Is there a possibility to pass current UIComponent as this in action’s MethodExpression?
XHTML
<p:menuitem id="test" value="Test" action="#{controller.test(this)}" update="test" />
Java
public String test(MenuItem item) {
// Do something with item
return null;
}
You can use the implicit EL variable
#{component}for this:with
Or if you’re only interested in for example the
idattribute:with
Or if you’re only interested in for example the
valueattribute:with
You can alternatively also use
UIComponent#getCurrentComponent()for this:with