navigation error in datatable with p:commandLink ..

UI Components for JSF
Post Reply
atamer
Posts: 8
Joined: 14 Dec 2010, 15:38

14 Dec 2010, 15:45

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, ????

WolinDesign
Posts: 36
Joined: 21 Oct 2010, 22:47

08 Jan 2011, 01:24

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!
Sean - WDG
PF 2.2 JSF 2.0 NetBeans 6.9.1 Glassfish 3.0.1 Mojarra 2.0.3

anzap
Posts: 2
Joined: 22 Mar 2011, 18:49

22 Mar 2011, 18:51

Exactly same problem here. Using p:commandLink or h:commandLink in p:datatable makes no difference.
Primefaces v4.0
JSF Mojarra v2.1.23
JBoss v7.2

akahky
Posts: 1
Joined: 21 Apr 2011, 18:40

21 Apr 2011, 18:47

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)

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

21 Apr 2011, 19:13

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

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 23 guests