Hi Friends
I am having trouble in calling the action method from command link inside datatable.
The code of the DataTable is
<h:dataTable id="siteDetailTable1" value="#{siteRequirementBean.detailHeadQuarterList}" var="details" cellpadding="1" cellspacing="1" width="100%">
<h:column>
<h:panelGrid columns="1" width="100%" columnClasses="none,tableRowOdd" rowClasses="tableRowEven,tableRowOdd">
<h:panelGroup>
<h:outputText value="Name: " />
<h:outputText value="#{details.name}" style="width: 55%" />
</h:panelGroup>
<h:panelGroup>
<h:outputText value="Location: " />
<h:outputText value="#{details.location}" style="width: 55%" />
</h:panelGroup>
<h:panelGroup>
<h:outputText value="Description: " />
<h:outputText value="#{details.description}" style="width: 55%" />
</h:panelGroup>
</h:panelGrid>
</h:column>
<h:column>
<h:commandLink action="#{requirementDisplay.viewDetailedRequirement}">
<h:outputText value="VDR" />
</h:commandLink>
</h:column>
</h:dataTable>
The managed beans siteRequirementBean & requirementDisplay both are in request scope.
The datatable has two columns. In the first column there 3 labels which displays some information. In the second column there is a command link. This command link is binded with an action method of managed bean. The page gets displayed with all the components including the commandlink , but on clicking the command link the action method is not getting called. The page gets refreshed & comes back again.
Infact I tried putting in arbitrary
string in the action method�s name attribute of command link. There was no error & the page came back again on clicking the link.
If the same command link is kept outside data table then the action method gets called.
Command Button also shows the same behavior as command link.
Please give your valuable inputs�..
Thanks in Advance
Amit