Re: [Wicket-user] Updating items of a Set...

2007-04-26 Thread Eelco Hillenius
> Hi Eelco
>
> Thanks for the help.
>
> I've a question however : currently, I put an object containing the
> Set as a final attribute of my Panel class, in order to be able to
> increase/decrease its values depending of the action in the AjaxLink
> onClick.
>
> However, having read about memory/session size, I wonder whether there
> is a better way to do so.

I wouldn't be too worried about it. If it turns out to be too
consuming, it should be easy to refactor this, right?

> Indeed, I fear this Set will stay in Session
> forever, which isn't needed nor wished.

It won't, Wicket takes care for cleaning up stuff. What stays in RAM
is always limited.

> BTW, the Set in questionning isn't coming from the database, but will
> later be saved into it.
>
> What would you advice ?

It depends on how expensive that set is to create. If that is cheap,
you could just create it only for the request, e.g. using a
LoadableDetachableModel. And as a final note, always implement object
identity (hashCode/ equals) properly. Some components (like dropdown
lists) depend on that. And if you done that in a good way, it won't be
a problem if you create the objects for just the request.

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Updating items of a Set...

2007-04-26 Thread ZedroS Schwart
Hi Eelco

Thanks for the help.

I've a question however : currently, I put an object containing the
Set as a final attribute of my Panel class, in order to be able to
increase/decrease its values depending of the action in the AjaxLink
onClick.

However, having read about memory/session size, I wonder whether there
is a better way to do so. Indeed, I fear this Set will stay in Session
forever, which isn't needed nor wished.

BTW, the Set in questionning isn't coming from the database, but will
later be saved into it.

What would you advice ?

Thanks in advance
Joseph, aka ZedroS

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Updating items of a Set...

2007-04-24 Thread Eelco Hillenius
> So, the need is basically to browse a set to be able to
> increase/decrease the value of each element. So, for each element, it
> should look like this:
> ElementName
> ElementValue  + -
>
> + and – are links that the user can click on.
>
> Then I would like a submit button under this to be able to submit the
> whole stuff. As I'm Ajax curious, I would like the action on the + or
> – to be done through Ajax.

> Currently, I'm using a RefreshingView with, for each element of the
> Set, some Labels (elementName, elementValue) and an action panel with
> two AjaxLink, one for "plus" and one for "minus".

Sounds good.

> Up to now, I manage to retrieve on which AjaxLink the user has
> clicked, but I don't manage to refresh the RefreshingView afterwards.
> I've two issues : how to tell the View to refresh and how to deal with
> the model, since I want to update it but not to save it to the
> database…NB : I give to the Panel containing the RefreshingView the
> model object containing the set.
>
> Do you have any comment/question/clue ?

Yep, it's one of the common questions here. Please read
http://cwiki.apache.org/WICKET/how-to-repaint-a-listview-via-ajax.html

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Updating items of a Set...

2007-04-24 Thread ZedroS Schwart
Hi all

As I'm new to wicket, I often wonder (especially when I encounter
hurdles ;)) if the approach I take is the good one. So, if you don't
mind, I will quickly introduce what I try to do, then present the
solution I've retained up to now and, finally, the current hurdle ;).
Feel free to comment on any of these points!

So, the need is basically to browse a set to be able to
increase/decrease the value of each element. So, for each element, it
should look like this:
ElementName
ElementValue  + -

+ and – are links that the user can click on.

Then I would like a submit button under this to be able to submit the
whole stuff. As I'm Ajax curious, I would like the action on the + or
– to be done through Ajax.

Currently, I'm using a RefreshingView with, for each element of the
Set, some Labels (elementName, elementValue) and an action panel with
two AjaxLink, one for "plus" and one for "minus".

Up to now, I manage to retrieve on which AjaxLink the user has
clicked, but I don't manage to refresh the RefreshingView afterwards.
I've two issues : how to tell the View to refresh and how to deal with
the model, since I want to update it but not to save it to the
database…NB : I give to the Panel containing the RefreshingView the
model object containing the set.

Do you have any comment/question/clue ?

Thanks in advance
Joseph, aka ZedroS

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user