Grzegorz Kossakowski wrote:
Kamal Bhatt pisze:
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.

That's interesting. Have you tried whether

  <jx:out value="${form.getChild('invisibleField')}"/>

Returns something?
Yes it does. "Field 'promotion.invisibleField'"

Now, something I could have made clearer is that this:

${form.getChild('validity_work').getState() != form.getChild('invisibleField').getState()}

works perfectly, and I am using Cocoon 2.1.11. I will investigate further, but as I have a work around (even if it is a pretty ugly one), I will not be making it a top priority.

Thanks for all the help thus far.

If it does, I guess only debugging may help. You can find some tips here:
http://cocoon.apache.org/1301_1_1.html
http://article.gmane.org/gmane.text.xml.cocoon.devel/77857



--
Kamal Bhatt


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to