Robin Wyles wrote:
Hi,
Maybe try:
${form.getChild('validity_work').getState().equals(WidgetState.INVISIBLE)}
Nope, sorry.
I have tried to do this:
<jx:set var="invisible"
value="#{org.apache.cocoon.forms.formmodel.WidgetState.stateForName('invisible')}"/>
<jx:out value="${invisible}"/>
!!<jx:out value="${form.getChild('invisibleField').getState()}"/>!!
??<jx:out value="${form.getChild('validity_work').getState()}"/>??
What I get is this:
WidgetState[invisible=1] !!!! ????
Now, validity_work is the field I want to test, invisibleField is the
field that I am using to test invibility. Neither prints a value, yet, I
can test both. This is starting to look like a bug.
Also, if you don't have it already you will need to have:
importClass(org.apache.cocoon.forms.formmodel.WidgetState)
Already done.
at the top of the flowscript that calls your JXTemplate.
Robin
On 27 May 2008, at 09:41, Kamal Bhatt wrote:
Hi,
I would like to determine if a particular field is invisible in
JXTemplates, unfortunately, if I do
${form.getChild('validity_work').getState() ==
WidgetState.INVISIBLE}, it doesn't work.
I have to setup an invisible field and compare the state against that
field. Is there a way I can achieve this test without adding a
pointless field or comparing an arbitary field?
Cheers.
--
Kamal Bhatt
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Kamal Bhatt
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]