0

I'm using JSF 2.0 and I've a datatable which has columns filled from the database.One of the column in the datatable is set as commandLink and onclick it should redirect to a new page with the data related to the column value. I've tried in this way

<f:view>
 <h:form>
  <h:panelGrid >
  <h:column>
   <h:outputText value="Stu Number : "></h:outputText>
   <h:inputText maxlength="10" value="#{SDReports.sdReportBean.stuNumber}"/>
  </h:column>
  <h:column>
   <h:outputText value="Document No : "></h:outputText>
   <h:inputText id="delDocNum" value="#{SDReports.sdReportBean.docNum}"/>
   <h:commandButton value="..." onclick="javascript:popUp('DocNumList.jsp',this)" ></h:commandButton>
 </h:column>     
 <h:column>
  <h:commandButton value="Display" action="#{SDReports.getStatus}" > </h:commandButton>
 </h:column>
 </h:panelGrid>
 <br> 
 <h:dataTable id="d" value="#{SDReports.reportList}" var="deliveryList">
  <h:column>
   <f:facet name="header">
    <h:outputText style=""value="Document Number" />
   </f:facet>
   <h:form>
   <h:commandLink id = "itemBtn" value="#{deliveryList.documentNumber}" action="#{sdReportBean.showDeliveryInfo}">
     <f:param name="docNum" value="#{deliveryList.documentNumber}" />
   </h:commandLink></h:form>
  </h:column>
  <h:column>
   <f:facet name="header">
    <h:outputText style=""value="Sales Doc No" />
   </f:facet>
   <h:inputText disabled="true" value="#{deliveryList.salesDocNum}" ></h:inputText>
  </h:column>
  <h:column>
   <f:facet name="header">
    <h:outputText style=""value="Created On" />
   </f:facet>
    <h:inputText disabled="true" value="#{deliveryList.createdOn}" ></h:inputText>
   </h:column>
  </h:dataTable>
 </h:form>
</f:view>

In above code based on search criteria, the data table is filled with data, where in the first column is a commandLink which on click should open another page, which again holds some data based on the document number. When I'm trying to run the above code, there is no action taking place on the commandLink click.the respective bean for this is request scoped

Mango
  • 650
  • 2
  • 16
  • 38
  • 1
    You'll most probaby find an answer to you problem [here](http://stackoverflow.com/questions/2118656/hcommandlink-is-not-being-invoked). – Giorgos Dimtsas Aug 08 '11 at 10:01
  • I've tried making the bean session scoped also tried by avoiding multiple in the page but still couldnt resolve the problem – Mango Aug 08 '11 at 16:16

0 Answers0