You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Early Morning <go...@gmail.com> on 2009/12/01 06:22:54 UTC

How to make a feedback panel appear on page load?

Hi,

I'm trying to make a feedback panel appear immadiately after page load (such
as when you search and the results appear in a new page, but there is an
error), but even if I call error(message); no feedback panel appears. What
would be the recommended way to do this? Thanks!


Regards,

Ces

Re: How to make a feedback panel appear on page load?

Posted by Jonathan Locke <jo...@gmail.com>.

if i understand you correctly, you can set an error directly on the session
(as opposed to on a particular component) and it will display on the target
page.


Early Morning wrote:
> 
> Hi,
> 
> I'm trying to make a feedback panel appear immadiately after page load
> (such
> as when you search and the results appear in a new page, but there is an
> error), but even if I call error(message); no feedback panel appears. What
> would be the recommended way to do this? Thanks!
> 
> 
> Regards,
> 
> Ces
> 
> 

-- 
View this message in context: http://old.nabble.com/How-to-make-a-feedback-panel-appear-on-page-load--tp26586832p26587350.html
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: How to make a feedback panel appear on page load?

Posted by Early Morning <go...@gmail.com>.
Hi Martin,

Yes, and the feedback appears when doing a normal in-page Ajax action (such
as clicking the search button within the page), but not when loading the
page from setResponsePage.


Regards,

Ces

On Tue, Dec 1, 2009 at 3:56 PM, Martijn Dashorst <martijn.dashorst@gmail.com
> wrote:

> Did you add a feedbackpanel?
>
> Martijn
>
> On Tue, Dec 1, 2009 at 8:03 AM, Early Morning <go...@gmail.com>
> wrote:
> > Hi Martin,
> >
> > I pass a DataProvider in the constructor of the page, and process it
> > somewhat like this:
> >
> >        if(accountDataProvider == null){
> >            container.add(new EmptyPanel("resultPanel"));
> >            asm = new AccountSearchModel();
> >        }else{
> >            asm = accountDataProvider.getAccountSearchModel();
> >            if(accountDataProvider.size() > 0){
> >                container.add(new AccountSearchResultsPanel("resultPanel",
> > accountDataProvider));
> >            }else{
> >                container.add(new EmptyPanel("resultPanel"));
> >                error("No results found.");
> >            }
> >        }
> >
> > Basically if the DataProvider is null, it just adds an empty panel, but
> if
> > not (and the size of the results is 0), there should be a feedback
> showing
> > "No results found". It successfully executes the error statement when I
> > debug, but when loading the page there is still no feedback shown. Is
> there
> > anything else I should add? Thanks.
> >
> >
> > Regards,
> >
> > Ces
> >
> > On Tue, Dec 1, 2009 at 2:30 PM, Martin Makundi <
> > martin.makundi@koodaripalvelut.com> wrote:
> >
> >> Hi!
> >>
> >> It should appear if you call "error" or something... what's your code?
> >>
> >> **
> >> Martin
> >>
> >> 2009/12/1 Early Morning <go...@gmail.com>:
> >> > Hi,
> >> >
> >> > I'm trying to make a feedback panel appear immadiately after page load
> >> (such
> >> > as when you search and the results appear in a new page, but there is
> an
> >> > error), but even if I call error(message); no feedback panel appears.
> >> What
> >> > would be the recommended way to do this? Thanks!
> >> >
> >> >
> >> > Regards,
> >> >
> >> > Ces
> >> >
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> >> For additional commands, e-mail: users-help@wicket.apache.org
> >>
> >>
> >
>
>
>
> --
> Become a Wicket expert, learn from the best: http://wicketinaction.com
> Apache Wicket 1.4 increases type safety for web applications
> Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.0
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: How to make a feedback panel appear on page load?

Posted by Martijn Dashorst <ma...@gmail.com>.
Did you add a feedbackpanel?

Martijn

On Tue, Dec 1, 2009 at 8:03 AM, Early Morning <go...@gmail.com> wrote:
> Hi Martin,
>
> I pass a DataProvider in the constructor of the page, and process it
> somewhat like this:
>
>        if(accountDataProvider == null){
>            container.add(new EmptyPanel("resultPanel"));
>            asm = new AccountSearchModel();
>        }else{
>            asm = accountDataProvider.getAccountSearchModel();
>            if(accountDataProvider.size() > 0){
>                container.add(new AccountSearchResultsPanel("resultPanel",
> accountDataProvider));
>            }else{
>                container.add(new EmptyPanel("resultPanel"));
>                error("No results found.");
>            }
>        }
>
> Basically if the DataProvider is null, it just adds an empty panel, but if
> not (and the size of the results is 0), there should be a feedback showing
> "No results found". It successfully executes the error statement when I
> debug, but when loading the page there is still no feedback shown. Is there
> anything else I should add? Thanks.
>
>
> Regards,
>
> Ces
>
> On Tue, Dec 1, 2009 at 2:30 PM, Martin Makundi <
> martin.makundi@koodaripalvelut.com> wrote:
>
>> Hi!
>>
>> It should appear if you call "error" or something... what's your code?
>>
>> **
>> Martin
>>
>> 2009/12/1 Early Morning <go...@gmail.com>:
>> > Hi,
>> >
>> > I'm trying to make a feedback panel appear immadiately after page load
>> (such
>> > as when you search and the results appear in a new page, but there is an
>> > error), but even if I call error(message); no feedback panel appears.
>> What
>> > would be the recommended way to do this? Thanks!
>> >
>> >
>> > Regards,
>> >
>> > Ces
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>



-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.4 increases type safety for web applications
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.0

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


Re: How to make a feedback panel appear on page load?

Posted by Early Morning <go...@gmail.com>.
Hi Martin,

I pass a DataProvider in the constructor of the page, and process it
somewhat like this:

        if(accountDataProvider == null){
            container.add(new EmptyPanel("resultPanel"));
            asm = new AccountSearchModel();
        }else{
            asm = accountDataProvider.getAccountSearchModel();
            if(accountDataProvider.size() > 0){
                container.add(new AccountSearchResultsPanel("resultPanel",
accountDataProvider));
            }else{
                container.add(new EmptyPanel("resultPanel"));
                error("No results found.");
            }
        }

Basically if the DataProvider is null, it just adds an empty panel, but if
not (and the size of the results is 0), there should be a feedback showing
"No results found". It successfully executes the error statement when I
debug, but when loading the page there is still no feedback shown. Is there
anything else I should add? Thanks.


Regards,

Ces

On Tue, Dec 1, 2009 at 2:30 PM, Martin Makundi <
martin.makundi@koodaripalvelut.com> wrote:

> Hi!
>
> It should appear if you call "error" or something... what's your code?
>
> **
> Martin
>
> 2009/12/1 Early Morning <go...@gmail.com>:
> > Hi,
> >
> > I'm trying to make a feedback panel appear immadiately after page load
> (such
> > as when you search and the results appear in a new page, but there is an
> > error), but even if I call error(message); no feedback panel appears.
> What
> > would be the recommended way to do this? Thanks!
> >
> >
> > Regards,
> >
> > Ces
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: How to make a feedback panel appear on page load?

Posted by Martin Makundi <ma...@koodaripalvelut.com>.
Hi!

It should appear if you call "error" or something... what's your code?

**
Martin

2009/12/1 Early Morning <go...@gmail.com>:
> Hi,
>
> I'm trying to make a feedback panel appear immadiately after page load (such
> as when you search and the results appear in a new page, but there is an
> error), but even if I call error(message); no feedback panel appears. What
> would be the recommended way to do this? Thanks!
>
>
> Regards,
>
> Ces
>

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