You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Asleson, Ryan" <as...@BIWORLDWIDE.com> on 2004/10/20 14:18:48 UTC

Map-backed action forms with JSTL tags

[This question was posted to taglib-user list also but I received no
responses.  My apologies for the cross post.]

Hello,

I have the following JSTL code fragment that is failing:


<c:if test="${empty form.mappedProperty[13]}">
<c:set target="${form}" property="mappedProperty[13]" value="newValue"/>
</c:if>


The "form" object has a method called getMappedProperty that takes a String
as the key and returns the appropriate value.  There is also a
setMappedProperty method that takes two Strings as parameters, the key and
new value, and sets the value.

Basically, in this instance I want the 13 to be passed to the
getMappedProperty method as a String parameter, just like Struts tags allow
when using parentheses in property value attributes.

This code is failing to compile -- at least, if fails on the c:if line.  I'm
trying to get this to work the way the Struts tags do, where any values that
appear in parentheses are assumed to be parameters to the underlying bean
property method.

How can I modify the above code so it does as I desire?  I figure it has to
be close.  


Thank you!!!



This e-mail message is being sent solely for use by the intended recipient(s) and may contain confidential information.  Any unauthorized review, use, disclosure or distribution is prohibited.  If you are not the intended recipient, please contact the sender by phone or reply by e-mail, delete the original message and destroy all copies. Thank you.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Java, J2EE,Struts requirement

Posted by Vicky <ja...@yahoo.com>.
Hello Group,

I am looking for a project in NY,NJ area. Let me know
if anyone know any open position in these two areas
for Java,J2EE,XML developer/architect.

Thanks,
Vicky


		
__________________________________ 
Do you Yahoo!? 
Check out the new Yahoo! Front Page. 
www.yahoo.com 
 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: xml treemenu in struts

Posted by Erik Weber <er...@mindspring.com>.
Well, if you draw the menu down the left rail, then it doesn't matter 
how shallow or deep it goes (whether directories are "folded" or 
"unfolded") -- the content area will remain in the same position (versus 
a horizontal menu across the top).

Also, if you use frames, clicks on the parent nodes could cause only a 
reload of the tree menu frame (showing and hiding directory contents), 
while clicks on the child nodes (pages) could cause a reload of the 
content area frame. This would save bandwidth versus a design that 
causes the whole page to reload for every click. But, even an entire 
page refresh can be OK depending on bandwidth and page size. I will say 
though that if you ever go to HTTPS protocol, using frames becomes more 
appealing, as even smaller pages can take a while to load because of all 
the encryption overhead. I have noticed some bill-paying sites using 
this technique lately -- the request protocol is HTTPS but only the 
center content frame is ever reloaded. Clicking stuff causes much less 
torture for the dialup user.

Perhaps the JSTL "x" tags could be of service as well in rendering your 
menu -- they provide XSL functions, for example, and all kinds of cool 
stuff.

Erik



Vicky wrote:

>I need to build tree menu from xml in struts. I want
>to avoid javascript as much as possible. Any pointers
>will be appreciated.
>
>Thanks,
>Vicky
>
>
>		
>__________________________________
>Do you Yahoo!?
>Yahoo! Mail Address AutoComplete - You start. We finish.
>http://promotions.yahoo.com/new_mail 
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>For additional commands, e-mail: user-help@struts.apache.org
>
>
>  
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


xml treemenu in struts

Posted by Vicky <ja...@yahoo.com>.
I need to build tree menu from xml in struts. I want
to avoid javascript as much as possible. Any pointers
will be appreciated.

Thanks,
Vicky


		
__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Map-backed action forms with JSTL tags

Posted by bm...@daimlerchrysler.com.






"Asleson, Ryan" <as...@BIWORLDWIDE.com> wrote on 10/20/2004 08:18:48 AM:

>
> [This question was posted to taglib-user list also but I received no
> responses.  My apologies for the cross post.]
>
> Hello,
>
> I have the following JSTL code fragment that is failing:
>
>
> <c:if test="${empty form.mappedProperty[13]}">
> <c:set target="${form}" property="mappedProperty[13]" value="newValue"/>
> </c:if>
>

Based on page 347 of JSTL in action try this...

<c:if test='${empty form.mappedProperty["13"]}'>


>
> The "form" object has a method called getMappedProperty that takes a
String
> as the key and returns the appropriate value.  There is also a
> setMappedProperty method that takes two Strings as parameters, the key
and
> new value, and sets the value.
>
> Basically, in this instance I want the 13 to be passed to the
> getMappedProperty method as a String parameter, just like Struts tags
allow
> when using parentheses in property value attributes.
>
> This code is failing to compile -- at least, if fails on the c:if line.
I'm
> trying to get this to work the way the Struts tags do, where any values
that
> appear in parentheses are assumed to be parameters to the underlying bean
> property method.
>
> How can I modify the above code so it does as I desire?  I figure it has
to
> be close.
>
>
> Thank you!!!
>
>
>
> This e-mail message is being sent solely for use by the intended
> recipient(s) and may contain confidential information.  Any
> unauthorized review, use, disclosure or distribution is prohibited.
> If you are not the intended recipient, please contact the sender by
> phone or reply by e-mail, delete the original message and destroy
> all copies. Thank you.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org