I have the code that calls my ValueChangeListener implementation.

That part works, the bit I’m having trouble with is setting the new a value on page.

 

JSP…

<h:inputText

id="partNumber"

value="#{nonConformingMaterial.partNumber}"

required="true

      immediate="true"

      onchange="submit()"

>   

<f:valueChangeListener type="org.me.jsf.actions.NonConformingMaterialAL"/>

</h:inputText>

 

 

The code I have is…

 

CODE…

public class NonConformingMaterialAL implements ValueChangeListener {

 

public void processValueChange(ValueChangeEvent vce) throws AbortProcessingException  {

 

       String partNo = ((String)vce.getNewValue());

       System.out.println("A value has changed!" + partNo);

 

                  // This doesn’t save & show the new value.?!??!

       FacesContext ctxt =  FacesContext.getCurrentInstance();

       if (null != vce.getNewValue()) {

           ctxt.getExternalContext().getSessionMap().put(“SHOWTHIS”, “partNumber”);

                  }

 

      ctxt.renderResponse();

            }

}

 

This doesn’t set the value “SHOWTHIS” in the field though.

 

Can someone please help?

 

Thanks

Jeff.

Reply via email to