On 2004-03-18 at 15:10:47 +0100, Mark Lowe wrote:
> try
> 
>  <html-el:text name="mappedTest" property="testPrimKey(${ctr})" />
doesnt exist in struts 1.1,right?
should be evaluated anyway...
i tried now
 <html:text name="mappedTest" property='testPrimKey[0]' />
-> still
 <input type="text" name="testPrimKey[0]" value="" />
 
should that version work? if so it doesnt seem to be the EL part which is
amiss.

> 
> 
> 
> 
> On 18 Mar 2004, at 14:49, Axel Gro� wrote:
> 
> >Hi Mark!
> >
> >thanks for your answer
> >>>   <td>testPrimKey[${ctr}]</td>
> >evaluates to as it should to testPrimKey[0], testPrimKey[1]..
> >( i did a stupid mistake in my code ),
> >
> >On 2004-03-18 at 13:25:22 +0100, Mark Lowe wrote:
> >>${testPrimKey[ctr]}
> >that actually evaluates to nothing
> >but ${mappedTest.testPrimKey[ctr]}
> >gets the right result
> >
> >BUT my original intention (to use it with html:struts) still fails, 
> >because
> >the tag doesnt populate the value for the indexed property:
> >without using the indexed property:
> > <html:text name="mappedTest" property='testPrimKey'></html:text>
> >-> is as expected:
> > <input type="text" name="testPrimKey" value="[Ljava...{right object 
> >reference}" />
> >
> >with using the indexed property
> > <html:text name="mappedTest" property='testPrimKey[${ctr}]' />
> >-> doesnt put value attribute:
> > <input type="text" name="testPrimKey[0]" value="" />
> > <input type="text" name="testPrimKey[1]" value="" />
> > ...
> >
> >if anybody could help me with that one, i'd be relieved
> >thanks,
> >axel
> >
> >>
> >>or perhaps with the wrappers
> >>
> >><c:set var="key" value="${testPrimKey[ctr]}" />
> >>${key}
> >>
> >> what does that do?
> >>
> >>
> >>On 18 Mar 2004, at 12:46, Axel Gro� wrote:
> >>
> >>>hi all!
> >>>
> >>>while trying to figure out how indexed/mapped properties work I get
> >>>some strange
> >>>behaviour - I'm pretty sure this doesn't conform to standard (hope 
> >>>I'm
> >>>mistaken):
> >>><logic:iterate id="foo" indexId="ctr" name="mappedTest"
> >>>property="testPrimKey">
> >>> <tr>
> >>>   <td>${foo}</td>
> >>>   <td>${ctr}</td>
> >>>   <td>testPrimKey[${ctr}]</td>
> >>> </tr>
> >>></logic:iterate>
> >>>
> >>>evaluates to:
> >>> <tr>
> >>>   <td>k1</td>
> >>>   <td>0</td>
> >>>   <td>testPrimKey[]</td>
> >>> </tr>
> >>> <tr>
> >>>   <td>k2</td>
> >>>   <td>1</td>
> >>>   <td>testPrimKey[]</td>
> >>> </tr>
> >>> ...
> >>>
> >>>where the k1, k2.. are the expected values of key "testPrimKey" in 
> >>>the
> >>>HashMap put under "mappedTest" in the PageContext
> >>>BUT ${ctr} gets evaluated to different values
> >>>
> >>>I'm using struts1.1 and tomcat 5.0.19
> >>>so whose wrong?
> >>>me or the result ???
> >>>
> >>>thanks for enlightenment!
> >>>Axel
> >>>
> >>>---------------------------------------------------------------------
> >>>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]
> >>
> >>
> >
> >---------------------------------------------------------------------
> >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]
> 
> 

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

Reply via email to