This content has been marked as final.
Show 2 replies
-
1. Re: h:message inside h:column
crudolf Feb 6, 2009 2:23 PM (in response to crudolf)I could not find a solution so i do this hack:
I calculate the component ID on the server side and pass the ID to the button:
<c:set var="messageContainerId" value="#{rich:clientId('test')}"/> <s:button action="#{TestComponent.testAction}"> <f:param name="messageContainerId" value="#{messageContainerId}"> </s:button>
Now i can access the id of the component via:
String messageContainerId= FacesContext.getCurrentInstance().getExternalContext(). getRequestParameterMap().get("messageContainerId");
And add a message via the classic JSF way:
FacesContext.getCurrentInstance().addMessage(messageContainerId, "Message for the Component with the ID=test");
Now the message is displayed correctly and the sourceId is valid.
Does anybody now a
cleaner
and more seam-solution? -
2. Re: h:message inside h:column
crudolf Feb 6, 2009 2:25 PM (in response to crudolf)Sorry i do not know how to edit a post, so:
I calculate the component ID on the server side and pass the ID to the button:was wrong, i meant:
I calculate the component ID on the client side and pass the ID to the button: