Hi,

Pls use <s:select list="loanPurposeList"headerKey="default " headerValue="Choose Loan Purpose "/>

Regards,
Ahmad

On Thursday 21 June 2012 04:06 AM, Craig Music wrote:
Greetings,

In my deployment, using Struts 2.3.1.2 and 2.3.4 on top of OC4J latest I've
had a problem where after my application runs some time (indeterminate), a
simple, properly formatted and correct syntax iterator tag call to get some
enum values will top working, initially it worked and rendered just fine
but after running sometime it returns different values. Specifically, I
mean that the code to create a simple dropdown below , driven by an
ArrayList of enums will stop showing N options with proper labels and
values and will change to show N options but with incorrect values and
empty labels.

<select>
<option value="default">-Choose Loan Purpose-</option>
<s:iterator id="s" value="getLoanPurposeList()">
  <option value="<s:property value="toString()" />"><s:property
value="getLabel()" /></option>
  </s:iterator>
</select>

The above code will go from outputting
<option value="business">Business</option>
to outputting
<option
value="tlc.ui.action.registration.borrower.borrowerc.ApplyForALoan@2220eeec
"></option>

However, after the server gets into this 'incorrect state' if i modify the
jsp and change from<s:property value="toString()" />  to<s:property
value="#s.toString()" />   and<s:property value="getLabel()" />
to<s:property value="#s.getLabel()" />things go back to outputting the
expected. Note the addition of the #s.

Re-starting my deployment will also fix the issue, after restarting I get
the expected values in the dropdown no problem.
Also tlc.ui.action.registration.borrower.borrowerc.ApplyForALoan is the
action class driving the action in question.

It seems the Value Stack is getting corrupted since the<s:property
value="toString()" />  looks like it's referencing the action class itself
instead of the next value in the iterator.

Any pointers or suggestions would be greatly appreciated. I believe the
problem is not "adding #s (iterator id) to all iterator calls" since this
is a symptom of a larger issue, some sort of partial Value Stack corruption
of some sort.

Thanks,
Craig

<pre><br><font size="2" color="gray" face="times new roman">  DISCLAIMER:  The information transmitted is intended only 
for the person or entity to<br>which it is addressed and may contain confidential and/or privileged material.  Any<br>review, retransmission, dissemination 
or other use of, or taking of any action in reliance<br>upon this information by persons or entities other than the intended recipient is<br>prohibited. If 
you received this in error, please contact the sender and destroy any copies of<br>this document and any attachments.</font></pre>


Reply via email to