trying to create

                  Hrs
Loans           2
Deposits       3
Total            5

Using struts, displaytag, JSTL to do the same.

Using the below code. The second column is getting the textfields with values in them but displays "???" before and after the textfield (question marks)

Not sure why is that?  below is the code I am trying to use.

Also, would like to add the rows 1 and 2 and put the value in the 3rd row. Ofcourse we can do this using javascript. But, can displaytag do that for us? there is an example for grouping. But did get how to use the same.


<display:table name="${HrsWs}" id="rows" requestURI="HoursAction.do" class="small">

<bean:define id="loans"><html:text name="hoursForm" property="loansws"/></bean:define>

<bean:define id="deposits"><html:text name="hoursForm" property="depositsws"/></bean:define>

<bean:define id="total"><bean:write name="hoursForm" property="totalws"/></bean:define>


        <c:choose>
        <c:when test="${rows_rowNum == 1}" >
                <c:set var="rowTitle" value="lbl.loans" scope="page" />
                <c:set var="rowValue" value="${loans}" scope="page" />
        </c:when>
        <c:when test="${rows_rowNum == 2}" >
                <c:set var="rowTitle" value="lbl.deposits" scope="page" />
                <c:set var="rowValue" value="${deposits}" scope="page" />
        </c:when>
        <c:when test="${rows_rowNum == 3}" >
               <c:set var="rowTitle" value="lbl.total" scope="page" />
               <c:set var="rowValue" value="${total}" scope="page" />
       </c:when>

        </c:choose>

        <!-- First Column creation -->
        <fmt:setBundle var="appbundle" basename="MessageResources"/>

        <display:column titleKey="lbl.empty">
                <fmt:message key="${rowTitle}" bundle="${appbundle}"/>
        </display:column>

        <!-- Second Column creation -->
        <display:column titleKey="lbl.hrs">
                <fmt:message key="${rowValue}" />
        </display:column>
</display:table>

Is there a better way of doing this?
This forum has been real helpfull for me.


Thanks.

_________________________________________________________________
Don’t just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
displaytag-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/displaytag-user

Reply via email to