D2W: named configurations in standard pages
Holzner Roman <[email protected]>
| Newsgroups | gmane.comp.web.webobjects.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi all
I'm new in developping in D2W and I'm having just a little question
about named configurations. With the WebAssistant i've created a new
pageConfiguration called testConfiguration on a BASInspectPage. The
task is edit, the entity is called Customer and the look is the
BasicLook. So the WebAssistant made me the following rules
pageConfiguration = 'testConfiguration' => task = edit [100]
pageConfiguration = 'testConfiguration' => entity = Customer
(com.webobjects.directtoweb.EntityAssignment)[100]
pageConfiguration = 'testConfiguration' => look = BasicLook"
To make the configuration visible, I changed the background-color of
this page to #84d0f5 (also created witht the WebAssistant). That
added me the following to the rules file:
pageConfiguration = 'testConfiguration' => backgroundColorForTable
= #84d0f5
So far so good. But when I start my application then, it only
displays the standart BASInspectpage. It does not fire any of my
pageConfigurations rules. :(
Then I tried out what happens when I setted the following rule:
task='edit' and entity.name = 'Customer' => pageConfiguration =
"testConfiguration"
(if I take also the look into this rule the application exits after a
while when I come to this page, what seems to be a kind of feedback)
And what a "mirical", the application changed it's backgroud-color
on that page. I can explain me that fact, because I store the value
for the key "pageConfiguration" directly in the D2WContext, but I
can't believe, that there's no easier solution. Especially because no
book or document writes anything about that.
I know, that I can use the pageConfiguration programatically by
writing D2W.factory().pageConfigurationNamed
("testConfiguration",session()), but in this case I can't make any
changes on the BASInspectPage and I think it does not really make
sense to create a new page only to use pageConfigurations.
So could anybody say me, if that what I do is ok? Or how else can I
use pageConfigurations in standard pages?
I'm curious about your answers
Roman