FYI - I need to get my RAD EditPanel committed to CVS so you can play
with it. I have it working for the basic things, it just needs people
to bang on it and flesh it out a bit. The idea is that it supports
dynamic form panels like you are talking about without having to write
any HTML.
- Jonathan
On 9/15/05, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
> I'd try to wrap the List in a IModel (like overriding Model's
> getObject and let it return the list you want every time), so you get
> the pull behaviour. Don't know how you set ListView's model now
> though, so you might be doing this the pull way allready.
>
> Eelco
>
>
> On 9/14/05, Nick Heudecker <[EMAIL PROTECTED]> wrote:
> > Okay, the problem is when I'm creating a new Survey. New Surveys don't have
> > any SurveyElements so the ListView is empty. When I try to add a Panel to
> > the ListView using a Form Button, the ListView doesn't update on the page.
> > Here's how I'm trying to do it:
> >
> > // "elements" is a ListView object initialized earlier.
> >
> > add(new Button("addAnotherElementButton") {
> > protected void onSubmit() {
> > elements.modelChanging();
> > List<SurveyElement> l = (List<SurveyElement>) elements.getList();
> > if (Util.isEmptyOrNull(l)) {
> > l = new ArrayList<SurveyElement>();
> > }
> > elements.removeAll();
> > l.add(getSurveyElement(getAddElement()));
> > elements.modelChanged();
> > }
> > });
> >
> > However, this doesn't work. Any thoughts on what I'm doing wrong? I read
> > in the ListView Javadoc about the removeAll() call, but I'm not sure when I
> > should be calling that. Additionally, it's unclear to mean if the ListView
> > has the new ListItem and it's just not rendering, or if the new ListItem
> > isn't being added.
> >
> >
>
>
> -------------------------------------------------------
> SF.Net email is sponsored by:
> Tame your development challenges with Apache's Geronimo App Server. Download
> it for free - -and be entered to win a 42" plasma tv or your very own
> Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
> _______________________________________________
> Wicket-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
--
Jon
[EMAIL PROTECTED]
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user