Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

getting the component when it is a specific TYPE  RSS feed

 
Denise Smith
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is the scenerio:

we would like to write a class that checks each page to see if it contains anHTMLDataTable. In that class we would like to get the tables id and set the row value to Max value when a button is clicked.

These pages can have multiple datatables that have different names AND
they also have multiple jsp includes on them that have datatables.

we have used a phase listener at RENDER_RESPONSE (before&after) and only get 2 components then an index out of bounds error when FacesContext.getCurrentInstance().getViewRoot().getChildren().get(i) is used in a for loop.

can someone help us with this???
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This works here:




Side note: in the first call the UIViewRoot is empty (even after the Render Response!) and therefore the PhaseListener cannot accomplish his task. During the calls/refreshes/actions/whatever afterwards the PhaseListener does his task. I'm still unsure why this is the case.
[ October 19, 2006: Message edited by: Bauke Scholtz ]
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!