Nested ajax in JSF and ui:repeat?

The culprit is here: The f:ajax uses JavaScript to locate the element-to-be-rendered in the client side. JavaScript won't be able to locate the HTML representation of the inner panelgrid when it's not rendered to the client side by JSF. Put the inner id in a parent component instead which is always rendered to the client side, so that Ajax/JavaScript can locate it regardless of the rendered condition.E.g.

: Update: as per the comments, using the ui:repeat should not form a problem here. Even more, to be sure I have copypasted your example to my playground environment and it works fine (using Mojarra 2.0.3 on Tomcat 6.0.29). The bean is by the way marked @ViewScoped.

Maybe yours was @RequestScoped and the loading of the value for the ui:repeat was based on some request scoped condition which wasn't retained in the subsequent ajax calls? See also: The benefits and pitfalls of @ViewScoped - explains the value of @ViewScoped What are the main disadvantages of JSF 2.0? - a bit of history.

Yes, that was it! Thank you. I changed the bean to @ViewScoped and it worked.

I should read up on setting the right scope for my beans. – luciaengel Nov 26 '10 at 19:45 You're welcome :) (I moved the comment back into the answer) – BalusC Nov 26 '10 at 19:46 Worked for me too! +1 – Steve Taylor Sep 11 at 15:44.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions