Ahh! Bach! The wrinkle here is the DynaValidatorForm and not a regular ActionForm ...

Try this ...

<core:if test="${studentDetailsBasicForm.map.age > 20}">
        <p>do something</p>
</core:if>

For complete details ...

http://jakarta.apache.org/struts/api/org/apache/struts/action/DynaActionForm.html#getMap()

Bill Siggelkow

Lukas wrote:

Daniel,

What i'm trying to achieve is to use the <core:if> tag to conditionally show
some content based on a value of the form bean.

Something along the lines..

<core:if test="${studentDetailsBasicForm.age > 20}">
<p>do something</p>
</core:if>


where 'studentDetailsBasicForm' is the name of my form for the action of which
this jsp page is a view (a forward) and age is a property of that form. In this
case the form is a DynaValidatorActionForm.

I'm not in the office at the moment so the code is just from memory, but it
gives you the idea.

I guess i could use the bean:define to copy out each attribute of the bean, but
it doesn't seem very tidy.

Lukas


-----Original Message-----
From: Daniel Henrique Alves Lima [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 20 April 2004 10:52 p.m.
To: Struts Users Mailing List
Subject: Re: Getting the form bean on a page for use in a core tag

Lukas, i don't know if i understand your question, but:
Can you use <bean:define> to "access and rename" your bean so you can use it in a el expression ?


Lukas Hazlehurst wrote:


Hello,

I apologise if I've missed something obvious somewhere, but

I'm trying


to use a property of my form bean in a core tag, and I'm

just missing


how to refer to the form bean easily, since the constant

name has full


stops in it which I presume will muck up the el expression.

I've been looking thru my list archives and I can't seem to find any reference to the problem which probably means I'm missing the point somewhere, but any help would be appreciated.

Lukas


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






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


--- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.659 / Virus Database: 423 - Release Date: 15/04/2004




---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.659 / Virus Database: 423 - Release Date: 15/04/2004


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.659 / Virus Database: 423 - Release Date: 15/04/2004


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



Reply via email to