You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Jakub Srba <ja...@email.cz> on 2009/02/17 13:59:42 UTC

Feedback message isn't displayed

Hi

I have LoadableDetachableModel model1. In load method it calls
error(String). When I put model1 into Label, the error message is displayed
in my FeedbackPanel. Then I have PropertyModel model2, that wraps model1.
This time, when I put model2 into Label, the error message isn't displayed.

Do you have any idea what do I do wrong?

Jakub Srba

-- 
View this message in context: http://www.nabble.com/Feedback-message-isn%27t-displayed-tp22056824p22056824.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: Feedback message isn't displayed

Posted by Gary Evesson <ga...@evesson.com>.
I'm seeing the same issue with 1.4 rc2.

Gary

On Wed, Feb 18, 2009 at 1:17 AM, Jakub Srba <ja...@email.cz> wrote:

>
> Here is a simpler example that doesn't work for me either:
>
> ProblemPage.java:
> public class ProblemPage extends WebPage
> {
>
>    @SuppressWarnings("serial")
>    public ProblemPage()
>    {
>        add(new FeedbackPanel("feedback"));
>
>        error("this error message is displayed");
>
>        final IModel<String> helloModel = new
> LoadableDetachableModel<String>()
>        {
>            @Override
>            protected String load()
>            {
>                error("this error message is NOT displayed");
>                return "Hello message";
>            }
>        };
>        add(new Label("hello", helloModel));
>    }
>
> }
>
> ProblemPage.html:
> <html>
> <body>
>
>    <div wicket:id="hello">[hello]</div>
>
>    <div wicket:id="feedback">[feedback messages]</div>
>
> </body>
> </html>
>
> First message is displayed, the second one isn't and in the output console
> I
> can read:
> Component-targetted feedback message was left unrendered. This could be
> because you are missing a FeedbackPanel on the page.  Message:
> [FeedbackMessage message = "this error message is NOT displayed", reporter
> =
> 0, level = ERROR]
>
>
> Cristiano Kliemann wrote:
> >
> > Maybe you are calling the error method of a wrong component. Can you send
> > some code snippet?
> >
> > -- Cristiano
> >
> > On Tue, Feb 17, 2009 at 9:59 AM, Jakub Srba <ja...@email.cz> wrote:
> >
> >>
> >> Hi
> >>
> >> I have LoadableDetachableModel model1. In load method it calls
> >> error(String). When I put model1 into Label, the error message is
> >> displayed
> >> in my FeedbackPanel. Then I have PropertyModel model2, that wraps
> model1.
> >> This time, when I put model2 into Label, the error message isn't
> >> displayed.
> >>
> >> Do you have any idea what do I do wrong?
> >>
> >> Jakub Srba
> >>
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/Feedback-message-isn%27t-displayed-tp22056824p22056824.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
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Feedback-message-isn%27t-displayed-tp22056824p22074113.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
>
>


-- 
Gary Evesson

Re: Feedback message isn't displayed

Posted by Jakub Srba <ja...@email.cz>.
I'm reposting the answer from JIRA:

Igor Vaynberg - 23/Feb/09 12:15 AM
the load method of your model can be called after the feedback panel has
already rendered - thus it will not pick it up. it is simply a bad idea to
call any feedback related messages from your model's get methods because you
have no idea when they are called. 

So I had to change the logic when loading data. Fortunately, it's more
understandable now.

Thanks for help.


Jakub Srba wrote:
> 
> OK, I created an issue:  https://issues.apache.org/jira/browse/WICKET-2121
> https://issues.apache.org/jira/browse/WICKET-2121 
> 

-- 
View this message in context: http://www.nabble.com/Feedback-message-isn%27t-displayed-tp22056824p22157840.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: Feedback message isn't displayed

Posted by Jakub Srba <ja...@email.cz>.
OK, I created an issue:  https://issues.apache.org/jira/browse/WICKET-2121
https://issues.apache.org/jira/browse/WICKET-2121 


Timo Rantalaiho wrote:
> 
> On Wed, 18 Feb 2009, Jakub Srba wrote:
>> Here is a simpler example that doesn't work for me either:
> ...
>> Component-targetted feedback message was left unrendered. This could be
>> because you are missing a FeedbackPanel on the page.  Message:
>> [FeedbackMessage message = "this error message is NOT displayed",
>> reporter =
>> 0, level = ERROR]
> 
> That sounds strange. Could you wrap your code in a 
> quickstart, make a Jira issue and attach it?
> 
> Best wishes,
> Timo
> 
> -- 
> Timo Rantalaiho           
> Reaktor Innovations Oy    <URL: http://www.ri.fi/ >
> 
> ---------------------------------------------------------------------
> 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/Feedback-message-isn%27t-displayed-tp22056824p22157094.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: Feedback message isn't displayed

Posted by Timo Rantalaiho <Ti...@ri.fi>.
On Wed, 18 Feb 2009, Jakub Srba wrote:
> Here is a simpler example that doesn't work for me either:
...
> Component-targetted feedback message was left unrendered. This could be
> because you are missing a FeedbackPanel on the page.  Message:
> [FeedbackMessage message = "this error message is NOT displayed", reporter =
> 0, level = ERROR]

That sounds strange. Could you wrap your code in a 
quickstart, make a Jira issue and attach it?

Best wishes,
Timo

-- 
Timo Rantalaiho           
Reaktor Innovations Oy    <URL: http://www.ri.fi/ >

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


Re: Feedback message isn't displayed

Posted by Jakub Srba <ja...@email.cz>.
Here is a simpler example that doesn't work for me either:

ProblemPage.java:
public class ProblemPage extends WebPage
{

    @SuppressWarnings("serial")
    public ProblemPage()
    {
        add(new FeedbackPanel("feedback"));
        
        error("this error message is displayed");
        
        final IModel<String> helloModel = new
LoadableDetachableModel<String>()
        {
            @Override
            protected String load()
            {
                error("this error message is NOT displayed");
                return "Hello message";
            }
        };
        add(new Label("hello", helloModel));
    }
    
}

ProblemPage.html:
<html>
<body>

    <div wicket:id="hello">[hello]</div>
    
    <div wicket:id="feedback">[feedback messages]</div>

</body>
</html>

First message is displayed, the second one isn't and in the output console I
can read:
Component-targetted feedback message was left unrendered. This could be
because you are missing a FeedbackPanel on the page.  Message:
[FeedbackMessage message = "this error message is NOT displayed", reporter =
0, level = ERROR]


Cristiano Kliemann wrote:
> 
> Maybe you are calling the error method of a wrong component. Can you send
> some code snippet?
> 
> -- Cristiano
> 
> On Tue, Feb 17, 2009 at 9:59 AM, Jakub Srba <ja...@email.cz> wrote:
> 
>>
>> Hi
>>
>> I have LoadableDetachableModel model1. In load method it calls
>> error(String). When I put model1 into Label, the error message is
>> displayed
>> in my FeedbackPanel. Then I have PropertyModel model2, that wraps model1.
>> This time, when I put model2 into Label, the error message isn't
>> displayed.
>>
>> Do you have any idea what do I do wrong?
>>
>> Jakub Srba
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Feedback-message-isn%27t-displayed-tp22056824p22056824.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
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/Feedback-message-isn%27t-displayed-tp22056824p22074113.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: Feedback message isn't displayed

Posted by Cristiano Kliemann <cr...@gmail.com>.
Maybe you are calling the error method of a wrong component. Can you send
some code snippet?

-- Cristiano

On Tue, Feb 17, 2009 at 9:59 AM, Jakub Srba <ja...@email.cz> wrote:

>
> Hi
>
> I have LoadableDetachableModel model1. In load method it calls
> error(String). When I put model1 into Label, the error message is displayed
> in my FeedbackPanel. Then I have PropertyModel model2, that wraps model1.
> This time, when I put model2 into Label, the error message isn't displayed.
>
> Do you have any idea what do I do wrong?
>
> Jakub Srba
>
> --
> View this message in context:
> http://www.nabble.com/Feedback-message-isn%27t-displayed-tp22056824p22056824.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
>
>