• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Junilu Lacar
  • Martin Vashko
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Scott Selikoff
  • salvin francis
  • Piet Souris

How to succesfully replace 4 components with 7? :)

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
"How many licks ..." - I think all of this dog's research starts with these words. Tasty tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!