Action of commandButton in facet in timeline not working
Posted: 15 Oct 2014, 09:25
Hi @ all!
I searched in the forum but found nothing; hope I don't miss it.
At first I apologize for my possibly bad english, I do not write often in that language.
Okay, here I go:
We use the timeline of PrimefacesExtensions in our project, which is great! Thank you for that!
In the facet which to use for grouping the events, I wanted to use p:commandButtons.
The actions of these buttons unfortunately aren't working properly, or I miss smt.
Here's the code of the xhtml:
The question/problem is:
Everywhere the "group" (=varGroup) is used, it works. But not as parameter in the action of the commandButtons.
(action="#{dispoBeanPF.toggleVehicleVisibility(group)}" And action="#{dispoBeanPF.toggleVehicleAvailability(group)}")
Oh, I also tried to pass not the group itself but group.id, which is a String like in the showcase, also don't worked.
However when I hardcode the passing argument in the action, like a fixed id ("123" for example), it works!
I don't understand why the id of the group is shown correctly in the h:outputText, where I use it as value.
But when i pass it in the method of the action, it is always null (or empty String when using group.id) in the Bean.
I tested that with PF 5.0 and 5.1, Extensions 2.0 and 2.1, same problem.
"Unfortunately" I still have to use Glassfish 3.1.1.
Having a glance at Firebug, the XML-Section of the Post says:
XML-Verarbeitungsfehler: nicht wohlgeformt Adresse: moz-nullprincipal:{4ad69840-e567-4857-82ce-7f2b7278ca29} Zeile Nr. 2, Spalte 1770:
...form_tabs_toggleVisibilityButton\"});\n\/\/]]>\n<\/script><\/td>\n<\/tr>\n<tr...
...-------------------------------------------------^
So the XML isn't well-formed...
Any ideas where the problem is?
Or do only I don't get it?
Greetings!
I searched in the forum but found nothing; hope I don't miss it.
At first I apologize for my possibly bad english, I do not write often in that language.
Okay, here I go:
We use the timeline of PrimefacesExtensions in our project, which is great! Thank you for that!
In the facet which to use for grouping the events, I wanted to use p:commandButtons.
The actions of these buttons unfortunately aren't working properly, or I miss smt.
Here's the code of the xhtml:
Code: Select all
<p:tab id="dispoTab" title="Disposition">
<pe:timeline id="timeline"
value="#{dispoBeanPF.timelineModel}"
var="order"
varGroup="group"
editable="true"
...
widgetVar="timelineWdgt"
...>
<p:ajax .../>
...
<f:facet name="group">
<h:panelGrid columns="2">
<h:panelGrid columns="1" style="border-collapse: collapse;">
<p:commandButton icon="ui-icon-power" id="toggleVisibilityButton"
action="#{dispoBeanPF.toggleVehicleVisibility(group)}"
update=":main-form:tabs:timeline"
process="@this">
</p:commandButton>
<p:commandButton icon="ui-icon-wrench" id="toggleAvailabilityButton"
action="#{dispoBeanPF.toggleVehicleAvailability(group)}"
update=":main-form:tabs:timeline"
process="@this">
</p:commandButton>
</h:panelGrid>
<h:panelGrid columns="2">
<h:outputText value="LKW:" style="font-weight:bold;"/>
<h:outputText value="#{group.licenceTag}" />
<h:outputText value="ID:" style="font-weight:bold;"/>
<h:outputText value="#{group.id}"/>
</h:panelGrid>
</h:panelGrid>
</f:facet>
<h:panelGrid id="timelineEventTextGrid">
<h:outputText .../>
...
</h:panelGrid>
</pe:timeline>
...
</p:tab>
Everywhere the "group" (=varGroup) is used, it works. But not as parameter in the action of the commandButtons.
(action="#{dispoBeanPF.toggleVehicleVisibility(group)}" And action="#{dispoBeanPF.toggleVehicleAvailability(group)}")
Oh, I also tried to pass not the group itself but group.id, which is a String like in the showcase, also don't worked.
However when I hardcode the passing argument in the action, like a fixed id ("123" for example), it works!
I don't understand why the id of the group is shown correctly in the h:outputText, where I use it as value.
But when i pass it in the method of the action, it is always null (or empty String when using group.id) in the Bean.
I tested that with PF 5.0 and 5.1, Extensions 2.0 and 2.1, same problem.
"Unfortunately" I still have to use Glassfish 3.1.1.
Having a glance at Firebug, the XML-Section of the Post says:
XML-Verarbeitungsfehler: nicht wohlgeformt Adresse: moz-nullprincipal:{4ad69840-e567-4857-82ce-7f2b7278ca29} Zeile Nr. 2, Spalte 1770:
...form_tabs_toggleVisibilityButton\"});\n\/\/]]>\n<\/script><\/td>\n<\/tr>\n<tr...
...-------------------------------------------------^
So the XML isn't well-formed...
Any ideas where the problem is?
Or do only I don't get it?
Greetings!