You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Linda van der Pal <lv...@heritageagenturen.nl> on 2009/08/12 16:27:41 UTC

Ajax based filling of form

I have a panel with a form. This form has several fields, one of which 
is the ISBN of a book. The fields are filled by a CompoundPropertyModel 
if the user is editing his previous entry, and they are empty if the 
user is adding a new book. Simply entering data or updating it and then 
submitting already works. But now I want to fetch the data for the other 
fields if the ISBN is already in the database. It is a multi-user 
system, so it is in fact possible that the ISBN is already in there.

I was thinking of achieving this with AJAX, but I'm not really sure how 
to do it. I was thinking of adding an AjaxFormComponentUpdatingBeavior, 
where all the related fields are added to the target. But as the ISBN is 
part of the model, I don't really now how to get this working. Any hints 
on what direction I should be searching in?

Regards,
Linda

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: wiki link

Posted by Fernando Wermus <fe...@gmail.com>.
Nice! and nice page too

On Thu, Aug 13, 2009 at 6:36 AM, Russell Simpkins <
russellsimpkins@hotmail.com> wrote:

>
> It describes how to authenticate with Facebook using Facebook Connect. Once
> you have an authenticated user, you can get information about that user and
> display Facebook information in your application. Our app, pigspigot.comis a user generated greeting card site, so we want get your friends upcoming
> birthdays or other events and make it easier to send cards.
> I wrote this up because the example on the wicket does not work with the
> most recent api.
> Russ
>
> > Date: Thu, 13 Aug 2009 14:10:46 +0200
> > Subject: Re: wiki link
> > From: nino.martinez.wael@gmail.com
> > To: users@wicket.apache.org
> >
> > Hi Russel
> >
> > Thanks for the documentation! But im not sure what it describes. Does
> > your document describe howto make a wicket application as a facebook
> > application or "just" to use facebook as authentication provider?
> >
> > By facebook application I mean the little apps that are passed around
> > in facebook?
> >
> > 2009/8/13 Russell Simpkins <ru...@hotmail.com>:
> > >
> > > Sorry, the link should be
> > > http://cwiki.apache.org/WICKET/adding-facebook-connect.html
> > >
> > >> From: russellsimpkins@hotmail.com
> > >> To: users@wicket.apache.org
> > >> Subject: RE: Ajax based filling of form
> > >> Date: Wed, 12 Aug 2009 21:12:38 -0400
> > >>
> > >>
> > >> All,
> > >> I'm still green with Wicket and even greener on Facebook, so I had a
> hard time adding Facebook connect to my wicket app. I think this is due in
> large part to Facebook changing so often. Any ways, I have written up a new
> page for anyone else trying to do Facebook connect with Wicket. If I get
> some more time I would like to come up with a quick start, for now the wiki
> entry is all I had time to squeeze in.
> > >>
> http://cwiki.apache.org/confluence/display/WICKET/Adding+Facebook+connect
> > >>
> > >>
> > >> Russ
> > >> _________________________________________________________________
> > >> Windows Live™: Keep your life in sync.
> > >>
> http://windowslive.com/explore?ocid=PID23384::T:WLMTAGL:ON:WL:en-US:NF_BR_sync:082009
> > >
> > > _________________________________________________________________
> > > Get free photo software from Windows Live
> > >
> http://www.windowslive.com/online/photos?ocid=PID23393::T:WLMTAGL:ON:WL:en-US:SI_PH_software:082009
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
>
> _________________________________________________________________
> Windows Live™: Keep your life in sync.
>
> http://windowslive.com/explore?ocid=PID23384::T:WLMTAGL:ON:WL:en-US:NF_BR_sync:082009
>



-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus

RE: wiki link

Posted by Russell Simpkins <ru...@hotmail.com>.
It describes how to authenticate with Facebook using Facebook Connect. Once you have an authenticated user, you can get information about that user and display Facebook information in your application. Our app, pigspigot.com is a user generated greeting card site, so we want get your friends upcoming birthdays or other events and make it easier to send cards. 
I wrote this up because the example on the wicket does not work with the most recent api.
Russ

> Date: Thu, 13 Aug 2009 14:10:46 +0200
> Subject: Re: wiki link
> From: nino.martinez.wael@gmail.com
> To: users@wicket.apache.org
> 
> Hi Russel
> 
> Thanks for the documentation! But im not sure what it describes. Does
> your document describe howto make a wicket application as a facebook
> application or "just" to use facebook as authentication provider?
> 
> By facebook application I mean the little apps that are passed around
> in facebook?
> 
> 2009/8/13 Russell Simpkins <ru...@hotmail.com>:
> >
> > Sorry, the link should be
> > http://cwiki.apache.org/WICKET/adding-facebook-connect.html
> >
> >> From: russellsimpkins@hotmail.com
> >> To: users@wicket.apache.org
> >> Subject: RE: Ajax based filling of form
> >> Date: Wed, 12 Aug 2009 21:12:38 -0400
> >>
> >>
> >> All,
> >> I'm still green with Wicket and even greener on Facebook, so I had a hard time adding Facebook connect to my wicket app. I think this is due in large part to Facebook changing so often. Any ways, I have written up a new page for anyone else trying to do Facebook connect with Wicket. If I get some more time I would like to come up with a quick start, for now the wiki entry is all I had time to squeeze in.
> >> http://cwiki.apache.org/confluence/display/WICKET/Adding+Facebook+connect
> >>
> >>
> >> Russ
> >> _________________________________________________________________
> >> Windows Live™: Keep your life in sync.
> >> http://windowslive.com/explore?ocid=PID23384::T:WLMTAGL:ON:WL:en-US:NF_BR_sync:082009
> >
> > _________________________________________________________________
> > Get free photo software from Windows Live
> > http://www.windowslive.com/online/photos?ocid=PID23393::T:WLMTAGL:ON:WL:en-US:SI_PH_software:082009
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 

_________________________________________________________________
Windows Live™: Keep your life in sync.
http://windowslive.com/explore?ocid=PID23384::T:WLMTAGL:ON:WL:en-US:NF_BR_sync:082009

Re: wiki link

Posted by nino martinez wael <ni...@gmail.com>.
Hi Russel

Thanks for the documentation! But im not sure what it describes. Does
your document describe howto make a wicket application as a facebook
application or "just" to use facebook as authentication provider?

By facebook application I mean the little apps that are passed around
in facebook?

2009/8/13 Russell Simpkins <ru...@hotmail.com>:
>
> Sorry, the link should be
> http://cwiki.apache.org/WICKET/adding-facebook-connect.html
>
>> From: russellsimpkins@hotmail.com
>> To: users@wicket.apache.org
>> Subject: RE: Ajax based filling of form
>> Date: Wed, 12 Aug 2009 21:12:38 -0400
>>
>>
>> All,
>> I'm still green with Wicket and even greener on Facebook, so I had a hard time adding Facebook connect to my wicket app. I think this is due in large part to Facebook changing so often. Any ways, I have written up a new page for anyone else trying to do Facebook connect with Wicket. If I get some more time I would like to come up with a quick start, for now the wiki entry is all I had time to squeeze in.
>> http://cwiki.apache.org/confluence/display/WICKET/Adding+Facebook+connect
>>
>>
>> Russ
>> _________________________________________________________________
>> Windows Live™: Keep your life in sync.
>> http://windowslive.com/explore?ocid=PID23384::T:WLMTAGL:ON:WL:en-US:NF_BR_sync:082009
>
> _________________________________________________________________
> Get free photo software from Windows Live
> http://www.windowslive.com/online/photos?ocid=PID23393::T:WLMTAGL:ON:WL:en-US:SI_PH_software:082009

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


wiki link

Posted by Russell Simpkins <ru...@hotmail.com>.
Sorry, the link should be
http://cwiki.apache.org/WICKET/adding-facebook-connect.html

> From: russellsimpkins@hotmail.com
> To: users@wicket.apache.org
> Subject: RE: Ajax based filling of form
> Date: Wed, 12 Aug 2009 21:12:38 -0400
> 
> 
> All,
> I'm still green with Wicket and even greener on Facebook, so I had a hard time adding Facebook connect to my wicket app. I think this is due in large part to Facebook changing so often. Any ways, I have written up a new page for anyone else trying to do Facebook connect with Wicket. If I get some more time I would like to come up with a quick start, for now the wiki entry is all I had time to squeeze in.
> http://cwiki.apache.org/confluence/display/WICKET/Adding+Facebook+connect
> 
> 
> Russ
> _________________________________________________________________
> Windows Live™: Keep your life in sync.
> http://windowslive.com/explore?ocid=PID23384::T:WLMTAGL:ON:WL:en-US:NF_BR_sync:082009

_________________________________________________________________
Get free photo software from Windows Live
http://www.windowslive.com/online/photos?ocid=PID23393::T:WLMTAGL:ON:WL:en-US:SI_PH_software:082009

RE: Ajax based filling of form

Posted by Russell Simpkins <ru...@hotmail.com>.
All,
I'm still green with Wicket and even greener on Facebook, so I had a hard time adding Facebook connect to my wicket app. I think this is due in large part to Facebook changing so often. Any ways, I have written up a new page for anyone else trying to do Facebook connect with Wicket. If I get some more time I would like to come up with a quick start, for now the wiki entry is all I had time to squeeze in.
http://cwiki.apache.org/confluence/display/WICKET/Adding+Facebook+connect


Russ
_________________________________________________________________
Windows Live™: Keep your life in sync.
http://windowslive.com/explore?ocid=PID23384::T:WLMTAGL:ON:WL:en-US:NF_BR_sync:082009

Re: Ajax based filling of form

Posted by Linda van der Pal <lv...@heritageagenturen.nl>.
Awesome! Thanks for the help.

Regards,
Linda

John Krasnay wrote:
> The problem is the CompoundPropertyModel continues to point to the
> original Book object. You would have to get rid of the
> CompoundPropertyModel and give each FormComponent its own model that is
> tolerant to changes to the book member. Something like this would work:
>
> add(new TextField("title", new PropertyModel(this, "book.title")));
>
> jk
>
> On Thu, Aug 13, 2009 at 09:15:50AM +0200, Linda van der Pal wrote:
>   
>> Well the model doesn't update. (Not that I'd expect it to.)
>>
>> Here's some pieces of my code I deem relevant to the problem.
>>
>>
>> if (key == null || key.getIsbn() == null) {
>>    book = new Book();
>> } else {
>>    book = bookRetriever.getBook(key.getIsbn(), key.getCollectionId());
>> }   
>>
>> setDefaultModel(new CompoundPropertyModel<Book>(book));
>>
>> // ...
>>
>> isbnField.add(new AjaxFormComponentUpdatingBehavior("onchange") {
>>    private static final long serialVersionUID = 1L;
>>
>>    @Override
>>    protected void onUpdate(final AjaxRequestTarget target) {
>>        try {
>>            book = bookRetriever.getBook(isbnField.getInput());
>>            modelChanged();
>>                       
>>            target.addComponent(titleField);
>>            //...
>>            target.addComponent(genrefield);
>>        } catch (SQLException e) {
>>            //...
>>        }
>>    }
>> });
>>
>> John Krasnay wrote:
>>     
>>> Sounds like you're on the right track. What's the problem?
>>>
>>> jk
>>>
>>> On Wed, Aug 12, 2009 at 04:27:41PM +0200, Linda van der Pal wrote:
>>>  
>>>       
>>>> I have a panel with a form. This form has several fields, one of which 
>>>> is the ISBN of a book. The fields are filled by a CompoundPropertyModel 
>>>> if the user is editing his previous entry, and they are empty if the 
>>>> user is adding a new book. Simply entering data or updating it and then 
>>>> submitting already works. But now I want to fetch the data for the other 
>>>> fields if the ISBN is already in the database. It is a multi-user 
>>>> system, so it is in fact possible that the ISBN is already in there.
>>>>
>>>> I was thinking of achieving this with AJAX, but I'm not really sure how 
>>>> to do it. I was thinking of adding an AjaxFormComponentUpdatingBeavior, 
>>>> where all the related fields are added to the target. But as the ISBN is 
>>>> part of the model, I don't really now how to get this working. Any hints 
>>>> on what direction I should be searching in?
>>>>
>>>> Regards,
>>>> Linda
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>
>>>>    
>>>>         
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>  
>>> ------------------------------------------------------------------------
>>>
>>>
>>> No virus found in this incoming message.
>>> Checked by AVG - www.avg.com 
>>> Version: 8.5.392 / Virus Database: 270.13.53/2299 - Release Date: 08/12/09 
>>> 18:12:00
>>>
>>>  
>>>       
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>     
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>   
> ------------------------------------------------------------------------
>
>
> No virus found in this incoming message.
> Checked by AVG - www.avg.com 
> Version: 8.5.392 / Virus Database: 270.13.54/2300 - Release Date: 08/13/09 06:11:00
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Ajax based filling of form

Posted by John Krasnay <jo...@krasnay.ca>.
The problem is the CompoundPropertyModel continues to point to the
original Book object. You would have to get rid of the
CompoundPropertyModel and give each FormComponent its own model that is
tolerant to changes to the book member. Something like this would work:

add(new TextField("title", new PropertyModel(this, "book.title")));

jk

On Thu, Aug 13, 2009 at 09:15:50AM +0200, Linda van der Pal wrote:
> Well the model doesn't update. (Not that I'd expect it to.)
> 
> Here's some pieces of my code I deem relevant to the problem.
> 
> 
> if (key == null || key.getIsbn() == null) {
>    book = new Book();
> } else {
>    book = bookRetriever.getBook(key.getIsbn(), key.getCollectionId());
> }   
> 
> setDefaultModel(new CompoundPropertyModel<Book>(book));
> 
> // ...
> 
> isbnField.add(new AjaxFormComponentUpdatingBehavior("onchange") {
>    private static final long serialVersionUID = 1L;
> 
>    @Override
>    protected void onUpdate(final AjaxRequestTarget target) {
>        try {
>            book = bookRetriever.getBook(isbnField.getInput());
>            modelChanged();
>                       
>            target.addComponent(titleField);
>            //...
>            target.addComponent(genrefield);
>        } catch (SQLException e) {
>            //...
>        }
>    }
> });
> 
> John Krasnay wrote:
> >Sounds like you're on the right track. What's the problem?
> >
> >jk
> >
> >On Wed, Aug 12, 2009 at 04:27:41PM +0200, Linda van der Pal wrote:
> >  
> >>I have a panel with a form. This form has several fields, one of which 
> >>is the ISBN of a book. The fields are filled by a CompoundPropertyModel 
> >>if the user is editing his previous entry, and they are empty if the 
> >>user is adding a new book. Simply entering data or updating it and then 
> >>submitting already works. But now I want to fetch the data for the other 
> >>fields if the ISBN is already in the database. It is a multi-user 
> >>system, so it is in fact possible that the ISBN is already in there.
> >>
> >>I was thinking of achieving this with AJAX, but I'm not really sure how 
> >>to do it. I was thinking of adding an AjaxFormComponentUpdatingBeavior, 
> >>where all the related fields are added to the target. But as the ISBN is 
> >>part of the model, I don't really now how to get this working. Any hints 
> >>on what direction I should be searching in?
> >>
> >>Regards,
> >>Linda
> >>
> >>---------------------------------------------------------------------
> >>To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> >>For additional commands, e-mail: users-help@wicket.apache.org
> >>
> >>    
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> >For additional commands, e-mail: users-help@wicket.apache.org
> >  
> >------------------------------------------------------------------------
> >
> >
> >No virus found in this incoming message.
> >Checked by AVG - www.avg.com 
> >Version: 8.5.392 / Virus Database: 270.13.53/2299 - Release Date: 08/12/09 
> >18:12:00
> >
> >  
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


RE: Ajax based filling of form

Posted by Russell Simpkins <ru...@hotmail.com>.
I believe this is a variable reference issue.
// instead of this....
isbnField.add(new AjaxFormComponentUpdatingBehavior("onchange") {@Override
protected void onUpdate(final AjaxRequestTarget target) {try {book = bookRetriever.getBook(isbnField.getInput());
// try this....@Overrideprotected void onUpdate(final AjaxRequestTarget target) {try {book = bookRetriever.getBook(isbnField.getInput());setDefaultModel(new CompoundPropertyModel<Book>(book));modelChanged();
When you passed in book to the constructor, it now has a reference to your book object, when you execute this line:
book = bookRetriever.getBook(isbnField.getInput());

you are only changing the value of the variable book, but not the reference stored in new CompoundPropertyModel<Book>(book). You should be able pull that off in C++ by changing the value of the pointer, but you can't do that in java.
It is similar to this short code
String y = "example";java.util.HashMap h = new java.util.HashMap();h.put("y",y);// changing the value of y y="not you";// see that the value of y is not the same as the reference we stored in the hashmapSystem.out.println(h.get("y"));System.out.println(y);
I hope that helps.

Russ
> Date: Thu, 13 Aug 2009 09:15:50 +0200
> From: lvdpal@heritageagenturen.nl
> To: users@wicket.apache.org
> Subject: Re: Ajax based filling of form
> 
> Well the model doesn't update. (Not that I'd expect it to.)
> 
> Here's some pieces of my code I deem relevant to the problem.
> 
> 
> if (key == null || key.getIsbn() == null) {
>     book = new Book();
> } else {
>     book = bookRetriever.getBook(key.getIsbn(), key.getCollectionId());
> }   
> 
> setDefaultModel(new CompoundPropertyModel<Book>(book));
> 
> // ...
> 
> isbnField.add(new AjaxFormComponentUpdatingBehavior("onchange") {
>     private static final long serialVersionUID = 1L;
> 
>     @Override
>     protected void onUpdate(final AjaxRequestTarget target) {
>         try {
>             book = bookRetriever.getBook(isbnField.getInput());
>             modelChanged();
>                        
>             target.addComponent(titleField);
>             //...
>             target.addComponent(genrefield);
>         } catch (SQLException e) {
>             //...
>         }
>     }
> });
> 
> John Krasnay wrote:
> > Sounds like you're on the right track. What's the problem?
> >
> > jk
> >
> > On Wed, Aug 12, 2009 at 04:27:41PM +0200, Linda van der Pal wrote:
> >   
> >> I have a panel with a form. This form has several fields, one of which 
> >> is the ISBN of a book. The fields are filled by a CompoundPropertyModel 
> >> if the user is editing his previous entry, and they are empty if the 
> >> user is adding a new book. Simply entering data or updating it and then 
> >> submitting already works. But now I want to fetch the data for the other 
> >> fields if the ISBN is already in the database. It is a multi-user 
> >> system, so it is in fact possible that the ISBN is already in there.
> >>
> >> I was thinking of achieving this with AJAX, but I'm not really sure how 
> >> to do it. I was thinking of adding an AjaxFormComponentUpdatingBeavior, 
> >> where all the related fields are added to the target. But as the ISBN is 
> >> part of the model, I don't really now how to get this working. Any hints 
> >> on what direction I should be searching in?
> >>
> >> Regards,
> >> Linda
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> >> For additional commands, e-mail: users-help@wicket.apache.org
> >>
> >>     
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >   
> > ------------------------------------------------------------------------
> >
> >
> > No virus found in this incoming message.
> > Checked by AVG - www.avg.com 
> > Version: 8.5.392 / Virus Database: 270.13.53/2299 - Release Date: 08/12/09 18:12:00
> >
> >   
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 

_________________________________________________________________
Get back to school stuff for them and cashback for you.
http://www.bing.com/cashback?form=MSHYCB&publ=WLHMTAG&crea=TEXT_MSHYCB_BackToSchool_Cashback_BTSCashback_1x1

Re: Ajax based filling of form

Posted by Linda van der Pal <lv...@heritageagenturen.nl>.
Well the model doesn't update. (Not that I'd expect it to.)

Here's some pieces of my code I deem relevant to the problem.


if (key == null || key.getIsbn() == null) {
    book = new Book();
} else {
    book = bookRetriever.getBook(key.getIsbn(), key.getCollectionId());
}   

setDefaultModel(new CompoundPropertyModel<Book>(book));

// ...

isbnField.add(new AjaxFormComponentUpdatingBehavior("onchange") {
    private static final long serialVersionUID = 1L;

    @Override
    protected void onUpdate(final AjaxRequestTarget target) {
        try {
            book = bookRetriever.getBook(isbnField.getInput());
            modelChanged();
                       
            target.addComponent(titleField);
            //...
            target.addComponent(genrefield);
        } catch (SQLException e) {
            //...
        }
    }
});

John Krasnay wrote:
> Sounds like you're on the right track. What's the problem?
>
> jk
>
> On Wed, Aug 12, 2009 at 04:27:41PM +0200, Linda van der Pal wrote:
>   
>> I have a panel with a form. This form has several fields, one of which 
>> is the ISBN of a book. The fields are filled by a CompoundPropertyModel 
>> if the user is editing his previous entry, and they are empty if the 
>> user is adding a new book. Simply entering data or updating it and then 
>> submitting already works. But now I want to fetch the data for the other 
>> fields if the ISBN is already in the database. It is a multi-user 
>> system, so it is in fact possible that the ISBN is already in there.
>>
>> I was thinking of achieving this with AJAX, but I'm not really sure how 
>> to do it. I was thinking of adding an AjaxFormComponentUpdatingBeavior, 
>> where all the related fields are added to the target. But as the ISBN is 
>> part of the model, I don't really now how to get this working. Any hints 
>> on what direction I should be searching in?
>>
>> Regards,
>> Linda
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>     
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>   
> ------------------------------------------------------------------------
>
>
> No virus found in this incoming message.
> Checked by AVG - www.avg.com 
> Version: 8.5.392 / Virus Database: 270.13.53/2299 - Release Date: 08/12/09 18:12:00
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Ajax based filling of form

Posted by John Krasnay <jo...@krasnay.ca>.
Sounds like you're on the right track. What's the problem?

jk

On Wed, Aug 12, 2009 at 04:27:41PM +0200, Linda van der Pal wrote:
> I have a panel with a form. This form has several fields, one of which 
> is the ISBN of a book. The fields are filled by a CompoundPropertyModel 
> if the user is editing his previous entry, and they are empty if the 
> user is adding a new book. Simply entering data or updating it and then 
> submitting already works. But now I want to fetch the data for the other 
> fields if the ISBN is already in the database. It is a multi-user 
> system, so it is in fact possible that the ISBN is already in there.
> 
> I was thinking of achieving this with AJAX, but I'm not really sure how 
> to do it. I was thinking of adding an AjaxFormComponentUpdatingBeavior, 
> where all the related fields are added to the target. But as the ISBN is 
> part of the model, I don't really now how to get this working. Any hints 
> on what direction I should be searching in?
> 
> Regards,
> Linda
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org