Please keep related messages within the same thread and try to avoid re-posting a question without the context of any prior discussion. See below for another suggestion:

Wei Xu wrote:
First, you can look through next jsp codes:

<s:iterator status="stat" value="destObjects">
<tr>
  <s:iterator value="visibleColumns">
    <td>
      <s:property value="destObjects[%{#stat.index}].%{fieldDefName}" />
    </td>
  </s:iterator>
</tr>
</s:iterator>

Why do the indexing into destObjects manually when s:iterator is already doing it for you? How about something like this:

  <s:iterator id="do" value="destObjects">
  <tr>
    <s:iterator value="visibleColumns">
      <td>
        <s:property value="%{#do[fieldDefName]}"/>
      </td>
    </s:iterator>
  </tr>
  </s:iterator>

or, being a little more explicit if you prefer:

  <s:iterator id="do" value="destObjects">
  <tr>
    <s:iterator id="vc" value="visibleColumns">
      <td>
        <s:property value="%{#do[#vc.fieldDefName]}"/>
      </td>
    </s:iterator>
  </tr>
  </s:iterator>

ALL could not work:

<s:property value="destObjects[%{#stat.index}].%{fieldDefName}" />
<s:property value="%{destObjects[#stat.index].%{fieldDefName}}" />
<s:property value="%{fieldDefName}" />

The first two don't look like valid OGNL expressions to me; I don't know OGNL very well, but I wouldn't expect it to support nested expressions (%{...%{...}...}).

L.


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

Reply via email to