You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by James Crosthwaite <ja...@rdfgroup.com> on 2007/08/03 18:38:44 UTC
Is this even possible...?
Hi all,
I'm relatively new to Wicket and i have a query about creating an editable
list. My query is simply, is it even possible?
Basically i have a list of objects, currently displayed in a
PageableListView, that i want the user to be able to edit. They should be
able to edit any of the rows and then click a button to save all changes
that they may have made to each row.
I've tried using DataBinder which didn't help as i could only edit one
object at a time, however i cannot now work out how to achieve this or even
if it is possible!
If anyone has any ideas that would get me started i would be most grateful!
Many thanks in advance
--
View this message in context: http://www.nabble.com/Is-this-even-possible...--tf4213555.html#a11986760
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Is this even possible...?
Posted by James Crosthwaite <ja...@rdfgroup.com>.
Thanks Nathan, i'll check that out. Will give you a shout if i need a
Databinder Forums account.
Thanks again
James
n8han wrote:
>
>> James Crosthwaite wrote:
>>> Basically i have a list of objects, currently displayed in a
>>> PageableListView, that i want the user to be able to edit.
>
> Oh and I should probably add that the example I pointed you to maps the
> ListView to a list contained in an object by a compound property model,
> but you probably want to use a query to get that list so it would be new
> PropertyListView("compenent-id", new HibernateListModel("from
> MyObject")) {...}
>
> AND if you want the changes to commit on submit and you don't have a
> containing DataForm that is bound to an entity (as in this scenario I'd
> guess), you can extend DataFormBase instead and let its onSubmit handler
> do the txn commit. Let me know by email if you need a Databinder forums
> account.
>
> Nathan
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/Is-this-even-possible...--tf4213555.html#a12013385
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Is this even possible...?
Posted by Nathan Hamblen <na...@technically.us>.
> James Crosthwaite wrote:
>> Basically i have a list of objects, currently displayed in a
>> PageableListView, that i want the user to be able to edit.
Oh and I should probably add that the example I pointed you to maps the
ListView to a list contained in an object by a compound property model,
but you probably want to use a query to get that list so it would be new
PropertyListView("compenent-id", new HibernateListModel("from
MyObject")) {...}
AND if you want the changes to commit on submit and you don't have a
containing DataForm that is bound to an entity (as in this scenario I'd
guess), you can extend DataFormBase instead and let its onSubmit handler
do the txn commit. Let me know by email if you need a Databinder forums
account.
Nathan
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Is this even possible...?
Posted by Nathan Hamblen <na...@technically.us>.
James Crosthwaite wrote:
> I'm relatively new to Wicket and i have a query about creating an editable
> list. My query is simply, is it even possible?
Impossible is nothing!
> Basically i have a list of objects, currently displayed in a
> PageableListView, that i want the user to be able to edit. They should be
> able to edit any of the rows and then click a button to save all changes
> that they may have made to each row.
>
> I've tried using DataBinder which didn't help
The recipe book example has repeating form elements in a list view. It's
not pageable, but that shouldn't be a problem. I've been improving that
example lately so I'll point you to the trunk version:
http://databinder.net/wsvn/Databinder/examples/trunk/recipe/src/main/java/example/panels/EditRecipe.java?op=file
If some of the code comments seem wrong it because I haven't updated
them yet. Also this is the version that's running live because the old
one was a little exception-happy.
http://databinder.net/recipe/
Hope that helps.
Nathan
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Is this even possible...?
Posted by James Crosthwaite <ja...@rdfgroup.com>.
Thanks to everyone for their replies, they are most helpful. I knew you guys
would have the answer, guess i just couldn't see the wood for the trees!
If I have any more queries I'll be sure to post back, thanks again.
James
igor.vaynberg wrote:
>
> this is pretty simple, but there are a few things to consider
>
> a) the obvious: create a form and put the pageable listview into it.
> instead
> of adding labels add textfields for each row.
>
> b) call setreuseitems(true) on the pageable listview
>
> c) override links in the navigator with submit links
>
> i think that should be it
>
> -igor
>
>
> On 8/3/07, James Crosthwaite <ja...@rdfgroup.com> wrote:
>>
>>
>> Hi all,
>>
>> I'm relatively new to Wicket and i have a query about creating an
>> editable
>> list. My query is simply, is it even possible?
>>
>> Basically i have a list of objects, currently displayed in a
>> PageableListView, that i want the user to be able to edit. They should be
>> able to edit any of the rows and then click a button to save all changes
>> that they may have made to each row.
>>
>> I've tried using DataBinder which didn't help as i could only edit one
>> object at a time, however i cannot now work out how to achieve this or
>> even
>> if it is possible!
>>
>> If anyone has any ideas that would get me started i would be most
>> grateful!
>>
>> Many thanks in advance
>> --
>> View this message in context:
>> http://www.nabble.com/Is-this-even-possible...--tf4213555.html#a11986760
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
>
--
View this message in context: http://www.nabble.com/Is-this-even-possible...--tf4213555.html#a12012906
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Is this even possible...?
Posted by Igor Vaynberg <ig...@gmail.com>.
this is pretty simple, but there are a few things to consider
a) the obvious: create a form and put the pageable listview into it. instead
of adding labels add textfields for each row.
b) call setreuseitems(true) on the pageable listview
c) override links in the navigator with submit links
i think that should be it
-igor
On 8/3/07, James Crosthwaite <ja...@rdfgroup.com> wrote:
>
>
> Hi all,
>
> I'm relatively new to Wicket and i have a query about creating an editable
> list. My query is simply, is it even possible?
>
> Basically i have a list of objects, currently displayed in a
> PageableListView, that i want the user to be able to edit. They should be
> able to edit any of the rows and then click a button to save all changes
> that they may have made to each row.
>
> I've tried using DataBinder which didn't help as i could only edit one
> object at a time, however i cannot now work out how to achieve this or
> even
> if it is possible!
>
> If anyone has any ideas that would get me started i would be most
> grateful!
>
> Many thanks in advance
> --
> View this message in context:
> http://www.nabble.com/Is-this-even-possible...--tf4213555.html#a11986760
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>