Note that there are some explanatory texts on larger screens.

plurals
  1. POp:commandButton does not fire action
    primarykey
    data
    text
    <p>Here is the problem: actionlistener does not want to be fired</p> <pre><code>@ManagedBean(name="hotelsController") @SessionScoped public class HotelsController implements Serializable { public void requestHotelAvail(ActionEvent event) { request = new Request(df.format(arrivalDate), df.format(departureDate)); } } </code></pre> <p>and xhtml</p> <pre><code>&lt;h:panelgroup id="rooms"/&gt; &lt;h:form id="hotelSearch"&gt; &lt;p:commandButton actionListener="#{hotelsController.requestHotelAvail}" value="submit" update="rooms" /&gt; &lt;/h:form&gt; </code></pre> <p>I have tried everything I could search of changed <code>@managedbean</code> to <code>@component</code> set <code>import</code> to <code>import javax.faces.event.ActionEvent;</code></p> <p>But it still does not fire anything. </p> <p>Form is in a <code>p:accordion</code> and when used with <code>h:commandbutton</code> it works fine</p> <p><strong>EDIT</strong>: sorry for mislead. rooms updates after click but actionListener is not fired. so rooms will not get any new data. Important code in <code>requestHotelAvail</code> needs to be fired before updating rooms and its not.</p> <p><strong>EDIT2</strong>: <code>PrimeFaces 2.2.1</code> - I've read whole manual to primefaces but theres no explanation to this as I've done all that it states</p> <p>I've tried using <code>action</code> instead of <code>actionListener</code> without <code>ActionEvent</code> but it never do anything. using <code>&lt;h:commandbutton action="#{hotelscontroller.requestHotelAvail}"/&gt;</code> works great but I want that ajax engine to refresh only that <code>rooms</code> panelgroup </p> <p><strong>UPDATE</strong>: Now it works. Form couldn't be in <code>&lt;p:accordion&gt;</code> but why and how to enable it there? Form now I'll work without it.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload