On Tue, Apr 08, 2008 at 11:03:52PM +0200, Vitaly Tsaplin wrote:
Yep. It looks simple and efficient. But it's quite a repetitive
task. As I already mentioned I am going to create a component. And a
data conversion should be its direct responsibility. The model wrapper
cannot be provided from
What is going to happen if I call getModel on such a component? The
model should be properly unwrapped I suspect. It's a logical behavior.
Is it possible to achieve?
On Wed, Apr 9, 2008 at 3:03 PM, John Krasnay [EMAIL PROTECTED] wrote:
On Tue, Apr 08, 2008 at 11:03:52PM +0200, Vitaly Tsaplin
On Wed, Apr 09, 2008 at 05:09:03PM +0200, Vitaly Tsaplin wrote:
What is going to happen if I call getModel on such a component? The
model should be properly unwrapped I suspect. It's a logical behavior.
Is it possible to achieve?
If you extend CheckBoxMultipleChoice, getModel() must return
The method getModel will always return a wrapper and that fact
breaks an encapsulation. So we can say that any wrapping can be done
only from outside which is not good. A conversion is an essential
part of an internal component's functionality and it's normally
shoudn't be exposed. I am not so
Hi everyone,
Lets say I am going to use a single integer value as a model object
for the component CheckBoxMultipleChoice packing the selected choices
somehow to this value as bits. Where can I do such a conversion? The
method getConvertor is not called... the methods getConvertedInput and
On Tue, Apr 08, 2008 at 06:41:20PM +0200, Vitaly Tsaplin wrote:
Hi everyone,
Lets say I am going to use a single integer value as a model object
for the component CheckBoxMultipleChoice packing the selected choices
somehow to this value as bits. Where can I do such a conversion? The
Thanks John,
It was the idea that came to my mind first. The question is where I
can create such a wrapper? I need to have it compatible with
CompountPropertyModel... That's the sticking point. Since I cannot
store an array in my mysql database anyway I am going to implement a
subclass of
Yep. It looks simple and efficient. But it's quite a repetitive
task. As I already mentioned I am going to create a component. And a
data conversion should be its direct responsibility. The model wrapper
cannot be provided from outside. It would be conceptually wrong in
this case. I think this