Okay, I should have written it in a different way. I just wasn't sure if
it was a bug or an intention :)
-Matej
Johan Compagner wrote:
ahh
i read youre first message wrong because how it was written :)
"Why do we have ICompoundModel then?"
fixed it.
johan
On 11/14/05, *Matej Knopp* <[EMA
ahh
i read youre first message wrong because how it was written :)
"Why do we have ICompoundModel then?"
fixed it.
johan
On 11/14/05, Matej Knopp <[EMAIL PROTECTED]> wrote:
Still, this is not what I'm asking for.class Component {...public Component setModel(final IModel model){..
Still, this is not what I'm asking for.
class Component {
...
public Component setModel(final IModel model)
{
...
// If a compound model is explicitly set on this component
if (model instanceof CompoundPropertyModel)
{
Form form = new Form();
form.setModel(new MyCompoundModel); // set a compound model so it is the root!
TextField tf = new TextField(); // no model!
then tf.initModel() will get the forms model and use it as its own BUT it is not the root.
johan
On 11/14/05, Matej Knopp <[EMAIL PROTECTED]> wrot
Sorry, I still don't understand.
What shoud I do if I want to have my own compound model, that is not
derived from CompoundPropertyModel? Why is in Component#setModel a
check, whether the model is instance of CompoundPropertyModel instand of
ICompoundModel?
-Matej
Johan Compagner wrote:
No
No because components can have a ICompoundModel but not be the root because
they got there model from the root. (see initModel())
johan
On 11/14/05, Matej Knopp <[EMAIL PROTECTED]> wrote:
Hi.In Component class, the flag FLAG_HAS_ROOT_MODEL is set only if themodel is CompoundPropertyModel. Why do
Hi.
In Component class, the flag FLAG_HAS_ROOT_MODEL is set only if the
model is CompoundPropertyModel. Why do we have ICompoundModel then?
Shouldn't it only check if the model implements ICompoundModel?
-Matej
---
SF.Net email is sponsore