I have a strange issue. I am developing an application on Jboss 7 using JSF, SEAM and Primefaces. Recently I had a strange problem. In my template I have two controls: 1. Categories 2. Channels
When a user clicks on a desired category, the block with channels is updated. If the user clicks on channel he goes to mysite.www/channel/idofchannel. On the first page everything works allright. But when the user is transfered to mysite.www/channel/idofchannel, the controls do not work. When I click on the category, the action of commandLink is executed, but does not update the block with channels. Does it have to do anything with f:viewParam?
Thanks
Without your source code, I can only guess. If you are using p:commandLink
then the reason might be, that it submits an ajax request by default. Then you have to use the update
attribute to specify the components that will be updated by this ajax call.
Here is an example from the Primefaces showcase:
<p:commandLink id="ajax" update="panel,display"
actionListener="#{pprBean.savePerson}">
<h:outputText value="Ajax Submit" />
</p:commandLink>
Another option would be to set ajax=false
and submit a full request:
<p:commandLink id="nonAjax" actionListener="#{pprBean.savePerson}" style="margin-right:20px;" ajax="false">
<h:outputText value="Non-Ajax Submit" />
</p:commandLink>