• Post Reply Bookmark Topic Watch Topic
  • New Topic

proprerty enum & selectonemenu not work

 
daniele galassi
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a managed bean that gestisceuna page .xhtml in all phases. After entering the data in the first form it will be prompted for confirmation of the data entered or by the ability to change the data entered. I try to promote a combo with the following method that draws an enum but loses in the various steps the selection.

THANKS





 
Greg Charles
Sheriff
Posts: 3010
12
Firefox Browser IntelliJ IDE Java Mac Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, that seems like it should work. However, I don't really understand what you say isn't working. Promoting a combo? Various steps are lost? I don't know what either of those means. Also, you have two "select one" menus, which as far as I can see are exactly the same, except one of them is disabled. What exactly are you trying to do?
 
daniele galassi
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thnk Charles, the second disabled combo is inside a confirm Step. View Logic is: one managed Bean for one Page .xhtml
In this Step i have 2 submit: confirm & Edit and if i clic edit "statoFetoValues" Field change value. It's the problem...
 
Tim Holloway
Bartender
Posts: 18408
58
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Enums are not well-handled in java. I think that probablly the process of converting the enum object to a string value for HTTP transmission and back again is at fault.

You are more likely to be successful if you make the value component of your SelectItem be the enum's string value explicitly (I'm not sure if the toString() method does a simple conversion or not). Then you need to ensure that the enum can reconstruct itself using a constructor whose argument is that string value.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!