| Author |
Make selection with h:selectOneMenu and redisplay the value in a h:outputText?
|
Todd Patrick
Ranch Hand
Joined: Jan 30, 2004
Posts: 31
|
|
How do I make a selection with h:selectOneMenu and redisplay the value in a h utputText? I have the following two JSF components defined: With a button at the bottom of the page defined as: In an Application scope bean, the method defined for valueChangeListener is:
public void clientIDSelected( ValueChangeEvent event) { PhaseId phaseId = event.getPhaseId(); String oldValue = (String) event.getOldValue(); String newValue = (String) event.getNewValue(); if (phaseId.equals(PhaseId.ANY_PHASE)) { event.setPhaseId(PhaseId.UPDATE_MODEL_VALUES); event.queue(); } else if (phaseId.equals(PhaseId.UPDATE_MODEL_VALUES)) { if (newValue != null) { this.currentTransStartDate = newValue; } } FacesContext context = FacesContext.getCurrentInstance(); context.renderResponse(); }
The navigation rule is defined as:
<navigation-rule> <from-view-id>/transactionbrowser.jsf</from-view-id> <navigation-case> <from-outcome>no results</from-outcome> <to-view-id>/transactionbrowser.jsf</to-view-id> </navigation-case> </navigation-rule>
When I click my single h:commandButton, the selected value from the h:selectOneMenu is not displayed in the h utputText. The rendered h utputText is empty: I'd appreciate any help on this, this should be simple, but I guess I am missing the point. I do have Kito Mann's JavaServerFaces In Action book, which doesn't seem to have a clear solution either, still a great book though. Thanks,
|
--Todd
|
 |
 |
|
|
subject: Make selection with h:selectOneMenu and redisplay the value in a h:outputText?
|
|
|