I am facing an odd behavior when using prime faces, basically I have a p:dataTable where one of the p:column has a f:selectOneMenu inside it.
The basic idea is allow the end user to perform actions using the options available in the f:selectOneMenu, as soon as the user select one event I can perform an action.
below is my faces code:
Code: Select all
<f:selectOneMenu valueChangeListener="#{myMB.applyFilter}">
<p:ajax/>
</f:selectOneMenu>
<p:dataTable>
...
<p:column>
<f:selectOneMenu valueChangeListener="#{myMB.performAction}" onclick="dlg.show()">
<p:ajax/>
</f:selectOneMenu>
</p:column>
...
</p:dataTable>
Code: Select all
public class MyMB{
//...
public void performAction(ValueChangeEvent e){
String action = (String)e.getAction().getNewValue();
System.out.println(action);
}
//...
public void applyFilter(ValueChangeEvent e){
String filter = (String)e.getAction().getNewValue();
System.out.println(filter);
}
//...
}
1) Using firefox 3.5.16
- When applying a filter, everything goes fine, I can click in the menu and select a filter and the MB applyFilter method is invoked
- When performing an action, everythng goes fine, except by I have to click and hold the mouse button pressed when selecting an action
? Why the behavior is different for the same component? Since the only difference is the second being used inside the p:dataTable
2) Using IE 8.0.7600
- When applying a filter, everything goes fine, I can click in the menu and select a filter and the MB applyFilter method is invoked
- When performing an action, nothing works, i.e., I have to press and hold the mouse when selecting an action, also MB.performAction is not invoked
- Is there any bug on primefaces, or that is maybe an expected behavior and IE has one more bug to fix?
NOTE: I have tried <p:ajax> with all sort of events (e.g. click, change, select), none works, only the change or empty one
NOTE: When using <p:ajax event="click"> both IE and Firefox allows to select an action without keep the mouse pressing, hoever none MB method is invoked
Any help is appreciated!!!
Thanks all