0

I am facing problem, rendering a commanlink from within a datatable. Here is my code

<h:form class="form-horizontal" rendered="#{ticketStatusController.role eq 'Coordinator'}">
        <h:dataTable value="#{taskListController.candidateUserTaskList}"    var="thisTask1" id="list" cellspacing="0" rowClasses="odd, even" styleClass="table table-striped table-bordered">
        <h:column><f:facet name="header">Name</f:facet><strong>#{thisTask1.name}</strong></h:column>
        <h:column><f:facet name="header">Description</f:facet>#{thisTask1.description}</h:column>
        <h:column><f:facet name="header">Actions</f:facet>
        <h:commandLink value="complete" action="#{taskListController.getFormKey(task)}" class="btn btn-small" style="margin-left:10px" >
        <f:param name="task" value="#{thisTask1}" />
        </h:commandLink>
            </h:column>
        </h:dataTable>
</h:form>

The outputlink is calling a method name getFormkey, Here is the code:

@Named("taskListController")
@RequestScoped

public class TicketStatusController implements Serializable {


public String getFormKey(Task task) {

//buisness logic 
  }

}

The commandlink, upon clicking, not going to the method, instead it shows #. What could be wrong here?

  • 1
    Have you gone through the list in [this question](http://stackoverflow.com/questions/2118656/commandlink-commandbutton-ajax-backing-bean-action-listener-method-not-invoked)? – kolossus Jan 05 '15 at 16:53
  • Tried the number 4 of the list, changed the scope to view scope, replaced the content of the getFormKey method within @PostConstruc public void init() method, still the commandlink is showing # . The implementation could be wrong, can you give some example ? – Abhidip Chowdhury Jan 06 '15 at 07:58

0 Answers0