struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Affan Qureshi" <quere...@etilize.com>
Subject [OT] Re: A <bean:define> question
Date Wed, 02 Apr 2003 03:36:31 GMT
Isn't the scriplet free version more confusing/cryptic than the scriplet
one? I know we should avoid scriplets 110% in JSPs but what about cases
where it can save some confusion of five tags to do a simple thing?

The reason to avoid scriplets is to allow seperation of page designers and
developers dependancies but the poor page designer won't make much sense out
of either of them in this case i think and its better to give him one line
of confusion than 5.

Intersted to know your comments.

Regards,
Affan

----- Original Message -----
From: "James Mitchell" <jmitchell@apache.org>
To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
Sent: Wednesday, April 02, 2003 12:21 AM
Subject: Re: A <bean:define> question


> ....or using the scriptlet-free version
>
> <bean:parameter id="myparam" name="httpParameter"/>
>
> <bean:define id="msgKey">
>  <bean:write name="myparam"/>.name
> </bean:define>
>
> <bean:define id="varName">
>  <bean:message name="msgKey"/>
> </bean:define>
>
> <bean:write name="varName"/>  <-- remove this unless you just want to
print
> it out on the page
>
>
>
> --
> James Mitchell
> Software Developer/Struts Evangelist
> http://www.open-tools.org
>
>
>
> ----- Original Message -----
> From: "Karr, David" <David.Karr@wamu.net>
> To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
> Sent: Tuesday, April 01, 2003 11:14 AM
> Subject: RE: A <bean:define> question
>
>
> > This might work:
> >
> > <bean:define id="varName">
> > <bean:message key='<%= request.getParameter("httpParameter") +
> >                              ".name" %>'/>
> > </bean:define>
> >
> > > -----Original Message-----
> > > From: Binaghi Mauro [mailto:mauro.binaghi@vtin.it]
> > >
> > > Hi
> > > I have the "user.name" property in my "ApplicationResource.properties"
> > > file.
> > > Can I take its value with the following instrucition in my JSP page?
> > >
> > > <bean:define id="varName">
> > > <bean:message key="<%= request.getParameter("httpParameter")
> > > %>.name"/>
> > > </bean:define>
> > >
> > > Of course, I call my JSP with this URI
> > "/myPage.jsp?httpParameter=user"
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>


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


Mime
View raw message