Re: Programatically updating the model

2007-04-11 Thread Mike Kienenberger
Would it be easier for you to override the following method in UISelect in your own component subclass? protected void validateValue(FacesContext context, Object convertedValue) I'm actually kind of confused why you'd even need to do this. Your source select many component has a list of items,

Re: Programatically updating the model

2007-04-11 Thread monkeyden
Here is why I believe I need to do this...correct me if Im wrong. I have two lists (A and B). List A has values 1,2,3,4,5 . List B has nothing. I move the values 1,2,3 over to list B and submit. Because the values 1,2,3 are not a subset of the original used to populate list B, the submitte

Re: Programatically updating the model

2007-04-11 Thread Mike Kienenberger
Are you physically moving with javascript the values 1,2,3 over to the other html element form data? Or when you submit the form, are you submitting values 1,2,3 for List A, submitting no values for List B, and executing a move action (or action listener)? This is what would normally happen if

Re: Programatically updating the model

2007-04-11 Thread monkeyden
Mike Kienenberger wrote: > > Are you physically moving with javascript the values 1,2,3 over to the > other html element form data? > I'm physically moving the values using JavaScript. Mike Kienenberger wrote: > > Or when you submit the form, are you submitting values 1,2,3 for List > A, sub

RE: Programatically updating the model

2007-04-12 Thread Beelen, Marco
: [EMAIL PROTECTED] Subject: Re: Programatically updating the model Mike Kienenberger wrote: > > Are you physically moving with javascript the values 1,2,3 over to the > other html element form data? > I'm physically moving the values using JavaScript. Mike Kienenberger wrote:

RE: Programatically updating the model

2007-04-12 Thread monkeyden
andbox/selectManyPicklist.html > It does the trick for me perfectly! > > With regards, > Marco > > -Original Message- > From: monkeyden [mailto:[EMAIL PROTECTED] > Sent: donderdag 12 april 2007 4:45 > To: [EMAIL PROTECTED] > Subject: Re: Programatically updat

Re: Programatically updating the model

2007-04-12 Thread Mike Kienenberger
Ah, I didn't really think you were using client-side javascript. Yes, if you're using javascript to move the stuff around, then it's a different story. Yes, overriding a renderer (or component if that works) would change the behavior for the entire application. What you'd probably want to do i

Re: Programatically updating the model

2007-04-12 Thread Mike Kienenberger
- > From: monkeyden [mailto:[EMAIL PROTECTED] > Sent: donderdag 12 april 2007 4:45 > To: [EMAIL PROTECTED] > Subject: Re: Programatically updating the model > > > > Mike Kienenberger wrote: >> >> Are you physically moving with javascript the values 1,2,3 ove

Re: Programatically updating the model

2007-04-12 Thread Mike Kienenberger
I guess another possibility would be to add a before-validation-phase-listener that temporarily adds the List A values to the List B component's allowed choices, then removes them in the after phase. I think trying to handle this after validation is going to cause too many other problems. On 4/1

Re: Programatically updating the model

2007-04-12 Thread monkeyden
ml >> > It does the trick for me perfectly! >> > >> > With regards, >> > Marco >> > >> > -Original Message- >> > From: monkeyden [mailto:[EMAIL PROTECTED] >> > Sent: donderdag 12 april 2007 4:45 >> > To: [EMAI

Re: Programatically updating the model

2007-04-12 Thread monkeyden
Isn't there a simple way to tell JSF to ask the backing bean for the SelectList again, after I've matched it with the submitted values in the VCL? I tried setLocalValueSet(false), in hopes that it would tell JSF that the local value needs to be updated. Not sure if this is the right method as th

Re: Programatically updating the model

2007-04-12 Thread Mike Kienenberger
Use the following to put a component into a state where it should fetch values from the backing bean model: component.setSubmittedValue(null); component.setLocalValueSet(false); On 4/12/07, monkeyden <[EMAIL PROTECTED]> wrote: Isn't there a simple way to tell JSF to ask the backing be

Re: Programatically updating the model

2007-04-12 Thread monkeyden
I tired this. The component still fails validation, so JSF still has the old version of the list. Mike Kienenberger wrote: > > Use the following to put a component into a state where it should > fetch values from the backing bean model: > > component.setSubmittedValue(null); > compo

Re: Programatically updating the model

2007-04-13 Thread monkeyden
Anyone else have any ideas on how to get around this? In a valueChangeListener method, I update the list bound to a UISelectMany and I want to tell JSF to update the UISelectMany from the backing bean before validating. monkeyden wrote: > > I tried this. The component still fails validation,

Re: Programatically updating the model

2007-04-16 Thread monkeyden
Wouldn't it be simpler to just create SelectItems from the submitted values, in the VCL, and set the backing bean property so they match? Who needs a phase listener and why add ALL the values from the picklist, when I have everything I need in UIInput.getSubmittedValues(). This seems so logical

Re: Programatically updating the model

2007-04-16 Thread Simon Kitching
The problems you are having are because you are trying to write a JSF component but are trying to do it through the "user api" rather than the "component api" of JSF. If you want to write a picklist component you should really subclass UIComponent (or other convenient base). In this case you d