File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes How to succesfully replace 4 components with 7? :) Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "How to succesfully replace 4 components with 7? :)" Watch "How to succesfully replace 4 components with 7? :)" New topic
Author

How to succesfully replace 4 components with 7? :)

Leo Budima
Greenhorn

Joined: Jun 06, 2005
Posts: 10
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!
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: How to succesfully replace 4 components with 7? :)
 
Similar Threads
Help in Multipart Request Urgent
Is there any way to do check how many files the user have uploaded?
values in one form dissapearing when editing another
mutipart/form-data
How to rendered a <tr:commandButton (trinidad) via ajax