You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by octoberdan <da...@october5th.net> on 2006/04/24 20:05:14 UTC

Weird h:message output from select menues!

First of all, thank you for reading this.

I have a page with selectOneMenues on it. When I submit the form, the action
method doesn't fire and the page reloads with...

This from h:message:
Bean: com.loomis.jsf.backingbean.ProjectCreationBackingBean, property: phase

Jsf Code:

    <h:outputText value="Phase: "/>
    <h:selectOneMenu id="phase" value="#{projectCreationBacker.phase}">
        <f:selectItems value="#{projectCreationBacker.phaseItems}"/>
    </h:selectOneMenu>
    <h:message for="phase"/>
    <f:verbatim ><br><br></f:verbatim>



Backing Bean Code:

        public List<SelectItem> getPhaseItems() {
            if (null == phaseItems) {
                phaseItems = new ArrayList<SelectItem>();
    			
                for(KeyValuePair kvp : PhaseLookup.getList()) {
                    phaseItems.add(new SelectItem(kvp.getKey(),
kvp.getValue()));
                }
            }
    		
            return phaseItems;
        }
     
        public void setPhase(String phaseDesc) {
            this.phaseDesc = phaseDesc;
            this.phaseId = PhaseLookup.getPhaseId(phaseDesc);
        }
    	
        public void setPhase(int phaseId) {
            this.phaseId = phaseId;
            this.phaseDesc = PhaseLookup.getPhaseDesc(phaseId);
        }
     
        // and to make jsf happy...
        public int getPhase() { 
            return getPhaseId();
        }


Any help would be endlessly appreciated, this one really has me stumped. If
you want the full code, I'll be willing to post it online somewhere.
--
View this message in context: http://www.nabble.com/Weird-h%3Amessage-output-from-select-menues%21-t1501000.html#a4068959
Sent from the MyFaces - Users forum at Nabble.com.