Win a copy of JDBC Workbook this week in the JDBC and Relational Databases forum
or A Day in Code in the A Day in Code forum!
  • 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 ...
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • salvin francis
  • fred rosenberger

How to succesfully replace 4 components with 7? :)

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!
Do not meddle in the affairs of dragons - for you are crunchy and good with ketchup. Crunchy tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
    Bookmark Topic Watch Topic
  • New Topic