Re: Model detached before Validate of FormValidator

2011-06-06 Thread Tito
Wow, you tryed hard to do this. I had no more ideas, I'll try with this. Thank you very much. Tito 2011/6/5 Per Newgro per.new...@gmx.ch Hi Tito, i hope i got a valid solution for you. Please check it: a) You need to use a bean. I've tried it with simple strings like (1,2,7,24) and it

Re: Model detached before Validate of FormValidator

2011-06-05 Thread Per Newgro
Hi Tito, i hope i got a valid solution for you. Please check it: a) You need to use a bean. I've tried it with simple strings like (1,2,7,24) and it wasn't working. I think because the renderer is called only with index 0. I don't know if this is a palette bug or a needed feature. b) you have

Re: Model detached before Validate of FormValidator

2011-06-03 Thread Per Newgro
PaletteTask palette = new PaletteTask(.); form.add(palette); form.add(new IFormValidator() { @Override public void Validate(Form? form) { // how to get a list of selected tasks??? } }); You have to set the model to the form by assigning the list or wrap it in a

Re: Model detached before Validate of FormValidator

2011-06-03 Thread Per Newgro
Sorry, i missed to say that you have to connect bunsinessModel and selected list of palette. PaletteTask palette = new PaletteTask(..., new PropertyModelListTask(model, tasks), ...); Per PaletteTask palette = new PaletteTask(.); form.add(palette); form.add(new IFormValidator() {

Re: Model detached before Validate of FormValidator

2011-06-03 Thread Tito
Does it means that Model of form is populated before Validate? I didn't know that. In that way I also can use palette model in form and it would have to work too. Thanks for the solution! Tito 2011/6/3 Per Newgro per.new...@gmx.ch Sorry, i missed to say that you have to connect bunsinessModel

Re: Model detached before Validate of FormValidator

2011-06-03 Thread Per Newgro
Afaik no. Your right. I missed the alidator part of the interface IFormValidator. My explanation was related the FromVisitor. Sorry for that. But you could make palette final and access it inside the validate method. Then you could do a palette.|getRecorderComponent().getSelectedChoices().

Re: Model detached before Validate of FormValidator

2011-06-03 Thread Tito
No problem, thanks for your answer. We always try to find a solution which is fine for me. When I call getSelectedChoices in Validation method it give us an empty List back. It is like the list it is not uploaded before entering the validation method. Thanks for helping me. Regards Tito

Re: Model detached before Validate of FormValidator

2011-06-01 Thread Tito
I read that is a normal behavior. It's because validation occurs before model population. In that way when validation fails model won't be populated. So I would have to do something like textField.getInput() but I had a problem to get a model Object from a Palette. For example: PaletteTask

Model detached before Validate of FormValidator

2011-05-31 Thread Tito
Is this ok? I have to validate model object but it's detached when validate of form validator is called. How can I make this validation? Thanks

Re: Model detached before Validate of FormValidator

2011-05-31 Thread Per Newgro
Am 31.05.2011 15:10, schrieb Tito: Is this ok? I have to validate model object but it's detached when validate of form validator is called. How can I make this validation? Thanks Provide some code describing the problem please. Cheers Per