Re: Problem with webobject attributes in WOBuilder
Re: Problem with webobject attributes in WOBuilder
- Subject: Re: Problem with webobject attributes in WOBuilder
- From: "John Stewart" <email@hidden>
- Date: Wed, 14 Jun 2006 12:54:45 +0100
OK, I've refined down what I'm trying to do.
I'd like to keep this as MVC as possible, so the Java code should not
deal directly with the alternative styles, though It will provide the
logic to select the styles.
The simplest version of this is a straight boolean describing "open"
or "closed" styles. The java code can, say, provide a boolean
"isOpen".
If I create a ul wrapper "styleContainer" as below, I'd like to
include the "open" or "closed" styles, as well as a common "clear"
style.
The output would be of the form:
<!-- isOpen = true: -->
<ul class="clear open">
<li>...</li>
</ul>
<!-- isOpen = false: -->
<ul class="clear closed">
<li>...</li>
</ul>
Any ideas how I might do this without providing explicit class strings
in Java? Can a WOConditional be nested inside a WOGenericContainer
definition?
I could wrap the two versions inside two WOConditionals, but then it
would mean duplicating the whole list.
To further complicate things, what if I want more than 2 alternative
styles, e.g. fed by an integer instead of a boolean?
Or is this one of WO's limitations where I have to include style names
in the Java code?
John
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden