Re: How to set the page title?

2015-12-09 Thread Martin Makundi
Another way in overriding class:

/**
   * @see
org.apache.wicket.Component#renderHead(org.apache.wicket.markup.html.internal.HtmlHeaderContainer)
   */
  @Override
  public void renderHead(HtmlHeaderContainer container) {
super.renderHead(container);
getResponse().write("" +
application.getEmployee().getPerson().displayName() + "");
  }

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-set-the-page-title-tp4662372p4672919.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Wicket Ajax adding all form component values to request parameters

2015-12-09 Thread Martin Grigorov
Hi,

Sorry, but it is still not clear to me.

On Thu, Dec 10, 2015 at 5:47 AM, Rakesh A 
wrote:

> One use-case is, we've a modal window with a form (with lot of form fields
> -
> 50 to 200 ) in it, dialog has 'Ok' button which, submits form field values
> using Wicket Ajax POST call.
> Modal window also has a 'onClose' Ajax callback. When I click on the 'Ok'
> button it results
> 1. POST call with all form feild values, in this case the
> "Wicket.Form.serializeElement(el)" call at line#656 of
> 'wicket-ajax-jquery.js', results empty array as the modal window DOM is
> empty.
>

The 'close' link triggers POST request ?!
Is this Wicket's ModalWindow or some custom Modal implementation?


> 2. GET call (dialog close callback - settings.onClose property of modal
> window), in this case "Wicket.Form.serializeElement(el)" call at line#656
> of
> 'wicket-ajax-jquery.js', results array with all form fields in the dialog;
> I
> see that the DOM for modal window gets changed before this call.
>

The 'close' link usually is something like "Close",
i.e it doesn't wrap a  (or any form elements) and
thus has nothing to serialize.
It is interesting to me how this 'close' button looks like. Both its Java
code and HTML code.


>
> The second call in our case results a GET URL with all the form field
> values
> appended to URL, resulting a http status code 400 - bad request.
>
> Regards,
> Rakesh.A
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Wicket-Ajax-adding-all-form-component-values-to-request-parameters-tp4672911p4672916.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Wicket Ajax adding all form component values to request parameters

2015-12-09 Thread Rakesh A
One use-case is, we've a modal window with a form (with lot of form fields -
50 to 200 ) in it, dialog has 'Ok' button which, submits form field values
using Wicket Ajax POST call.
Modal window also has a 'onClose' Ajax callback. When I click on the 'Ok'
button it results
1. POST call with all form feild values, in this case the
"Wicket.Form.serializeElement(el)" call at line#656 of
'wicket-ajax-jquery.js', results empty array as the modal window DOM is
empty.
2. GET call (dialog close callback - settings.onClose property of modal
window), in this case "Wicket.Form.serializeElement(el)" call at line#656 of
'wicket-ajax-jquery.js', results array with all form fields in the dialog; I
see that the DOM for modal window gets changed before this call.

The second call in our case results a GET URL with all the form field values
appended to URL, resulting a http status code 400 - bad request.

Regards,
Rakesh.A

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-Ajax-adding-all-form-component-values-to-request-parameters-tp4672911p4672916.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Wicket Ajax adding all form component values to request parameters

2015-12-09 Thread Martin Grigorov
Hi,

What is the purpose of your Ajax behavior ?
What kind of behavior it is and what JavaScript event it listens to ?

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Wed, Dec 9, 2015 at 1:49 PM, Rakesh A  wrote:

> Hi,
> We tried (upgrade from 6.20.0) Wicket 6.21.0, and observe a change in the
> way Wicket ajax calls are made. Upon looking into it further, we see it due
> to the fix for "https://issues.apache.org/jira/browse/WICKET-5948";.
>
> We've some custom Ajax behaviors added to a normal DOM elements (div) which
> has as form in it, Ajax behavior is triggered on a custom event (like
> click/drag mouse events on one of the child DOM elements).
>
> With the fix for WICKET-5948, the above Ajax call is made after appending
> all form field values to the Ajax request; in our case its quite a big form
> with lot of fields, the Ajax behavior uses GET method, and all form fields
> are getting added as url parameters, resulting a long GET url.
>
> Because of this in some cases we even get a 400 bad request as a response
> from our tomcat.
>
> Is this usecase considered while fixing the above mentioned call ?
> Is there a suggested way to avoid this behavior?
>
> Regards,
> Rakesh.A
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Wicket-Ajax-adding-all-form-component-values-to-request-parameters-tp4672911.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Wicket Ajax adding all form component values to request parameters

2015-12-09 Thread Rakesh A
Hi,
We tried (upgrade from 6.20.0) Wicket 6.21.0, and observe a change in the
way Wicket ajax calls are made. Upon looking into it further, we see it due
to the fix for "https://issues.apache.org/jira/browse/WICKET-5948";.

We've some custom Ajax behaviors added to a normal DOM elements (div) which
has as form in it, Ajax behavior is triggered on a custom event (like
click/drag mouse events on one of the child DOM elements).

With the fix for WICKET-5948, the above Ajax call is made after appending
all form field values to the Ajax request; in our case its quite a big form
with lot of fields, the Ajax behavior uses GET method, and all form fields
are getting added as url parameters, resulting a long GET url.

Because of this in some cases we even get a 400 bad request as a response
from our tomcat.

Is this usecase considered while fixing the above mentioned call ?
Is there a suggested way to avoid this behavior?

Regards,
Rakesh.A



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-Ajax-adding-all-form-component-values-to-request-parameters-tp4672911.html
Sent from the Users forum mailing list archive at Nabble.com.

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