0 Replies Latest reply on Oct 31, 2005 11:29 PM by wang haiwen

    Use JSTL not response!

    wang haiwen Newbie



      use "<c:when ..." not response

      session scope "borrowUpdate"
      use #{borrowUpdate.taskID} can response
      but use "<c:when test="${borrowUpdate.taskID=='check'}" not response
      use <c:out value="${borrowUpdate.taskID}"> print nothing!

      <%@ page session="false" contentType="text/html;charset=GBK"%>
      <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
      <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
      <%@ taglib uri="../WEB-INF/tld/tomahawk.tld" prefix="t"%>
      <%@ taglib uri="../WEB-INF/tld/c.tld" prefix="c" %>
      <%@ page isELIgnored ="false" %>
      <html>
      <head>
       <meta HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=GBK" />
       <title>?????</title>
       <link rel="stylesheet" type="text/css" href="../css/basic.css" />
      </head>
      <body>
      <f:view>
       <table align="center">
       <tr valign="middle" align="center">
       <td valign="middle" align="center">
       <table>
       <tr valign="middle">
       <td>
       <h:form id="foo">
       <t:tree2 id="clientTree" value="#{borrowUpdate.taskTree}" var="node" varNodeToggler="t">
       <f:facet name="person">
       <h:panelGroup>
       <f:facet name="expand">
       <t:graphicImage value="../images/yellow-folder-open.png" rendered="#{t.nodeExpanded}" border="0"/>
       </f:facet>
       <f:facet name="collapse">
       <t:graphicImage value="../images/yellow-folder-closed.png" rendered="#{!t.nodeExpanded}" border="0"/>
       </f:facet>
       <h:outputText value="#{node.description}" styleClass="nodeFolder"/>
       </h:panelGroup>
       </f:facet>
       <f:facet name="foo-folder">
       <h:panelGroup>
       <f:facet name="expand">
       <t:graphicImage value="../images/yellow-folder-open.png" rendered="#{t.nodeExpanded}" border="0"/>
       </f:facet>
       <f:facet name="collapse">
       <t:graphicImage value="../images/yellow-folder-closed.png" rendered="#{!t.nodeExpanded}" border="0"/>
       </f:facet>
       <h:outputText value="#{node.description}" styleClass="nodeFolder"/>
       <h:outputText value=" (#{node.childCount})" styleClass="childCount" rendered="#{!empty node.children}"/>
       </h:panelGroup>
       </f:facet>
       <f:facet name="bar-folder">
       <h:panelGroup>
       <f:facet name="expand">
       <t:graphicImage value="../images/blue-folder-open.gif" rendered="#{t.nodeExpanded}" border="0"/>
       </f:facet>
       <f:facet name="collapse">
       <t:graphicImage value="../images/blue-folder-closed.png" rendered="#{!t.nodeExpanded}" border="0"/>
       </f:facet>
       <h:outputText value="#{node.description}" styleClass="nodeFolder"/>
       <h:outputText value=" (#{node.childCount})" styleClass="childCount" rendered="#{!empty node.children}"/>
       </h:panelGroup>
       </f:facet>
       <f:facet name="document">
       <h:panelGroup>
       <t:commandLink action="#{borrowUpdate.doSearch}" immediate="false" styleClass="#{t.nodeSelected ? 'documentSelected':'document'}" actionListener="#{t.setNodeSelected}">
       <t:graphicImage value="../images/document.png" border="0"/>
       <h:outputText value="#{node.description}"/>
       <t:updateActionListener property="#{borrowUpdate.taskID}" value="#{node.identifier}" />
       </t:commandLink>
       </h:panelGroup>
       </f:facet>
       </t:tree2>
       </h:form>
       </td>
       </tr>
       </table>
       </td>
       <td valign="top" align="center">
       <table>
       <tr>
       <td>
       <h:form>
       <h:commandButton value="?????" styleClass="formButton" action="addborrow" />
       </h:form>
       </td>
       </tr>
       <tr valign="middle">
       <td>
       <h:form>
       <h:panelGroup>
       <t:dataTable id="data"
       styleClass="scrollerTable"
       headerClass="standardTable_Header"
       footerClass="standardTable_Header"
       rowClasses="standardTable_Row1,standardTable_Row2"
       columnClasses="standardTable_Column,standardTable_ColumnCentered,standardTable_Column"
       var="_borrow"
       preserveDataModel="false"
       value="#{borrowUpdate.borrowList}"
       rows="10"
       >
       <h:column>
       <f:facet name="header">
       <h:outputText value="?????"></h:outputText>
       </f:facet>
       <h:outputText value="#{_borrow.brBillID}"></h:outputText>
       </h:column>
       <h:column>
       <f:facet name="header">
       <h:outputText value="????"></h:outputText>
       </f:facet>
       <h:outputText value="#{_borrow.payItem.itemName}"></h:outputText>
       </h:column>
       <h:column>
       <f:facet name="header">
       <h:outputText value="? ?"></h:outputText>
       </f:facet>
       <h:outputText value="#{_borrow.dept.deptName}"></h:outputText>
       </h:column>
       <h:column>
       <f:facet name="header">
       <h:outputText value="????"></h:outputText>
       </f:facet>
       <h:outputText value="#{_borrow.brMoney}"></h:outputText>
       </h:column>
       <h:column>
       <f:facet name="header">
       <h:outputText value="????"></h:outputText>
       </f:facet>
       <h:outputText value="#{_borrow.brDate}"></h:outputText>
       </h:column>
       <h:column>
       <f:facet name="header">
       <h:outputText value="? ?"></h:outputText>
       </f:facet>
       <h:outputText value="? ?"></h:outputText>
       </h:column>
       <h:column>
       <f:facet name="header">
       <h:outputText value="testt"></h:outputText>
       </f:facet>
       <c:out value="${borrowUpdate.taskID}" />
       </h:column>
      
       <c:choose>
       <c:when test="${sessionScope.borrowUpdate.taskID}">
       <h:column>
       <f:facet name="header">
       <h:outputText value="? ?" />
       </f:facet>
       <h:commandLink action="borrowupdate" immediate="false">
       <h:outputText value="? ?" />
       <t:updateActionListener property="#{borrowUpdate.parabrBillID}" value="#{_borrow.brBillID}" />
       </h:commandLink>
       </h:column>
       <h:column>
       <f:facet name="header">
       <h:outputText value="? ?" />
       </f:facet>
       <h:commandLink action="#{borrowUpdate.removeBorrow}" immediate="true">
       <h:outputText value="? ?" />
       <t:updateActionListener property="#{borrowUpdate.parabrBillID}" value="#{_borrow.brBillID}" />
       </h:commandLink>
       </h:column>
       </c:when>
       <c:when test="${borrowUpdate.taskID == 'check'}">
       <h:column>
       <f:facet name="header">
       <h:outputText value="check Exception" />
       </f:facet>
       <h:outputText value="#{borrowUpdate.taskID}" />
       </h:column>
       </c:when>
       <c:when test="${borrowUpdate.taskID=='acct'}">
       <h:column>
       <f:facet name="header">
       <h:outputText value="acct Exception" />
       </f:facet>
       <h:outputText value="#{borrowUpdate.taskID}" />
       </h:column>
       </c:when>
       <c:otherwise>
       <h:column>
       <f:facet name="header">
       <h:outputText value="other Exception" />
       </f:facet>
       <h:outputText value="#{borrowUpdate.taskID}" />
       </h:column>
       </c:otherwise>
       </c:choose>
       </t:dataTable>
       <h:panelGrid columns="1" styleClass="scrollerTable2" columnClasses="standardTable_ColumnCentered" >
       <t:dataScroller id="scroll_1"
       for="data"
       fastStep="10"
       pageCountVar="pageCount"
       pageIndexVar="pageIndex"
       styleClass="scroller"
       paginator="true"
       paginatorMaxPages="9"
       paginatorTableClass="paginator"
       paginatorActiveColumnStyle="font-weight:bold;"
       >
       <f:actionListener type="govfms.myfaces.DataScrollerActionListener"/>
       <f:facet name="first" >
       <t:graphicImage url="../images/arrow-first.gif" border="1" />
       </f:facet>
       <f:facet name="last">
       <t:graphicImage url="../images/arrow-last.gif" border="1" />
       </f:facet>
       <f:facet name="previous">
       <t:graphicImage url="../images/arrow-previous.gif" border="1" />
       </f:facet>
       <f:facet name="next">
       <t:graphicImage url="../images/arrow-next.gif" border="1" />
       </f:facet>
       <f:facet name="fastforward">
       <t:graphicImage url="../images/arrow-ff.gif" border="1" />
       </f:facet>
       <f:facet name="fastrewind">
       <t:graphicImage url="../images/arrow-fr.gif" border="1" />
       </f:facet>
       </t:dataScroller>
       </h:panelGrid>
       </h:panelGroup>
       </h:form>
      
       </td>
       </tr>
       </table>
       </td>
       </tr>
       </table>
      </f:view>
      </body>
      </html>