This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Cloud Application Architecture Patterns: Designing, Building, and Modernizing for the Cloud and have Kyle Brown, Bobby Woolf and Joseph Yodor on-line!
See this thread for details.
  • 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Problem with JSF editing

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello I want to do this:
I have a page where the user can see all the types. When the user want to edit the photos it take him to a page where he will be able to edit the photos the page will be test.xhtml?id=5
There it runs the


And there i have the code



But when i click the Delete that should run the excursion_type.testt(2) it does not work. What i am doing wrong? I spend hours to find it but no luck
 
Bartender
Posts: 3648
16
Android Mac OS X Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When user click delete, the button does "excursion_type.testt(2)". OK. It doesn't work as in the action did not happen or it did something but that wasn't what you expected?
 
Saloon Keeper
Posts: 28755
211
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That's a non-JSF way to handle a common JSF problem. JSF, as originally designed, didn't pass parameters around between pages, it passed them around in the backing beans. And the ui:repeat looping construct didn't exist, so generally, you'd use a h:dataTable, which has the necessary mechanisms.

I'm sceptical of any sample URL that has an ".xhtml" extension, however. Normally, you'd have webapp resources with .xhtml as the extension, but the webapp URL would be something like "x.jsf".

 
nikos karanikos
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It does not work at all. My problem is that i load all the information of the bean at the page that i load the photos but when i am trying to pass a parameter to an action nothing is working. My latest code is this

excecutiontype.xhtml


excursiontypephotos.xhtml


but when i click Set main it does not run. Also i can not pass value to <h:inputHidden value="#{excursion_type.id}" /> so i can upload correctly the photo. What am i doing wrong?
 
nikos karanikos
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
 
nikos karanikos
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Anyone knows how i can do this? I want to edit or upload more photos of a specific bean . I want to load the bean and the for this bean upload more photos or edit existing. Thank you
 
nikos karanikos
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can anyone suggest me how i can edit the existing photos of a bean or upload more photos for the selected bean?
Thank you
 
reply
    Bookmark Topic Watch Topic
  • New Topic