I'm working on something a little bit like a data grid. However, while the
current display is tabular, the data backing it isn't. As a result I can't use
straight map notation to access the values to display.  For now I have a
inefficient helper lookup attached to the action, but I can't seem to get it
invoked.

The relevant portion of the jsp looks like

  <s:iterator value="competition.feeCategories" id="fee">
    <tr><th><s:property value="name" /></th></tr>
    <s:iterator value="competition.sessions" id="session">
      <tr>
        <td><s:property value="name" /></td>
                  <s:iterator value="competition.deadlines" id="deadline">
            <td><s:property value="#session.getDisplayPrice(#deadline,#fee)"
/></td> <!-- 1 -->
            <td><s:textfield
name="sessionMap[%{#session.id}][%{#deadline.id}][%{#fee.id}]"
                            
value="%{getSessionMarkup(#session,#fee,#deadline).costDeltaInCents}" /></td> 
<!-- 2-->
            <td>Studio Markup (%)</td>
          </s:iterator>
          </tr>
     </s:iterator>
   </s:iterator>


The action looks like:
public class ConfigurePrices extends ExcursionBase {
        public String execute() {
                return SUCCESS;
        }
        public StudioSessionPrice getSessionMarkup(Session session, 
CompetitionDeadline
deadline, FeeCategory fee) {
                for (StudioSessionPrice ssp: excursion.getSessionPrices()) {
                        if 
(ssp.getUnderlyingCompetitionSession().getSession().equals(session) &&
                                        
ssp.getUnderlyingCompetitionSession().getDeadline().equals(deadline) &&
                                        
ssp.getUnderlyingCompetitionSession().getFeeCategory().equals(fee))
                                return ssp;
                }
                StudioSessionPrice ssp = new StudioSessionPrice();
                ssp.setExcursion(excursion);
                
ssp.setUnderlyingCompetitionSession(session.getCSPfor(deadline,fee));
                ssp.setCostDeltaInCents(0L);
                ssp.setDeltaInPercent(0.0F);
                excursion.addSessionPrice(ssp);
                excursionRepository.save(excursion);
                return ssp;
        }
}

ExcursionBase implements ActionSupport; the jsp shown before is hooked up to the
INPUT result of the action.

The line preceding the <!-- 1 --> works properly, so I thought I knew how to
call functions with parameters in OGNL. The line around <!-- 2--> does not
work. The breakpoint just inside the function is not hit. However there are no
errors in the log. None of the iterator related objects respond to the
getSessionMarkup message and thus shouldn't be masking it from bubbling down to
the action.  What am I missing?

Thank you.

Eric

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

Reply via email to