You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Tate Jones <ta...@bluedog.com.au> on 2011/10/05 09:38:25 UTC

Messages to FeedBackPanel from AbstractAjaxBehavior onRequest

Hi Group,

I have added a AbstractAjaxBehavior  to WebPage to recieve a 'post' request from JavaScript (.ajax post).  During the onRequest method an error could occur and I want to display this in the FeedbackPanel.  When I attempt to use the error(..) or info(..) method the following WARNING appears in the console.

WARNING: Component-targetted feedback message was left unrendered. This could be because you are missing a FeedbackPanel on the page.  Message: [FeedbackMessage message = "to be display in feedback panel", reporter = 2, level = ERROR]

I already have a working Feedback panel on the page for a basic button submit method.

code fragment.

@AuthorizeInstantiation(Roles.ADMIN)
public class AdminPage extends WebPage {

    private static final long serialVersionUID = 1L;
    private static final Logger log = LoggerFactory.getLogger(WebPage.class);

    public AdminPage() {

	add(new FeedbackPanel("feedback"));


        Form form = new Form("adminForm", new CompoundPropertyModel(tuneChip));
        add(form);

	form.add(new RequiredTextField("description"));
	
	   AbstractAjaxBehavior ajaxPostBehaviour = new AbstractAjaxBehavior() {
            private static final long serialVersionUID = 1L;

            @SuppressWarnings("unchecked")
            public void onRequest() {
		/**…..
		some logic. The something goes wrong...
		…..**/

		error("Report Error Message");
            }
        };
        add(ajaxPostBehaviour);

What is the best way to bind AbstractAjaxBehavior to the FeedbackPanel or should I used another approach?   As mentioned I am using AbstractAjaxBehavior to received a 'post' request.

eg.
	 "$.ajax({ " +
                        "url: '" + callBackURL + "'," +
                        "type: 'post'," +
	…etc..

Tate


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


Re: Messages to FeedBackPanel from AbstractAjaxBehavior onRequest

Posted by Martin Grigorov <mg...@apache.org>.
On Wed, Oct 5, 2011 at 2:11 PM, Tate Jones <ta...@bluedog.com.au> wrote:
> No filters.
>
> response() method did have this at the end.
>
>                IRequestTarget t = new StringRequestTarget("application/json", "UTF-8", jsonAck);
>                getRequestCycle().setRequestTarget(t);
As I said you need JSONP-like approach for having both features
AjaxRequestTarget should be executed last to update the feedback
component, and use target.appendJavascript("myHandler("+jsonAck+")")
where 'myHandler' is a function which will be executed with the
generated JSON as parameter.
>
> Once I removed this the warning message disappeared, however the feedback panel still didn't show the required message.
>
> On 05/10/2011, at 8:07 PM, Martin Grigorov wrote:
>
>> On Wed, Oct 5, 2011 at 1:02 PM, Tate Jones <ta...@bluedog.com.au> wrote:
>>> Thanks Martin,
>>>
>>> I am still learning so AbstractAjaxBehavior was my first choice.  No reason...
>>>
>>> I have changed it to AbstractDefaultAjaxBehavior and added the following code to the respond method.
>>>
>>>                       target.addComponent(feedback);
>>>                       error(errorMessage);
>>>
>>> However I still receiving the same WARNING message.
>> This looks OK.
>> I guess your FeedbackPanel has no explicit filter.
>>>
>>> Layout
>>>
>>> Page
>>>        - feedback
>>>        - form
>>>                - TextFields
>>>                - AbstractDefaultAjaxBehavior has been added here.
>>>
>>> I must missing something very basic.
>>>
>>> On 05/10/2011, at 5:57 PM, Martin Grigorov wrote:
>>>
>>>> Hi,
>>>>
>>>> Why do you use AbstractAjaxBehavior instead of AbstractDefaultAjaxBehavior?
>>>>
>>>> AbstractDefaultAjaxBehavior passes you an instance of
>>>> AjaxRequestTarget which you can use to add the feedback panel and show
>>>> the feedback message. It writes a special XML back to the browser
>>>> which wicket-ajax.js (e.g. wicketAjaxPost()) knows how to read and
>>>> uses it to update the components.
>>>>
>>>> AbstractAjaxBehavior is a bit more general Ajax behavior with which
>>>> you can write back to the response any kind of response (e.g. JSON).
>>>>
>>>> If you need both kind of responses then I suggest you to use
>>>> AbstractDefaultAjaxBehavior to update components (target.add()) and
>>>> target.appendJavaScript(someJSONP)
>>>>
>>>> On Wed, Oct 5, 2011 at 10:38 AM, Tate Jones <ta...@bluedog.com.au> wrote:
>>>>> Hi Group,
>>>>>
>>>>> I have added a AbstractAjaxBehavior  to WebPage to recieve a 'post' request from JavaScript (.ajax post).  During the onRequest method an error could occur and I want to display this in the FeedbackPanel.  When I attempt to use the error(..) or info(..) method the following WARNING appears in the console.
>>>>>
>>>>> WARNING: Component-targetted feedback message was left unrendered. This could be because you are missing a FeedbackPanel on the page.  Message: [FeedbackMessage message = "to be display in feedback panel", reporter = 2, level = ERROR]
>>>>>
>>>>> I already have a working Feedback panel on the page for a basic button submit method.
>>>>>
>>>>> code fragment.
>>>>>
>>>>> @AuthorizeInstantiation(Roles.ADMIN)
>>>>> public class AdminPage extends WebPage {
>>>>>
>>>>>    private static final long serialVersionUID = 1L;
>>>>>    private static final Logger log = LoggerFactory.getLogger(WebPage.class);
>>>>>
>>>>>    public AdminPage() {
>>>>>
>>>>>        add(new FeedbackPanel("feedback"));
>>>>>
>>>>>
>>>>>        Form form = new Form("adminForm", new CompoundPropertyModel(tuneChip));
>>>>>        add(form);
>>>>>
>>>>>        form.add(new RequiredTextField("description"));
>>>>>
>>>>>           AbstractAjaxBehavior ajaxPostBehaviour = new AbstractAjaxBehavior() {
>>>>>            private static final long serialVersionUID = 1L;
>>>>>
>>>>>            @SuppressWarnings("unchecked")
>>>>>            public void onRequest() {
>>>>>                /**…..
>>>>>                some logic. The something goes wrong...
>>>>>                …..**/
>>>>>
>>>>>                error("Report Error Message");
>>>>>            }
>>>>>        };
>>>>>        add(ajaxPostBehaviour);
>>>>>
>>>>> What is the best way to bind AbstractAjaxBehavior to the FeedbackPanel or should I used another approach?   As mentioned I am using AbstractAjaxBehavior to received a 'post' request.
>>>>>
>>>>> eg.
>>>>>         "$.ajax({ " +
>>>>>                        "url: '" + callBackURL + "'," +
>>>>>                        "type: 'post'," +
>>>>>        …etc..
>>>>>
>>>>> Tate
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Martin Grigorov
>>>> jWeekend
>>>> Training, Consulting, Development
>>>> http://jWeekend.com
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>
>>
>>
>> --
>> Martin Grigorov
>> jWeekend
>> Training, Consulting, Development
>> http://jWeekend.com
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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


Re: Messages to FeedBackPanel from AbstractAjaxBehavior onRequest

Posted by Tate Jones <ta...@bluedog.com.au>.
No filters.

response() method did have this at the end.

                IRequestTarget t = new StringRequestTarget("application/json", "UTF-8", jsonAck);
                getRequestCycle().setRequestTarget(t);

Once I removed this the warning message disappeared, however the feedback panel still didn't show the required message. 

On 05/10/2011, at 8:07 PM, Martin Grigorov wrote:

> On Wed, Oct 5, 2011 at 1:02 PM, Tate Jones <ta...@bluedog.com.au> wrote:
>> Thanks Martin,
>> 
>> I am still learning so AbstractAjaxBehavior was my first choice.  No reason...
>> 
>> I have changed it to AbstractDefaultAjaxBehavior and added the following code to the respond method.
>> 
>>                       target.addComponent(feedback);
>>                       error(errorMessage);
>> 
>> However I still receiving the same WARNING message.
> This looks OK.
> I guess your FeedbackPanel has no explicit filter.
>> 
>> Layout
>> 
>> Page
>>        - feedback
>>        - form
>>                - TextFields
>>                - AbstractDefaultAjaxBehavior has been added here.
>> 
>> I must missing something very basic.
>> 
>> On 05/10/2011, at 5:57 PM, Martin Grigorov wrote:
>> 
>>> Hi,
>>> 
>>> Why do you use AbstractAjaxBehavior instead of AbstractDefaultAjaxBehavior?
>>> 
>>> AbstractDefaultAjaxBehavior passes you an instance of
>>> AjaxRequestTarget which you can use to add the feedback panel and show
>>> the feedback message. It writes a special XML back to the browser
>>> which wicket-ajax.js (e.g. wicketAjaxPost()) knows how to read and
>>> uses it to update the components.
>>> 
>>> AbstractAjaxBehavior is a bit more general Ajax behavior with which
>>> you can write back to the response any kind of response (e.g. JSON).
>>> 
>>> If you need both kind of responses then I suggest you to use
>>> AbstractDefaultAjaxBehavior to update components (target.add()) and
>>> target.appendJavaScript(someJSONP)
>>> 
>>> On Wed, Oct 5, 2011 at 10:38 AM, Tate Jones <ta...@bluedog.com.au> wrote:
>>>> Hi Group,
>>>> 
>>>> I have added a AbstractAjaxBehavior  to WebPage to recieve a 'post' request from JavaScript (.ajax post).  During the onRequest method an error could occur and I want to display this in the FeedbackPanel.  When I attempt to use the error(..) or info(..) method the following WARNING appears in the console.
>>>> 
>>>> WARNING: Component-targetted feedback message was left unrendered. This could be because you are missing a FeedbackPanel on the page.  Message: [FeedbackMessage message = "to be display in feedback panel", reporter = 2, level = ERROR]
>>>> 
>>>> I already have a working Feedback panel on the page for a basic button submit method.
>>>> 
>>>> code fragment.
>>>> 
>>>> @AuthorizeInstantiation(Roles.ADMIN)
>>>> public class AdminPage extends WebPage {
>>>> 
>>>>    private static final long serialVersionUID = 1L;
>>>>    private static final Logger log = LoggerFactory.getLogger(WebPage.class);
>>>> 
>>>>    public AdminPage() {
>>>> 
>>>>        add(new FeedbackPanel("feedback"));
>>>> 
>>>> 
>>>>        Form form = new Form("adminForm", new CompoundPropertyModel(tuneChip));
>>>>        add(form);
>>>> 
>>>>        form.add(new RequiredTextField("description"));
>>>> 
>>>>           AbstractAjaxBehavior ajaxPostBehaviour = new AbstractAjaxBehavior() {
>>>>            private static final long serialVersionUID = 1L;
>>>> 
>>>>            @SuppressWarnings("unchecked")
>>>>            public void onRequest() {
>>>>                /**…..
>>>>                some logic. The something goes wrong...
>>>>                …..**/
>>>> 
>>>>                error("Report Error Message");
>>>>            }
>>>>        };
>>>>        add(ajaxPostBehaviour);
>>>> 
>>>> What is the best way to bind AbstractAjaxBehavior to the FeedbackPanel or should I used another approach?   As mentioned I am using AbstractAjaxBehavior to received a 'post' request.
>>>> 
>>>> eg.
>>>>         "$.ajax({ " +
>>>>                        "url: '" + callBackURL + "'," +
>>>>                        "type: 'post'," +
>>>>        …etc..
>>>> 
>>>> Tate
>>>> 
>>>> 
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>> 
>>>> 
>>> 
>>> 
>>> 
>>> --
>>> Martin Grigorov
>>> jWeekend
>>> Training, Consulting, Development
>>> http://jWeekend.com
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>> 
>> 
> 
> 
> 
> -- 
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 


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


Re: Messages to FeedBackPanel from AbstractAjaxBehavior onRequest

Posted by Martin Grigorov <mg...@apache.org>.
On Wed, Oct 5, 2011 at 1:02 PM, Tate Jones <ta...@bluedog.com.au> wrote:
> Thanks Martin,
>
> I am still learning so AbstractAjaxBehavior was my first choice.  No reason...
>
> I have changed it to AbstractDefaultAjaxBehavior and added the following code to the respond method.
>
>                       target.addComponent(feedback);
>                       error(errorMessage);
>
> However I still receiving the same WARNING message.
This looks OK.
I guess your FeedbackPanel has no explicit filter.
>
> Layout
>
> Page
>        - feedback
>        - form
>                - TextFields
>                - AbstractDefaultAjaxBehavior has been added here.
>
> I must missing something very basic.
>
> On 05/10/2011, at 5:57 PM, Martin Grigorov wrote:
>
>> Hi,
>>
>> Why do you use AbstractAjaxBehavior instead of AbstractDefaultAjaxBehavior?
>>
>> AbstractDefaultAjaxBehavior passes you an instance of
>> AjaxRequestTarget which you can use to add the feedback panel and show
>> the feedback message. It writes a special XML back to the browser
>> which wicket-ajax.js (e.g. wicketAjaxPost()) knows how to read and
>> uses it to update the components.
>>
>> AbstractAjaxBehavior is a bit more general Ajax behavior with which
>> you can write back to the response any kind of response (e.g. JSON).
>>
>> If you need both kind of responses then I suggest you to use
>> AbstractDefaultAjaxBehavior to update components (target.add()) and
>> target.appendJavaScript(someJSONP)
>>
>> On Wed, Oct 5, 2011 at 10:38 AM, Tate Jones <ta...@bluedog.com.au> wrote:
>>> Hi Group,
>>>
>>> I have added a AbstractAjaxBehavior  to WebPage to recieve a 'post' request from JavaScript (.ajax post).  During the onRequest method an error could occur and I want to display this in the FeedbackPanel.  When I attempt to use the error(..) or info(..) method the following WARNING appears in the console.
>>>
>>> WARNING: Component-targetted feedback message was left unrendered. This could be because you are missing a FeedbackPanel on the page.  Message: [FeedbackMessage message = "to be display in feedback panel", reporter = 2, level = ERROR]
>>>
>>> I already have a working Feedback panel on the page for a basic button submit method.
>>>
>>> code fragment.
>>>
>>> @AuthorizeInstantiation(Roles.ADMIN)
>>> public class AdminPage extends WebPage {
>>>
>>>    private static final long serialVersionUID = 1L;
>>>    private static final Logger log = LoggerFactory.getLogger(WebPage.class);
>>>
>>>    public AdminPage() {
>>>
>>>        add(new FeedbackPanel("feedback"));
>>>
>>>
>>>        Form form = new Form("adminForm", new CompoundPropertyModel(tuneChip));
>>>        add(form);
>>>
>>>        form.add(new RequiredTextField("description"));
>>>
>>>           AbstractAjaxBehavior ajaxPostBehaviour = new AbstractAjaxBehavior() {
>>>            private static final long serialVersionUID = 1L;
>>>
>>>            @SuppressWarnings("unchecked")
>>>            public void onRequest() {
>>>                /**…..
>>>                some logic. The something goes wrong...
>>>                …..**/
>>>
>>>                error("Report Error Message");
>>>            }
>>>        };
>>>        add(ajaxPostBehaviour);
>>>
>>> What is the best way to bind AbstractAjaxBehavior to the FeedbackPanel or should I used another approach?   As mentioned I am using AbstractAjaxBehavior to received a 'post' request.
>>>
>>> eg.
>>>         "$.ajax({ " +
>>>                        "url: '" + callBackURL + "'," +
>>>                        "type: 'post'," +
>>>        …etc..
>>>
>>> Tate
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>
>>
>>
>> --
>> Martin Grigorov
>> jWeekend
>> Training, Consulting, Development
>> http://jWeekend.com
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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


Re: Messages to FeedBackPanel from AbstractAjaxBehavior onRequest

Posted by Tate Jones <ta...@bluedog.com.au>.
Thanks Martin,

I am still learning so AbstractAjaxBehavior was my first choice.  No reason...

I have changed it to AbstractDefaultAjaxBehavior and added the following code to the respond method.

                       target.addComponent(feedback);
                       error(errorMessage);

However I still receiving the same WARNING message.

Layout

Page
	- feedback
	- form
		- TextFields
		- AbstractDefaultAjaxBehavior has been added here.

I must missing something very basic.

On 05/10/2011, at 5:57 PM, Martin Grigorov wrote:

> Hi,
> 
> Why do you use AbstractAjaxBehavior instead of AbstractDefaultAjaxBehavior?
> 
> AbstractDefaultAjaxBehavior passes you an instance of
> AjaxRequestTarget which you can use to add the feedback panel and show
> the feedback message. It writes a special XML back to the browser
> which wicket-ajax.js (e.g. wicketAjaxPost()) knows how to read and
> uses it to update the components.
> 
> AbstractAjaxBehavior is a bit more general Ajax behavior with which
> you can write back to the response any kind of response (e.g. JSON).
> 
> If you need both kind of responses then I suggest you to use
> AbstractDefaultAjaxBehavior to update components (target.add()) and
> target.appendJavaScript(someJSONP)
> 
> On Wed, Oct 5, 2011 at 10:38 AM, Tate Jones <ta...@bluedog.com.au> wrote:
>> Hi Group,
>> 
>> I have added a AbstractAjaxBehavior  to WebPage to recieve a 'post' request from JavaScript (.ajax post).  During the onRequest method an error could occur and I want to display this in the FeedbackPanel.  When I attempt to use the error(..) or info(..) method the following WARNING appears in the console.
>> 
>> WARNING: Component-targetted feedback message was left unrendered. This could be because you are missing a FeedbackPanel on the page.  Message: [FeedbackMessage message = "to be display in feedback panel", reporter = 2, level = ERROR]
>> 
>> I already have a working Feedback panel on the page for a basic button submit method.
>> 
>> code fragment.
>> 
>> @AuthorizeInstantiation(Roles.ADMIN)
>> public class AdminPage extends WebPage {
>> 
>>    private static final long serialVersionUID = 1L;
>>    private static final Logger log = LoggerFactory.getLogger(WebPage.class);
>> 
>>    public AdminPage() {
>> 
>>        add(new FeedbackPanel("feedback"));
>> 
>> 
>>        Form form = new Form("adminForm", new CompoundPropertyModel(tuneChip));
>>        add(form);
>> 
>>        form.add(new RequiredTextField("description"));
>> 
>>           AbstractAjaxBehavior ajaxPostBehaviour = new AbstractAjaxBehavior() {
>>            private static final long serialVersionUID = 1L;
>> 
>>            @SuppressWarnings("unchecked")
>>            public void onRequest() {
>>                /**…..
>>                some logic. The something goes wrong...
>>                …..**/
>> 
>>                error("Report Error Message");
>>            }
>>        };
>>        add(ajaxPostBehaviour);
>> 
>> What is the best way to bind AbstractAjaxBehavior to the FeedbackPanel or should I used another approach?   As mentioned I am using AbstractAjaxBehavior to received a 'post' request.
>> 
>> eg.
>>         "$.ajax({ " +
>>                        "url: '" + callBackURL + "'," +
>>                        "type: 'post'," +
>>        …etc..
>> 
>> Tate
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>> 
>> 
> 
> 
> 
> -- 
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 


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


Re: Messages to FeedBackPanel from AbstractAjaxBehavior onRequest

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

Why do you use AbstractAjaxBehavior instead of AbstractDefaultAjaxBehavior?

AbstractDefaultAjaxBehavior passes you an instance of
AjaxRequestTarget which you can use to add the feedback panel and show
the feedback message. It writes a special XML back to the browser
which wicket-ajax.js (e.g. wicketAjaxPost()) knows how to read and
uses it to update the components.

AbstractAjaxBehavior is a bit more general Ajax behavior with which
you can write back to the response any kind of response (e.g. JSON).

If you need both kind of responses then I suggest you to use
AbstractDefaultAjaxBehavior to update components (target.add()) and
target.appendJavaScript(someJSONP)

On Wed, Oct 5, 2011 at 10:38 AM, Tate Jones <ta...@bluedog.com.au> wrote:
> Hi Group,
>
> I have added a AbstractAjaxBehavior  to WebPage to recieve a 'post' request from JavaScript (.ajax post).  During the onRequest method an error could occur and I want to display this in the FeedbackPanel.  When I attempt to use the error(..) or info(..) method the following WARNING appears in the console.
>
> WARNING: Component-targetted feedback message was left unrendered. This could be because you are missing a FeedbackPanel on the page.  Message: [FeedbackMessage message = "to be display in feedback panel", reporter = 2, level = ERROR]
>
> I already have a working Feedback panel on the page for a basic button submit method.
>
> code fragment.
>
> @AuthorizeInstantiation(Roles.ADMIN)
> public class AdminPage extends WebPage {
>
>    private static final long serialVersionUID = 1L;
>    private static final Logger log = LoggerFactory.getLogger(WebPage.class);
>
>    public AdminPage() {
>
>        add(new FeedbackPanel("feedback"));
>
>
>        Form form = new Form("adminForm", new CompoundPropertyModel(tuneChip));
>        add(form);
>
>        form.add(new RequiredTextField("description"));
>
>           AbstractAjaxBehavior ajaxPostBehaviour = new AbstractAjaxBehavior() {
>            private static final long serialVersionUID = 1L;
>
>            @SuppressWarnings("unchecked")
>            public void onRequest() {
>                /**…..
>                some logic. The something goes wrong...
>                …..**/
>
>                error("Report Error Message");
>            }
>        };
>        add(ajaxPostBehaviour);
>
> What is the best way to bind AbstractAjaxBehavior to the FeedbackPanel or should I used another approach?   As mentioned I am using AbstractAjaxBehavior to received a 'post' request.
>
> eg.
>         "$.ajax({ " +
>                        "url: '" + callBackURL + "'," +
>                        "type: 'post'," +
>        …etc..
>
> Tate
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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