IIRC it will--OGNL plays some games to try and do what it thinks you want to; I'm not what all the rules are, though.
--- On Wed, 8/27/08, Musachy Barroso <[EMAIL PROTECTED]> wrote: > From: Musachy Barroso <[EMAIL PROTECTED]> > Subject: Re: [S2] non intuitive OGNL value evaluation? > To: "Struts Users Mailing List" <user@struts.apache.org> > Date: Wednesday, August 27, 2008, 11:31 AM > Parameters are an array, so "parameters.eventoId" > is an String > array(hence "[Ljava.lang.String;@144c5bb"), to > get the actual value > you need to always do "parameters.eventoId[0]". > Are you sure that it > print "9" for the first one? > > musachy > > On Wed, Aug 27, 2008 at 11:15 AM, Gabriel Belingueres > <[EMAIL PROTECTED]> wrote: > > Hi, > > > > Please see this lines: > > > > <s:property > value='#parameters.eventoId'/><br/> > > <s:property value='%{"hello" + > #parameters.eventoId}'/><br/> > > <s:property value='%{"hello" + > #parameters.eventoId[0]}'/> > > > > Let's say that parameter eventoId == 9, it > outputs: > > > > 9 > > hello[Ljava.lang.String;@144c5bb > > hello9 > > > > The funny thing is that #parameters.eventoId' is > evaluated to String > > when it's alone (what I expected to be), but it is > evaluated to an > > String array when concatenated like in > "hello" + #parameters.eventoId. > > As expected, taking the first array element ([0]) > solves the problem. > > > > But the question is if this is OK to be this way, am I > building the > > OGNL expression wrongly, or is it some bug in the OGNL > evaluation > > code? > > > > Gabriel > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: > [EMAIL PROTECTED] > > For additional commands, e-mail: > [EMAIL PROTECTED] > > > > > > > > -- > "Hey you! Would you help me to carry the stone?" > Pink Floyd > > --------------------------------------------------------------------- > 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]