Hi,
I have a JSF page in which there is a treeTable component. In one of the
columns (which is not within node stamp or path stamp facets) is an inputText
component. I want to set Readonly =true on inputTexts corresponding rows on
level one(may be apply a different style on those rows as well). On debugging
the page I found the client id's of all the rendered inputTexts(for level 1) to
be starting with treetable1:0 and treeTable1:1. So I wrote,
UIComponent treeTbl= facesContext.getViewRoot().findComponent("treeTable1");
List lst = treeTbl.getChildren();
for(int i=0;i<lst.size();i++){
UIComponent column = lst.get(i);
List lst1 = column.getChildren();
for(int j=0;i<lst1.size();j++){
UIComponent colChild= lst.get(j);
if(colChild instanceof CoreInputText){
/*
Over here the client id is coming out to be treeTable1:inputText1
How can I get the components for level 1i.e."treeTable1:0:" and "treeTable1:1:"
*/
if(colChild .getClientId(facesContext).startsWith("treeTable1:0:")){
((CoreInputText)colChild).setReadOnly(true);
}
}
}
}
Thanks,
Dushyant
Explore your hobbies and interests. Go to
http://in.promos.yahoo.com/groups/