> could you please post some code snippets?? 
> ValueChangeListener/JSP/JSF/JS for form submit...
> 

I've found a solution:

HtmlSelectBooleanCheckbox booleanEingabe = (HtmlSelectBooleanCheckbox)
application.createComponent(HtmlSelectBooleanCheckbox.COMPONENT_TYPE);
booleanEingabe.setOnclick("if(document.forms['modelForm'].onsubmit){document
.forms['modelForm'].onsubmit();}document.forms['modelForm'].submit();");
Class[] argTypesDA = {javax.faces.event.ValueChangeEvent.class};
String methodBindingDisableAttribute = "#{modellerViewMB.disableAttribute}";
MethodBinding mbDisableAttribute =
FacesContext.getCurrentInstance().getApplication().createMethodBinding(metho
dBindingDisableAttribute, argTypesDA);
booleanEingabe.setValueChangeListener(mbDisableAttribute);



public void disableAttribute(ValueChangeEvent event) {
boolean value = (Boolean) event.getNewValue();
// jump to the right phase
if (event.getPhaseId().equals(PhaseId.ANY_PHASE)) {
    ValueChangeEvent vce = new ValueChangeEvent(event.getComponent(),
event.getOldValue(), event.getNewValue());
    vce.setPhaseId(PhaseId.INVOKE_APPLICATION);
    event.getComponent().queueEvent(vce);
} else {
        //my code...
    this.displayAttributes();
}
}


> > 
> > I use JavaScript to submit the form when a user clicks on a 
> checkbox. 
> > The checkbox fires a valueChangeEvent. I have implemented a 
> > valueChangeListener.
> > When the valueChangeListener is called the attributes which 
> are bind 
> > to the inputText Components have the old values. Probably 
> because the 
> > Update Model Values Phase was called not yet. How can I jump to the 
> > right Phase to get the new inserted attribute values?
> > 
> > Bye Felix
> > 
> 
> --
> Lust, ein paar Euro nebenbei zu verdienen? Ohne Kosten, ohne Risiko!
> Satte Provisionen für GMX Partner: http://www.gmx.net/de/go/partner
> 

Reply via email to