voyent
Id attribute is not set to auto generated one . If no id is specified  XML
Forum Index -> Contributor's Corner
Author Message
bhuvan

Joined: 19/Aug/2012 23:12:19
Messages: 14
Offline


Let say i have
Code:
 <h:graphicImage
      value="image.png"  />
 


In 1.8 there use to be auto generator id attached to the final html
but with 3.3 it is not.

I can see in both 1.8 and 3.3 "ImageRenderer.java" call "setRootElementId"

1.8 has
Code:
 
 public static void setRootElementId(FacesContext facesContext,
  	                                        Element rootElement,
  	                                        UIComponent uiComponent) {
  	        if (idNotNull(uiComponent)) {
  	            rootElement.setAttribute("id", uiComponent.getClientId(facesContext));
  	            rootElement.setIdAttribute("id", true);
  	        }
  	    }
 


and in 3.3
Code:
 
 public static void setRootElementId(FacesContext facesContext,
  	                                        Element rootElement,
  	                                        UIComponent uiComponent) {
  	        if (idNotNull(uiComponent)) {
  	            rootElement.setAttribute("id", uiComponent.getClientId(facesContext));
  	        }
  	    }
 


I dont know why id is not being set in 3.3
philip.breau


Joined: 08/May/2006 00:00:00
Messages: 2989
Offline


Not sure about the <h:graphicImage> but the <ice:graphicImage> is rendering an auto-generated id:

<img alt="" class="iceGphImg" id="j_idt3832:j_idt3833" src="/icefaces/resource/LTkxMzgwMDQ5Nw==/icefaces.png">

.
 
Forum Index -> Contributor's Corner
Go to:   
Powered by JForum 2.1.7ice © JForum Team