Re: NPE on session invalidation

2018-05-17 Thread Rakesh A
Hi,
Sorry for a delayed reply, didn't had chance to work on it till today.

Martin Grigorov-4 wrote
> You didn't answer my question (or I didn't understand your answer).
> Why do you need to use "isSessionInvalidated()" in your cleanup method ?
> Is the cleanup method called in some other cases ? If it is just called by
> logout/onInvalidate then there is no need to check
> "isSessionInvalidated()".

Yes, mentioned cleanup method is called in few other cases as well.

I managed to avoid a call to "isSessionInvalidated()" during session
invalidation by doing small refactoring of our implementation.

Regards,
Rakesh.A



--
Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html

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



Re: NPE on session invalidation

2018-04-03 Thread Rakesh A
Actually, we've bit more complex scenario I should say; we've multiple
webapps running on tomcat with SSO valve configured; which means logout on
one application kills the session on other applications and we've session
implementation class with logout & session invalidation handling.
In both cases logout/invalidate, we try to do some cleanup (at a high level
both call one method), which has this check 'isSessionInvalidated()' before
proceeding with cleanup.

Regards,
Rakesh.A

--
Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html

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



Re: NPE on session invalidation

2018-04-03 Thread Rakesh A
I see the ticket https://issues.apache.org/jira/browse/WICKET-6547 closed as
'resolved' with resolution 'not a problem'. Instead of reopening it I wanted
to discuss the usecase here and decide on re-opening.

Is is allowed to call 'Session.isSessionInvalidated()' from
'WebSession.onInvalidate()' ?
Java doc doesn't say much about its usage (when to or When not to).

We are using #onInvalidate() as a hook to do some cleanup. With 6.29.0
because of a call to isSessionInvlaidated() we get a NullPointerException.
WICKET-6547.7z
  

Regards,
Rakesh.A

--
Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html

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



Re: NPE on session invalidation

2018-03-30 Thread Rakesh A
Did a quick test and logged an issue
https://issues.apache.org/jira/browse/WICKET-6547

--
Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html

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



NPE on session invalidation

2018-03-30 Thread Rakesh A
Wicket 6.29.0 has a fix for https://issues.apache.org/jira/browse/WICKET-6484

change-set of which can be see at -
https://git-wip-us.apache.org/repos/asf?p=wicket.git;a=blobdiff;f=wicket-core/src/main/java/org/apache/wicket/Session.java;h=21a9432a2c5d5005b215dd5d7c3b15bf87fda0ba;hp=5bab1c6bf5fd60243c7adc8a9a6f248f41f78166;hb=35b9381;hpb=d0967b2312ed999b289566fbdd81eb282ad20c8e

Problem I see with this fix is, when session times out there wont be a
request cycle, RequestCycle.get() will return NULL and
'isSessionInvalidated()' method call in
'org.apache.wicket.protocol.http.WebSession.invalidate()' will result a NPE


Regards,
Rakesh.A

--
Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html

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



Will there be a WicketStuff 6.29.0 release ?

2018-03-30 Thread Rakesh A
Wicket 6.29.0 has been released recently, but latest 6.x WicketStuff release
is 6.28.0
Are there plans to do WicketStuff 6.29.0 release.

If not, as Wicket 6.29.0 is a drop-in replacement for older 6.x versions, I
assume we can still use WicketStuff 6.28.0 along with Wicket 6.29.0, correct
?

Regards,
Rakesh.A

--
Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html

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



Wicket PageStore and Token based authentication

2018-01-24 Thread Rakesh A
Hi,

I am trying to build a Wicket application which uses
1. Token based authentication; where token can be valid for a longer time
2. Have page store remain till token expires

I couldn't find any example/information regarding this, by going through the
PageStoreManager implementation, I was thinking about below
1. Have custom implementation of RequestAdapter and avoid setting page store
as http session attribute, but some other alternative way (Ex. persist this
information also)
2. Have custom PageStoreManager which use the custom RequestAdapter
mentioned in step#1

Other than that I think I also need to take care of 
1. Avoid using session id usage for page store lookup
2. Alternative implementation for KeyInSessionSunJceCryptFactory

Is this approach correct ?
Any suggestions on how to do it ?
Any links that I can refer for more information about it ?

Regards,
Rakesh.A

--
Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html

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



WiQuery 6.x and JQuery UI draggable (auto-scroll) bug

2017-11-14 Thread Rakesh A
Hi,

We are using wiquery 6.13.0 to build some interactive UI. This includes
JQuery's UI draggable, droppable, etc.
jquery-ui-1.10.4 is used in wiquery-6.13.0

There was a bug with jquiery-ui in draggable component. The auto-scroll does
not work properly, which can be seen using the below give jsfiddle link.
https://jsfiddle.net/mohammed_techie/5bv8wjuc/

It has been fixed along with few other bugs mentioned at below change log
link https://jqueryui.com/changelog/1.11.0/#interactions

JQuery UI issue details can be found at
https://bugs.jqueryui.com/ticket/9379

It has been fixed by jquery ui, but unfortunately we cannot apply that fix
(in our code), only option is to have this latest JQuery UI (and draggable)
version as part of WiQuery.

Are there plans to upgrade JQuery UI version in WiQuery 6.x branch ?
Any work around that we can use ?

Regards,
Rakesh.A

--
Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html

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



Re: Moving modal window in touch devices

2017-11-02 Thread Rakesh A
Thank you for the suggestion, I tried and was able to make it work.

Below code is what I ended up (for some one who is interested in it)

(function () {
function _duckPunchTouchHandler(event) {
// ignore multi-touch events
if (event.originalEvent.touches.length > 1) {
  return;
}

var touch = event.originalEvent.changedTouches[0];

var simulatedEvent = document.createEvent("MouseEvent");
simulatedEvent.initMouseEvent({
touchstart: "mousedown",
touchmove: "mousemove",
touchend: "mouseup"}[event.type],
true, true, window, 1,
touch.screenX, touch.screenY,
touch.clientX, touch.clientY, false,
false, false, false, 0, null);

touch.target.dispatchEvent(simulatedEvent);
};

DuckPunchWicketDrag = {
 init : function () {
 var init_org = Wicket.Drag.init;

 var mousedown_org = Wicket.Drag.mouseDownHandler;
 var clean_org = Wicket.Drag.clean;

 var mousemove_org = Wicket.Drag.mousemove;
 var mouseup_org = Wicket.Drag.mouseUp;
 var mouseout_org = Wicket.Drag.mouseOut;

 Wicket.Drag.init = function(element, onDragBegin, onDragEnd,
onDrag) {
 Wicket.Event.add(element, "touchstart",
_duckPunchTouchHandler);
 init_org.call(this, element, onDragBegin, onDragEnd,
onDrag);
 };

 Wicket.Drag.mouseDownHandler = function (e) {
 $(document).on('touchmove', _duckPunchTouchHandler);
 $(document).on('touchend', _duckPunchTouchHandler);

 return mousedown_org.call(this, e);
 };

 Wicket.Drag.clean = function (element) {
 Wicket.Event.remove(element, "touchstart",
_duckPunchTouchHandler);
 clean_org.call(this, element);
 };

 Wicket.Drag.mousemove = function (e) {
 return mousemove_org.call(this, e);
 };

 Wicket.Drag.mouseUp = function (e) {
 if (Wicket.Drag.current) {
 $(document).off('touchmove', _duckPunchTouchHandler);
 $(document).off('touchend', _duckPunchTouchHandler);
 }

 mouseup_org.call(this, e);
 };

 Wicket.Drag.mouseOut = function (e) {
 mouseout_org.call(this, e);
 };
 }
};
})();

Regards,
Rakesh.A

--
Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html

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



Moving modal window in touch devices

2017-11-01 Thread Rakesh A
Hi,

I am trying to make modal window positioning (by dragging) work on touch
enabled devices with no luck.
What I tried is to use JQuery Touch punch, to simulate mouse event for touch
events on devices, but this for some reason doesn't work.

Any pointers how to make this (allow users to position Wicket modal dialogs
by dragging them on touch devices) work ?

Regards,
Rakesh.A

--
Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html

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



Re: Joda-time dependency

2017-09-11 Thread Rakesh A
Hi,

Is it going to be for Wicket 8 only ?

Regards,
Rakesh.A

--
Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html

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



Joda-time dependency

2017-09-11 Thread Rakesh A
Hi,

Joda-time library dependency in Wicket was added long back for valid reasons
then. With improvements to Date time API in JDK, do we still need this
dependency ?
Can we replace its usage in Wicket with JDK classes ?

Reason for this is recently we'd issues with date time conversions when
three letter time zones are used.
Eg: When date entered is "04/08/2017 13:00" got converted to "04/08/2017
12:00" when EST (which currently observing EDT -
https://www.timeanddate.com/time/zones/est) time zone used.

Basically conversion result -1hr always.

Regards,
Rakesh.A

--
Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html

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



Re: Possibility of mounting Wicket resource accessible only once

2016-10-13 Thread Rakesh A
Hi,

URLs I can add some code to make them unique, and unmounting from
#getResource() seems better place indeed.

Thank you for the inputs.

Regards,
Rakesh.A

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Possibility-of-mounting-Wicket-resource-accessible-only-once-tp4675749p4675753.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: Possibility of mounting Wicket resource accessible only once

2016-10-13 Thread Rakesh A
Hi,

Having the token persisted into DB seems bit complex to solve this 'dynamic'
resource issue.

The way I've implemented it right now, is to have this resource reference
unmounted, from AbstractRequestCycleListener#onRequestHandlerExecuted()
method, where I've access to IRequestHandler and the resource reference
object it self (checking for ResourceReferenceRequestHandler)

Do you see any issues with this approach ?

Regards,
Rakesh.A

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Possibility-of-mounting-Wicket-resource-accessible-only-once-tp4675749p4675751.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



Possibility of mounting Wicket resource accessible only once

2016-10-12 Thread Rakesh A
Hi,

Is it possible to mount a resource programmatically (Eg. On click of an
AjaxLink), and make it available only once ?

I looked into dynamic resources concept of having a mounted resource, which
uses URL attributes to decide which resource content to return from
getResource() method of it.

In my case, URL remains the same but what to return from getResource() is
decided based on the context when user clicks on an AjaxLink.

Any pointers how to implement it ?

Regards,
Rakesh.A

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Possibility-of-mounting-Wicket-resource-accessible-only-once-tp4675749.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: CryptoMapper, Mounted pages recreation and ModalWindow cookie

2016-10-02 Thread Rakesh A
Created an issue for it - https://issues.apache.org/jira/browse/WICKET-6248

Regards,
Rakesh.A

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/CryptoMapper-Mounted-pages-recreation-and-ModalWindow-cookie-tp4675513p4675621.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: CryptoMapper, Mounted pages recreation and ModalWindow cookie

2016-09-21 Thread Rakesh A
Hi,

Added to my previous reproduction steps, there one more configuration which
causes the mentioned behavior;
When the mounted page has some url path parameter. It might also be
reproducible if mounted path more than one URL segments.

Please find the quick start attached. 
Try accessing the page using '://modal-ex/my-page/01'


modal-ex.7z
  

Regards,
Rakesh.A

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/CryptoMapper-Mounted-pages-recreation-and-ModalWindow-cookie-tp4675513p4675540.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



CryptoMapper, Mounted pages recreation and ModalWindow cookie

2016-09-14 Thread Rakesh A
Hi,

When we've a mounted page for URL '/my-page' and modal window (with
'cookieName' set) is opened from that page modal window size/position
information is set into a cookie and path set for it contains the mount path
as well.

When we enable CryptoMapper in WicketApplication, encrypted URLs for Ajax
links/behaviors will look like '//my-page?wicket-crypt=...', and
modal window size/position cookie is also sent along with any Ajax call made
(including modal window close ajax call).

On top this if we set
'org.apache.wicket.settings.def.PageSettings.recreateMountedPagesAfterExpiry'
to 'false' by calling 

getPageSettings().setRecreateMountedPagesAfterExpiry(false);

in WicketApplication#init() function, encrypted URLs for Ajax
links/behaviors will look like '//', and modal window
size/position cookie is NOT sent along with Ajax calls.

This is because the 'path' for the cookie contains page mount path, but the
encrypted ajax URLs doesn't contain the page mount path.

Different seems to be in
"org.apache.wicket.Component.createRequestHandler(RequestListenerInterface,
PageParameters, Integer)"; where for the first scenario
'BookmarkableListenerInterfaceRequestHandler' instance is being created, and
for the second scenario 'ListenerInterfaceRequestHandler' instance is being
created.

Is it a bug ?
How do I solve it in the second scenario mentioned above ?

Regards,
Rakesh.A

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/CryptoMapper-Mounted-pages-recreation-and-ModalWindow-cookie-tp4675513.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: Regarding nested multipart modal dialog

2016-05-20 Thread Rakesh A
Hi,

Created JIRA issue - https://issues.apache.org/jira/browse/WICKET-6171

I tried to refresh the root form by adding it to 'AjaxRequestTarget', but it
didn't work.

Any workaround you know of, that I can use for now ?

Regards,
Rakesh.A

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Regarding-nested-multipart-modal-dialog-tp4674764p4674769.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



Regarding nested multipart modal dialog

2016-05-19 Thread Rakesh A
Hi,

I observed that when I've a nested (second level) dialog with multipart form
in it, after submitting this form, first level dialog form submit results a
multipart form submit instead of normal form submit.
I've attached a quick start to reproduce this.

Steps:
1. Click the link on home page to open first level dialog
2. Click on the link to open 'multipart' dialog
3. Simply click 'Ok' on this dialog
4. Click 'Ok' on the first level dialog

I expect form submit of Step#4 to be a normal form submit, but I see its a
'multipart' form submit.

I read few discussions at the below link, but couldn't find a solution for
it, any clue how to solve this?
http://apache-wicket.1842946.n4.nabble.com/modal-dialog-and-nesting-of-forms-td4395177.html

nested-multipart-modal-window.7z

  

Regards,
Rakesh.A

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Regarding-nested-multipart-modal-dialog-tp4674764.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: Correct way to get current page instance

2016-02-11 Thread Rakesh A
Clear 

Thank you,
Rakesh.A

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Correct-way-to-get-current-page-instance-tp4673548p4673550.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



Correct way to get current page instance

2016-02-10 Thread Rakesh A
Hi,
I see two possibilities to access current page instance using
"PageRequestHandlerTracker"
One

IRequestHandler requestHandler =
RequestCycle.get().getActiveRequestHandler();
if (requestHandler instanceof IRequestHandlerDelegate)
{
  requestHandler = ((IRequestHandlerDelegate)
requestHandler).getDelegateHandler();
}

if (requestHandler instanceof IPageRequestHandler)
{
  IPageRequestHandler pageRequestHandler = (IPageRequestHandler)
requestHandler;
  if (pageRequestHandler.isPageInstanceCreated())
  {
IRequestablePage page = pageRequestHandler.getPage();
  }
}

Two
   PageRequestHandlerTracker.getLastHandler(RequestCycle.get()).getPage();

Option#2 looks simpler, but
Is there any difference between the two?
What is correct way to get current page instance?

Regards,
Rakesh.A

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Correct-way-to-get-current-page-instance-tp4673548.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



Access log & CryptoMapper

2016-01-12 Thread Rakesh A
Hi,

Without CryptoMapper enabled, we can check URLs accessed and their HTTP
status in access logs of tomcat or any other server. But if we enable
CryptoMapper, access logs will have encrypted URLs in server access logs,
and would be difficult to identify which URL resulted a break.

Is there any possibility to have logging (with plain URLs) similar to access
log with CryptoMapper enabled?

To be more exact, with our situation. We've our error handling done in
RequestCycleListener#onException(), method, is there any possibility to log
decypted URL from here, which we can use to track the issue.

Regards,
Rakesh.A

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Access-log-CryptoMapper-tp4673267.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: Exception handling in AutoCompleteTextField

2016-01-12 Thread Rakesh A
Hi,

After looking into ajax code a bit, I see that 'Ajax-Location' header is not
considered for autocomplete response.
I created a PR (https://github.com/apache/wicket/pull/156) with a small
change to ajax JavaScript.

Regards,
Rakesh.A

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Exception-handling-in-AutoCompleteTextField-tp4673192p4673272.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



Exception handling in AutoCompleteTextField

2016-01-06 Thread Rakesh A
Hi,

If we get an exception while preparing suggestions/choices for the entered
text (in AutoCompleteTextField#getChoices()), I see that, there is no means
to show it to user.
JavaScript implementation handles only success responses.

Is there any way to execute standard Ajax response handling, in this case?

Please find attached quick start, try entering 'test' in the autocomplete
text field on home page.

autocomplete.7z
  

Regards,
Rakesh.A

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Exception-handling-in-AutoCompleteTextField-tp4673192.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: Regarding Browser/Client info implementation

2015-12-24 Thread Rakesh A
I created JIRA ticket - https://issues.apache.org/jira/browse/WICKET-6056

PR links for master and wicket-6.x branches, are added at ticket comments
section.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Regarding-Browser-Client-info-implementation-tp4673024p4673093.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: Regarding Browser/Client info implementation

2015-12-24 Thread Rakesh A
Can you go through this check-in
https://github.com/iamrakesh/wicket/commit/351f084872467f0d3d0f339ab9c20afb4f79d2d1

Or do you need PR?

Regards,
Rakesh.A

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Regarding-Browser-Client-info-implementation-tp4673024p4673070.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: Regarding Browser/Client info implementation

2015-12-24 Thread Rakesh A
Done - https://github.com/apache/wicket/pull/152

Mary Christmas :)

Rakesh.A

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Regarding-Browser-Client-info-implementation-tp4673024p4673083.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: Regarding Browser/Client info implementation

2015-12-22 Thread Rakesh A
I tried to create a patch with the changes on Wicket sources, please find
them attached.

Patch#1 - Without renaming HTML files
Patch#2 - With renaming HTML files

Note: I did not test/execute these changes.

wicket6-browser-info-changes-NO-RENAME.patch

  
wicket6-browser-info-changes-WITH-RENAME.patch

  

Regards,
Rakesh.A

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Regarding-Browser-Client-info-implementation-tp4673024p4673025.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



Regarding Browser/Client info implementation

2015-12-22 Thread Rakesh A
Hi,

I was trying to use WebClientInfo to get browser information on the server,
and also extend the implementation in Wicket 6.x, reasons for me to extend
Wicket's implementation are
1. Current implementation does not allow me to detect browser's touch api
support
2. Wanted to use client side implementation library to detect browser
features - like Modernizr.

On a brief look at the implementation I thought it is possible, but I ended
up copy/pasting lot of code to workaround the problems I faced.
Changing the implementation a bit might allow extension to Wicket's
implementation. As changes are more, I created a quick start to show the
changes required in Wicket's implementation. Please find the attached quick
start.
1. I've copied and changed Wicket's implementation and they can be found in
package "in.rakesh.example.wicket.page.browserinfo"
2. Extension to this implementation can be found under package
"in.rakesh.example.wicket.page"

Another problem I'd while doing these changes is regarding 'WebClientInfo'
object creation. Current implementation creates instances in multiple
places, making it difficult to have a subclass/extension to it.

Adding a method to WebSession (WebSession#createClientInfo()), and using it
to create instance gives lot of flexibility to extend it.

In the attached quick start, I've added TODOs which need to be
updated/corrected, if we've a method in WebSession.

Can you please provide your views on this change.

browserinfo.7z
  

Regards,
Rakesh.A

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Regarding-Browser-Client-info-implementation-tp4673024.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: CssUrlReplacer and performance with certain CSS files

2015-12-14 Thread Rakesh A
Created JIRA task: https://issues.apache.org/jira/browse/WICKET-6051

Regards,
Rakesh.A

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/CssUrlReplacer-and-performance-with-certain-CSS-files-tp4672969p4672981.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: CssUrlReplacer and performance with certain CSS files

2015-12-14 Thread Rakesh A
Yes, exclusion files (java.util.Set) would be better I think, instead of
pattern.

I can attach/provide a sample file tomorrow, if you want.

Regards,
Rakesh.A

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/CssUrlReplacer-and-performance-with-certain-CSS-files-tp4672969p4672971.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



CssUrlReplacer and performance with certain CSS files

2015-12-14 Thread Rakesh A
Hi,

I was experimenting with 'CssUrlReplacer', and I see that the performance of
CSS file loading might get affected if we enable it. I know that it depends
on the content of (no of image URLs) CSS files (and documentation doesn't
mention it also :) )

In my tests, I was trying to load ExtJs theme CSS file, and it took
"18668ms" to process it, and this file has 633 instances of background image
css property with 'url'.

One can extend this class and exclude it from the processing list, but would
like to know if the performance aspects of this class were investigated?
Any plans to improve this implementation ?

Regards,
Rakesh.A

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/CssUrlReplacer-and-performance-with-certain-CSS-files-tp4672969.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-14 Thread Rakesh A
Hi,

I see in the fix for WICKET-6006, it is specific to ModalWindow
implementation. 

Please find the attached quick start with the another usecase.

WICKET-5948-2.7z
  

This is an update to earlier quickstart. Here I am trying to use JQuery UI's
resizable behavior, use case is when resizing of a DOM element stops, I'd
like to make an Ajax call by sending the new width back to server.
On the home page I added a Panel with same two form feilds, to which an Ajax
behavior is added to enable JQuery UI's resizable and the Ajax call when
resizing stops - Try resizing the panel and check the network call.

By adding Wicket.Form.excludeFromAjaxSerialization[markupId] = 'true'; it
probably can be avoided, but this needs to be done to all behaviors that
were written earlier (consider behaviors written for UI component
integration - WiQuery, etc).

This change in 6.21.0 has more impact I think.

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-tp4672911p4672966.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-14 Thread Rakesh A
Created JIRA ticket: https://issues.apache.org/jira/browse/WICKET-6050

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-tp4672911p4672968.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-11 Thread Rakesh A
Please find the attached quick start, which shows the mentioned behavior.

WICKET-5948.7z
  

After deploying
1. Click on the link (on home page) to open modal dialog, with few form
fields in it.
2. Click on the 'Ajax submit button' to submit form

Check the network calls for Step#2 mentioned above.

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-tp4672911p4672942.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



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: Regarding WicketStuff projects deliverables as OSGI bundles

2015-10-16 Thread Rakesh A
Wicket deliverables are bundles, but WicketStuff project deliverables are
plain JARs.
I'd like to have WicketStuff JARs as bundles as well.

Regards,
Rakesh.A

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Regarding-WicketStuff-projects-deliverables-as-OSGI-bundles-tp4672250p4672259.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



CryptoMapper and mounted resource URLs

2015-10-15 Thread Rakesh A
Hi,

I am trying to generate URLs for mounted resources, and use them later (from
JavaScript). I expected using 'RequestCycle#urlFor()' with CryptoMapper
enabled will result encrypted urls. But I see I am wrong, and implementation
in "CryptoMapper#encryptUrl(Url)" (gets into else block and calls
encryptRequestListenerParameter()) results plain text urls.

Is there any way, to get/generate encrypted URLs for mounted
resources/pages.

Attached quickstart to show the behavior.

example1.zip
  

Regards,
Rakesh.A


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/CryptoMapper-and-mounted-resource-URLs-tp4672249.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



Regarding WicketStuff projects deliverables as OSGI bundles

2015-10-15 Thread Rakesh A
Hi,

All WicketStuff project deliverables are plain JARs, is there any
possibility to have them as OSGI bundles?

I tried using 'maven-bundle-plugin' plugin, on one of the projects, and was
able to build OSGI bundles.

Is it a possibility to have these POM files changed with above plugin
configured.

Regards,
Rakesh.A

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Regarding-WicketStuff-projects-deliverables-as-OSGI-bundles-tp4672250.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: CryptoMapper and mounted resource URLs

2015-10-15 Thread Rakesh A
Hi,

I did try overriding the #mapHandler() method and have a condition to check
for a specific type of 'IRequestHandler', and call "#encryptEntireUrl()"
method, this does work.

  @Override
  public Url mapHandler(final IRequestHandler requestHandler)
  {
 Url myUrl = super.mapHandler(aRequestHandler);
 if (requestHandler instanceof MyResourceRequestHandler)
 {
return encryptEntireUrl(myUrl);
 }
 return myUrl;
  }

Is it the suggested way ?

Regards,
Rakesh.A

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/CryptoMapper-and-mounted-resource-URLs-tp4672249p4672256.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: Regarding WicketStuff projects deliverables as OSGI bundles

2015-10-15 Thread Rakesh A
Hi,

Yes, we might've to add some (import, export package) configuration; by
adding maven-bundle-plugin, I tested only, whether manifest contains OSGI
specific info or not. 

I'll try to come up with a patch.

Regards,
Rakesh.A

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Regarding-WicketStuff-projects-deliverables-as-OSGI-bundles-tp4672250p4672255.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



FileUploadException - 'Stream ended unexpectedly' when proxy is configured

2014-11-17 Thread Rakesh A
Hi,

Wicket file upload results HTTP 400 - bad request, when proxy is configured
[Eg: OWASP ZAP]. I am able to reproduce this using the live examples URL - 
www.wicket-library.com/wicket-examples-6.0.x/upload/single
http://www.wicket-library.com/wicket-examples-6.0.x/upload/single  
Can anybody explain this behavior.

1. Installed ZAP tool
2. Start ZAP [starts on 8080 by default, can be changed]
3. Configured proxy in IE [Internet Options - Connetions - LAN settings]
4. Access the above given wicket file upload example URL
5. Try uploading a file [try using reasonably big file - between 100KB -
700KB]

Regards,
Rakesh.A

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/FileUploadException-Stream-ended-unexpectedly-when-proxy-is-configured-tp4668436.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: WiQuery for Wicket 6.17.0

2014-09-23 Thread Rakesh A
We are doing that, but wanted to get a confirmation .

Thank you,
Rakesh.A

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/WiQuery-for-Wicket-6-17-0-tp4667564p4667634.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



WiQuery for Wicket 6.17.0

2014-09-19 Thread Rakesh A
Hi,

I see WiQuery is still at 6.13.0, Is there a release plan to upgrade WiQuery
to use Wicket 6.17.0?

Regards,
Rakesh.A

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/WiQuery-for-Wicket-6-17-0-tp4667564.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: CouldNotLockPageException while trying 'inspect' option of Debug bar

2014-09-10 Thread Rakesh A
Hi,

After some debugging  investigation, It turned out to be a
'AjaxEventBehavior' for 'load' event [page onload event], which was added to
page was causing this lock, removing this behavior solved the page locking
issue.

Thanks,
Rakesh.A

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/CouldNotLockPageException-while-trying-inspect-option-of-Debug-bar-tp4667405p4667450.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: CouldNotLockPageException while trying 'inspect' option of Debug bar

2014-09-10 Thread Rakesh A
Forgot to mention, an anonymous class implementation was done for the
AjaxEventBehavior, and the #onEvent(..) method access' Page properties in
it.

Regards,
Rakesh.A

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/CouldNotLockPageException-while-trying-inspect-option-of-Debug-bar-tp4667405p4667451.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



CouldNotLockPageException while trying 'inspect' option of Debug bar

2014-09-09 Thread Rakesh A
Hi,

I was trying to analyze my wicket page, by adding Wicket debug bar. When I
click on the 'Inspector' option in Wicket debug bar I get a
CouldNotLockPageException. Thread dump logged is provided below, I couldn't
understand much from it, can anybody point me towards why I am getting this
exception.


Thanks,
Rakesh.A

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/CouldNotLockPageException-while-trying-inspect-option-of-Debug-bar-tp4667405.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: CouldNotLockPageException while trying 'inspect' option of Debug bar

2014-09-09 Thread Rakesh A
Hi,
Strange thing is, even if I increase the request timeout to 5mins using
org.apache.wicket.settings.IRequestCycleSettings.setTimeout(Duration), I
get the same exception.

I use Wicket 6.15.0, pages are unversioned  page uses
'AbstractAjaxTimerBehavior'.
Does 'AbstractAjaxTimerBehavior' cause this lock?

Regards,
Rakesh.A

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/CouldNotLockPageException-while-trying-inspect-option-of-Debug-bar-tp4667405p4667413.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



after redirect to statefull page and browser back button results StalePageException

2014-06-18 Thread Rakesh A
Hi,
I've a link on the page, which requires a redirect to statefull page, and
the resultant page also has this type of link, upon clicking on it [on the
second page], and on the third page, if use the browser back button, I get
StalePageException.

Click on link - will result
a. Create a page instance
b. Update its model with some data
c. Redirect to this page instance using RestartResponseException

Steps i follow are
1. Click on a link which will do the above mentioned steps
2. On the resultant page of Step#1, click on the link again.
3. Step#2 will take me to a page
4. On this page use the browser back button.

Is there any way I can set some data in page modal after page gets
instantiated [only in special cases] ?

BTW: I am using Wicket v6.12.0

Thanks,
Rakesh.A

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/after-redirect-to-statefull-page-and-browser-back-button-results-StalePageException-tp4666311.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



Request.getClientUrl() usage when using reverse proxy

2014-05-16 Thread Rakesh A
Hi,
I've little trouble finding the correct method to use, to get the host name
when using reverse proxy. I tried to use
org.apache.wicket.request.Request.getClientUrl(), but when I use
Url#getHost() on the return value, I get the actual host name instead of
the proxy url.

Is there any other method I can use in this case?

Thanks,
Rakesh.A

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Request-getClientUrl-usage-when-using-reverse-proxy-tp4665750.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: Request.getClientUrl() usage when using reverse proxy

2014-05-12 Thread Rakesh A
Hi,

After some investigation into configuration, we found that few headers were
not set and resulted the behavior I mentioned. Enabling the following solved
it.

proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

Thank you,
Rakesh.A


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Request-getClientUrl-usage-when-using-reverse-proxy-tp4665750p4665779.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: DOM element not found issue - Ajax response

2014-04-03 Thread Rakesh A
Hi,

In my case, the DOM element is not part of iframe/modal window, its in the
current page itself. And the 'id' attribute used by javascript is also part
of the same Ajax response. And I am using JQuery to reference this DOM
element.
What I am doing is.
1. Go to my page
2. Press F5 to refresh my wicket page [unversioned], and wait for the page
to load completely.
3. Click on one AjaxLink which replaces another component in the same page.

Step#3 here responds markup and Javascript [JQuery script], I see that the
'id' attribute used by JQuery is part of the same Ajax response. But still
JQuery fails to find this DOM element.

There is another case where I get similar issue.
When my application is deployed over network, and is accessed from a
different machine [with some network lag]. On the page I've one AjaxLink 
and Component with Ajax on click behavior added to it.
1. Click on component with ajax on click behavior.
2. Click on AjaxLink, without waiting for the first request to complete.

The AjaxLink in both scenarios is the same link, and replaced another
component.

Thanks,
Rakesh.A

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/DOM-element-not-found-issue-Ajax-response-tp4665201p4665258.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



Character ^ added to javascript blocks in Ajax response

2014-04-01 Thread Rakesh A
Hi,
I am using Wicket v6.12.0, I observed that ^ character is getting added at
places in javascript blocks in Ajax response. I observed that its for Ajax
attributes with supports array like 'pre', 'bh', 'dep', etc.

Example:
pre:[function(attrs){return false;}]^
bh:[function(attrs){if (attrs.event.shiftKey) {
attrs.event.preventDefault(); }}]^
dep:[function(attrs){return {'ctrlKey' : attrs.event.ctrlKey, 'shiftKey' :
attrs.event.shiftKey}}]^

Is it being added by Wicket?

I tried by adding -Djavax.servlet.request.encoding=UTF-8
-Dfile.encoding=UTF-8 options to my tomcat startup, thinking its character
encoding issue, but that didn't help!

Thanks,
Rakesh.A


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Character-added-to-javascript-blocks-in-Ajax-response-tp4665190.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



DOM element not found issue - Ajax response

2014-04-01 Thread Rakesh A
Hi,

I am using Wicket v6.12.0, I've couple of Ajax links, clicking on which will
replace a panel [ajax enabled - markup id is generated], and this click also
results a piece of javascript, which will use the markup id of the panel.
In some cases I see the the javascript fails saying the DOM element doesn't
exists. When I enable Ajax debug window and see the response, I do see the
panel with markup id and the javascript is using the same markup id, but
still script fails to find the DOM element.

This script is added using OnDomReadyHeaderItem. Can anyone point me how to
find the cause of it?

Thanks,
Rakesh.A

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/DOM-element-not-found-issue-Ajax-response-tp4665201.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



StalePageException when AjaxFallbackLink opened in new tab

2014-01-09 Thread Rakesh A
Hi,

I've few AjaxFallbackLink links in my page [not versioned], when I try to
right click on these link and use the open in new tab option, page gets
opened in new tab and results a StalePageException, because render count
doesn't match [verified this by debugging
org.apache.wicket.core.request.handler.PageProvider.getStoredPage(int)], but
it gets into a infinate loop of refresh [due to repeated StalePageException
s].

Can one point me to how to fix this?

Regards,
Rakesh.A

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/StalePageException-when-AjaxFallbackLink-opened-in-new-tab-tp4663568.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: StalePageException when AjaxFallbackLink opened in new tab

2014-01-09 Thread Rakesh A
Hi,

Yes, page does have 'AbstractAjaxTimerBehavior' added to it.

Regards,
Rakesh.A

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/StalePageException-when-AjaxFallbackLink-opened-in-new-tab-tp4663568p4663573.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: AutoCompleteTextField suggestions popup position issue when container has scrollbar

2013-09-10 Thread Rakesh A
Thank you 

- Rakesh.A



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AutoCompleteTextField-suggestions-popup-position-issue-when-container-has-scrollbar-tp4661242p4661273.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: AutoCompleteTextField suggestions popup position issue when container has scrollbar

2013-09-09 Thread Rakesh A
Hi,

Can you please provide me the call [new call] details, when you create one.

Thanks,
Rakesh.A



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AutoCompleteTextField-suggestions-popup-position-issue-when-container-has-scrollbar-tp4661242p4661267.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: AutoCompleteTextField suggestions popup position issue when container has scrollbar

2013-09-08 Thread Rakesh A
Hi,

Thank you, I did bit of search and found one issue which seems to be
similar,

https://issues.apache.org/jira/browse/WICKET-1355

But the status says, its not reproducible.

Hope it helps

Regards,
Rakesh.A



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AutoCompleteTextField-suggestions-popup-position-issue-when-container-has-scrollbar-tp4661242p4661247.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



AutoCompleteTextField suggestions popup position issue when container has scrollbar

2013-09-07 Thread Rakesh A
Hi,

I am trying to use wicket's AutoCompleteTextField, which is placed inside a
Div, and it has vertical scrollbar, in this case when scroll bar is not at 0
position, the auto complete suggestions popup is not shown next to the text
box.

I've attached a quickstart which helps reproducing this issue.
autocomplete-test.zip
http://apache-wicket.1842946.n4.nabble.com/file/n4661242/autocomplete-test.zip
  

Is there any solution to this problem?

Regards,
Rakesh.A



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AutoCompleteTextField-suggestions-popup-position-issue-when-container-has-scrollbar-tp4661242.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: CryptoMapper not encoding query string - Wicket 6.5.0

2013-07-09 Thread Rakesh A
Hi,

After bit more debugging I found that the URL provided in the previous post
were indeed 1.4.x generated, new URL generated is similar to the one given
below

http://localhost:9090/myTest/?8-1.ILinkListener-contentPanel-layout-entryPanel-layoutButtonPanel-actionButtonTitleHolder-actionButton

But the encryption problem is still exists. If you observe, the URL is
similar to that of a home page, and it doesn't have segments and the
condition 'url.getSegments().isEmpty()' in CryptoMapper#encryptUrl(Url)
returns 'true' for the above URL and encryption is skipped.

Current implementation of CryptoMapper - has encryptUrl() method declared as
private and can not be extended!
Is there any other way to solve it?

Regards,
Rakesh.A



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/CryptoMapper-not-encoding-query-string-Wicket-6-5-0-tp4659643p4660169.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: markup not found exception for fragment which is part of wicket:extend

2013-07-04 Thread Rakesh A
Hi,

Will it be the same [dialog instance as markup provider instead of page
instance] if the fragment is part of wicket modal dialog?

Regards,
Rakesh.A



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/markup-not-found-exception-for-fragment-which-is-part-of-wicket-extend-tp4660037p4660049.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



markup not found exception for fragment which is part of wicket:extend

2013-07-03 Thread Rakesh A
Hi,

I am using Wicket v6.5.0, I've code where wicket fragments are part of
'wicket:extend/' tag and I get exception that Markup is not found for the
fragment, same piece of code works in Wicket v1.4.21.

I created  attached a quick start with code similar to my case.

fragmentTest.zip
http://apache-wicket.1842946.n4.nabble.com/file/n4660037/fragmentTest.zip  

Regards,
Rakesh.A



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/markup-not-found-exception-for-fragment-which-is-part-of-wicket-extend-tp4660037.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: Alternatives for Page.componentChanged(Component, MarkupContainer) - Wicket 6.5.0

2013-07-02 Thread Rakesh A
Hi,

Thank you for the solution ; Yes, I fixed it by using
IComponentInitializationListener  IDetachListener.

Regards,
Rakesh.A



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Alternatives-for-Page-componentChanged-Component-MarkupContainer-Wicket-6-5-0-tp4659644p4659957.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



Changes related to serialization in Wicket 1.5+

2013-07-02 Thread Rakesh A
Hi,

We recently upgraded our application from Wicket v1.4.21 to v6.5.0; after
upgrade we see traces of NotSerializableException for few of classes [in
fact the number is more] which were working fine with v1.4.21.

Was there any change in wicket serialization in v1.5+ ?
Is the latest library doing more serialization?

Regards,
Rakesh.A



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Changes-related-to-serialization-in-Wicket-1-5-tp4659961.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: Changes related to serialization in Wicket 1.5+

2013-07-02 Thread Rakesh A
Hi,

We have a class 'ColorDisplayFormatHelper' which doesn't implement
'Serializable', but was working fine with v1.4.21 library, but after using
v6.5.0, we get exception that this class is not serializable.

My question why it was working earlier, and fails now?

Regards,
Rakesh.A



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Changes-related-to-serialization-in-Wicket-1-5-tp4659961p4659967.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: Alternatives for Page.componentChanged(Component, MarkupContainer) - Wicket 6.5.0

2013-06-30 Thread Rakesh A
Hi,

In 1.4.x implementation, we were overriding this method [int our base Page
implementation] and were doing bit of initialization for the components of
the page which is [I mean initialization part - UI related] specific to our
implementation.

This was one central location to do this for any component change on the
page with v1.4.x, as we upgraded Wicket libarary to 6.5.0 recently, we're
looking for alternatives for this method.

Regards,
Rakesh.A



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Alternatives-for-Page-componentChanged-Component-MarkupContainer-Wicket-6-5-0-tp4659644p4659932.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: Alternatives for Page.componentChanged(Component, MarkupContainer) - Wicket 6.5.0

2013-06-24 Thread Rakesh A
Hi,

Is there any other way for the mentioned method?
Any suggestions?

Regards,
Rakesh.A



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Alternatives-for-Page-componentChanged-Component-MarkupContainer-Wicket-6-5-0-tp4659644p4659763.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: CryptoMapper not encoding query string - Wicket 6.5.0

2013-06-21 Thread Rakesh A
Hi,

I added the below two lines in my WebApplication#init() method.

  getSecuritySettings().setCryptFactory(new
KeyInSessionSunJceCryptFactory());
  setRootRequestMapper(new PnCryptoMapper(getRootRequestMapper(),
this));

When I debug, for me url.getSegments().isEmpty() is 'true' [my url doesn't
have segments] and encryptUrl() method returns without encrypting the URL.

Regards,
Rakesh.A



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/CryptoMapper-not-encoding-query-string-Wicket-6-5-0-tp4659643p4659650.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: CryptoMapper not encoding query string - Wicket 6.5.0

2013-06-21 Thread Rakesh A
Hi,

Code is recently upgraded from Wicket v1.4.21 to v6.5.0

Regards,
Rakesh.A



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/CryptoMapper-not-encoding-query-string-Wicket-6-5-0-tp4659643p4659651.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: Alternatives for Page.componentChanged(Component, MarkupContainer) - Wicket 6.5.0

2013-06-21 Thread Rakesh A
Hi,

May be I should've added more details to my question.
Code recently upgraded from v1.4.21 to v6.5.0. Old implementation code we
are using this method to do some initialization whenever a component gets
added/removed.

As this method is not being called anymore, the initialization code is not
getting executed anymore [with v6.5.0].

I am looking for alternatives for this method in new v6.5.0 api.

Regards,
Rakesh.A



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Alternatives-for-Page-componentChanged-Component-MarkupContainer-Wicket-6-5-0-tp4659644p4659653.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: Alternatives for Page.componentChanged(Component, MarkupContainer) - Wicket 6.5.0

2013-06-21 Thread Rakesh A
Hi,

Page.componentRemoved(Component)  Page.componentAdded(Component) are final
methods, I can not override them in my Page implementation.

Regards,
Rakesh.A



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Alternatives-for-Page-componentChanged-Component-MarkupContainer-Wicket-6-5-0-tp4659644p4659655.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



radiochoice signature - List vs Collection ?

2008-07-09 Thread Rakesh Sinha
Hi -
 I am looking at 1.4m2 codebase.

One of the constructors of  radio choice seem to be:

public RadioChoice(final String id, final ListT choices) ..

In reality the second argument seems to be more appropriate for a
Collection , rather than as a list.
Any specific reason why it is List? instead of being a Collection?
. The argument being a collection can enable it to take Set?s. that
seems more appropriate here.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: radiochoice signature - List vs Collection ?

2008-07-09 Thread Rakesh Sinha
Thanks.

Here it is .

I would like to volunteer to fix this as well.
What are the svn commit procedures ?

On 7/9/08, Igor Vaynberg [EMAIL PROTECTED] wrote:
 please open a jira issue

  -igor


  On Wed, Jul 9, 2008 at 6:43 PM, Rakesh Sinha [EMAIL PROTECTED] wrote:
   Hi -
I am looking at 1.4m2 codebase.
  
   One of the constructors of  radio choice seem to be:
  
   public RadioChoice(final String id, final ListT choices) ..
  
   In reality the second argument seems to be more appropriate for a
   Collection , rather than as a list.
   Any specific reason why it is List? instead of being a Collection?
   . The argument being a collection can enable it to take Set?s. that
   seems more appropriate here.
  

  -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  

  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: radiochoice signature - List vs Collection ?

2008-07-09 Thread Rakesh Sinha
https://issues.apache.org/jira/browse/WICKET-1744 .

Sorry - forgot the url .

On 7/9/08, Rakesh Sinha [EMAIL PROTECTED] wrote:
 Thanks.

  Here it is .

  I would like to volunteer to fix this as well.
  What are the svn commit procedures ?


  On 7/9/08, Igor Vaynberg [EMAIL PROTECTED] wrote:
   please open a jira issue
  
-igor
  
  
On Wed, Jul 9, 2008 at 6:43 PM, Rakesh Sinha [EMAIL PROTECTED] wrote:
 Hi -
  I am looking at 1.4m2 codebase.

 One of the constructors of  radio choice seem to be:

 public RadioChoice(final String id, final ListT choices) ..

 In reality the second argument seems to be more appropriate for a
 Collection , rather than as a list.
 Any specific reason why it is List? instead of being a Collection?
 . The argument being a collection can enable it to take Set?s. that
 seems more appropriate here.

  
-
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


  
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
  
  


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



reusing css files across directories.

2008-07-09 Thread Rakesh Sinha
Hi -
   I am trying to add css to my page.

Adding the following line to my WebPage , definitely works.

add(new StyleSheetReference(pageCSS, getClass(), page.css));

But I am just curious - what would be the solution to share the css
across the directory structures.


In other words - if we were to specify a path in the stylesheet - how
would that be interpreted relative to the wicket application directory
structure ?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



MockWebApplication supporting https ?

2008-07-06 Thread Rakesh Sinha
Hi -
  Came across this class -
 org.apache.wicket.protocol.http.MockWebApplication internally used by
WicketTester. It seems to work nice with http:// , but not with SSL.
 I am working with 1.3.4 .  Can we have a future MockObject (may
be a configurable WicketTester , that can take the hostname , ssl port
too) and mock a ssl connection instead of a http:// connection).
Thanks.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



SSL support for WebApplication in development branch ..

2008-07-06 Thread Rakesh Sinha
Hi -
  I am looking at the following wiki -
http://cwiki.apache.org/confluence/display/WICKET/How+to+switch+to+SSL+mode#HowtoswitchtoSSLmode-Edit(Wicket1.3.x)%3A
.

  The wiki lists a whole number of options to add SSL support to a web
application including that of the links of controls etc. (Button /
Link etc). I was curious if any of these things are already
incorporated in the development branch already that could be picked
up.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



ajax behavior sample with radiogroup / radio

2008-07-05 Thread Rakesh Sinha
Hi -
  I am trying to integrate ajax behavior with a radio button such that
whenever a radio button in a radio group is selected - an appropriate
handler is invoked.

Java:

RadioGroup sex = new RadioGroup(sex);
sex.add(new Radio(M, new Model(AgeValidator.SexEnum.MALE)));
sex.add(new Radio(F, new Model(AgeValidator.SexEnum.FEMALE)));

sex.add(
new OnChangeAjaxBehavior(
protected void onUpdate(AjaxRequestTarget target) {
//code to execute when a radio button is selected.
   //appropriate component added to target.
 }
)
);

html:
===

wicket:container wicket:id=sex
tdinput wicket:id=M type=radio /Male input
wicket:id=F type=radio /Female/td
/wicket:container

This does not seem to invoke the ajax code handler that I was
expecting when I select an age in the front - end. Any idea what I am
missing here.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: ajax behavior sample with radiogroup / radio

2008-07-05 Thread Rakesh Sinha
I changed the code to be AjaxFormComponentUpdatingBehavior (onclick)
- but it still does not seem to work ( though , onclick *is* the right
method to invoke from javascript ).

The generated HTML does not seem to contain the javascript invocation
for the particular event. I am suspecting something wrong with my html
code.

html:


wicket:container wicket:id=sex
   tdinput wicket:id=M type=radio /Male input
   wicket:id=F type=radio /Female/td
/wicket:container

Would this be correct ?


On 7/5/08, Timo Rantalaiho [EMAIL PROTECTED] wrote:
 On Sat, 05 Jul 2008, Rakesh Sinha wrote:
   This does not seem to invoke the ajax code handler that I was
   expecting when I select an age in the front - end. Any idea what I am
   missing here.


 Check out which JavaScript event gets triggered on checking
  the radio button. It might be onclick instead of onchange,
  in which case new
  AjaxFormComponentUpdatingBehavior(onclick) in place of
  OnChangeAjaxBehavior should work.

  Best wishes,
  Timo


  --
  Timo Rantalaiho
  Reaktor Innovations OyURL: http://www.ri.fi/ 

  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: ajax behavior sample with radiogroup / radio

2008-07-05 Thread Rakesh Sinha
Ok - my new code looks as follows:
-

RadioGroup sex = new RadioGroup(sex);
Radio male = new Radio(M, new Model(SexEnum.MALE));
Radio female = new Radio(F, new Model(SexEnum.FEMALE));

sex.add(male.add(new AjaxEventBehavior(onchange) {
 protected void onEvent(AjaxRequestTarget target) {
   // add your favorite component.
  }
});
sex.add(female.add(new AjaxEventBehavior(onchange) {
 protected void onEvent(AjaxRequestTarget target) {
   // add your favorite component.
  }
});

This seems to associate the right event with the radio buttons.

Having said that - I was curious - how would I distinguish between the
different radio buttons in a given radio group (between M and F , in
the above example ) to see which value has been chosen. Is there a
method in RadioGroup , that will given something like a current
selected radio model or something similar to that ?




On 7/5/08, Rakesh Sinha [EMAIL PROTECTED] wrote:
 I changed the code to be AjaxFormComponentUpdatingBehavior (onclick)
  - but it still does not seem to work ( though , onclick *is* the right
  method to invoke from javascript ).

  The generated HTML does not seem to contain the javascript invocation
  for the particular event. I am suspecting something wrong with my html
  code.


  html:
  

  wicket:container wicket:id=sex
tdinput wicket:id=M type=radio /Male input
wicket:id=F type=radio /Female/td
  /wicket:container


 Would this be correct ?



  On 7/5/08, Timo Rantalaiho [EMAIL PROTECTED] wrote:
   On Sat, 05 Jul 2008, Rakesh Sinha wrote:
 This does not seem to invoke the ajax code handler that I was
 expecting when I select an age in the front - end. Any idea what I am
 missing here.
  
  
   Check out which JavaScript event gets triggered on checking
the radio button. It might be onclick instead of onchange,
in which case new
AjaxFormComponentUpdatingBehavior(onclick) in place of
OnChangeAjaxBehavior should work.
  
Best wishes,
Timo
  
  
--
Timo Rantalaiho
Reaktor Innovations OyURL: http://www.ri.fi/ 
  
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
  
  


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: ajax behavior sample with radiogroup / radio

2008-07-05 Thread Rakesh Sinha
RadioGroup sex; //define as a member variable ..


sex = new RadioGroup(sex, new Model(SexEnum.MALE) ) ;
//important: the model of the radio group has to be the same as
// the model for the individual radio members as well.

Radio male = new Radio(M, new Model(SexEnum.MALE));
Radio female = new Radio(F, new Model(SexEnum.FEMALE));

sex.add(male.add(new AjaxEventBehavior(onchange) {
protected void onEvent(AjaxRequestTarget target) {
  // add your favorite component.
 }
});
sex.add(female.add(new AjaxFormSubmitBehavior(onclick) {
@Override
protected void onSubmit(AjaxRequestTarget target) {
  //sex.getModelObject()
  // will have the selected model object.
 //SexEnum.Male / SexEnum.Female in this case.
}

@Override
protected void onError(AjaxRequestTarget target) {
// TODO Auto-generated method stub

}
});


This seems to work.


On 7/5/08, Rakesh Sinha [EMAIL PROTECTED] wrote:
 Ok - my new code looks as follows:
  -


  RadioGroup sex = new RadioGroup(sex);

 Radio male = new Radio(M, new Model(SexEnum.MALE));
  Radio female = new Radio(F, new Model(SexEnum.FEMALE));

  sex.add(male.add(new AjaxEventBehavior(onchange) {
  protected void onEvent(AjaxRequestTarget target) {
// add your favorite component.
   }
  });
  sex.add(female.add(new AjaxEventBehavior(onchange) {
  protected void onEvent(AjaxRequestTarget target) {
// add your favorite component.
   }
  });

  This seems to associate the right event with the radio buttons.

  Having said that - I was curious - how would I distinguish between the
  different radio buttons in a given radio group (between M and F , in
  the above example ) to see which value has been chosen. Is there a
  method in RadioGroup , that will given something like a current
  selected radio model or something similar to that ?





  On 7/5/08, Rakesh Sinha [EMAIL PROTECTED] wrote:
   I changed the code to be AjaxFormComponentUpdatingBehavior (onclick)
- but it still does not seem to work ( though , onclick *is* the right
method to invoke from javascript ).
  
The generated HTML does not seem to contain the javascript invocation
for the particular event. I am suspecting something wrong with my html
code.
  
  
html:

  
wicket:container wicket:id=sex
  tdinput wicket:id=M type=radio /Male input
  wicket:id=F type=radio /Female/td
/wicket:container
  
  
   Would this be correct ?
  
  
  
On 7/5/08, Timo Rantalaiho [EMAIL PROTECTED] wrote:
 On Sat, 05 Jul 2008, Rakesh Sinha wrote:
   This does not seem to invoke the ajax code handler that I was
   expecting when I select an age in the front - end. Any idea what I am
   missing here.


 Check out which JavaScript event gets triggered on checking
  the radio button. It might be onclick instead of onchange,
  in which case new
  AjaxFormComponentUpdatingBehavior(onclick) in place of
  OnChangeAjaxBehavior should work.

  Best wishes,
  Timo


  --
  Timo Rantalaiho
  Reaktor Innovations OyURL: http://www.ri.fi/ 

  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]


  


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



calendar control for wicket ??

2008-07-05 Thread Rakesh Sinha
Hi -
   Just curious if there is a Calendar control / class associated with
Wicket. Thanks.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: calendar control for wicket ??

2008-07-05 Thread Rakesh Sinha
Thanks Ayodeji.

import org.apache.wicket.extensions.yui.calendar.DateField;

This does the trick.

But a clarification though -  I am using the default version as
specified in the javadoc.

java: dateField = new DateField(birthday);

html: div wicket:id=birthday/div

I need a couple of modifications to the same. Just curious how I get
about doing the same.

1) The textfield (DateTextField) seems to parse the dates in mm/dd/yy
format . I need to change the same to dd/mm/yy as the audience for
which the application is targeted is going to be using that particular
format.

2) When  I enter the date as 14/14/1980, say  (incorrect date to
begin with) - for some reason it gets rounded, and appears as
2/14/81  (a very similar behavior is exhibited by the Calendar class
in java.util too). Instead I would like to reminded that the input is
actually an error and it is incorrect altogether.
  This might be more involved I believe.




On 7/5/08, Ayodeji Aladejebi [EMAIL PROTECTED] wrote:
 are you talking about a DatePicker?

  On Sun, Jul 6, 2008 at 4:11 AM, Rakesh Sinha [EMAIL PROTECTED]
  wrote:


   Hi -
 Just curious if there is a Calendar control / class associated with
   Wicket. Thanks.
  

  -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: ajax event handler with a textfield .. .

2008-07-03 Thread Rakesh Sinha
On 7/3/08, Timo Rantalaiho [EMAIL PROTECTED] wrote:
 On Thu, 03 Jul 2008, Rakesh Sinha wrote:

  Thanks for pointing this one out. Can you paste / point to a code
   fragement for - OnChangeAjaxBehavior and how to integrate with
   TextField.


 Use the source, Luke :) Just use it instead of the normal
  AjaxFormComponentUpdatingBehavior.

Thanks Timo. Revised code looks something similar to this.

java:

import org.apache.wicket.ajax.form.OnChangeAjaxBehavior;

txtAge.add(new OnChangeAjaxBehavior() {
@Override
protected void onUpdate(AjaxRequestTarget target) {
ValidatorResult result =
ageValidator.validate(txtAge
.getValue());
lblModel.setErrorMessage(result.getMessage());
target.addComponent(lblAgeValidate);
}
});





 Probably you can trim your code a bit but the basic idea
 is like that. Instead of passing the error message around
 you could make your Label use a pull model.
  
 Can you clarify about the pull model here and how it gets supported
   with Wicket.


 By pull model I meant here just a Wicket IModel that reads
  the necessary data in getObject, for example

  lblAgeValidate = new Label(lblAgeValidate, new AbstractReadOnlyModel() {
 @Override
 public Object getObject() {
 return txtAge.getValue();
 }
  }).setOutputMarkupId(true);

Thanks for the suggestion. That removes some boiler-plate code for sure.



  Best wishes,
  Timo

  --
  Timo Rantalaiho
  Reaktor Innovations OyURL: http://www.ri.fi/ 

  -

 To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



ajax event handler with a textfield .. .

2008-07-02 Thread Rakesh Sinha
Hi -
   I have a TextField component in my page.

Java :

  txtAge = new TextField(txtAge, Integer.class);
  lblAgeValidate = new Label(lblAgeValidate, );

html:

tdinput type=text wicket:id=txtAge //td
tdspan wicket:id=lblAgeValidate //td

I want a behavior to attach an ajax event handler to the textfield
such a way that anytime a text field changes - there would be an ajax
validation performed , that would update the model behind
lblAgeValidate - which will contain the error message.

Just curious how this could be done.

I saw the ajax example in the website - that talks about a Link (with
onClick() method).

Similarly - is there any other event handler that I could use to get
this done. Thanks.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: ajax event handler with a textfield .. .

2008-07-02 Thread Rakesh Sinha
Thanks Timo...

I tried something similar to this .. It works.


Java :
==
txtAge = new TextField(txtAge, new Model());
lblModel = new ErrorLabelModel();

lblAgeValidate = new Label(lblAgeValidate, lblModel);
lblAgeValidate.setOutputMarkupId(true);

txtAge.add(new AjaxFormComponentUpdatingBehavior(onkeyup) {
 protected void onUpdate(AjaxRequestTarget target) {
lblModel.setErrorMessage(txtAge.getValue());
target.addComponent(lblAgeValidate);
}
});

ErrorModel:

public class ErrorLabelModel extends Model {

public ErrorLabelModel() {
errorMessage = DEFAULT_ERROR_MESSAGE;
}

public void setErrorMessage(String _errorMessage) {
if (_errorMessage == null) {
errorMessage = DEFAULT_ERROR_MESSAGE;
} else {
errorMessage = _errorMessage;
}
}

public Object getObject() {
return errorMessage;
}

private String errorMessage;

private static final String DEFAULT_ERROR_MESSAGE = ;
}


The question is - can this be the fastest way of doing this...



On 7/2/08, Timo Rantalaiho [EMAIL PROTECTED] wrote:
 On Wed, 02 Jul 2008, Rakesh Sinha wrote:
   I want a behavior to attach an ajax event handler to the textfield
   such a way that anytime a text field changes - there would be an ajax
   validation performed , that would update the model behind
   lblAgeValidate - which will contain the error message.


 Try OnChangeAjaxBehavior. It is the best attempt that I am
  aware of (reacts both to key and mouse input, but has to
  disable the browser autocomplete).

  Best wishes,
  Timo


  --
  Timo Rantalaiho
  Reaktor Innovations OyURL: http://www.ri.fi/ 

  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



turning off autocomplete for textfield ..

2008-07-02 Thread Rakesh Sinha
on a separate note - how do we turn off autocomplete for a TextField
in the java code. (other than autocomplete=off, in html).

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: ajax event handler with a textfield .. .

2008-07-02 Thread Rakesh Sinha
On 7/3/08, Timo Rantalaiho [EMAIL PROTECTED] wrote:
 On Thu, 03 Jul 2008, Rakesh Sinha wrote:
   I tried something similar to this .. It works.

 ...

  txtAge.add(new AjaxFormComponentUpdatingBehavior(onkeyup) {


 This works otherwise but does not detect cut and paste done
  with mouse.

Thanks for pointing this one out. Can you paste / point to a code
fragement for - OnChangeAjaxBehavior and how to integrate with
TextField.




   The question is - can this be the fastest way of doing this...


 What do you mean by fastest? Least amount of code, most
  performant or some other thing?

  I meant - most performant from a user perspective. I agree
javascript is the fastest experience - but I do not want all the
validation to be performed at javascript level since a user can
potentially bypass the same - the least thing that I want.


  Probably you can trim your code a bit but the basic idea
  is like that. Instead of passing the error message around
  you could make your Label use a pull model.

  Can you clarify about the pull model here and how it gets supported
with Wicket.


  Plain javascript should be faster than Ajax, but then you
  obviously cannot check anything on the server side.

  Best wishes,

 Timo



  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



configuring wicket:id from Java code in TITLE in a page

2008-07-01 Thread Rakesh Sinha
I am trying to have the title of a given page, populated from the code.

HTML:
==
html
head
titlewicket:id=mysiteName/title
/head
body
strongHomepage/strong
br /
br /
span wicket:id=messagemessage will be here/span
/body
/html

Java: (HomePage.java only)
=

public class HomePage extends WebPage {
   public HomePage(final PageParameters parameters) {
// Add the simplest type of label
add(new Label(message, MESSAGE));
add(new Label(mysiteName, mysite));
// TODO Add your page's components here
}

static final String MESSAGE = If you see this message wicket is
properly configured and running;
}

I am getting the following error.

ERROR - RequestCycle   - The component(s) below failed to
render. A common problem is that you have added a component in code
but forgot to reference it in the markup (thus the component will
never be rendered).

1. [Component id = mysiteName, page = pages.HomePage, path =
0:mysiteName.Label, isVisible = true, isVersioned = true]

org.apache.wicket.WicketRuntimeException: The component(s) below
failed to render. A common problem is that you have added a component
in code but forgot to reference it in the markup (thus the component
will never be rendered).

1. [Component id = mysiteName, page = pages.HomePage, path =
0:mysiteName.Label, isVisible = true, isVersioned = true]

at org.apache.wicket.Page.checkRendering(Page.java:1115)


Can somebody help me here.

I am using this with Wicket 1.3.4 . (with Jetty engine).
Thanks.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: configuring wicket:id from Java code in TITLE in a page

2008-07-01 Thread Rakesh Sinha
Thanks Igor. That works.

Thanks Apache Wicket team once again for a wonderful framework.

On Wed, Jul 2, 2008 at 12:37 AM, Igor Vaynberg [EMAIL PROTECTED] wrote:
 title wicket:id=mysiteName[title will be here]/title

 just like the span...

 -igor

 On Tue, Jul 1, 2008 at 9:01 PM, Rakesh Sinha [EMAIL PROTECTED] wrote:
 I am trying to have the title of a given page, populated from the code.

 HTML:
 ==
 html
 head
 titlewicket:id=mysiteName/title
 /head
 body
 strongHomepage/strong
 br /
 br /
 span wicket:id=messagemessage will be here/span
 /body
 /html

 Java: (HomePage.java only)
 =

 public class HomePage extends WebPage {
   public HomePage(final PageParameters parameters) {
// Add the simplest type of label
add(new Label(message, MESSAGE));
add(new Label(mysiteName, mysite));
// TODO Add your page's components here
}

static final String MESSAGE = If you see this message wicket is
 properly configured and running;
 }

 I am getting the following error.

 ERROR - RequestCycle   - The component(s) below failed to
 render. A common problem is that you have added a component in code
 but forgot to reference it in the markup (thus the component will
 never be rendered).

 1. [Component id = mysiteName, page = pages.HomePage, path =
 0:mysiteName.Label, isVisible = true, isVersioned = true]

 org.apache.wicket.WicketRuntimeException: The component(s) below
 failed to render. A common problem is that you have added a component
 in code but forgot to reference it in the markup (thus the component
 will never be rendered).

 1. [Component id = mysiteName, page = pages.HomePage, path =
 0:mysiteName.Label, isVisible = true, isVersioned = true]

at org.apache.wicket.Page.checkRendering(Page.java:1115)


 Can somebody help me here.

 I am using this with Wicket 1.3.4 . (with Jetty engine).
 Thanks.

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]