Page 1 of 1

navigation error in datatable with p:commandLink ..

Posted: 14 Dec 2010, 15:45
by atamer
Hello
It is very strange that anybody pointed this error but here is my nightmare

<h:form id="showSurvey">

<p:dataTable var="personelSurvey" value="#{flightPersonelListBean.personelSurveyList}"
emptyMessage="Uygun Anket Personeli Bulunamadi">
<f:facet name="header">
Uçus Personeli
</f:facet>



<p:column headerText="Anket Tipi">
<h:selectOneMenu value="#{showSurveyBean.anketTipi}" >
<f:selectItems value="#{personelSurvey.anketTipiList}" />
</h:selectOneMenu>
</p:column>

<p:column headerText="">
<h:commandLink value="Anketi Çöz" action="#{showSurveyBean.showSurvey}">
<f:param name="personelFlightId" value="#{personelSurvey.personelFlightId}" />
</h:commandLink>
</p:column>

<f:facet name="footer">

</f:facet>

</p:dataTable>

It is a very basic datatable and there is a commandlink in each row , however it is not navigating to my desired page
here is my faces-config


<?xml version="1.0" encoding="utf-8"?>
<faces-config xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-f ... ig_2_0.xsd"
version="2.0">

<application>
<el-resolver>org.springframework.web.jsf.el.SpringBeanFacesELResolver</el-resolver>
<locale-config>
<default-locale>tr</default-locale>
<supported-locale>tr</supported-locale>
</locale-config>
<message-bundle>i18n.errors</message-bundle>
<resource-bundle>
<base-name>i18n.messages</base-name>
<var>messages</var>
</resource-bundle>
</application>

<navigation-rule>
<from-view-id>/base/home.xhtml</from-view-id>
<navigation-case>
<from-outcome>
takesurvey
</from-outcome>
<to-view-id>
/base/personel_survey_list.xhtml
</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>
showsurvey
</from-outcome>
<to-view-id>
/base/show_survey.xhtml
</to-view-id>
</navigation-case>
</navigation-rule>

<navigation-rule>
<from-view-id>/base/personel_survey_list.xhtml</from-view-id>
<navigation-case>
<from-outcome>
showsurvey
</from-outcome>
<to-view-id>
/base/show_survey.xhtml
</to-view-id>
</navigation-case>
</navigation-rule>

<lifecycle>
<phase-listener>com.thy.backend.phase.NoCachePhaseListener</phase-listener>
</lifecycle>
</faces-config>


It is very strange that after I added this line end of my form , it started to work
<p:commandButton value="" style="visibility: hidden" action="#{showSurveyBean.showSurvey}" ajax="false" />

i think there is someting very wrong in datatable, ????

Re: navigation error in datatable with p:commandLink ..

Posted: 08 Jan 2011, 01:24
by WolinDesign
Did you figure this out? I have a datatable with a commandLink that won't navigate to my desired page and I'm not finding anything in the Forum questions that solve my problem. Any solution you found might help me. Thanks!

Re: navigation error in datatable with p:commandLink ..

Posted: 22 Mar 2011, 18:51
by anzap
Exactly same problem here. Using p:commandLink or h:commandLink in p:datatable makes no difference.

Re: navigation error in datatable with p:commandLink ..

Posted: 21 Apr 2011, 18:47
by akahky
exactly the same error, commandLink or commandButton action never called primcefaces 2.2.1 and mojarra 2.1.0.
The commandLink has a javascript.void(0)

Re: navigation error in datatable with p:commandLink ..

Posted: 21 Apr 2011, 19:13
by cagatay.civici
Works for me;

Code: Select all

<p:column>
                        <f:facet name="header">
								Color
                        </f:facet>
                        <h:commandLink action="#{tableBean.navigate}">
                            <h:outputText value="#{car.color}" />
                        </h:commandLink>
                    </p:column>

Code: Select all

public String navigate() {
        return "home";
    }
Used;

http://www.primefaces.org/showcase/ui/d ... eBasic.jsf