myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jo11 <>
Subject problem with image rendering
Date Fri, 01 Aug 2008 12:30:17 GMT


We have a data table with sortable header.But we have our own implementation
for the sortable headers.
We are putting it in facelets and the content is like

value="#{columnHeader}" styleClass="#{styleClass}">
		<f:param name="columnName" value="#{columnParam}" />
        <h:graphicImage	id="#{columnParam}"  rendered="false"
immediate="true" style="border:none;padding:4px;" />			 		

When the user is clicks on the second header after he has clicked the first
one, the first header image should disappear.To achieve this we keep a
handle of the previous image in the session and when the user clicks on a
new header we set the old image component's rendered property to false .
This logic used to work fine in icefaces as the image objects always remain
the same.But in myfaces its not working as the objects are different and
they are taking the state of the previous object.

The code snippet that gets invoked on click of a header is given below

	List childrenList = event.getComponent().getChildren();
		Iterator it = (Iterator) childrenList.iterator();
		while (it.hasNext()) {
			UIComponent comp = (UIComponent);
			if (comp instanceof HtmlGraphicImage) {
				HtmlGraphicImage image = (HtmlGraphicImage) comp;
				if (getOldImageComponent() != null && getOldImageComponent() != image) {		

Can someone provide any workaround for the issue?

Thanks in advance...

View this message in context:
Sent from the MyFaces - Users mailing list archive at

View raw message