/**
    * Whether this component's onSelectionChanged event handler should
called
    * using javascript if the selection changes. If true, a roundtrip will
be
    * generated with each selection change, resulting in the model being
    * updated (of just this component) and onSelectionChanged being called.
    * This method returns false by default.
    *
    * @return True if this component's onSelectionChanged event handler
should
    *         called using javascript if the selection changes
    */
   protected boolean wantOnSelectionChangedNotifications()
   {
       return false;
   }

if you want the entire form submitted then create your own onclick that does
"this.form.submit();"

-igor


On 3/30/07, changdt2 <[EMAIL PROTECTED]> wrote:


Hi ,

I do have dataview.setitemreusestrategy and reuseifmodelsequalstartegy.

I took a closer look at my code and what I notice is that when I click on
the radio button which has wantOnSelectionChangedNotifications returning
true, it does not update the model. basically I have a few textfield (
simple textfield ) which seems to just refresh the screen with the model,
but it does not update the model with the new data entered.  by the way
the
whole screen get refresh and even data on top of the screen are refresh
with
the model and the data entered are not updated.

DO you know what can be the cause?
is "wantOnSelectionChangedNotifications returning true" on the
radiochoice,
suppose to only refresh the radiochoice?

regards,
David Chang

igor.vaynberg wrote:
>
> if you use dataview in a form you have to set the proper
itemreusestrategy
> so dataview doesnt discard items and rebuild them on every request
>
> see dataview.setitemreusestrategy and reuseifmodelsequalstartegy
>
> -igor
>
>
> On 3/29/07, changdt2 <[EMAIL PROTECTED]> wrote:
>>
>>
>> this is what I have
>>
>> public  class MyRadioChoice extends RadioChoice
>> {
>>         public MyRadioChoice(final String id, final IModel model,List
>> choices)
>>         { super(id,model,choices);}
>>         public boolean wantOnSelectionChangedNotifications(){return
>> true;}
>> }
>>
>> public void populateItem(final Item item)
>> {
>>
>>      QuestionModel questionModel =
(QuestionModel)item.getModelObject();
>>      item.add(new MyRadioChoice("question",new
>> PropertyModel(question,"question")),lisOfYesNo);
>>
>>      ResultDataProvider rdp = new ResultDataProvider();
>>      MyResultDVO rdvo = new MyResultDVO();
>>
>>     rdvo.setResultDVO(questionModel.getSubQuestionModels());
>>     rdp.setResultDVO(rdvo);
>>
>>
>>      DataView dataView = new DataView(CommonConstants.FOLLOWUP_QUESTION,
>> rdp)
>>      {
>>
>>         protected void populateItem(final Item item)
>>         {
>>                 Question question = ((QuestionModel)obj).getQuestion();
>>                 TextFirld ft = new TextField("subQuestion", new
>> PropertyModel(question,"question"), type)
>>                 ft.setRequired(true);
>>                 item.add(ft);
>>         }
>>
>>      };
>>
>>      item.add(dataView);
>>
>> }
>>
>> basically the model seems not attached.  I do not see the field high
>> lighted
>> when I leave tre field empty.
>> TextFirld ft = new TextField("subQuestion", new
>> PropertyModel(question,"question"), type)
>>                 ft.setRequired(true);
>>                 item.add(ft);
>>
>>
>> Sorry, posted to author by mistake,
>> Regards,
>> David C.
>>
>> igor.vaynberg wrote:
>> >
>> > what do you mean fields are not highlighted?
>> >
>> > -igor
>> >
>> >
>> > On 3/29/07, changdt2 <[EMAIL PROTECTED]> wrote:
>> >>
>> >>
>> >> hi,
>> >>
>> >> I am working with DataView where each item will a have a label,
>> checkbox
>> >> and
>> >> another Dataview which is created on the fly, but it seems that the
>> >> models
>> >> in the sub Dataview is not been attached, when error happens the Sub
>> >> Dataview which contains fields is not high lighted.
>> >>
>> >> Is there a issue to created Nested dataview?
>> >>
>> >> Thanks,
>> >> David C.
>> >> --
>> >> View this message in context:
>> >>
>>
http://www.nabble.com/nested-DataView-is-not-updating-model-tf3487728.html#a9738414
>> >> 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/nested-DataView-is-not-updating-model-tf3487728.html#a9739403
>> 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/nested-DataView-is-not-updating-model-tf3487728.html#a9754597
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

Reply via email to