Re: [Wicket-user] check box questions how to I associate an object with a boolean seletion from a checkbox component

2007-06-01 Thread GS-ikiini

So i used this method ( check group and check) once then tried to use it
again and when and checks won't come up where the objects are already
present in the list. for example. you have a list of all colors and i have a
list of blue and green. when i look at the check box, blue and green should
be selected. but they are not. nothing is. can someone tell me why this
isn't working. what ties the check to an object? what is used to determine
what object is in the list already and what is not.? 

-B



igor.vaynberg wrote:
> 
> if you dont grasp the concepts perhaps you should read the wiki page on
> models
> 
> the concept is:
> 
> since the checkbox works by setting/clearing a boolean the model
> translates
> a set boolean->insert into collection and clear boolean->remove from
> collection.
> 
> there is explanation there, try to read that too, not just look at the
> code.
> 
> -igor
> 
> 
> On 3/26/07, GS-ikiini <[EMAIL PROTECTED]> wrote:
>>
>>
>> I don't quite grasp the concepts used in that tread. from what i
>> understand i
>> should create a separate model that takes the model that has to get
>> set(the
>> model that is selected via checkbox) in the object i'm making, and places
>> it
>> in a collection if it is selected. Is this correct?
>>
>> -B
>>
>>
>>
>> igor.vaynberg wrote:
>> >
>> > please search mail archives before posting
>> >
>> >
>> http://www.nabble.com/Design-questions%3A-Use-of-controllers-and-wicket-models-tf3373279.html#a9510784
>> >
>> > -igor
>> >
>> >
>> > On 3/26/07, GS-ikiini <[EMAIL PROTECTED]> wrote:
>> >>
>> >>
>> >> Hey all,
>> >>
>> >> I have a list view that contains a list of objects. these objects are
>> >> selectable via checkboxes. My problem is that i don't know how to know
>> or
>> >> tell my code what objects have been selected. here is what i want to
>> do.
>> >>
>> >> i ahve a list of objects lets call them pens. So i have a list of 5
>> >> different types of pen objects. this object type is a property ( a
>> list
>> >> of
>> >> this object to be specific) in another object say a pencilCase.  i
>> want
>> a
>> >> user to select 0-many different pens which will then be placed in the
>> >> pencil
>> >> case by the applicaition. what i am not sure how to do is associate
>> each
>> >> pen
>> >> in the list with what is selected. I seen on the wiki that i can add a
>> >> boolean property to the pens called selected. and make that what the
>> >> checkbox renders on. but i don't have access to the pens to do that.
>> is
>> >> another some way i can do an association externally? I thought of
>> >> creating
>> >> a
>> >> separate list of booleans variables that i can compare side by side
>> with
>> >> the
>> >> list of pens. selection of check boxes will set the booleans in that
>> >> list.
>> >> then look at what is true and go get the pen in the pens list at that
>> >> position and do what i got to do with it. however I think this method
>> 1-
>> >> may
>> >> not work and 2 - is to elementary and not very professional. I am sure
>> >> there
>> >> is another way to do this. Please advise.
>> >>
>> >>
>> >> -B
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/check-box-questions-how-to-I-associate-an-object-with-a-boolean-seletion-from-a-checkbox-component-tf3469311.html#a9680769
>> >> Sent from the Wicket - User mailing list archive at Nabble.com.
>> >>
>> >>
>> >>
>> -
>> >> Take Surveys. Earn Cash. Influence the Future of IT
>> >> Join SourceForge.net's Techsay panel and you'll get the chance to
>> share
>> >> your
>> >> opinions on IT & business topics through brief surveys-and earn cash
>> >>
>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>> >> ___
>> >> Wicket-user mailing list
>> >> Wicket-user@lists.sourceforge.net
>> >> https://lists.sourceforge.net/lists/listinfo/wicket-user
>> >>
>> >
>> >
>

Re: [Wicket-user] check box questions how to I associate an object with a boolean seletion from a checkbox component

2007-03-28 Thread GS-ikiini

thank you...I just figured it out..with help from the IRC

-B



svenmeier wrote:
> 
> CheckGroup selectedPensCheckGroup = new CheckGroup("selectedPens",
> selectedPensModel);
> add(selectedPensCheckGroup);
> ListView pensList = new ListView("pens", pensModel)
> {
>   protected void populateItem(ListItem item)
>   {
>   item.add(new Check("check", item.getModel()));
>   // assuming pen has a nice toString()
>   item.add(new Label("pen", item.getModel()));
>   };
> };
> selectedPensCheckGroup.add(pensList);
> 
> Now you have one check component for each available pen and all selected
> pens will be contained in selectedPensModel.
> For the models there are many possibilities: AbstractReadOnlyModel,
> PropertyModel, ...
> 
> Sven
> 
> GS-ikiini wrote:
> 
>> so this would associate my object with a checkbox? how do i place the
>> select
>> objects in a collection from there?
>>
>> -B
>>
>>
>>
>> svenmeier wrote:
>>   
>>> I'm not sure I fully understand what you're trying to do, but
>>> CheckGroup/Check components are a nice solution for managing the
>>> selection
>>> of multiple objects.
>>> No need to introduce a boolean property in your domain objects.
>>>
>>> Please take a look at FormInput.java from wicket examples:
>>>
>>> CheckGroup checks = new CheckGroup("numbersCheckGroup");
>>> add(checks);
>>> ListView checksList = new ListView("numbers", NUMBERS)
>>> {
>>> protected void populateItem(ListItem item)
>>> {
>>> item.add(new Check("check", item.getModel()));
>>> item.add(new Label("number", item.getModelObjectAsString()));
>>> };
>>> };
>>> checks.add(checksList);
>>>
>>> 
>>>> I don't understand that last post can you re phrase please..
>>>>
>>>> -B 
>>>>
>>>>
>>>>
>>>> svenmeier wrote:
>>>>   
>>>>> Could it be that you slipped our CheckGroup/Check components? Cannot
>>>>> get 
>>>>> simpler than that.
>>>>>
>>>>> Sven
>>>>> 
>>> -
>>> Take Surveys. Earn Cash. Influence the Future of IT
>>> Join SourceForge.net's Techsay panel and you'll get the chance to share
>>> your
>>> opinions on IT & business topics through brief surveys-and earn cash
>>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>>> ___
>>> Wicket-user mailing list
>>> Wicket-user@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/wicket-user
>>>
>>>
>>> 
>>
>>   
> 
> 
> -
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> 
> 

-- 
View this message in context: 
http://www.nabble.com/check-box-questions-how-to-I-associate-an-object-with-a-boolean-seletion-from-a-checkbox-component-tf3469311.html#a9722173
Sent from the Wicket - User mailing list archive at Nabble.com.


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] check box questions how to I associate an object with a boolean seletion from a checkbox component

2007-03-28 Thread GS-ikiini

so this would associate my object with a checkbox? how do i place the select
objects in a collection from there?

-B



svenmeier wrote:
> 
> I'm not sure I fully understand what you're trying to do, but
> CheckGroup/Check components are a nice solution for managing the selection
> of multiple objects.
> No need to introduce a boolean property in your domain objects.
> 
> Please take a look at FormInput.java from wicket examples:
> 
> CheckGroup checks = new CheckGroup("numbersCheckGroup");
> add(checks);
> ListView checksList = new ListView("numbers", NUMBERS)
> {
>   protected void populateItem(ListItem item)
>   {
>   item.add(new Check("check", item.getModel()));
>   item.add(new Label("number", item.getModelObjectAsString()));
>   };
> };
> checks.add(checksList);
> 
>>I don't understand that last post can you re phrase please..
>>
>>-B 
>>
>>
>>
>>svenmeier wrote:
>>> 
>>> Could it be that you slipped our CheckGroup/Check components? Cannot get 
>>> simpler than that.
>>> 
>>> Sven
> 
> -
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> 
> 

-- 
View this message in context: 
http://www.nabble.com/check-box-questions-how-to-I-associate-an-object-with-a-boolean-seletion-from-a-checkbox-component-tf3469311.html#a9716119
Sent from the Wicket - User mailing list archive at Nabble.com.


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] check box questions how to I associate an object with a boolean seletion from a checkbox component

2007-03-27 Thread GS-ikiini

I don't understand that last post can you re phrase please..

-B 



svenmeier wrote:
> 
> Could it be that you slipped our CheckGroup/Check components? Cannot get 
> simpler than that.
> 
> Sven
> 
> GS-ikiini wrote:
>> this part of the concept i understand...what i don't get is a little
>> deeper...from your example i am accessing a property in input. however, I
>> don't have such a property in my object. I some how have to figure out if
>> that mode is selected. basically, i want to implement imodel as show in a
>> example on the forum to put my object in a collection if it is selected.
>> In
>> the example ivan implements imodel. and set  that model as the model that
>> the checkbox works with. 
>>
>> http://www.nabble.com/Design-questions%3A-Use-of-controllers-and-wicket-models-tf3373279.html#a9510784
>>
>> i don't understand how the implentaion works. can you help me with
>> understanding how that works please.
>>
>> -B 
>>
>>
>>
>> Eelco Hillenius wrote:
>>   
>>> Wicket models are a way to locate values.
>>>
>>> Let's take a look at wicket.examples.compref.CheckBoxPage. That page
>>> has a nested static class called Input, with a property bool:
>>>
>>> private static class Input implements Serializable
>>> {
>>> public Boolean bool = Boolean.TRUE;
>>> }
>>>
>>> Then, in CheckBoxPage's constructor we do (simplified):
>>>
>>>   final Input input = new Input();
>>>   setModel(new CompoundPropertyModel(input));
>>>   Form form = new Form("form");
>>>   form.add(new CheckBox("bool"));
>>>
>>> CompoundPropertyModel might be a bit distracting, so let's rewrite
>>> this to use a normal model:
>>>
>>>   final Input input = new Input();
>>>   Form form = new Form("form");
>>>   form.add(new CheckBox("bool", PropertyModel(input, "bool")));
>>>
>>> another way to rewrite the model:
>>>
>>> form.add(new CheckBox("bool", new Model(input)
>>> {
>>> public Object getObject()
>>> {
>>> return ((Input)super.getObject()).bool;
>>> }
>>>
>>> public void setObject(Object object)
>>> {
>>> ((Input)super.getObject()).bool = (Boolean)object;
>>> }
>>> }));
>>>
>>> and yet another to rewrite the model is:
>>>
>>> form.add(new CheckBox("bool", new IModel()
>>> {
>>> public Object getObject()
>>> {
>>> return input.bool;
>>> }
>>> 
>>> public void setObject(Object object)
>>> {
>>> input.bool = (Boolean)object;
>>> }
>>> 
>>> public void detach()
>>> {
>>> }
>>> }));
>>>
>>> and *yet* another way is:
>>>
>>> form.add(new CheckBox("bool", new AbstractCheckBoxModel()
>>> {
>>> @Override
>>> public boolean isSelected()
>>> {
>>> return input.bool;
>>> }
>>>
>>> @Override
>>> public void select()
>>> {
>>> input.bool = true;
>>> }
>>>
>>> @Override
>>> public void unselect()
>>> {
>>> input.bool = false;
>>> }
>>> }));
>>>
>>> If you compare these examples, the constant factor is that we're after
>>> the bool property of the Input instance. It is important that you
>>> understand that the typical thing for Wicket models to do is to pass
>>> and get values from other objects, typically your domain objects or
>>> 'form beans' (that's the name which other frameworks often use). Here,
>>> the Input instance is that object, and any of the above combinations
>>> just provides the facility for components to work on that object in a
>>> generic fashion.
>>>
>>> So... the CheckBox component calls getObject on it&

Re: [Wicket-user] check box questions how to I associate an object with a boolean seletion from a checkbox component

2007-03-27 Thread GS-ikiini

this part of the concept i understand...what i don't get is a little
deeper...from your example i am accessing a property in input. however, I
don't have such a property in my object. I some how have to figure out if
that mode is selected. basically, i want to implement imodel as show in a
example on the forum to put my object in a collection if it is selected. In
the example ivan implements imodel. and set  that model as the model that
the checkbox works with. 

http://www.nabble.com/Design-questions%3A-Use-of-controllers-and-wicket-models-tf3373279.html#a9510784

i don't understand how the implentaion works. can you help me with
understanding how that works please.

-B 



Eelco Hillenius wrote:
> 
> Wicket models are a way to locate values.
> 
> Let's take a look at wicket.examples.compref.CheckBoxPage. That page
> has a nested static class called Input, with a property bool:
> 
>   private static class Input implements Serializable
>   {
>   public Boolean bool = Boolean.TRUE;
>   }
> 
> Then, in CheckBoxPage's constructor we do (simplified):
> 
>   final Input input = new Input();
>   setModel(new CompoundPropertyModel(input));
>   Form form = new Form("form");
>   form.add(new CheckBox("bool"));
> 
> CompoundPropertyModel might be a bit distracting, so let's rewrite
> this to use a normal model:
> 
>   final Input input = new Input();
>   Form form = new Form("form");
>   form.add(new CheckBox("bool", PropertyModel(input, "bool")));
> 
> another way to rewrite the model:
> 
>   form.add(new CheckBox("bool", new Model(input)
>   {
>   public Object getObject()
>   {
>   return ((Input)super.getObject()).bool;
>   }
> 
>   public void setObject(Object object)
>   {
>   ((Input)super.getObject()).bool = (Boolean)object;
>   }
>   }));
> 
> and yet another to rewrite the model is:
> 
>   form.add(new CheckBox("bool", new IModel()
>   {
>   public Object getObject()
>   {
>   return input.bool;
>   }
>   
>   public void setObject(Object object)
>   {
>   input.bool = (Boolean)object;
>   }
>   
>   public void detach()
>   {
>   }
>   }));
> 
> and *yet* another way is:
> 
>   form.add(new CheckBox("bool", new AbstractCheckBoxModel()
>   {
>   @Override
>   public boolean isSelected()
>   {
>   return input.bool;
>   }
> 
>   @Override
>   public void select()
>   {
>   input.bool = true;
>   }
> 
>   @Override
>   public void unselect()
>   {
>   input.bool = false;
>   }
>   }));
> 
> If you compare these examples, the constant factor is that we're after
> the bool property of the Input instance. It is important that you
> understand that the typical thing for Wicket models to do is to pass
> and get values from other objects, typically your domain objects or
> 'form beans' (that's the name which other frameworks often use). Here,
> the Input instance is that object, and any of the above combinations
> just provides the facility for components to work on that object in a
> generic fashion.
> 
> So... the CheckBox component calls getObject on it's model to
> determine whether it should render itself as checked or not. It calls
> setObject on the model when it receives input. The typical case for
> that is when it is part of a form. The form calls updateModel on all
> nested components, and the components then call setObject with the
> received  (and converted) input.
> 
> Now, to get back to your original question. We could rewrite the above
> example to work on a list of checkboxes/ input objects like this:
> 
>   List inputs = new ArrayList(Arrays.asList(new Input[] {
> new Input(),
>   new Input(), new Input() }));
>   ListView l = new ListView("list", inputs)
>   {
>   @Override
>   protected void populateItem(ListItem item)
>   {
>   // item.getModel().getObject() would give the Input 
> instance for
>   // this particular list element
>   item.add(new CheckBox("bool&

Re: [Wicket-user] check box questions how to I associate an object with a boolean seletion from a checkbox component

2007-03-27 Thread GS-ikiini

ok so i'm trying to implement my own model but i have little idea what i am
suppose to be trying to do here. can someone please give a brief overview as
to what the getObject, and setObject expects and does please. I am really
lost and need some help with this. also how does the model intereact with
the componenet..what do they tell each other.?

-B



igor.vaynberg wrote:
> 
> On 3/26/07, GS-ikiini <[EMAIL PROTECTED]> wrote:
>>
>>
>> its saying that you create a custom model that takes as an argument in
>> the
>> constructor the object/model that you want to tie to a check box. this
>> model
>> is used as the model that we pass to our check box component. the
>> setObject
>> method gets called at the push of the submit button and sets that
>> object/model as part of the collection if it is selected. is this
>> correct?
> 
> 
> sounds about right.
> 
> -igor
> 
> 
> 
> -B
>>
>>
>>
>> igor.vaynberg wrote:
>> >
>> > if you dont grasp the concepts perhaps you should read the wiki page on
>> > models
>> >
>> > the concept is:
>> >
>> > since the checkbox works by setting/clearing a boolean the model
>> > translates
>> > a set boolean->insert into collection and clear boolean->remove from
>> > collection.
>> >
>> > there is explanation there, try to read that too, not just look at the
>> > code.
>> >
>> > -igor
>> >
>> >
>> > On 3/26/07, GS-ikiini <[EMAIL PROTECTED]> wrote:
>> >>
>> >>
>> >> I don't quite grasp the concepts used in that tread. from what i
>> >> understand i
>> >> should create a separate model that takes the model that has to get
>> >> set(the
>> >> model that is selected via checkbox) in the object i'm making, and
>> places
>> >> it
>> >> in a collection if it is selected. Is this correct?
>> >>
>> >> -B
>> >>
>> >>
>> >>
>> >> igor.vaynberg wrote:
>> >> >
>> >> > please search mail archives before posting
>> >> >
>> >> >
>> >>
>> http://www.nabble.com/Design-questions%3A-Use-of-controllers-and-wicket-models-tf3373279.html#a9510784
>> >> >
>> >> > -igor
>> >> >
>> >> >
>> >> > On 3/26/07, GS-ikiini <[EMAIL PROTECTED]> wrote:
>> >> >>
>> >> >>
>> >> >> Hey all,
>> >> >>
>> >> >> I have a list view that contains a list of objects. these objects
>> are
>> >> >> selectable via checkboxes. My problem is that i don't know how to
>> know
>> >> or
>> >> >> tell my code what objects have been selected. here is what i want
>> to
>> >> do.
>> >> >>
>> >> >> i ahve a list of objects lets call them pens. So i have a list of 5
>> >> >> different types of pen objects. this object type is a property ( a
>> >> list
>> >> >> of
>> >> >> this object to be specific) in another object say a pencilCase.  i
>> >> want
>> >> a
>> >> >> user to select 0-many different pens which will then be placed in
>> the
>> >> >> pencil
>> >> >> case by the applicaition. what i am not sure how to do is associate
>> >> each
>> >> >> pen
>> >> >> in the list with what is selected. I seen on the wiki that i can
>> add
>> a
>> >> >> boolean property to the pens called selected. and make that what
>> the
>> >> >> checkbox renders on. but i don't have access to the pens to do
>> that.
>> >> is
>> >> >> another some way i can do an association externally? I thought of
>> >> >> creating
>> >> >> a
>> >> >> separate list of booleans variables that i can compare side by side
>> >> with
>> >> >> the
>> >> >> list of pens. selection of check boxes will set the booleans in
>> that
>> >> >> list.
>> >> >> then look at what is true and go get the pen in the pens list at
>> that
>> >> >> position and do what i got to do with it. however I think this
>> method
>> >> 1-
>> >> >> may
>&

Re: [Wicket-user] check box questions how to I associate an object with a boolean seletion from a checkbox component

2007-03-27 Thread GS-ikiini

okI though that was a lower case bmy bad on the not so smart
question...

-B


Eelco Hillenius wrote:
> 
> java.lang.Boolean?
> 
> Eelco
> 
> On 3/26/07, GS-ikiini <[EMAIL PROTECTED]> wrote:
>>
>> one more thing...i see wehn you implement the IModel class in the thread,
>> you
>> use a data type called Boolean. What is this? is this something (an enum
>> class) that you create else wehre?
>>
>> -B
>>
>>
>>
>> igor.vaynberg wrote:
>> >
>> > On 3/26/07, GS-ikiini <[EMAIL PROTECTED]> wrote:
>> >>
>> >>
>> >> its saying that you create a custom model that takes as an argument in
>> >> the
>> >> constructor the object/model that you want to tie to a check box. this
>> >> model
>> >> is used as the model that we pass to our check box component. the
>> >> setObject
>> >> method gets called at the push of the submit button and sets that
>> >> object/model as part of the collection if it is selected. is this
>> >> correct?
>> >
>> >
>> > sounds about right.
>> >
>> > -igor
>> >
>> >
>> >
>> > -B
>> >>
>> >>
>> >>
>> >> igor.vaynberg wrote:
>> >> >
>> >> > if you dont grasp the concepts perhaps you should read the wiki page
>> on
>> >> > models
>> >> >
>> >> > the concept is:
>> >> >
>> >> > since the checkbox works by setting/clearing a boolean the model
>> >> > translates
>> >> > a set boolean->insert into collection and clear boolean->remove from
>> >> > collection.
>> >> >
>> >> > there is explanation there, try to read that too, not just look at
>> the
>> >> > code.
>> >> >
>> >> > -igor
>> >> >
>> >> >
>> >> > On 3/26/07, GS-ikiini <[EMAIL PROTECTED]> wrote:
>> >> >>
>> >> >>
>> >> >> I don't quite grasp the concepts used in that tread. from what i
>> >> >> understand i
>> >> >> should create a separate model that takes the model that has to get
>> >> >> set(the
>> >> >> model that is selected via checkbox) in the object i'm making, and
>> >> places
>> >> >> it
>> >> >> in a collection if it is selected. Is this correct?
>> >> >>
>> >> >> -B
>> >> >>
>> >> >>
>> >> >>
>> >> >> igor.vaynberg wrote:
>> >> >> >
>> >> >> > please search mail archives before posting
>> >> >> >
>> >> >> >
>> >> >>
>> >>
>> http://www.nabble.com/Design-questions%3A-Use-of-controllers-and-wicket-models-tf3373279.html#a9510784
>> >> >> >
>> >> >> > -igor
>> >> >> >
>> >> >> >
>> >> >> > On 3/26/07, GS-ikiini <[EMAIL PROTECTED]> wrote:
>> >> >> >>
>> >> >> >>
>> >> >> >> Hey all,
>> >> >> >>
>> >> >> >> I have a list view that contains a list of objects. these
>> objects
>> >> are
>> >> >> >> selectable via checkboxes. My problem is that i don't know how
>> to
>> >> know
>> >> >> or
>> >> >> >> tell my code what objects have been selected. here is what i
>> want
>> >> to
>> >> >> do.
>> >> >> >>
>> >> >> >> i ahve a list of objects lets call them pens. So i have a list
>> of 5
>> >> >> >> different types of pen objects. this object type is a property (
>> a
>> >> >> list
>> >> >> >> of
>> >> >> >> this object to be specific) in another object say a pencilCase. 
>> i
>> >> >> want
>> >> >> a
>> >> >> >> user to select 0-many different pens which will then be placed
>> in
>> >> the
>> >> >> >> pencil
>> >> >> >> case by the applicaition. what i am not sure how to do is
>> associate
>>

Re: [Wicket-user] check box questions how to I associate an object with a boolean seletion from a checkbox component

2007-03-26 Thread GS-ikiini

one more thing...i see wehn you implement the IModel class in the thread, you
use a data type called Boolean. What is this? is this something (an enum
class) that you create else wehre?

-B



igor.vaynberg wrote:
> 
> On 3/26/07, GS-ikiini <[EMAIL PROTECTED]> wrote:
>>
>>
>> its saying that you create a custom model that takes as an argument in
>> the
>> constructor the object/model that you want to tie to a check box. this
>> model
>> is used as the model that we pass to our check box component. the
>> setObject
>> method gets called at the push of the submit button and sets that
>> object/model as part of the collection if it is selected. is this
>> correct?
> 
> 
> sounds about right.
> 
> -igor
> 
> 
> 
> -B
>>
>>
>>
>> igor.vaynberg wrote:
>> >
>> > if you dont grasp the concepts perhaps you should read the wiki page on
>> > models
>> >
>> > the concept is:
>> >
>> > since the checkbox works by setting/clearing a boolean the model
>> > translates
>> > a set boolean->insert into collection and clear boolean->remove from
>> > collection.
>> >
>> > there is explanation there, try to read that too, not just look at the
>> > code.
>> >
>> > -igor
>> >
>> >
>> > On 3/26/07, GS-ikiini <[EMAIL PROTECTED]> wrote:
>> >>
>> >>
>> >> I don't quite grasp the concepts used in that tread. from what i
>> >> understand i
>> >> should create a separate model that takes the model that has to get
>> >> set(the
>> >> model that is selected via checkbox) in the object i'm making, and
>> places
>> >> it
>> >> in a collection if it is selected. Is this correct?
>> >>
>> >> -B
>> >>
>> >>
>> >>
>> >> igor.vaynberg wrote:
>> >> >
>> >> > please search mail archives before posting
>> >> >
>> >> >
>> >>
>> http://www.nabble.com/Design-questions%3A-Use-of-controllers-and-wicket-models-tf3373279.html#a9510784
>> >> >
>> >> > -igor
>> >> >
>> >> >
>> >> > On 3/26/07, GS-ikiini <[EMAIL PROTECTED]> wrote:
>> >> >>
>> >> >>
>> >> >> Hey all,
>> >> >>
>> >> >> I have a list view that contains a list of objects. these objects
>> are
>> >> >> selectable via checkboxes. My problem is that i don't know how to
>> know
>> >> or
>> >> >> tell my code what objects have been selected. here is what i want
>> to
>> >> do.
>> >> >>
>> >> >> i ahve a list of objects lets call them pens. So i have a list of 5
>> >> >> different types of pen objects. this object type is a property ( a
>> >> list
>> >> >> of
>> >> >> this object to be specific) in another object say a pencilCase.  i
>> >> want
>> >> a
>> >> >> user to select 0-many different pens which will then be placed in
>> the
>> >> >> pencil
>> >> >> case by the applicaition. what i am not sure how to do is associate
>> >> each
>> >> >> pen
>> >> >> in the list with what is selected. I seen on the wiki that i can
>> add
>> a
>> >> >> boolean property to the pens called selected. and make that what
>> the
>> >> >> checkbox renders on. but i don't have access to the pens to do
>> that.
>> >> is
>> >> >> another some way i can do an association externally? I thought of
>> >> >> creating
>> >> >> a
>> >> >> separate list of booleans variables that i can compare side by side
>> >> with
>> >> >> the
>> >> >> list of pens. selection of check boxes will set the booleans in
>> that
>> >> >> list.
>> >> >> then look at what is true and go get the pen in the pens list at
>> that
>> >> >> position and do what i got to do with it. however I think this
>> method
>> >> 1-
>> >> >> may
>> >> >> not work and 2 - is to elementary and not very professional. I am
>> sure
>> >> >> there
>> >> >> is another 

Re: [Wicket-user] check box questions how to I associate an object with a boolean seletion from a checkbox component

2007-03-26 Thread GS-ikiini

Great so i do understand somewhat. I am reading the wiki on models now and
its becoming more clear. I thought i knoew but apparently i didn't know the
lowlevel workings. If i get stuck i will be seeking more help. Thanks a lot

-B



igor.vaynberg wrote:
> 
> On 3/26/07, GS-ikiini <[EMAIL PROTECTED]> wrote:
>>
>>
>> its saying that you create a custom model that takes as an argument in
>> the
>> constructor the object/model that you want to tie to a check box. this
>> model
>> is used as the model that we pass to our check box component. the
>> setObject
>> method gets called at the push of the submit button and sets that
>> object/model as part of the collection if it is selected. is this
>> correct?
> 
> 
> sounds about right.
> 
> -igor
> 
> 
> 
> -B
>>
>>
>>
>> igor.vaynberg wrote:
>> >
>> > if you dont grasp the concepts perhaps you should read the wiki page on
>> > models
>> >
>> > the concept is:
>> >
>> > since the checkbox works by setting/clearing a boolean the model
>> > translates
>> > a set boolean->insert into collection and clear boolean->remove from
>> > collection.
>> >
>> > there is explanation there, try to read that too, not just look at the
>> > code.
>> >
>> > -igor
>> >
>> >
>> > On 3/26/07, GS-ikiini <[EMAIL PROTECTED]> wrote:
>> >>
>> >>
>> >> I don't quite grasp the concepts used in that tread. from what i
>> >> understand i
>> >> should create a separate model that takes the model that has to get
>> >> set(the
>> >> model that is selected via checkbox) in the object i'm making, and
>> places
>> >> it
>> >> in a collection if it is selected. Is this correct?
>> >>
>> >> -B
>> >>
>> >>
>> >>
>> >> igor.vaynberg wrote:
>> >> >
>> >> > please search mail archives before posting
>> >> >
>> >> >
>> >>
>> http://www.nabble.com/Design-questions%3A-Use-of-controllers-and-wicket-models-tf3373279.html#a9510784
>> >> >
>> >> > -igor
>> >> >
>> >> >
>> >> > On 3/26/07, GS-ikiini <[EMAIL PROTECTED]> wrote:
>> >> >>
>> >> >>
>> >> >> Hey all,
>> >> >>
>> >> >> I have a list view that contains a list of objects. these objects
>> are
>> >> >> selectable via checkboxes. My problem is that i don't know how to
>> know
>> >> or
>> >> >> tell my code what objects have been selected. here is what i want
>> to
>> >> do.
>> >> >>
>> >> >> i ahve a list of objects lets call them pens. So i have a list of 5
>> >> >> different types of pen objects. this object type is a property ( a
>> >> list
>> >> >> of
>> >> >> this object to be specific) in another object say a pencilCase.  i
>> >> want
>> >> a
>> >> >> user to select 0-many different pens which will then be placed in
>> the
>> >> >> pencil
>> >> >> case by the applicaition. what i am not sure how to do is associate
>> >> each
>> >> >> pen
>> >> >> in the list with what is selected. I seen on the wiki that i can
>> add
>> a
>> >> >> boolean property to the pens called selected. and make that what
>> the
>> >> >> checkbox renders on. but i don't have access to the pens to do
>> that.
>> >> is
>> >> >> another some way i can do an association externally? I thought of
>> >> >> creating
>> >> >> a
>> >> >> separate list of booleans variables that i can compare side by side
>> >> with
>> >> >> the
>> >> >> list of pens. selection of check boxes will set the booleans in
>> that
>> >> >> list.
>> >> >> then look at what is true and go get the pen in the pens list at
>> that
>> >> >> position and do what i got to do with it. however I think this
>> method
>> >> 1-
>> >> >> may
>> >> >> not work and 2 - is to elementary and not very professional. I am
>> sure
>> >> >> there

Re: [Wicket-user] check box questions how to I associate an object with a boolean seletion from a checkbox component

2007-03-26 Thread GS-ikiini

I read the thread again and still don't quite understand. I thought i
understod models but maybe i don't i am going to read the wiki on that now.
but in between this is what i think all the tread is saying tell me if i'm
wrong or not. 

its saying that you create a custom model that takes as an argument in the
constructor the object/model that you want to tie to a check box. this model
is used as the model that we pass to our check box component. the setObject
method gets called at the push of the submit button and sets that
object/model as part of the collection if it is selected. is this correct? 

-B 



igor.vaynberg wrote:
> 
> if you dont grasp the concepts perhaps you should read the wiki page on
> models
> 
> the concept is:
> 
> since the checkbox works by setting/clearing a boolean the model
> translates
> a set boolean->insert into collection and clear boolean->remove from
> collection.
> 
> there is explanation there, try to read that too, not just look at the
> code.
> 
> -igor
> 
> 
> On 3/26/07, GS-ikiini <[EMAIL PROTECTED]> wrote:
>>
>>
>> I don't quite grasp the concepts used in that tread. from what i
>> understand i
>> should create a separate model that takes the model that has to get
>> set(the
>> model that is selected via checkbox) in the object i'm making, and places
>> it
>> in a collection if it is selected. Is this correct?
>>
>> -B
>>
>>
>>
>> igor.vaynberg wrote:
>> >
>> > please search mail archives before posting
>> >
>> >
>> http://www.nabble.com/Design-questions%3A-Use-of-controllers-and-wicket-models-tf3373279.html#a9510784
>> >
>> > -igor
>> >
>> >
>> > On 3/26/07, GS-ikiini <[EMAIL PROTECTED]> wrote:
>> >>
>> >>
>> >> Hey all,
>> >>
>> >> I have a list view that contains a list of objects. these objects are
>> >> selectable via checkboxes. My problem is that i don't know how to know
>> or
>> >> tell my code what objects have been selected. here is what i want to
>> do.
>> >>
>> >> i ahve a list of objects lets call them pens. So i have a list of 5
>> >> different types of pen objects. this object type is a property ( a
>> list
>> >> of
>> >> this object to be specific) in another object say a pencilCase.  i
>> want
>> a
>> >> user to select 0-many different pens which will then be placed in the
>> >> pencil
>> >> case by the applicaition. what i am not sure how to do is associate
>> each
>> >> pen
>> >> in the list with what is selected. I seen on the wiki that i can add a
>> >> boolean property to the pens called selected. and make that what the
>> >> checkbox renders on. but i don't have access to the pens to do that.
>> is
>> >> another some way i can do an association externally? I thought of
>> >> creating
>> >> a
>> >> separate list of booleans variables that i can compare side by side
>> with
>> >> the
>> >> list of pens. selection of check boxes will set the booleans in that
>> >> list.
>> >> then look at what is true and go get the pen in the pens list at that
>> >> position and do what i got to do with it. however I think this method
>> 1-
>> >> may
>> >> not work and 2 - is to elementary and not very professional. I am sure
>> >> there
>> >> is another way to do this. Please advise.
>> >>
>> >>
>> >> -B
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/check-box-questions-how-to-I-associate-an-object-with-a-boolean-seletion-from-a-checkbox-component-tf3469311.html#a9680769
>> >> Sent from the Wicket - User mailing list archive at Nabble.com.
>> >>
>> >>
>> >>
>> -
>> >> Take Surveys. Earn Cash. Influence the Future of IT
>> >> Join SourceForge.net's Techsay panel and you'll get the chance to
>> share
>> >> your
>> >> opinions on IT & business topics through brief surveys-and earn cash
>> >>
>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>> >> ___
>> >>

Re: [Wicket-user] check box questions how to I associate an object with a boolean seletion from a checkbox component

2007-03-26 Thread GS-ikiini

I don't quite grasp the concepts used in that tread. from what i understand i
should create a separate model that takes the model that has to get set(the
model that is selected via checkbox) in the object i'm making, and places it
in a collection if it is selected. Is this correct?

-B



igor.vaynberg wrote:
> 
> please search mail archives before posting
> 
> http://www.nabble.com/Design-questions%3A-Use-of-controllers-and-wicket-models-tf3373279.html#a9510784
> 
> -igor
> 
> 
> On 3/26/07, GS-ikiini <[EMAIL PROTECTED]> wrote:
>>
>>
>> Hey all,
>>
>> I have a list view that contains a list of objects. these objects are
>> selectable via checkboxes. My problem is that i don't know how to know or
>> tell my code what objects have been selected. here is what i want to do.
>>
>> i ahve a list of objects lets call them pens. So i have a list of 5
>> different types of pen objects. this object type is a property ( a list
>> of
>> this object to be specific) in another object say a pencilCase.  i want a
>> user to select 0-many different pens which will then be placed in the
>> pencil
>> case by the applicaition. what i am not sure how to do is associate each
>> pen
>> in the list with what is selected. I seen on the wiki that i can add a
>> boolean property to the pens called selected. and make that what the
>> checkbox renders on. but i don't have access to the pens to do that. is
>> another some way i can do an association externally? I thought of
>> creating
>> a
>> separate list of booleans variables that i can compare side by side with
>> the
>> list of pens. selection of check boxes will set the booleans in that
>> list.
>> then look at what is true and go get the pen in the pens list at that
>> position and do what i got to do with it. however I think this method 1-
>> may
>> not work and 2 - is to elementary and not very professional. I am sure
>> there
>> is another way to do this. Please advise.
>>
>>
>> -B
>> --
>> View this message in context:
>> http://www.nabble.com/check-box-questions-how-to-I-associate-an-object-with-a-boolean-seletion-from-a-checkbox-component-tf3469311.html#a9680769
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>> Take Surveys. Earn Cash. Influence the Future of IT
>> Join SourceForge.net's Techsay panel and you'll get the chance to share
>> your
>> opinions on IT & business topics through brief surveys-and earn cash
>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>> ___
>> Wicket-user mailing list
>> Wicket-user@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/wicket-user
>>
> 
> -
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> 
> 

-- 
View this message in context: 
http://www.nabble.com/check-box-questions-how-to-I-associate-an-object-with-a-boolean-seletion-from-a-checkbox-component-tf3469311.html#a9682170
Sent from the Wicket - User mailing list archive at Nabble.com.


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] check box questions how to I associate an object with a boolean seletion from a checkbox component

2007-03-26 Thread GS-ikiini

Hey all,

I have a list view that contains a list of objects. these objects are
selectable via checkboxes. My problem is that i don't know how to know or
tell my code what objects have been selected. here is what i want to do.

i ahve a list of objects lets call them pens. So i have a list of 5
different types of pen objects. this object type is a property ( a list of
this object to be specific) in another object say a pencilCase.  i want a
user to select 0-many different pens which will then be placed in the pencil
case by the applicaition. what i am not sure how to do is associate each pen
in the list with what is selected. I seen on the wiki that i can add a
boolean property to the pens called selected. and make that what the
checkbox renders on. but i don't have access to the pens to do that. is
another some way i can do an association externally? I thought of creating a
separate list of booleans variables that i can compare side by side with the
list of pens. selection of check boxes will set the booleans in that list.
then look at what is true and go get the pen in the pens list at that
position and do what i got to do with it. however I think this method 1- may
not work and 2 - is to elementary and not very professional. I am sure there
is another way to do this. Please advise.


-B
-- 
View this message in context: 
http://www.nabble.com/check-box-questions-how-to-I-associate-an-object-with-a-boolean-seletion-from-a-checkbox-component-tf3469311.html#a9680769
Sent from the Wicket - User mailing list archive at Nabble.com.


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] form processing - getting dropdown selection back to onSubmit method.

2007-03-20 Thread GS-ikiini

don't understand: "look up a localized string with the key "nullValid"
(rather than  
"null") to represent the null option." - can you elaborate a bit please.
need to know what a localised string is and what is its key. thank you

-B

Ryan Holmes wrote:
> 
> DropDownChoice.setNullValid(true)
> 
> And remember that for a "null valid" drop down choice, Wicket will  
> look up a localized string with the key "nullValid" (rather than  
> "null") to represent the null option.
> 
> Also see the JavaDocs for DropDownChoice and it's superclasses, plus  
> this wiki page: http://cwiki.apache.org/WICKET/dropdownchoice- 
> examples.html
> 
> -Ryan
> 
> On Mar 16, 2007, at 1:55 PM, GS-ikiini wrote:
> 
>>
>> hey,
>>
>> is there way to get the "select one" option to remain in the  
>> selection list
>> after the user has made a selection?
>>
>> -B
>>
>>
>> igor.vaynberg wrote:
>>>
>>> the id of dropdowns has nothing to do with their model. i am not  
>>> using a
>>> compound property model anywhere in the code, nor am i not  
>>> specifying it
>>> directly.
>>>
>>> the model for each dropdown is specified as a propertymodel where  
>>> "this"
>>> refers to the page and the string refers to the property on that  
>>> page.
>>>
>>> so the selected user object will go into the "user" page property,  
>>> and the
>>> selected logtype will go into the page's "logtype" property just  
>>> like the
>>> property models specify.
>>>
>>> then your dataprovider picks up those two properties and uses them to
>>> filter
>>> the result just like the code shows.
>>>
>>> the models are just glue between formcomponent and properties on  
>>> some java
>>> bean - which in this case happens to be the page.
>>>
>>> -igor
>>>
>>>
>>> On 3/16/07, GS-ikiini <[EMAIL PROTECTED]> wrote:
>>>>
>>>>
>>>> let me make sure i understand..
>>>> add(new DropDownChoice("users",new PropertyModel(this,  
>>>> "user"),));
>>>> the Property model returns the User model. and the id of this
>>>> dropdownchoice
>>>> is used to access that model? so get or setUsers on the User user of
>>>> this?
>>>> if that is correct. can i do  add(new DropDownChoice("users",new
>>>> PropertyModel(mydataprovider, "user"),)); and get a model  
>>>> that is a
>>>> property over there set to something?
>>>>
>>>> let me give a bit more detail..
>>>>
>>>> I have a filter in my dataprovider that searches my DB using a  
>>>> service
>>>> that
>>>> takes users and logTypes and returns a list. thats why i need to  
>>>> set them
>>>> in
>>>> there. I have a list of all the users tied to a list and all the log
>>>> types
>>>> tied to a list in the web page. i just want to take the once  
>>>> selected and
>>>> hand it to the dataprovider who will give me back a list of all the
>>>> process
>>>> matching those 2 models it was given. I understand what you said  
>>>> but just
>>>> need some clarity on weither or not it would work in the way i am  
>>>> doing
>>>> it.
>>>> or is there another way i should be approaching the problem.  
>>>> Thank you
>>>> for
>>>> you repeated assistance.
>>>>
>>>> -B
>>>> .
>>>>
>>>> igor.vaynberg wrote:
>>>>>
>>>>> once you understand models it becomes quiet trivial :)
>>>>> below is the simple way (without using a compound property model)
>>>>>
>>>>> class mypage extends webpage {
>>>>> private user user;
>>>>> private logtype logtype;
>>>>> // getters setters (only necessary in 1.2.x, in later wicket will
>>>> access
>>>>> private properties through property model)
>>>>>
>>>>> public mypage() {
>>>>>   form form=new form();
>>>>>   add(new DropDownChoice("users",new PropertyModel(this,
>>>> "user"),));
>>>>>   add(new DropDownChoice("logtypes", new Prope

Re: [Wicket-user] form processing - getting dropdown selection back to onSubmit method.

2007-03-16 Thread GS-ikiini

hey,

is there way to get the "select one" option to remain in the selection list
after the user has made a selection? 

-B


igor.vaynberg wrote:
> 
> the id of dropdowns has nothing to do with their model. i am not using a
> compound property model anywhere in the code, nor am i not specifying it
> directly.
> 
> the model for each dropdown is specified as a propertymodel where "this"
> refers to the page and the string refers to the property on that page.
> 
> so the selected user object will go into the "user" page property, and the
> selected logtype will go into the page's "logtype" property just like the
> property models specify.
> 
> then your dataprovider picks up those two properties and uses them to
> filter
> the result just like the code shows.
> 
> the models are just glue between formcomponent and properties on some java
> bean - which in this case happens to be the page.
> 
> -igor
> 
> 
> On 3/16/07, GS-ikiini <[EMAIL PROTECTED]> wrote:
>>
>>
>> let me make sure i understand..
>> add(new DropDownChoice("users",new PropertyModel(this, "user"),));
>> the Property model returns the User model. and the id of this
>> dropdownchoice
>> is used to access that model? so get or setUsers on the User user of
>> this?
>> if that is correct. can i do  add(new DropDownChoice("users",new
>> PropertyModel(mydataprovider, "user"),)); and get a model that is a
>> property over there set to something?
>>
>> let me give a bit more detail..
>>
>> I have a filter in my dataprovider that searches my DB using a service
>> that
>> takes users and logTypes and returns a list. thats why i need to set them
>> in
>> there. I have a list of all the users tied to a list and all the log
>> types
>> tied to a list in the web page. i just want to take the once selected and
>> hand it to the dataprovider who will give me back a list of all the
>> process
>> matching those 2 models it was given. I understand what you said but just
>> need some clarity on weither or not it would work in the way i am doing
>> it.
>> or is there another way i should be approaching the problem. Thank you
>> for
>> you repeated assistance.
>>
>> -B
>> .
>>
>> igor.vaynberg wrote:
>> >
>> > once you understand models it becomes quiet trivial :)
>> > below is the simple way (without using a compound property model)
>> >
>> > class mypage extends webpage {
>> > private user user;
>> > private logtype logtype;
>> > // getters setters (only necessary in 1.2.x, in later wicket will
>> access
>> > private properties through property model)
>> >
>> > public mypage() {
>> >   form form=new form();
>> >   add(new DropDownChoice("users",new PropertyModel(this,
>> "user"),));
>> >   add(new DropDownChoice("logtypes", new PropertyModel(this,
>> > "logtype"),...));
>> >
>> >add(new DataView("results",new MyDataProvider(),...
>> >...
>> >
>> >
>> >   private class MyDataProvider implements IDataProvider {
>> >   public Iterator iterator(int f,int c) {
>> >   return getlogs(user,logtype);
>> >}
>> >}
>> > }
>> >
>> > and thats all she wrote. makes sense?
>> >
>> > -igor
>> >
>> >
>> >
>> >
>> > On 3/15/07, GS-ikiini <[EMAIL PROTECTED]> wrote:
>> >>
>> >>
>> >> The popilateItem as i know it is used within the dataview. That part i
>> >> understand. let me re-explain myself.
>> >>
>> >> on my webpage class, i have a dataview component. i also have a
>> >> dropdownview
>> >> component . they are both children of a form component. i have a beans
>> >> user,
>> >> log and logtype. (I am using wicket along with spring.). now in my
>> >> webpage
>> >> i have a drop down class whic implements dropdownchoice. the list for
>> the
>> >> drop down is generated earlier in the webpage class. i have a drop
>> down
>> >> for
>> >> the user. and a drop down for the log type. I want to get the user
>> >> selection
>> >> for these two, tie it back to the appropriate bean then set those
>> beans
>> >> in
>> >> the implementation of the dataprovider then use th

Re: [Wicket-user] form processing - getting dropdown selection back to onSubmit method.

2007-03-16 Thread GS-ikiini

hey i think i figured it outi am passing a list of the object ideed and
the toSting method is automatically called to display what the user sees. I
need to go look up how to alter that using the ichoiceRender..once i get
that then i think it would work the way i want it to...you've been a big
help. Thank you so much. can you point me to the wiki please. Thanks again.

-B



igor.vaynberg wrote:
> 
> the id of dropdowns has nothing to do with their model. i am not using a
> compound property model anywhere in the code, nor am i not specifying it
> directly.
> 
> the model for each dropdown is specified as a propertymodel where "this"
> refers to the page and the string refers to the property on that page.
> 
> so the selected user object will go into the "user" page property, and the
> selected logtype will go into the page's "logtype" property just like the
> property models specify.
> 
> then your dataprovider picks up those two properties and uses them to
> filter
> the result just like the code shows.
> 
> the models are just glue between formcomponent and properties on some java
> bean - which in this case happens to be the page.
> 
> -igor
> 
> 
> On 3/16/07, GS-ikiini <[EMAIL PROTECTED]> wrote:
>>
>>
>> let me make sure i understand..
>> add(new DropDownChoice("users",new PropertyModel(this, "user"),));
>> the Property model returns the User model. and the id of this
>> dropdownchoice
>> is used to access that model? so get or setUsers on the User user of
>> this?
>> if that is correct. can i do  add(new DropDownChoice("users",new
>> PropertyModel(mydataprovider, "user"),)); and get a model that is a
>> property over there set to something?
>>
>> let me give a bit more detail..
>>
>> I have a filter in my dataprovider that searches my DB using a service
>> that
>> takes users and logTypes and returns a list. thats why i need to set them
>> in
>> there. I have a list of all the users tied to a list and all the log
>> types
>> tied to a list in the web page. i just want to take the once selected and
>> hand it to the dataprovider who will give me back a list of all the
>> process
>> matching those 2 models it was given. I understand what you said but just
>> need some clarity on weither or not it would work in the way i am doing
>> it.
>> or is there another way i should be approaching the problem. Thank you
>> for
>> you repeated assistance.
>>
>> -B
>> .
>>
>> igor.vaynberg wrote:
>> >
>> > once you understand models it becomes quiet trivial :)
>> > below is the simple way (without using a compound property model)
>> >
>> > class mypage extends webpage {
>> > private user user;
>> > private logtype logtype;
>> > // getters setters (only necessary in 1.2.x, in later wicket will
>> access
>> > private properties through property model)
>> >
>> > public mypage() {
>> >   form form=new form();
>> >   add(new DropDownChoice("users",new PropertyModel(this,
>> "user"),));
>> >   add(new DropDownChoice("logtypes", new PropertyModel(this,
>> > "logtype"),...));
>> >
>> >add(new DataView("results",new MyDataProvider(),...
>> >...
>> >
>> >
>> >   private class MyDataProvider implements IDataProvider {
>> >   public Iterator iterator(int f,int c) {
>> >   return getlogs(user,logtype);
>> >}
>> >}
>> > }
>> >
>> > and thats all she wrote. makes sense?
>> >
>> > -igor
>> >
>> >
>> >
>> >
>> > On 3/15/07, GS-ikiini <[EMAIL PROTECTED]> wrote:
>> >>
>> >>
>> >> The popilateItem as i know it is used within the dataview. That part i
>> >> understand. let me re-explain myself.
>> >>
>> >> on my webpage class, i have a dataview component. i also have a
>> >> dropdownview
>> >> component . they are both children of a form component. i have a beans
>> >> user,
>> >> log and logtype. (I am using wicket along with spring.). now in my
>> >> webpage
>> >> i have a drop down class whic implements dropdownchoice. the list for
>> the
>> >> drop down is generated earlier in the webpage class. i have a drop
>> down
>> >> for
>> >> the user. and a drop down for t

Re: [Wicket-user] form processing - getting dropdown selection back to onSubmit method.

2007-03-16 Thread GS-ikiini

I see..I am still thinking in old java style...let me try again...

i have my dataprovider class/model. my page class and 2 beans. in my
dataprovider class.model, the 2 beans are properties. that i need to set via
drop down choice. so i set them as specified here. what i don't understand
is where does the user object that we set come from? if i select string x
from the drop down how do we get the object that sting x in the drop down
list belongs to.? i have many users objects is my point. Can you explain
that part to me please. is ther some special way i generate the list for the
drop down...maybe thats waht i'm not getting..

-B



igor.vaynberg wrote:
> 
> the id of dropdowns has nothing to do with their model. i am not using a
> compound property model anywhere in the code, nor am i not specifying it
> directly.
> 
> the model for each dropdown is specified as a propertymodel where "this"
> refers to the page and the string refers to the property on that page.
> 
> so the selected user object will go into the "user" page property, and the
> selected logtype will go into the page's "logtype" property just like the
> property models specify.
> 
> then your dataprovider picks up those two properties and uses them to
> filter
> the result just like the code shows.
> 
> the models are just glue between formcomponent and properties on some java
> bean - which in this case happens to be the page.
> 
> -igor
> 
> 
> On 3/16/07, GS-ikiini <[EMAIL PROTECTED]> wrote:
>>
>>
>> let me make sure i understand..
>> add(new DropDownChoice("users",new PropertyModel(this, "user"),));
>> the Property model returns the User model. and the id of this
>> dropdownchoice
>> is used to access that model? so get or setUsers on the User user of
>> this?
>> if that is correct. can i do  add(new DropDownChoice("users",new
>> PropertyModel(mydataprovider, "user"),)); and get a model that is a
>> property over there set to something?
>>
>> let me give a bit more detail..
>>
>> I have a filter in my dataprovider that searches my DB using a service
>> that
>> takes users and logTypes and returns a list. thats why i need to set them
>> in
>> there. I have a list of all the users tied to a list and all the log
>> types
>> tied to a list in the web page. i just want to take the once selected and
>> hand it to the dataprovider who will give me back a list of all the
>> process
>> matching those 2 models it was given. I understand what you said but just
>> need some clarity on weither or not it would work in the way i am doing
>> it.
>> or is there another way i should be approaching the problem. Thank you
>> for
>> you repeated assistance.
>>
>> -B
>> .
>>
>> igor.vaynberg wrote:
>> >
>> > once you understand models it becomes quiet trivial :)
>> > below is the simple way (without using a compound property model)
>> >
>> > class mypage extends webpage {
>> > private user user;
>> > private logtype logtype;
>> > // getters setters (only necessary in 1.2.x, in later wicket will
>> access
>> > private properties through property model)
>> >
>> > public mypage() {
>> >   form form=new form();
>> >   add(new DropDownChoice("users",new PropertyModel(this,
>> "user"),));
>> >   add(new DropDownChoice("logtypes", new PropertyModel(this,
>> > "logtype"),...));
>> >
>> >add(new DataView("results",new MyDataProvider(),...
>> >...
>> >
>> >
>> >   private class MyDataProvider implements IDataProvider {
>> >   public Iterator iterator(int f,int c) {
>> >   return getlogs(user,logtype);
>> >}
>> >}
>> > }
>> >
>> > and thats all she wrote. makes sense?
>> >
>> > -igor
>> >
>> >
>> >
>> >
>> > On 3/15/07, GS-ikiini <[EMAIL PROTECTED]> wrote:
>> >>
>> >>
>> >> The popilateItem as i know it is used within the dataview. That part i
>> >> understand. let me re-explain myself.
>> >>
>> >> on my webpage class, i have a dataview component. i also have a
>> >> dropdownview
>> >> component . they are both children of a form component. i have a beans
>> >> user,
>> >> log and logtype. (I am using wicket along with spring.). now in my

Re: [Wicket-user] form processing - getting dropdown selection back to onSubmit method.

2007-03-16 Thread GS-ikiini

let me make sure i understand..
 add(new DropDownChoice("users",new PropertyModel(this, "user"),));
the Property model returns the User model. and the id of this dropdownchoice
is used to access that model? so get or setUsers on the User user of this?
if that is correct. can i do  add(new DropDownChoice("users",new
PropertyModel(mydataprovider, "user"),)); and get a model that is a
property over there set to something?

let me give a bit more detail..

I have a filter in my dataprovider that searches my DB using a service that
takes users and logTypes and returns a list. thats why i need to set them in
there. I have a list of all the users tied to a list and all the log types
tied to a list in the web page. i just want to take the once selected and
hand it to the dataprovider who will give me back a list of all the process
matching those 2 models it was given. I understand what you said but just
need some clarity on weither or not it would work in the way i am doing it.
or is there another way i should be approaching the problem. Thank you for
you repeated assistance.

-B
.

igor.vaynberg wrote:
> 
> once you understand models it becomes quiet trivial :)
> below is the simple way (without using a compound property model)
> 
> class mypage extends webpage {
> private user user;
> private logtype logtype;
> // getters setters (only necessary in 1.2.x, in later wicket will access
> private properties through property model)
> 
> public mypage() {
>   form form=new form();
>   add(new DropDownChoice("users",new PropertyModel(this, "user"),));
>   add(new DropDownChoice("logtypes", new PropertyModel(this,
> "logtype"),...));
> 
>add(new DataView("results",new MyDataProvider(),...
>...
> 
> 
>   private class MyDataProvider implements IDataProvider {
>   public Iterator iterator(int f,int c) {
>   return getlogs(user,logtype);
>}
>}
> }
> 
> and thats all she wrote. makes sense?
> 
> -igor
> 
> 
> 
> 
> On 3/15/07, GS-ikiini <[EMAIL PROTECTED]> wrote:
>>
>>
>> The popilateItem as i know it is used within the dataview. That part i
>> understand. let me re-explain myself.
>>
>> on my webpage class, i have a dataview component. i also have a
>> dropdownview
>> component . they are both children of a form component. i have a beans
>> user,
>> log and logtype. (I am using wicket along with spring.). now in my
>> webpage
>> i have a drop down class whic implements dropdownchoice. the list for the
>> drop down is generated earlier in the webpage class. i have a drop down
>> for
>> the user. and a drop down for the log type. I want to get the user
>> selection
>> for these two, tie it back to the appropriate bean then set those beans
>> in
>> the implementation of the dataprovider then use the implementation of the
>> data provider as the model for the dataview. My problem lies is getting
>> the
>> user selection from the drop down. I can't seem get it without having a
>> model to tie it to.
>>
>>
>>
>> igor.vaynberg wrote:
>> >
>> > first of all the dataprovider is a readonly interface, it has no set
>> > method
>> > like the model.
>> >
>> > that said what you want is simple:
>> >
>> > populateitem(item item) {
>> >final imodel namemodel=new propertymodel(item.getmodel(), "name");
>> >add(new dropdownchoice("names",namemodel,nameslist));
>> > }
>> >
>> > -igor
>> >
>> >
>> > On 3/15/07, GS-ikiini <[EMAIL PROTECTED]> wrote:
>> >>
>> >>
>> >> i seei have a fair understaning of models this is what i am doing:
>> I
>> >> have
>> >> a dataprovider that services a dataview. this data provider is the the
>> >> model
>> >> that i ultimately need to update. however the properties within this
>> are
>> >> beans i need to set them using the selection from the dropdown. so fo
>> >> instancemy dataprovider has a property that is a saya user. this
>> user
>> >> itself has a property called name. which is a string. now in my
>> webpage
>> >> class i have a dropdown with a list of names. what i need to do is
>> select
>> >> a
>> >> name and get the appropriate bean to pass it to the dataprovider so
>> that
>> >> it
>> >> can do its thing and return its results to the dataview. how would i
>> go
>> >> about this?

Re: [Wicket-user] form processing - getting dropdown selection back to onSubmit method.

2007-03-15 Thread GS-ikiini

 The popilateItem as i know it is used within the dataview. That part i
understand. let me re-explain myself.

on my webpage class, i have a dataview component. i also have a dropdownview
component . they are both children of a form component. i have a beans user,
log and logtype. (I am using wicket along with spring.). now in my webpage
i have a drop down class whic implements dropdownchoice. the list for the
drop down is generated earlier in the webpage class. i have a drop down for
the user. and a drop down for the log type. I want to get the user selection
for these two, tie it back to the appropriate bean then set those beans in
the implementation of the dataprovider then use the implementation of the
data provider as the model for the dataview. My problem lies is getting the
user selection from the drop down. I can't seem get it without having a
model to tie it to.



igor.vaynberg wrote:
> 
> first of all the dataprovider is a readonly interface, it has no set
> method
> like the model.
> 
> that said what you want is simple:
> 
> populateitem(item item) {
>final imodel namemodel=new propertymodel(item.getmodel(), "name");
>add(new dropdownchoice("names",namemodel,nameslist));
> }
> 
> -igor
> 
> 
> On 3/15/07, GS-ikiini <[EMAIL PROTECTED]> wrote:
>>
>>
>> i seei have a fair understaning of models this is what i am doing: I
>> have
>> a dataprovider that services a dataview. this data provider is the the
>> model
>> that i ultimately need to update. however the properties within this are
>> beans i need to set them using the selection from the dropdown. so fo
>> instancemy dataprovider has a property that is a saya user. this user
>> itself has a property called name. which is a string. now in my webpage
>> class i have a dropdown with a list of names. what i need to do is select
>> a
>> name and get the appropriate bean to pass it to the dataprovider so that
>> it
>> can do its thing and return its results to the dataview. how would i go
>> about this?
>>
>> -B
>>
>>
>> igor.vaynberg wrote:
>> >
>> > since you dont specify the model for the selection wicket will look for
>> a
>> > compoundpropertymodel you have somewhere above. the value will go into
>> the
>> > bean that is in the compoundpropertymodel into a property with the same
>> > name
>> > as the id of the dropdownchoice.
>> >
>> > there is a great page on models on our wiki
>> >
>> > -igor
>> >
>> >
>> > On 3/15/07, GS-ikiini <[EMAIL PROTECTED]> wrote:
>> >>
>> >>
>> >> also how do i get the user selection from a drop down that uses the
>> >> dropDownchoice(String id,list choinces) constrctor?
>> >>
>> >>
>> >>
>> >> Gwyn wrote:
>> >> >
>> >> > I'm away from my main computer now, so can't check code, but have
>> you
>> >> > had a look at the Wicket examples, e.g.
>> >> >
>> >>
>> http://www.wicket-library.com/wicket-examples/compref?wicket:bookmarkablePage=:wicket.examples.compref.DropDownChoicePage
>> >> >
>> >> > /Gwyn
>> >> >
>> >> > On 15/03/07, GS-ikiini <[EMAIL PROTECTED]> wrote:
>> >> >>
>> >> >> ok here is another question...how do i by pass the validating and
>> form
>> >> >> processing and go straight to the onSubmit method of my form(not
>> the
>> >> >> button)?
>> >> >>
>> >> >> -B
>> >> >>
>> >> >>
>> >> >>
>> >> >> GS-ikiini wrote:
>> >> >> >
>> >> >> > hey all,
>> >> >> >
>> >> >> > I am attempting to do some form processing for a filter that i am
>> >> >> > building. I user 4 dropDownChoice in a form with a submit button.
>> I
>> >> >> want
>> >> >> > to overide the onSubmit method, which i did. however when i try
>> to
>> >> get
>> >> >> the
>> >> >> > values selected from the drop down in the method for prodessing,
>> >> they
>> >> >> come
>> >> >> > back empty. I am using pro wicket as a reference. i wrote simple
>> >> helper
>> >> >> > methods as illustrated in the book but they don't seem to work:
>> >> >

Re: [Wicket-user] form processing - getting dropdown selection back to onSubmit method.

2007-03-15 Thread GS-ikiini

I have an implementaion of IDataProvider. that has setters in it and
originally i used it like a model. however the properties have now been
changed to beans. can i still use what you say below? does that populateItem
go into my implementaion of dataView?

in other words, 

Imodel myModelwhichImplementsIDataProvider = new
PropertyModel(item.getModel(),"user")//user is the name of the user property
in myModelwhichImplementsIDataProvider.



-B




igor.vaynberg wrote:
> 
> first of all the dataprovider is a readonly interface, it has no set
> method
> like the model.
> 
> that said what you want is simple:
> 
> populateitem(item item) {
>final imodel namemodel=new propertymodel(item.getmodel(), "name");
>add(new dropdownchoice("names",namemodel,nameslist));
> }
> 
> -igor
> 
> 
> On 3/15/07, GS-ikiini <[EMAIL PROTECTED]> wrote:
>>
>>
>> i seei have a fair understaning of models this is what i am doing: I
>> have
>> a dataprovider that services a dataview. this data provider is the the
>> model
>> that i ultimately need to update. however the properties within this are
>> beans i need to set them using the selection from the dropdown. so fo
>> instancemy dataprovider has a property that is a saya user. this user
>> itself has a property called name. which is a string. now in my webpage
>> class i have a dropdown with a list of names. what i need to do is select
>> a
>> name and get the appropriate bean to pass it to the dataprovider so that
>> it
>> can do its thing and return its results to the dataview. how would i go
>> about this?
>>
>> -B
>>
>>
>> igor.vaynberg wrote:
>> >
>> > since you dont specify the model for the selection wicket will look for
>> a
>> > compoundpropertymodel you have somewhere above. the value will go into
>> the
>> > bean that is in the compoundpropertymodel into a property with the same
>> > name
>> > as the id of the dropdownchoice.
>> >
>> > there is a great page on models on our wiki
>> >
>> > -igor
>> >
>> >
>> > On 3/15/07, GS-ikiini <[EMAIL PROTECTED]> wrote:
>> >>
>> >>
>> >> also how do i get the user selection from a drop down that uses the
>> >> dropDownchoice(String id,list choinces) constrctor?
>> >>
>> >>
>> >>
>> >> Gwyn wrote:
>> >> >
>> >> > I'm away from my main computer now, so can't check code, but have
>> you
>> >> > had a look at the Wicket examples, e.g.
>> >> >
>> >>
>> http://www.wicket-library.com/wicket-examples/compref?wicket:bookmarkablePage=:wicket.examples.compref.DropDownChoicePage
>> >> >
>> >> > /Gwyn
>> >> >
>> >> > On 15/03/07, GS-ikiini <[EMAIL PROTECTED]> wrote:
>> >> >>
>> >> >> ok here is another question...how do i by pass the validating and
>> form
>> >> >> processing and go straight to the onSubmit method of my form(not
>> the
>> >> >> button)?
>> >> >>
>> >> >> -B
>> >> >>
>> >> >>
>> >> >>
>> >> >> GS-ikiini wrote:
>> >> >> >
>> >> >> > hey all,
>> >> >> >
>> >> >> > I am attempting to do some form processing for a filter that i am
>> >> >> > building. I user 4 dropDownChoice in a form with a submit button.
>> I
>> >> >> want
>> >> >> > to overide the onSubmit method, which i did. however when i try
>> to
>> >> get
>> >> >> the
>> >> >> > values selected from the drop down in the method for prodessing,
>> >> they
>> >> >> come
>> >> >> > back empty. I am using pro wicket as a reference. i wrote simple
>> >> helper
>> >> >> > methods as illustrated in the book but they don't seem to work:
>> >> >> >
>> >> >> >
>> >> >> > ...
>> >> >> > desc = new
>> >> >> FilterChoice("description",ldp,processTypeDropDownList,logs);
>> >> >> > ...
>> >> >> >
>> >> >> > protected String getDescriptionSelection(){
>> >> >> > return desc.getModelObjectAsString();
&

Re: [Wicket-user] form processing - getting dropdown selection back to onSubmit method.

2007-03-15 Thread GS-ikiini

i seei have a fair understaning of models this is what i am doing: I have
a dataprovider that services a dataview. this data provider is the the model
that i ultimately need to update. however the properties within this are
beans i need to set them using the selection from the dropdown. so fo
instancemy dataprovider has a property that is a saya user. this user
itself has a property called name. which is a string. now in my webpage
class i have a dropdown with a list of names. what i need to do is select a
name and get the appropriate bean to pass it to the dataprovider so that it
can do its thing and return its results to the dataview. how would i go
about this?

-B


igor.vaynberg wrote:
> 
> since you dont specify the model for the selection wicket will look for a
> compoundpropertymodel you have somewhere above. the value will go into the
> bean that is in the compoundpropertymodel into a property with the same
> name
> as the id of the dropdownchoice.
> 
> there is a great page on models on our wiki
> 
> -igor
> 
> 
> On 3/15/07, GS-ikiini <[EMAIL PROTECTED]> wrote:
>>
>>
>> also how do i get the user selection from a drop down that uses the
>> dropDownchoice(String id,list choinces) constrctor?
>>
>>
>>
>> Gwyn wrote:
>> >
>> > I'm away from my main computer now, so can't check code, but have you
>> > had a look at the Wicket examples, e.g.
>> >
>> http://www.wicket-library.com/wicket-examples/compref?wicket:bookmarkablePage=:wicket.examples.compref.DropDownChoicePage
>> >
>> > /Gwyn
>> >
>> > On 15/03/07, GS-ikiini <[EMAIL PROTECTED]> wrote:
>> >>
>> >> ok here is another question...how do i by pass the validating and form
>> >> processing and go straight to the onSubmit method of my form(not the
>> >> button)?
>> >>
>> >> -B
>> >>
>> >>
>> >>
>> >> GS-ikiini wrote:
>> >> >
>> >> > hey all,
>> >> >
>> >> > I am attempting to do some form processing for a filter that i am
>> >> > building. I user 4 dropDownChoice in a form with a submit button. I
>> >> want
>> >> > to overide the onSubmit method, which i did. however when i try to
>> get
>> >> the
>> >> > values selected from the drop down in the method for prodessing,
>> they
>> >> come
>> >> > back empty. I am using pro wicket as a reference. i wrote simple
>> helper
>> >> > methods as illustrated in the book but they don't seem to work:
>> >> >
>> >> >
>> >> > ...
>> >> > desc = new
>> >> FilterChoice("description",ldp,processTypeDropDownList,logs);
>> >> > ...
>> >> >
>> >> > protected String getDescriptionSelection(){
>> >> > return desc.getModelObjectAsString();
>> >> >   }
>> >> >
>> >> > ...
>> >> > @overide
>> >> > onSubmit(){
>> >> > if(MyClass.this.getDescriptionSelection() .equals(something)){
>> >> >do something...
>> >> > }
>> >> > }
>> >> >
>> >> > thing is...I insert some log.debugs in there to see what was being
>> >> > returned and nothing came back. How can i get the selection back to
>> my
>> >> > onSubmit method i guess is my question. Thank you
>> >> >
>> >> > -B
>> >> >
>> >> >
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/form-processing---getting-dropdown-selection-back-to-onSubmit-method.-tf3409455.html#a9501974
>> >> Sent from the Wicket - User mailing list archive at Nabble.com.
>> >>
>> >
>> > --
>> > Download Wicket 1.2.5 now! - http://wicketframework.org
>> >
>> >
>> -
>> > Take Surveys. Earn Cash. Influence the Future of IT
>> > Join SourceForge.net's Techsay panel and you'll get the chance to share
>> > your
>> > opinions on IT & business topics through brief surveys-and earn cash
>> >
>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>> > ___
>> > Wicket-user mailing list
>> > Wicket-user@lists.sourceforge.net

Re: [Wicket-user] form processing - getting dropdown selection back to onSubmit method.

2007-03-15 Thread GS-ikiini

also how do i get the user selection from a drop down that uses the
dropDownchoice(String id,list choinces) constrctor? 



Gwyn wrote:
> 
> I'm away from my main computer now, so can't check code, but have you
> had a look at the Wicket examples, e.g.
> http://www.wicket-library.com/wicket-examples/compref?wicket:bookmarkablePage=:wicket.examples.compref.DropDownChoicePage
> 
> /Gwyn
> 
> On 15/03/07, GS-ikiini <[EMAIL PROTECTED]> wrote:
>>
>> ok here is another question...how do i by pass the validating and form
>> processing and go straight to the onSubmit method of my form(not the
>> button)?
>>
>> -B
>>
>>
>>
>> GS-ikiini wrote:
>> >
>> > hey all,
>> >
>> > I am attempting to do some form processing for a filter that i am
>> > building. I user 4 dropDownChoice in a form with a submit button. I
>> want
>> > to overide the onSubmit method, which i did. however when i try to get
>> the
>> > values selected from the drop down in the method for prodessing, they
>> come
>> > back empty. I am using pro wicket as a reference. i wrote simple helper
>> > methods as illustrated in the book but they don't seem to work:
>> >
>> >
>> > ...
>> > desc = new
>> FilterChoice("description",ldp,processTypeDropDownList,logs);
>> > ...
>> >
>> > protected String getDescriptionSelection(){
>> > return desc.getModelObjectAsString();
>> >   }
>> >
>> > ...
>> > @overide
>> > onSubmit(){
>> > if(MyClass.this.getDescriptionSelection() .equals(something)){
>> >do something...
>> > }
>> > }
>> >
>> > thing is...I insert some log.debugs in there to see what was being
>> > returned and nothing came back. How can i get the selection back to my
>> > onSubmit method i guess is my question. Thank you
>> >
>> > -B
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/form-processing---getting-dropdown-selection-back-to-onSubmit-method.-tf3409455.html#a9501974
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
> 
> -- 
> Download Wicket 1.2.5 now! - http://wicketframework.org
> 
> -
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> 
> 

-- 
View this message in context: 
http://www.nabble.com/form-processing---getting-dropdown-selection-back-to-onSubmit-method.-tf3409455.html#a9503553
Sent from the Wicket - User mailing list archive at Nabble.com.


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] form processing - getting dropdown selection back to onSubmit method.

2007-03-15 Thread GS-ikiini

yes i have but i am not quite sure how to apply it to what i am doing. It
calls for a model on which the current selecting is designated thing is in
my selection list i have a strings. but in the model that need setting i
have only mostly bean properties. what i want to do is as the user makes a
selection, i want to take that selection and look up the appropriate bean.
then pass that bean to the model which does something with it. any
suggestions on how to accomplish this? 

-B



Gwyn wrote:
> 
> I'm away from my main computer now, so can't check code, but have you
> had a look at the Wicket examples, e.g.
> http://www.wicket-library.com/wicket-examples/compref?wicket:bookmarkablePage=:wicket.examples.compref.DropDownChoicePage
> 
> /Gwyn
> 
> On 15/03/07, GS-ikiini <[EMAIL PROTECTED]> wrote:
>>
>> ok here is another question...how do i by pass the validating and form
>> processing and go straight to the onSubmit method of my form(not the
>> button)?
>>
>> -B
>>
>>
>>
>> GS-ikiini wrote:
>> >
>> > hey all,
>> >
>> > I am attempting to do some form processing for a filter that i am
>> > building. I user 4 dropDownChoice in a form with a submit button. I
>> want
>> > to overide the onSubmit method, which i did. however when i try to get
>> the
>> > values selected from the drop down in the method for prodessing, they
>> come
>> > back empty. I am using pro wicket as a reference. i wrote simple helper
>> > methods as illustrated in the book but they don't seem to work:
>> >
>> >
>> > ...
>> > desc = new
>> FilterChoice("description",ldp,processTypeDropDownList,logs);
>> > ...
>> >
>> > protected String getDescriptionSelection(){
>> > return desc.getModelObjectAsString();
>> >   }
>> >
>> > ...
>> > @overide
>> > onSubmit(){
>> > if(MyClass.this.getDescriptionSelection() .equals(something)){
>> >do something...
>> > }
>> > }
>> >
>> > thing is...I insert some log.debugs in there to see what was being
>> > returned and nothing came back. How can i get the selection back to my
>> > onSubmit method i guess is my question. Thank you
>> >
>> > -B
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/form-processing---getting-dropdown-selection-back-to-onSubmit-method.-tf3409455.html#a9501974
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
> 
> -- 
> Download Wicket 1.2.5 now! - http://wicketframework.org
> 
> -
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> 
> 

-- 
View this message in context: 
http://www.nabble.com/form-processing---getting-dropdown-selection-back-to-onSubmit-method.-tf3409455.html#a9503495
Sent from the Wicket - User mailing list archive at Nabble.com.


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] form processing - getting dropdown selection back to onSubmit method.

2007-03-15 Thread GS-ikiini

ok here is another question...how do i by pass the validating and form
processing and go straight to the onSubmit method of my form(not the
button)?

-B 



GS-ikiini wrote:
> 
> hey all,
> 
> I am attempting to do some form processing for a filter that i am
> building. I user 4 dropDownChoice in a form with a submit button. I want
> to overide the onSubmit method, which i did. however when i try to get the
> values selected from the drop down in the method for prodessing, they come
> back empty. I am using pro wicket as a reference. i wrote simple helper
> methods as illustrated in the book but they don't seem to work:
> 
> 
> ...
> desc = new FilterChoice("description",ldp,processTypeDropDownList,logs);
> ...
>  
> protected String getDescriptionSelection(){
> return desc.getModelObjectAsString();
>   }
> 
> ...
> @overide
> onSubmit(){
> if(MyClass.this.getDescriptionSelection() .equals(something)){
>do something...
> }
> }
> 
> thing is...I insert some log.debugs in there to see what was being
> returned and nothing came back. How can i get the selection back to my
> onSubmit method i guess is my question. Thank you
> 
> -B
>  
> 

-- 
View this message in context: 
http://www.nabble.com/form-processing---getting-dropdown-selection-back-to-onSubmit-method.-tf3409455.html#a9501974
Sent from the Wicket - User mailing list archive at Nabble.com.


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] form processing - getting dropdown selection back to onSubmit method.

2007-03-15 Thread GS-ikiini

hey all,

I am attempting to do some form processing for a filter that i am building.
I user 4 dropDownChoice in a form with a submit button. I want to overide
the onSubmit method, which i did. however when i try to get the values
selected from the drop down in the method for prodessing, they come back
empty. I am using pro wicket as a reference. i wrote simple helper methods
as illustrated in the book but they don't seem to work:


...
desc = new FilterChoice("description",ldp,processTypeDropDownList,logs);
...
 
protected String getDescriptionSelection(){
return desc.getModelObjectAsString();
  }

...
@overide
onSubmit(){
if(MyClass.this.getDescriptionSelection() .equals(something)){
   do something...
}
}

thing is...I insert some log.debugs in there to see what was being returned
and nothing came back. How can i get the selection back to my onSubmit
method i guess is my question. Thank you

-B
 
-- 
View this message in context: 
http://www.nabble.com/form-processing---getting-dropdown-selection-back-to-onSubmit-method.-tf3409455.html#a9498483
Sent from the Wicket - User mailing list archive at Nabble.com.


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] spring bean injection and interfaces(IDataProvider)

2007-03-12 Thread GS-ikiini

i got it. Thank you.

-B



James McLaughlin-3 wrote:
> 
> While wicket automatically injects all components (provided you have setup
> the proper componentinstantiationlistener), you need to inject your own
> stuff with InjectorHolder.getInjector().inject(obj)
> 
> best,
> jim
> 
> On 3/12/07, GS-ikiini <[EMAIL PROTECTED]> wrote:
>>
>>
>> Hey all,
>>
>> I am trying to use a spring bean in my implementaion of IDataProvider.
>> but
>> its just not working. i get a nullpointerexception. It however works fine
>> in
>> my page classes. Can someone please help me with this problem. I would
>> really appreciate some help here. This is sending me mad at the moment.
>> Thanks
>>
>> -Ikiini
>> --
>> View this message in context:
>> http://www.nabble.com/spring-bean-injection-and-interfaces%28IDataProvider%29-tf3391811.html#a9441927
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>> Take Surveys. Earn Cash. Influence the Future of IT
>> Join SourceForge.net's Techsay panel and you'll get the chance to share
>> your
>> opinions on IT & business topics through brief surveys-and earn cash
>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>> ___
>> Wicket-user mailing list
>> Wicket-user@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/wicket-user
>>
> 
> -
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> 
> 

-- 
View this message in context: 
http://www.nabble.com/spring-bean-injection-and-interfaces%28IDataProvider%29-tf3391811.html#a9444336
Sent from the Wicket - User mailing list archive at Nabble.com.


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] spring bean injection and interfaces(IDataProvider)

2007-03-12 Thread GS-ikiini

oh the componetInstantiationListener was set in the Applicaition class.

-B



James McLaughlin-3 wrote:
> 
> While wicket automatically injects all components (provided you have setup
> the proper componentinstantiationlistener), you need to inject your own
> stuff with InjectorHolder.getInjector().inject(obj)
> 
> best,
> jim
> 
> On 3/12/07, GS-ikiini <[EMAIL PROTECTED]> wrote:
>>
>>
>> Hey all,
>>
>> I am trying to use a spring bean in my implementaion of IDataProvider.
>> but
>> its just not working. i get a nullpointerexception. It however works fine
>> in
>> my page classes. Can someone please help me with this problem. I would
>> really appreciate some help here. This is sending me mad at the moment.
>> Thanks
>>
>> -Ikiini
>> --
>> View this message in context:
>> http://www.nabble.com/spring-bean-injection-and-interfaces%28IDataProvider%29-tf3391811.html#a9441927
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>> Take Surveys. Earn Cash. Influence the Future of IT
>> Join SourceForge.net's Techsay panel and you'll get the chance to share
>> your
>> opinions on IT & business topics through brief surveys-and earn cash
>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>> ___
>> Wicket-user mailing list
>> Wicket-user@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/wicket-user
>>
> 
> -
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> 
> 

-- 
View this message in context: 
http://www.nabble.com/spring-bean-injection-and-interfaces%28IDataProvider%29-tf3391811.html#a9443059
Sent from the Wicket - User mailing list archive at Nabble.com.


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] spring bean injection and interfaces(IDataProvider)

2007-03-12 Thread GS-ikiini

how do i do this? can you please give me an example. below is what i did.
maybe you can point out what i need to do.

in the myProjectApplication{

public myProjectApplication() {
super();
  }

  @Override
  protected void init() {
// Spring injector
addComponentInstantiationListener(new SpringComponentInjector(this));
}
...

public class thePage extends WebPage{

@SpringBean(name = "adminService")
  private AdminService adminService;
  private dataProvider dp;
public thePage(){

  String test = adminService.print();
  log.debug("Checking adminService: "+ test);
  dp = new DataPrivicer();
 }

...

now this is the problem..

public class DataProvider implements IDataProvider {

  @SpringBean(name = "adminService")
  private AdminService DPadminService;
  

public DataProvider(){
String test = BLDPadminService.print();
log.debug("Checking adminService in the BLDP constructor: "+ test);
   }

..

the above returns a nullpointer exception. by the way, the above is used is
the pageclass.

please please tell me how i would use your method to fix this

-ikiini

James McLaughlin-3 wrote:
> 
> While wicket automatically injects all components (provided you have setup
> the proper componentinstantiationlistener), you need to inject your own
> stuff with InjectorHolder.getInjector().inject(obj)
> 
> best,
> jim
> 
> On 3/12/07, GS-ikiini <[EMAIL PROTECTED]> wrote:
>>
>>
>> Hey all,
>>
>> I am trying to use a spring bean in my implementaion of IDataProvider.
>> but
>> its just not working. i get a nullpointerexception. It however works fine
>> in
>> my page classes. Can someone please help me with this problem. I would
>> really appreciate some help here. This is sending me mad at the moment.
>> Thanks
>>
>> -Ikiini
>> --
>> View this message in context:
>> http://www.nabble.com/spring-bean-injection-and-interfaces%28IDataProvider%29-tf3391811.html#a9441927
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>> Take Surveys. Earn Cash. Influence the Future of IT
>> Join SourceForge.net's Techsay panel and you'll get the chance to share
>> your
>> opinions on IT & business topics through brief surveys-and earn cash
>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>> ___
>> Wicket-user mailing list
>> Wicket-user@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/wicket-user
>>
> 
> -
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> 
> 

-- 
View this message in context: 
http://www.nabble.com/spring-bean-injection-and-interfaces%28IDataProvider%29-tf3391811.html#a9443054
Sent from the Wicket - User mailing list archive at Nabble.com.


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] spring bean injection and interfaces(IDataProvider)

2007-03-12 Thread GS-ikiini

Hey all,

I am trying to use a spring bean in my implementaion of IDataProvider. but
its just not working. i get a nullpointerexception. It however works fine in
my page classes. Can someone please help me with this problem. I would
really appreciate some help here. This is sending me mad at the moment.
Thanks

-Ikiini  
-- 
View this message in context: 
http://www.nabble.com/spring-bean-injection-and-interfaces%28IDataProvider%29-tf3391811.html#a9441927
Sent from the Wicket - User mailing list archive at Nabble.com.


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user