Related to my previous post, I'm trying to allow a user to click a link and show 3 more file components upload and not to complicate things too much. Since javascript can't be of any help with setting rendered attribute and I don't like the solution of showing and hiding additional div with comps inside (if nothing than because of the possitioning problems), I thought I could try something like this:
If a user clicks a link, I call the same page with "more" parameter:
<a href="upload.jsp?more=1" target="_self">link</a>
and in the page I have:
Logically, it should work ok, but guess what - it doesn't.
Instead of getting 6 upload components followed by a submit button, I
get 3 comps, then a button, 2 more components and again a button ?!
I've tried several variants, mostly placing <h:form> and <h:commandButton> in and out of the JSP code and it gives different results all leading to one conclusion - it is obvious the renderer does not "substitute" component correctly if the new one is different, but I still don't know enough about JSF to solve this myself.
Does anyone have a clue how to solve this? Thanks!
If a user clicks a link, I call the same page with "more" parameter:
<a href="upload.jsp?more=1" target="_self">link</a>
and in the page I have:
Logically, it should work ok, but guess what - it doesn't.
Instead of getting 6 upload components followed by a submit button, I
get 3 comps, then a button, 2 more components and again a button ?!
I've tried several variants, mostly placing <h:form> and <h:commandButton> in and out of the JSP code and it gives different results all leading to one conclusion - it is obvious the renderer does not "substitute" component correctly if the new one is different, but I still don't know enough about JSF to solve this myself.
Does anyone have a clue how to solve this? Thanks!