Re: Caused by java util ConcurrentModificationException

2017-12-28 Thread durairaj t
org.infinispan.commons.marshall.AbstractDelegatingMarshaller.objectToBuffer(AbstractDelegatingMarshaller.java:85)
at
org.infinispan.remoting.transport.jgroups.MarshallerAdapter.objectToBuffer(MarshallerAdapter.java:23)
at
org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.marshallCall(CommandAwareRpcDispatcher.java:256)
at
org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.processSingleCall(CommandAwareRpcDispatcher.java:274)
at
org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.invokeRemoteCommand(CommandAwareRpcDispatcher.java:130)
... 89 more
Caused by: an exception which occurred:
in field children
in field reporter
in field messages
in field feedbackMessages
in object java.util.concurrent.ConcurrentHashMap@95574862
in object
org.wildfly.clustering.marshalling.jboss.SimpleMarshalledValue@95574862
in object org.infinispan.commands.write.PutKeyValueCommand@b04c35d9
in object org.infinispan.commands.remote.SingleRpcCommand@5963da51

On Thu, Dec 28, 2017 at 1:31 PM, durairaj t  wrote:

> My application is running in Wicket7.6 frequently logging the below error
> and increasing the log file size,
>
>  Any help?
>
>
>
>  ERROR [org.apache.wicket.serialize.java.JavaSerializer] (default
> task-54) error writing object [Page class = 
> com.tre.wktcommon.components.FieldSearchTField$5$1,
> id = 122, render count = 1]: null: java.util.
> ConcurrentModificationException
> at java.util.ArrayList.writeObject(ArrayList.java:766)
> at sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at java.io.ObjectStreamClass.invokeWriteObject(
> ObjectStreamClass.java:1028)
> at java.io.ObjectOutputStream.writeSerialData(
> ObjectOutputStream.java:1496)
> at java.io.ObjectOutputStream.writeOrdinaryObject(
> ObjectOutputStream.java:1432)
> at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
> at java.io.ObjectOutputStream.defaultWriteFields(
> ObjectOutputStream.java:1548)
> at java.io.ObjectOutputStream.writeSerialData(
> ObjectOutputStream.java:1509)
> at java.io.ObjectOutputStream.writeOrdinaryObject(
> ObjectOutputStream.java:1432)
> at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
> at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)
> at org.apache.wicket.serialize.java.JavaSerializer$
> SerializationCheckerObjectOutputStream.writeObjectOverride(
> JavaSerializer.java:256)
> at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:344)
> at org.apache.wicket.serialize.java.JavaSerializer.serialize(
> JavaSerializer.java:78)
> at org.apache.wicket.pageStore.AbstractPageStore.serializePage(
> AbstractPageStore.java:133)
> at org.apache.wicket.pageStore.DefaultPageStore.createSerializedPage(
> DefaultPageStore.java:281)
> at org.apache.wicket.pageStore.DefaultPageStore.prepareForSerialization(
> DefaultPageStore.java:137)
> at org.apache.wicket.page.PageStoreManager$SessionEntry.
> writeObject(PageStoreManager.java:251)
> at sun.reflect.GeneratedMethodAccessor342.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
>


Caused by java util ConcurrentModificationException

2017-12-28 Thread durairaj t
My application is running in Wicket7.6 frequently logging the below error
and increasing the log file size,

 Any help?



 ERROR [org.apache.wicket.serialize.java.JavaSerializer] (default task-54)
error writing object [Page class =
com.tre.wktcommon.components.FieldSearchTField$5$1, id = 122, render count
= 1]: null: java.util.ConcurrentModificationException
at java.util.ArrayList.writeObject(ArrayList.java:766)
at sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:1028)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1496)
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509)
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)
at
org.apache.wicket.serialize.java.JavaSerializer$SerializationCheckerObjectOutputStream.writeObjectOverride(JavaSerializer.java:256)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:344)
at
org.apache.wicket.serialize.java.JavaSerializer.serialize(JavaSerializer.java:78)
at
org.apache.wicket.pageStore.AbstractPageStore.serializePage(AbstractPageStore.java:133)
at
org.apache.wicket.pageStore.DefaultPageStore.createSerializedPage(DefaultPageStore.java:281)
at
org.apache.wicket.pageStore.DefaultPageStore.prepareForSerialization(DefaultPageStore.java:137)
at
org.apache.wicket.page.PageStoreManager$SessionEntry.writeObject(PageStoreManager.java:251)
at sun.reflect.GeneratedMethodAccessor342.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)


Re: Wicket 1.5 PageExpiredException

2017-09-25 Thread durairaj t
Is it happening in all the browsers?


Have you tried the scenarios as given below in your application to
reproduce the same issue in your machine or the development server?

Scenario:  Open certain set of application pages simultaneously by clicking
the links (other links), do not stop until you reach at least 50 to 100
clicks.

Example: let's say DashboardPage, PersonProfilePage, AddressPage,
EmploymentRelatedPage, SomeXYZPage from the Home Page or somewhere from the
application. Just load them simultaneously



Wicket 5 PageStoreManager preserves certain number of page versions and
destroying others from its List. If your application
stores those pages in List then they may not be available
in your session ( in heavy load).  Debug  “PageStoreManager” for more
details.


Try the below code snippet where your application expecting page from the
session if the above scenario helps you to reproduce the issue.



 if (Session.get().getPageManager().getPage(page.getPageId()) == null) {

Session.get().getPageManager().touchPage(page);

 }


   Or (preserves  always)


Session.get().getPageManager().touchPage(page);





On Sun, Sep 24, 2017 at 3:02 AM, trlt  wrote:

> The wicket applications are authenticated using Single Sign On (so yes,
> there
> are other cookies set by the SSO group). The Bookmarkable links seem to be
> working fine, but all other links become expired. Again, the only way to
> get
> out is to clear the browser's cache. This problem happens intermittently
> and
> only happens to a handle of users which makes the debugging harder.
>
> Any suggestion is greatly appreciated. Thanks!
>
> --
> 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: Blur not listening Enter Key event- Wicket 7

2017-09-06 Thread durairaj t
Hi Martin -

sorry for the late response and unclear question, I forgot to paste the
correct code snippet.

However this issue has been fixed by adding another behavior for the Enter
key events. some how it is working in wicket 1.5 without this solution.

Thank you!

On Mon, Sep 4, 2017 at 2:59 AM, Martin Grigorov 
wrote:

> Hi,
>
> Your question is not very clear.
> Could you please explain the workflow ?
> On what kind of component you assign this behavior ? What interactions do
> not lead to the fire of the event ?
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Fri, Sep 1, 2017 at 5:41 PM, durairaj t  wrote:
>
> > Following code working with TAB and mouse click events but not with
> "ENTER
> > KEY", do I need to use keycode and handle it? if yes, any examples for
> > multi behavior functionality?
> >
> > *Wicket 5 is good, but in Wicket 7 it is not working.
> >
> > Code Snippet:
> > 
> > new MyEventHandlingBehavior("blur", ""){
> >
> > protected void onUpdate(AjaxRequestTarget target) {
> > FieldSearchTextField.this.onSubmit(target);
> > }
> > }
> >
> > Any help?
> >
> > Thanks.
> >
>


Blur not listening Enter Key event- Wicket 7

2017-09-01 Thread durairaj t
Following code working with TAB and mouse click events but not with "ENTER
KEY", do I need to use keycode and handle it? if yes, any examples for
multi behavior functionality?

*Wicket 5 is good, but in Wicket 7 it is not working.

Code Snippet:

new MyEventHandlingBehavior("blur", ""){

protected void onUpdate(AjaxRequestTarget target) {
FieldSearchTextField.this.onSubmit(target);
}
}

Any help?

Thanks.


Re: getEventHandler() and updateAjaxAttributes - cursor focusing the same data grid cell again after the form submission by blur event.

2017-08-21 Thread durairaj t
Thank you martin!


On Mon, Aug 21, 2017 at 10:11 AM, Martin Grigorov 
wrote:

> It looks like some IE 7 quirck...
> We do not support IE older than 11.
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Mon, Aug 21, 2017 at 4:42 PM, durairaj t 
> wrote:
>
> > No issues with the Chrome  and Firefox. It is working as expected.
> >
> > On Mon, Aug 21, 2017 at 3:54 AM, Martin Grigorov 
> > wrote:
> >
> > > Hi,
> > >
> > > How does it behave in Chrome/Firefox ?
> > >
> > > Martin Grigorov
> > > Wicket Training and Consulting
> > > https://twitter.com/mtgrigorov
> > >
> > > On Fri, Aug 18, 2017 at 11:26 PM, durairaj t 
> > > wrote:
> > >
> > > > in IE 11, the "wicket-focusedelementid" is giving the next cell id,
> but
> > > not
> > > > in IE compatibility mode(IE7, id remains same).
> > > >
> > > > Is it due to some error in the ajax behavior which I used to submit
> the
> > > > form *Or* something not supporting in wicket 7?
> > > >
> > > >
> > > > On Fri, Aug 18, 2017 at 10:48 AM, durairaj t  >
> > > > wrote:
> > > >
> > > > > I have replaced the following wicket5 getEventHandler() code to
> > wicket7
> > > > as
> > > > > it is in the below code snippet, it worked but the cursor focusing
> > the
> > > > same
> > > > > filed again after the form submission by blur event. This event
> > > behavior
> > > > > used in the wicket stuff data grid cell,
> > > > >
> > > > >
> > > > > *Expected *functionality:  Cursor should focus next cell in “blur”
> > (TAB
> > > > > key press).
> > > > >
> > > > >
> > > > > *Actual *functionality: pointing the same field until press the TAB
> > > once
> > > > > again or use the mouse once again.
> > > > >
> > > > >
> > > > > *Browser*: IE 11, application running in the compatibility mode and
> > > > > failing in it, but it is working if I remove the compatibility in
> IE.
> > > > >
> > > > >
> > > > > What is wrong in the below wic7 code, do I need to handle the focus
> > > > > manually or add something else to bring the focus to the next
> cell? I
> > > > have
> > > > > no idea?
> > > > >
> > > > >
> > > > > *Any help?*
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > *Code snippet:*
> > > > >
> > > > >
> > > > > *Wicket 5: ->  var wcall=wicketSubmitFormById*
> > > > >
> > > > >
> > > > > @Override
> > > > > protected CharSequence getEventHandler()
> > > > > {
> > > > > if(getEvent().equalsIgnoreCase("onBlur")) {
> > > > > String script = "setFieldSearchOn('" + StringEscapeUtils.
> > > > > escapeJavaScript(((FormComponent)getComponent()).getValue())+ "',
> > this
> > > > > );" ;
> > > > > AppendingStringBuffer handler = new AppendingStringBuffer();
> > > > > if (!Strings.isEmpty(script))
> > > > > {
> > > > > handler.append(script).append(";");
> > > > > }
> > > > > handler.append(super.getEventHandler());
> > > > > handler.append("; return false;");
> > > > > return handler;
> > > > > }else {
> > > > > return super.getEventHandler();
> > > > > }
> > > > > }
> > > > >
> > > > >
> > > > > *Wicket7:-> Wicket.Aajax.ajax*
> > > > >
> > > > >
> > > > > @Override
> > > > > protected void updateAjaxAttributes(AjaxRequestAttributes
> > > > > ajaxRequestAttributes) {
> > > > > super.updateAjaxAttributes(ajaxRequestAttributes);
> > > > > AjaxCallListener ajaxCallListener = new AjaxCallListener();
> > > > > if(getEvent().equalsIgnoreCase("blur")) {
> > > > > ajaxCallListener.onPrecondition("if(setFieldSearchOn('" +
> > > > > StringEscapeUtils.escapeEcmaScript(((
> FormComponent)getComponent()).
> > > > getValue())+
> > > > > "', this ) == false)return false;");
> > > > > //appending "return false" is not working as expected.
> > > > > }
> > > > > ajaxRequestAttributes.getAjaxCallListeners().add(
> ajaxCallListener);
> > > > > }
> > > > >
> > > > > Thanks!
> > > > >
> > > > >
> > > >
> > >
> >
>


Re: getEventHandler() and updateAjaxAttributes - cursor focusing the same data grid cell again after the form submission by blur event.

2017-08-21 Thread durairaj t
No issues with the Chrome  and Firefox. It is working as expected.

On Mon, Aug 21, 2017 at 3:54 AM, Martin Grigorov 
wrote:

> Hi,
>
> How does it behave in Chrome/Firefox ?
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Fri, Aug 18, 2017 at 11:26 PM, durairaj t 
> wrote:
>
> > in IE 11, the "wicket-focusedelementid" is giving the next cell id, but
> not
> > in IE compatibility mode(IE7, id remains same).
> >
> > Is it due to some error in the ajax behavior which I used to submit the
> > form *Or* something not supporting in wicket 7?
> >
> >
> > On Fri, Aug 18, 2017 at 10:48 AM, durairaj t 
> > wrote:
> >
> > > I have replaced the following wicket5 getEventHandler() code to wicket7
> > as
> > > it is in the below code snippet, it worked but the cursor focusing the
> > same
> > > filed again after the form submission by blur event. This event
> behavior
> > > used in the wicket stuff data grid cell,
> > >
> > >
> > > *Expected *functionality:  Cursor should focus next cell in “blur” (TAB
> > > key press).
> > >
> > >
> > > *Actual *functionality: pointing the same field until press the TAB
> once
> > > again or use the mouse once again.
> > >
> > >
> > > *Browser*: IE 11, application running in the compatibility mode and
> > > failing in it, but it is working if I remove the compatibility in IE.
> > >
> > >
> > > What is wrong in the below wic7 code, do I need to handle the focus
> > > manually or add something else to bring the focus to the next cell? I
> > have
> > > no idea?
> > >
> > >
> > > *Any help?*
> > >
> > >
> > >
> > >
> > > *Code snippet:*
> > >
> > >
> > > *Wicket 5: ->  var wcall=wicketSubmitFormById*
> > >
> > >
> > > @Override
> > > protected CharSequence getEventHandler()
> > > {
> > > if(getEvent().equalsIgnoreCase("onBlur")) {
> > > String script = "setFieldSearchOn('" + StringEscapeUtils.
> > > escapeJavaScript(((FormComponent)getComponent()).getValue())+ "', this
> > > );" ;
> > > AppendingStringBuffer handler = new AppendingStringBuffer();
> > > if (!Strings.isEmpty(script))
> > > {
> > > handler.append(script).append(";");
> > > }
> > > handler.append(super.getEventHandler());
> > > handler.append("; return false;");
> > > return handler;
> > > }else {
> > > return super.getEventHandler();
> > > }
> > > }
> > >
> > >
> > > *Wicket7:-> Wicket.Aajax.ajax*
> > >
> > >
> > > @Override
> > > protected void updateAjaxAttributes(AjaxRequestAttributes
> > > ajaxRequestAttributes) {
> > > super.updateAjaxAttributes(ajaxRequestAttributes);
> > > AjaxCallListener ajaxCallListener = new AjaxCallListener();
> > > if(getEvent().equalsIgnoreCase("blur")) {
> > > ajaxCallListener.onPrecondition("if(setFieldSearchOn('" +
> > > StringEscapeUtils.escapeEcmaScript(((FormComponent)getComponent()).
> > getValue())+
> > > "', this ) == false)return false;");
> > > //appending "return false" is not working as expected.
> > > }
> > > ajaxRequestAttributes.getAjaxCallListeners().add(ajaxCallListener);
> > > }
> > >
> > > Thanks!
> > >
> > >
> >
>


Re: getEventHandler() and updateAjaxAttributes - cursor focusing the same data grid cell again after the form submission by blur event.

2017-08-18 Thread durairaj t
in IE 11, the "wicket-focusedelementid" is giving the next cell id, but not
in IE compatibility mode(IE7, id remains same).

Is it due to some error in the ajax behavior which I used to submit the
form *Or* something not supporting in wicket 7?


On Fri, Aug 18, 2017 at 10:48 AM, durairaj t  wrote:

> I have replaced the following wicket5 getEventHandler() code to wicket7 as
> it is in the below code snippet, it worked but the cursor focusing the same
> filed again after the form submission by blur event. This event behavior
> used in the wicket stuff data grid cell,
>
>
> *Expected *functionality:  Cursor should focus next cell in “blur” (TAB
> key press).
>
>
> *Actual *functionality: pointing the same field until press the TAB once
> again or use the mouse once again.
>
>
> *Browser*: IE 11, application running in the compatibility mode and
> failing in it, but it is working if I remove the compatibility in IE.
>
>
> What is wrong in the below wic7 code, do I need to handle the focus
> manually or add something else to bring the focus to the next cell? I have
> no idea?
>
>
> *Any help?*
>
>
>
>
> *Code snippet:*
>
>
> *Wicket 5: ->  var wcall=wicketSubmitFormById*
>
>
> @Override
> protected CharSequence getEventHandler()
> {
> if(getEvent().equalsIgnoreCase("onBlur")) {
> String script = "setFieldSearchOn('" + StringEscapeUtils.
> escapeJavaScript(((FormComponent)getComponent()).getValue())+ "', this
> );" ;
> AppendingStringBuffer handler = new AppendingStringBuffer();
> if (!Strings.isEmpty(script))
> {
> handler.append(script).append(";");
> }
> handler.append(super.getEventHandler());
> handler.append("; return false;");
> return handler;
> }else {
> return super.getEventHandler();
> }
> }
>
>
> *Wicket7:-> Wicket.Aajax.ajax*
>
>
> @Override
> protected void updateAjaxAttributes(AjaxRequestAttributes
> ajaxRequestAttributes) {
> super.updateAjaxAttributes(ajaxRequestAttributes);
> AjaxCallListener ajaxCallListener = new AjaxCallListener();
> if(getEvent().equalsIgnoreCase("blur")) {
> ajaxCallListener.onPrecondition("if(setFieldSearchOn('" +
> StringEscapeUtils.escapeEcmaScript(((FormComponent)getComponent()).getValue())+
> "', this ) == false)return false;");
> //appending "return false" is not working as expected.
> }
> ajaxRequestAttributes.getAjaxCallListeners().add(ajaxCallListener);
> }
>
> Thanks!
>
>


getEventHandler() and updateAjaxAttributes - cursor focusing the same data grid cell again after the form submission by blur event.

2017-08-18 Thread durairaj t
I have replaced the following wicket5 getEventHandler() code to wicket7 as
it is in the below code snippet, it worked but the cursor focusing the same
filed again after the form submission by blur event. This event behavior
used in the wicket stuff data grid cell,


*Expected *functionality:  Cursor should focus next cell in “blur” (TAB key
press).


*Actual *functionality: pointing the same field until press the TAB once
again or use the mouse once again.


*Browser*: IE 11, application running in the compatibility mode and failing
in it, but it is working if I remove the compatibility in IE.


What is wrong in the below wic7 code, do I need to handle the focus
manually or add something else to bring the focus to the next cell? I have
no idea?


*Any help?*




*Code snippet:*


*Wicket 5: ->  var wcall=wicketSubmitFormById*


@Override
protected CharSequence getEventHandler()
{
if(getEvent().equalsIgnoreCase("onBlur")) {
String script = "setFieldSearchOn('" +
StringEscapeUtils.escapeJavaScript(((FormComponent)getComponent()).getValue())+
"', this );" ;
AppendingStringBuffer handler = new AppendingStringBuffer();
if (!Strings.isEmpty(script))
{
handler.append(script).append(";");
}
handler.append(super.getEventHandler());
handler.append("; return false;");
return handler;
}else {
return super.getEventHandler();
}
}


*Wicket7:-> Wicket.Aajax.ajax*


@Override
protected void updateAjaxAttributes(AjaxRequestAttributes
ajaxRequestAttributes) {
super.updateAjaxAttributes(ajaxRequestAttributes);
AjaxCallListener ajaxCallListener = new AjaxCallListener();
if(getEvent().equalsIgnoreCase("blur")) {
ajaxCallListener.onPrecondition("if(setFieldSearchOn('" +
StringEscapeUtils.escapeEcmaScript(((FormComponent)getComponent()).getValue())+
"', this ) == false)return false;");
//appending "return false" is not working as expected.
}
ajaxRequestAttributes.getAjaxCallListeners().add(ajaxCallListener);
}

Thanks!


Re: TreePanel#onInitialize() is not being called from AbstractGridRow#onBeforeRender(). - WicketStuff-wicket7

2017-07-28 Thread durairaj t
Issue has been fixed by adding "*final" *in the TreeGrid initiation.

Thank you for your help Martin!



On Fri, Jul 28, 2017 at 11:41 AM, durairaj t  wrote:

> from *Component.java* ---> getFlag(FLAG_INITIALIZED) --> it returns false
>
> /**
> * Used to call {@link #onInitialize()}
> */
> final void fireInitialize()
> {
> *if (!getFlag(FLAG_INITIALIZED))*
> {
> setFlag(FLAG_INITIALIZED, true);
> setRequestFlag(RFLAG_INITIALIZE_SUPER_CALL_VERIFIED, false);
> onInitialize();
> if (!getRequestFlag(RFLAG_INITIALIZE_SUPER_CALL_VERIFIED))
> {
> throw new IllegalStateException(Component.class.getName() +
> " has not been properly initialized. Something in the hierarchy of " +
> getClass().getName() +
> " has not called super.onInitialize() in the override of onInitialize()
> method");
> }
> setRequestFlag(RFLAG_INITIALIZE_SUPER_CALL_VERIFIED, false);
>
> getApplication().getComponentInitializationListeners().onInitialize(this);
> }
> else if (getFlag(FLAG_REMOVED))
> {
> setFlag(FLAG_REMOVED, false);
> setRequestFlag(RFLAG_ON_RE_ADD_SUPER_CALL_VERIFIED, false);
> onReAdd();
> if (!getRequestFlag(RFLAG_ON_RE_ADD_SUPER_CALL_VERIFIED))
> {
> throw new IllegalStateException(Component.class.getName() +
> " has not been properly added. Something in the hierarchy of " +
> getClass().getName() +
> " has not called super.onReAdd() in the override of onReAdd() method");
> }
> }
> }
>
> On Fri, Jul 28, 2017 at 11:33 AM, Martin Grigorov 
> wrote:
>
>> Where is this line of code ?
>>
>> Martin Grigorov
>> Wicket Training and Consulting
>> https://twitter.com/mtgrigorov
>>
>> On Fri, Jul 28, 2017 at 6:18 PM, durairaj t 
>> wrote:
>>
>> > Thank you Martin! I will compare the entire code.
>> >
>> > beside, I found that the below code from the
>> >  Component#fireInitialize(){} returns false, it should to be true
>> to
>> > invoke the onInitialize();. any idea about this line of code, I did not
>> > understand that why it is false and what it mean.
>> >
>> > if (!getFlag(FLAG_INITIALIZED))---> it is false
>> >
>> >
>> > On Fri, Jul 28, 2017 at 10:59 AM, Martin Grigorov > >
>> > wrote:
>> >
>> > > Hi,
>> > >
>> > > It is not very clear what is broken and why.
>> > > I think the best you can do is to check what is different in your code
>> > > against the samples application for InMethodGrid -
>> > > https://github.com/wicketstuff/core/tree/wicket-
>> > 7.x/inmethod-grid-parent/
>> > > inmethod-grid-examples
>> > >
>> > > Martin Grigorov
>> > > Wicket Training and Consulting
>> > > https://twitter.com/mtgrigorov
>> > >
>> > > On Fri, Jul 28, 2017 at 5:08 PM, durairaj t 
>> > > wrote:
>> > >
>> > > > I'm upgrading wicketstuff from wicket 5 to 7, one of the TreePanel
>> > > > functionality is not working.
>> > > >
>> > > >  it was TreePanel#onBeforeRender() in wicket5 and AbstractGridRow
>> > > > #onBeforeRender().
>> > > >
>> > > > Component component = get(column.getId()); returns BaseTreeColumn
>> > object
>> > > > with the null child object  in AbstractGridRow#onRender(). it should
>> > have
>> > > > child objects[junctionLink,nodeComponent,icon].
>> > > >
>> > > >
>> > > >  any help?
>> > > >
>> > >
>> >
>>
>
>


Re: TreePanel#onInitialize() is not being called from AbstractGridRow#onBeforeRender(). - WicketStuff-wicket7

2017-07-28 Thread durairaj t
from *Component.java* ---> getFlag(FLAG_INITIALIZED) --> it returns false

/**
* Used to call {@link #onInitialize()}
*/
final void fireInitialize()
{
*if (!getFlag(FLAG_INITIALIZED))*
{
setFlag(FLAG_INITIALIZED, true);
setRequestFlag(RFLAG_INITIALIZE_SUPER_CALL_VERIFIED, false);
onInitialize();
if (!getRequestFlag(RFLAG_INITIALIZE_SUPER_CALL_VERIFIED))
{
throw new IllegalStateException(Component.class.getName() +
" has not been properly initialized. Something in the hierarchy of " +
getClass().getName() +
" has not called super.onInitialize() in the override of onInitialize()
method");
}
setRequestFlag(RFLAG_INITIALIZE_SUPER_CALL_VERIFIED, false);

getApplication().getComponentInitializationListeners().onInitialize(this);
}
else if (getFlag(FLAG_REMOVED))
{
setFlag(FLAG_REMOVED, false);
setRequestFlag(RFLAG_ON_RE_ADD_SUPER_CALL_VERIFIED, false);
onReAdd();
if (!getRequestFlag(RFLAG_ON_RE_ADD_SUPER_CALL_VERIFIED))
{
throw new IllegalStateException(Component.class.getName() +
" has not been properly added. Something in the hierarchy of " +
getClass().getName() +
" has not called super.onReAdd() in the override of onReAdd() method");
}
}
}

On Fri, Jul 28, 2017 at 11:33 AM, Martin Grigorov 
wrote:

> Where is this line of code ?
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Fri, Jul 28, 2017 at 6:18 PM, durairaj t 
> wrote:
>
> > Thank you Martin! I will compare the entire code.
> >
> > beside, I found that the below code from the
> >  Component#fireInitialize(){} returns false, it should to be true to
> > invoke the onInitialize();. any idea about this line of code, I did not
> > understand that why it is false and what it mean.
> >
> > if (!getFlag(FLAG_INITIALIZED))---> it is false
> >
> >
> > On Fri, Jul 28, 2017 at 10:59 AM, Martin Grigorov 
> > wrote:
> >
> > > Hi,
> > >
> > > It is not very clear what is broken and why.
> > > I think the best you can do is to check what is different in your code
> > > against the samples application for InMethodGrid -
> > > https://github.com/wicketstuff/core/tree/wicket-
> > 7.x/inmethod-grid-parent/
> > > inmethod-grid-examples
> > >
> > > Martin Grigorov
> > > Wicket Training and Consulting
> > > https://twitter.com/mtgrigorov
> > >
> > > On Fri, Jul 28, 2017 at 5:08 PM, durairaj t 
> > > wrote:
> > >
> > > > I'm upgrading wicketstuff from wicket 5 to 7, one of the TreePanel
> > > > functionality is not working.
> > > >
> > > >  it was TreePanel#onBeforeRender() in wicket5 and AbstractGridRow
> > > > #onBeforeRender().
> > > >
> > > > Component component = get(column.getId()); returns BaseTreeColumn
> > object
> > > > with the null child object  in AbstractGridRow#onRender(). it should
> > have
> > > > child objects[junctionLink,nodeComponent,icon].
> > > >
> > > >
> > > >  any help?
> > > >
> > >
> >
>


Re: TreePanel#onInitialize() is not being called from AbstractGridRow#onBeforeRender(). - WicketStuff-wicket7

2017-07-28 Thread durairaj t
Thank you Martin! I will compare the entire code.

beside, I found that the below code from the
 Component#fireInitialize(){} returns false, it should to be true to
invoke the onInitialize();. any idea about this line of code, I did not
understand that why it is false and what it mean.

if (!getFlag(FLAG_INITIALIZED))---> it is false


On Fri, Jul 28, 2017 at 10:59 AM, Martin Grigorov 
wrote:

> Hi,
>
> It is not very clear what is broken and why.
> I think the best you can do is to check what is different in your code
> against the samples application for InMethodGrid -
> https://github.com/wicketstuff/core/tree/wicket-7.x/inmethod-grid-parent/
> inmethod-grid-examples
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Fri, Jul 28, 2017 at 5:08 PM, durairaj t 
> wrote:
>
> > I'm upgrading wicketstuff from wicket 5 to 7, one of the TreePanel
> > functionality is not working.
> >
> >  it was TreePanel#onBeforeRender() in wicket5 and AbstractGridRow
> > #onBeforeRender().
> >
> > Component component = get(column.getId()); returns BaseTreeColumn object
> > with the null child object  in AbstractGridRow#onRender(). it should have
> > child objects[junctionLink,nodeComponent,icon].
> >
> >
> >  any help?
> >
>


TreePanel#onInitialize() is not being called from AbstractGridRow#onBeforeRender(). - WicketStuff-wicket7

2017-07-28 Thread durairaj t
I'm upgrading wicketstuff from wicket 5 to 7, one of the TreePanel
functionality is not working.

 it was TreePanel#onBeforeRender() in wicket5 and AbstractGridRow
#onBeforeRender().

Component component = get(column.getId()); returns BaseTreeColumn object
with the null child object  in AbstractGridRow#onRender(). it should have
child objects[junctionLink,nodeComponent,icon].


 any help?


Wicket & IE11 kb4025341 update issue

2017-07-20 Thread durairaj t
Wicket 5 crashes IE after the IE  kb4025341 updates in Windows7, we are
migrating our application to wicket7. But wicket 5 is still in production
and it is crashing with all the events but not with "onclick" in certain
place of code.

IE does not throwing any error message, but a pop up saying " IE has
stopped working" .

Also we tested migrated application(wicket7) in IE 11 it throws "wiketGet
is not defind" and  it worked after we replaced Wicket.$(). But still the
in method grid is not working as expected.

*MS IE 11 patch update details- URL:*
https://support.microsoft.com/en-us/help/4025341/windows-7-update-kb4025341



Is anyone facing the same issue? any help?


Wicketstuff for wicket7

2017-06-08 Thread durairaj t
Is the closing parenthesis"()" at the end of the following line of code
correct?

*AbstractGrid#*getInitializationJavascript()
{
...
sb.append("})*()*;\n");

}
I have a link in the data grid to call a modal window,it is not working
with this closing parenthesis, it is good if I removed it. But the Grid
header resize function is not working.

Chrome complaining as a script error in the Ajaxcall with the symbol "()",

Any help?


*Method from AbstractGrid.java*

private String getInitializationJavascript()
{
AppendingStringBuffer sb = new AppendingStringBuffer(128);
sb.append("(function() {\n");

// initialize the columns
sb.append("var columns = [\n");
Collection> columns = getActiveColumns();
int i = 0;
for (IGridColumn column : columns)
{
++i;
sb.append("  {");
sb.append(" minSize: " + column.getMinSize());
sb.append(", maxSize: " + column.getMaxSize());
sb.append(", id: \"" + column.getId() + "\"");
sb.append(", resizable: " + column.isResizable());
sb.append(", reorderable: " + column.isReorderable());
sb.append("  }");
if (i != columns.size())
{
sb.append(",");
}
sb.append("\n");
}

sb.append("];\n");

// method that calls the proper listener when column state is changed
sb.append("var submitStateCallback = ");
sb.append(submitColumnStateBehavior.getCallbackScript());
sb.append("\n");

// initialization
sb.append("InMethod.XTableManager.instance.register(\"" + getMarkupId() +
"\", columns, submitStateCallback);\n");
*sb.append("})();\n");// issue is here with the "()"*
System.out.println("sb.toString():"+sb.toString());

return sb.toString();
}

Thanks.


Wicket7 - How to replace the getWicketEventHandler()

2017-04-18 Thread durairaj t
How to replace the below code in wicket7?


*Below code from wicket 1.5:*

protected CharSequence getWicketEventHandler()
{
return generateCallbackScript(new
AppendingStringBuffer("wicketAjaxPost('").append(
getCallbackUrl()).append(
"', wicketSerialize(Wicket.$('" + getComponent().getMarkupId() + "'))"));
}


Re: Wicket7 with the commons-collections4-4.1 and jasperreport6.1.0

2017-04-12 Thread durairaj t
Thank you Martin!


On Wed, Apr 12, 2017 at 2:39 AM, Martin Grigorov 
wrote:

> Hi,
>
> There is no problem using -collections4 and -collections3 in the same
> project.
> They use different package names to avoid problems.
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Tue, Apr 11, 2017 at 8:19 PM, durairaj t 
> wrote:
>
> > Does anyone face the jasperreport6.1.0 issue with the
> > commons-collections4-4.1 while upgrading your applications to wicket 7.x?
> >
> >
> > I have upgraded the latest versions of common libraries for wicket 7.6
> > migration, since it is not supporting the older versions. But it gives
> > problem with the jasperreport6.1.0 as this report is using the older
> > versions of common libs.  I’m maintaining  both the versions to make the
> > application work.
> >
> >
> > Is it good to keep both the versions with the wicket7.6 until the next
> > jasper version release with the latest common libs?
> >
> >
> >
> > Any idea?
> >
>


Wicket7 with the commons-collections4-4.1 and jasperreport6.1.0

2017-04-11 Thread durairaj t
Does anyone face the jasperreport6.1.0 issue with the
commons-collections4-4.1 while upgrading your applications to wicket 7.x?


I have upgraded the latest versions of common libraries for wicket 7.6
migration, since it is not supporting the older versions. But it gives
problem with the jasperreport6.1.0 as this report is using the older
versions of common libs.  I’m maintaining  both the versions to make the
application work.


Is it good to keep both the versions with the wicket7.6 until the next
jasper version release with the latest common libs?



Any idea?


Silk Test for wicket appplication

2017-01-17 Thread durairaj t
Unable to run the recorded Silk Test scripts in the Silk Test tool and
getting the following message in the scripts.


 "id81_hf_0" := ""  , // hidden,
unchanged, value: ""

 "idf_hf_0"  := ""  , // hidden,
unchanged, value: ""


"id81_hf_0", "idf_hf_0"  are wicket dynamically generated component ID, the
load test is failing wherever wicket handling the component id's.



Do we need to do anything to handle the components ID for the Silk Test?


Any Help?


Re: [ANNOUNCE] CVE-2016-6793 Apache Wicket deserialization vulnerability

2017-01-03 Thread durairaj t
Thank you!

On Tue, Jan 3, 2017 at 4:11 PM, Tobias Soloschenko <
tobiassolosche...@googlemail.com> wrote:

> Hi,
>
> but it is released. See here: https://mvnrepository.com/arti
> fact/org.apache.wicket/wicket-core/1.5.17
>
> kind regards
>
> Tobias
>
> Am 03.01.17 um 21:25 schrieb durairaj t:
>
>> I can see the Wicket 1.5.16 but not 1.5.17 in "
>> https://wicket.apache.org/start/wicket-1.5.x.html#download";.
>>
>>
>>
>> On Sat, Dec 31, 2016 at 2:21 AM, Pedro Santos  wrote:
>>
>> CVE-2016-6793: Apache Wicket deserialization vulnerability
>>>
>>> Severity: Low
>>>
>>> Vendor: The Apache Software Foundation
>>>
>>> Versions Affected: Apache Wicket 6.x and 1.5.x
>>>
>>> Description: Depending on the ISerializer set in the Wicket application,
>>> it's possible that a Wicket's object deserialized from an untrusted
>>> source
>>> and utilized by the application to causes the code to enter in an
>>> infinite loop. Specifically, Wicket's DiskFileItem class, serialized by
>>> Kryo, allows an attacker to hack its serialized form to put a client on
>>> an
>>> infinite loop if the client attempts to write on the
>>> DeferredFileOutputStream attribute.
>>>
>>> Mitigation: Upgrade to Apache Wicket 6.25.0 or 1.5.17
>>>
>>> Credit: This issue was discovered by Jacob Baines, Tenable Network
>>> Security and
>>> Pedro Santos
>>>
>>> References: https://wicket.apache.org/news
>>>
>>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: [ANNOUNCE] CVE-2016-6793 Apache Wicket deserialization vulnerability

2017-01-03 Thread durairaj t
I can see the Wicket 1.5.16 but not 1.5.17 in "
https://wicket.apache.org/start/wicket-1.5.x.html#download";.



On Sat, Dec 31, 2016 at 2:21 AM, Pedro Santos  wrote:

> CVE-2016-6793: Apache Wicket deserialization vulnerability
>
> Severity: Low
>
> Vendor: The Apache Software Foundation
>
> Versions Affected: Apache Wicket 6.x and 1.5.x
>
> Description: Depending on the ISerializer set in the Wicket application,
> it's possible that a Wicket's object deserialized from an untrusted source
> and utilized by the application to causes the code to enter in an
> infinite loop. Specifically, Wicket's DiskFileItem class, serialized by
> Kryo, allows an attacker to hack its serialized form to put a client on an
> infinite loop if the client attempts to write on the
> DeferredFileOutputStream attribute.
>
> Mitigation: Upgrade to Apache Wicket 6.25.0 or 1.5.17
>
> Credit: This issue was discovered by Jacob Baines, Tenable Network
> Security and
> Pedro Santos
>
> References: https://wicket.apache.org/news
>


Re: ResponseIOException

2016-12-22 Thread durairaj t
I found recursion in the inmethod API. I'm not sure whether this is the
reason for the  memory leakage.

Java file name:  AbstractPageableView.java

at
com.inmethod.grid.common.AbstractPageableView.initialize(AbstractPageableView.java:244)
[classes:]
at
com.inmethod.grid.common.AbstractPageableView.getItemCount(AbstractPageableView.java:85)
[classes:]
at
com.inmethod.grid.common.AbstractPageableView.getPageCount(AbstractPageableView.java:119)
[classes:]
at
com.inmethod.grid.common.AbstractPageableView.setCurrentPage(AbstractPageableView.java:143)
[classes:]

*Recursive call*: initialize() -> getPageCount() -> getItemCount()
-> initialize()

JVM throwing "java.lang.StackOverflowError".


Do I need to increase the stack size instead a fix?


On Wed, Dec 21, 2016 at 3:02 AM, Martin Grigorov 
wrote:

> Forgot to mention that once you have the heap dumps you should compare them
> with tools like Eclipse Memory Analyzer or JProfiler, or similar.
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Wed, Dec 21, 2016 at 9:01 AM, Martin Grigorov 
> wrote:
>
> > Hi,
> >
> > There are no known memory related issues with Wicket 1.5.x!
> >
> > The best way to debug out of memory issues is to create heap dumps just
> > after starting the application and another when the OOM occurs with
> > -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=.
> >
> > ResponseIOException is not related. It occurs when the browser closes the
> > connection before the server has the chance to write the response back to
> > it.
> >
> > Martin Grigorov
> > Wicket Training and Consulting
> > https://twitter.com/mtgrigorov
> >
> > On Wed, Dec 21, 2016 at 3:28 AM, durairaj t 
> > wrote:
> >
> >> I'm migrating my application to wicket7.x, but it is still running in
> >> wicket1.5  in production and logging following error frequently and
> >> throwing OutOfMemoryError later. I'm still analyzing wicket1.5 code for
> >> the
> >> root cause of the memory leakage.
> >>
> >> Is it an existing error with the wicket1.5.x? did any one faced this
> error
> >> in wicket1.5 and got solution for this?
> >>
> >> I found  a problem ticket in JIRA for this issue,  "
> >> https://issues.apache.org/jira/browse/WICKET-3869";, but I did not find
> >> any
> >> solution in it.
> >>
> >> Error:
> >> org.apache.wicket.DefaultExceptionMapper]  Connection lost, give up
> >> responding.: org.apache.wicket.protocol.http.servlet.
> ResponseIOException:
> >> ClientAbortException:  java.io.IOException: JBWEB002012: Socket write
> >> failed
> >>
> >> Server details:
> >>
> >> JVM Arguments: -D[Standalone] -XX:+UseCompressedOops -Xms2048m -Xmx2048m
> >> -XX:MaxPermSize=512m
> >>
> >> jdk1.7.0_75
> >>
> >> JBoss EAP 6.1.0.GA (AS 7.2.0.Final-redhat-8)
> >>
> >> Browser IE 11 running in compatibility mode IE 7.
> >>
> >> Any help?
> >>
> >
> >
>


Re: ResponseIOException

2016-12-21 Thread durairaj t
Thank you Martin!  I will try with the eclipse MAT.

On Wed, Dec 21, 2016 at 3:02 AM, Martin Grigorov 
wrote:

> Forgot to mention that once you have the heap dumps you should compare them
> with tools like Eclipse Memory Analyzer or JProfiler, or similar.
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Wed, Dec 21, 2016 at 9:01 AM, Martin Grigorov 
> wrote:
>
> > Hi,
> >
> > There are no known memory related issues with Wicket 1.5.x!
> >
> > The best way to debug out of memory issues is to create heap dumps just
> > after starting the application and another when the OOM occurs with
> > -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=.
> >
> > ResponseIOException is not related. It occurs when the browser closes the
> > connection before the server has the chance to write the response back to
> > it.
> >
> > Martin Grigorov
> > Wicket Training and Consulting
> > https://twitter.com/mtgrigorov
> >
> > On Wed, Dec 21, 2016 at 3:28 AM, durairaj t 
> > wrote:
> >
> >> I'm migrating my application to wicket7.x, but it is still running in
> >> wicket1.5  in production and logging following error frequently and
> >> throwing OutOfMemoryError later. I'm still analyzing wicket1.5 code for
> >> the
> >> root cause of the memory leakage.
> >>
> >> Is it an existing error with the wicket1.5.x? did any one faced this
> error
> >> in wicket1.5 and got solution for this?
> >>
> >> I found  a problem ticket in JIRA for this issue,  "
> >> https://issues.apache.org/jira/browse/WICKET-3869";, but I did not find
> >> any
> >> solution in it.
> >>
> >> Error:
> >> org.apache.wicket.DefaultExceptionMapper]  Connection lost, give up
> >> responding.: org.apache.wicket.protocol.http.servlet.
> ResponseIOException:
> >> ClientAbortException:  java.io.IOException: JBWEB002012: Socket write
> >> failed
> >>
> >> Server details:
> >>
> >> JVM Arguments: -D[Standalone] -XX:+UseCompressedOops -Xms2048m -Xmx2048m
> >> -XX:MaxPermSize=512m
> >>
> >> jdk1.7.0_75
> >>
> >> JBoss EAP 6.1.0.GA (AS 7.2.0.Final-redhat-8)
> >>
> >> Browser IE 11 running in compatibility mode IE 7.
> >>
> >> Any help?
> >>
> >
> >
>


ResponseIOException

2016-12-20 Thread durairaj t
I'm migrating my application to wicket7.x, but it is still running in
wicket1.5  in production and logging following error frequently and
throwing OutOfMemoryError later. I'm still analyzing wicket1.5 code for the
root cause of the memory leakage.

Is it an existing error with the wicket1.5.x? did any one faced this error
in wicket1.5 and got solution for this?

I found  a problem ticket in JIRA for this issue,  "
https://issues.apache.org/jira/browse/WICKET-3869";, but I did not find any
solution in it.

Error:
org.apache.wicket.DefaultExceptionMapper]  Connection lost, give up
responding.: org.apache.wicket.protocol.http.servlet.ResponseIOException:
ClientAbortException:  java.io.IOException: JBWEB002012: Socket write failed

Server details:

JVM Arguments: -D[Standalone] -XX:+UseCompressedOops -Xms2048m -Xmx2048m
-XX:MaxPermSize=512m

jdk1.7.0_75

JBoss EAP 6.1.0.GA (AS 7.2.0.Final-redhat-8)

Browser IE 11 running in compatibility mode IE 7.

Any help?


Is it possible to set the PDF Zoom level while loading pdf in ByteArrayResource ?

2016-10-18 Thread durairaj t



Re: Wicket.Ajax.transports

2016-10-10 Thread durairaj t
Thank you!. Let me integrate it in my application.

On Mon, Oct 10, 2016 at 5:33 PM, Martin Grigorov 
wrote:

> On Mon, Oct 10, 2016 at 11:19 PM, durairaj t 
> wrote:
>
> > Yes I tried, but the following lines from the examples are not working,
> >   $(hiderId).width($(elementId).outerWidth());
> >   $(hiderId).height($(elementId).outerHeight());
> >
> > I'm getting  "Object doesn't support property or method 'outerWidth'"  .
> >
> > I got the jquery.ui.position.min.js from :
> > https://sourceforge.net/projects/mccv/?source=typ_redirect
>
>
> Why not use the latest version from the official jQueryUI site ?
>
> I'd not spend time on this. Better migrate your code than trying to run the
> examples.
>
>
> >
> >
> >
> >
> > On Mon, Oct 10, 2016 at 4:55 PM, Martin Grigorov 
> > wrote:
> >
> > > You should use AjaxCallListener.
> > > Show the mask in #onBeforeSend() callback and hide it in #onComplete().
> > > See https://ci.apache.org/projects/wicket/guide/7.x/
> > guide/ajax.html#ajax_5
> > >
> > > Martin Grigorov
> > > Wicket Training and Consulting
> > > https://twitter.com/mtgrigorov
> > >
> > > On Mon, Oct 10, 2016 at 10:39 PM, durairaj t 
> > > wrote:
> > >
> > > > The below code needs to be replaced for Wicket 7.
> > > >
> > > > var t = Wicket.Ajax.transports;
> > > >
> > > >   for (var i = 0; i < t.length; ++i) {
> > > >  if (t[i].readyState != 0) {
> > > >   return true;
> > > >  }
> > > >   }
> > > >
> > > > I'm migrating my application from 1.5 to 7. It is a part of Progress
> > Mask
> > > > to block the screen (semi-transparent overlay) while it is in
> process .
> > > >
> > > >
> > > >
> > > > On Mon, Oct 10, 2016 at 4:22 PM, Martin Grigorov <
> mgrigo...@apache.org
> > >
> > > > wrote:
> > > >
> > > > > Hi,
> > > > >
> > > > > There is no such thing in Wicket 6.x.
> > > > > What exactly you need to accomplish ?
> > > > >
> > > > > Martin Grigorov
> > > > > Wicket Training and Consulting
> > > > > https://twitter.com/mtgrigorov
> > > > >
> > > > > On Mon, Oct 10, 2016 at 9:47 PM, durairaj t <
> durairaj@gmail.com>
> > > > > wrote:
> > > > >
> > > > > > How to get "Wicket.Ajax.transports" in wicket 7?
> > > > > >
> > > > > > I'm getting error while executing the below script in wic7.
> > > > > > var t = Wicket.Ajax.transports;
> > > > > >
> > > > >
> > > >
> > >
> >
>


Re: Wicket.Ajax.transports

2016-10-10 Thread durairaj t
Yes I tried, but the following lines from the examples are not working,
  $(hiderId).width($(elementId).outerWidth());
  $(hiderId).height($(elementId).outerHeight());

I'm getting  "Object doesn't support property or method 'outerWidth'"  .

I got the jquery.ui.position.min.js from :
https://sourceforge.net/projects/mccv/?source=typ_redirect



On Mon, Oct 10, 2016 at 4:55 PM, Martin Grigorov 
wrote:

> You should use AjaxCallListener.
> Show the mask in #onBeforeSend() callback and hide it in #onComplete().
> See https://ci.apache.org/projects/wicket/guide/7.x/guide/ajax.html#ajax_5
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Mon, Oct 10, 2016 at 10:39 PM, durairaj t 
> wrote:
>
> > The below code needs to be replaced for Wicket 7.
> >
> > var t = Wicket.Ajax.transports;
> >
> >   for (var i = 0; i < t.length; ++i) {
> >  if (t[i].readyState != 0) {
> >   return true;
> >  }
> >   }
> >
> > I'm migrating my application from 1.5 to 7. It is a part of Progress Mask
> > to block the screen (semi-transparent overlay) while it is in process .
> >
> >
> >
> > On Mon, Oct 10, 2016 at 4:22 PM, Martin Grigorov 
> > wrote:
> >
> > > Hi,
> > >
> > > There is no such thing in Wicket 6.x.
> > > What exactly you need to accomplish ?
> > >
> > > Martin Grigorov
> > > Wicket Training and Consulting
> > > https://twitter.com/mtgrigorov
> > >
> > > On Mon, Oct 10, 2016 at 9:47 PM, durairaj t 
> > > wrote:
> > >
> > > > How to get "Wicket.Ajax.transports" in wicket 7?
> > > >
> > > > I'm getting error while executing the below script in wic7.
> > > > var t = Wicket.Ajax.transports;
> > > >
> > >
> >
>


Re: Wicket.Ajax.transports

2016-10-10 Thread durairaj t
The below code needs to be replaced for Wicket 7.

var t = Wicket.Ajax.transports;

  for (var i = 0; i < t.length; ++i) {
 if (t[i].readyState != 0) {
  return true;
 }
  }

I'm migrating my application from 1.5 to 7. It is a part of Progress Mask
to block the screen (semi-transparent overlay) while it is in process .



On Mon, Oct 10, 2016 at 4:22 PM, Martin Grigorov 
wrote:

> Hi,
>
> There is no such thing in Wicket 6.x.
> What exactly you need to accomplish ?
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Mon, Oct 10, 2016 at 9:47 PM, durairaj t 
> wrote:
>
> > How to get "Wicket.Ajax.transports" in wicket 7?
> >
> > I'm getting error while executing the below script in wic7.
> > var t = Wicket.Ajax.transports;
> >
>


Wicket.Ajax.transports

2016-10-10 Thread durairaj t
How to get "Wicket.Ajax.transports" in wicket 7?

I'm getting error while executing the below script in wic7.
var t = Wicket.Ajax.transports;


Re: "com.inmethod.grid.treegrid" for advanced grid with tree - is it updated for wicket 7?

2016-09-30 Thread durairaj t
The "inmethod.grid for wicket 7.4" using following classes in TreeGrid.java
from the "org.apache.wicket.extensions.markup.html.tree", but those are
removed in wicket7.4.

import org.apache.wicket.extensions.markup.html.tree.AbstractTree;
import org.apache.wicket.extensions.markup.html.tree.DefaultTreeState;
import org.apache.wicket.extensions.markup.html.tree.ITreeState;
import org.apache.wicket.extensions.markup.html.tree.ITreeStateListener;


On Fri, Sep 30, 2016 at 9:19 AM, durairaj t  wrote:

> Thank you!
>
> On Fri, Sep 30, 2016 at 2:36 AM, Martin Grigorov 
> wrote:
>
>> Hi,
>>
>> InMethod-Grid is available for 7.x:
>> http://search.maven.org/#artifactdetails%7Corg.wicketstuff%
>> 7Cwicketstuff-inmethod-grid%7C7.4.0%7Cbundle
>>
>> Martin Grigorov
>> Wicket Training and Consulting
>> https://twitter.com/mtgrigorov
>>
>> On Thu, Sep 29, 2016 at 9:33 PM, durairaj t 
>> wrote:
>>
>> >Do I need to remove the entire package (com.inmethod.grid.treegrid -
>> >   auther: Matej Knoop) and should use the Wicket 7 feature (Advanced
>> >   tabular tree)?
>> >
>> >   I have used this package in many places in my application with the
>> >   older versions of wicket.
>> >
>> >   Any help?
>> >
>>
>
>


Re: "com.inmethod.grid.treegrid" for advanced grid with tree - is it updated for wicket 7?

2016-09-30 Thread durairaj t
Thank you!

On Fri, Sep 30, 2016 at 2:36 AM, Martin Grigorov 
wrote:

> Hi,
>
> InMethod-Grid is available for 7.x:
> http://search.maven.org/#artifactdetails%7Corg.wicketstuff%7Cwicketstuff-
> inmethod-grid%7C7.4.0%7Cbundle
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Thu, Sep 29, 2016 at 9:33 PM, durairaj t 
> wrote:
>
> >Do I need to remove the entire package (com.inmethod.grid.treegrid -
> >   auther: Matej Knoop) and should use the Wicket 7 feature (Advanced
> >   tabular tree)?
> >
> >   I have used this package in many places in my application with the
> >   older versions of wicket.
> >
> >   Any help?
> >
>


"com.inmethod.grid.treegrid" for advanced grid with tree - is it updated for wicket 7?

2016-09-29 Thread durairaj t
   Do I need to remove the entire package (com.inmethod.grid.treegrid -
  auther: Matej Knoop) and should use the Wicket 7 feature (Advanced
  tabular tree)?

  I have used this package in many places in my application with the
  older versions of wicket.

  Any help?


Re: AjaxCallListener

2016-09-27 Thread durairaj t
Thank you!



On Tue, Sep 27, 2016 at 10:21 AM, Martin Grigorov 
wrote:

> Hi,
>
> decorateScript() means "do something before and after".
> So you need IAjaxCallListener's onBefore() and onComplete()
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Tue, Sep 27, 2016 at 4:11 PM, durairaj t 
> wrote:
>
> > Based on the wicket 1.5 comments in IAjaxCallDecorator.java,
> > I think, I may need to use "beforeSend" for "decorateScript" and
> > "onSuccess" for "decorateOnSuccessScript".
> >
> > But I'm not sure.  Any help?
> >
> > *Code snippet from wicket 1.5  IAjaxCallDecorator.java*
> >
> > /**
> > * Decorates the script that performs the ajax call
> > *
> > * @param component
> > * @param script
> > * @return decorated script
> > */
> > CharSequence decorateScript(Component component, CharSequence script);
> >
> > /**
> > * Decorates the onSuccess handler script
> > *
> > * @param component
> > * @param script
> > * @return decorated onSuccess handler script
> > */
> > CharSequence decorateOnSuccessScript(Component component, CharSequence
> > script);
> >
> > On Tue, Sep 27, 2016 at 8:54 AM, durairaj t 
> > wrote:
> >
> > > Hi,
> > >
> > > I'm replacing "decorateScript(Component arg0,CharSequence script)" with
> > > "AjaxRequestAttributes#getSuccessHandler(Component component)"
> > > and
> > > "decorateOnSuccessScript(Component arg0,CharSequence script)"  with
> > > "AjaxRequestAttributes# onSuccess(."
> > >
> > >
> > > *Is it correct?*
> > >
> > >
> > >
> > >
> > > On Mon, Sep 26, 2016 at 4:35 PM, Tobias Soloschenko <
> > > tobiassolosche...@googlemail.com> wrote:
> > >
> > >> Hi,
> > >>
> > >> I just googled for it:
> > >>
> > >> http://apache-wicket.1842946.n4.nabble.com/Migration-1-5-gt-
> > >> 6-CancelEventIfNoAjaxDecorator-td4652609.html
> > >>
> > >> Hope this helps.
> > >>
> > >> kind regards
> > >>
> > >> Tobias
> > >>
> > >> > Am 26.09.2016 um 22:13 schrieb durairaj t :
> > >> >
> > >> > How to replace the "new CancelEventIfNoAjaxDecorator();" in
> wicket 7
> > >> > AjaxCallListener?
> > >> >
> > >> > Any help?
> > >>
> > >
> > >
> >
>


Re: AjaxCallListener

2016-09-27 Thread durairaj t
Based on the wicket 1.5 comments in IAjaxCallDecorator.java,
I think, I may need to use "beforeSend" for "decorateScript" and
"onSuccess" for "decorateOnSuccessScript".

But I'm not sure.  Any help?

*Code snippet from wicket 1.5  IAjaxCallDecorator.java*

/**
* Decorates the script that performs the ajax call
*
* @param component
* @param script
* @return decorated script
*/
CharSequence decorateScript(Component component, CharSequence script);

/**
* Decorates the onSuccess handler script
*
* @param component
* @param script
* @return decorated onSuccess handler script
*/
CharSequence decorateOnSuccessScript(Component component, CharSequence
script);

On Tue, Sep 27, 2016 at 8:54 AM, durairaj t  wrote:

> Hi,
>
> I'm replacing "decorateScript(Component arg0,CharSequence script)" with
> "AjaxRequestAttributes#getSuccessHandler(Component component)"
> and
> "decorateOnSuccessScript(Component arg0,CharSequence script)"  with
> "AjaxRequestAttributes# onSuccess(."
>
>
> *Is it correct?*
>
>
>
>
> On Mon, Sep 26, 2016 at 4:35 PM, Tobias Soloschenko <
> tobiassolosche...@googlemail.com> wrote:
>
>> Hi,
>>
>> I just googled for it:
>>
>> http://apache-wicket.1842946.n4.nabble.com/Migration-1-5-gt-
>> 6-CancelEventIfNoAjaxDecorator-td4652609.html
>>
>> Hope this helps.
>>
>> kind regards
>>
>> Tobias
>>
>> > Am 26.09.2016 um 22:13 schrieb durairaj t :
>> >
>> > How to replace the "new CancelEventIfNoAjaxDecorator();" in  wicket 7
>> > AjaxCallListener?
>> >
>> > Any help?
>>
>
>


Re: AjaxCallListener

2016-09-27 Thread durairaj t
Hi,

I'm replacing "decorateScript(Component arg0,CharSequence script)" with
"AjaxRequestAttributes#getSuccessHandler(Component component)"
and
"decorateOnSuccessScript(Component arg0,CharSequence script)"  with
"AjaxRequestAttributes# onSuccess(."


*Is it correct?*




On Mon, Sep 26, 2016 at 4:35 PM, Tobias Soloschenko <
tobiassolosche...@googlemail.com> wrote:

> Hi,
>
> I just googled for it:
>
> http://apache-wicket.1842946.n4.nabble.com/Migration-1-5-gt-6-
> CancelEventIfNoAjaxDecorator-td4652609.html
>
> Hope this helps.
>
> kind regards
>
> Tobias
>
> > Am 26.09.2016 um 22:13 schrieb durairaj t :
> >
> > How to replace the "new CancelEventIfNoAjaxDecorator();" in  wicket 7
> > AjaxCallListener?
> >
> > Any help?
>


Re: AjaxCallListener

2016-09-26 Thread durairaj t
Ya. I used AjaxRequestAttributes#setPreventDefault(true);

Thank you!

On Mon, Sep 26, 2016 at 4:35 PM, Tobias Soloschenko <
tobiassolosche...@googlemail.com> wrote:

> Hi,
>
> I just googled for it:
>
> http://apache-wicket.1842946.n4.nabble.com/Migration-1-5-gt-6-
> CancelEventIfNoAjaxDecorator-td4652609.html
>
> Hope this helps.
>
> kind regards
>
> Tobias
>
> > Am 26.09.2016 um 22:13 schrieb durairaj t :
> >
> > How to replace the "new CancelEventIfNoAjaxDecorator();" in  wicket 7
> > AjaxCallListener?
> >
> > Any help?
>


AjaxCallListener

2016-09-26 Thread durairaj t
How to replace the "new CancelEventIfNoAjaxDecorator();" in  wicket 7
AjaxCallListener?

 Any help?


Re: Wicket-Bootstrap

2016-09-20 Thread durairaj t
Thank you Martin!

On Tue, Sep 20, 2016 at 1:59 PM, Martin Grigorov 
wrote:

> Hi,
>
> The library is hosted at GitHub:
> https://github.com/l0rdn1kk0n/wicket-bootstrap
> The description points to the new demo site.
> I have no influence on Google to tell it to forget this old demo site.
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Tue, Sep 20, 2016 at 7:18 PM, durairaj t 
> wrote:
>
> > Unable to access the URL: https://wb.agilecoders.de/app.
> >
> > I'm getting "Your Connection is not private".
> >
> > Is there any other URL?
> >
> >
> > Thanks!
> >
>


Wicket-Bootstrap

2016-09-20 Thread durairaj t
Unable to access the URL: https://wb.agilecoders.de/app.

I'm getting "Your Connection is not private".

Is there any other URL?


Thanks!


Re: Wicket 8.0

2016-09-16 Thread durairaj t
Thank You!

Let me wait for the final release.

On Fri, Sep 16, 2016 at 3:16 AM, Martin Grigorov 
wrote:

> Hi,
>
> I also upgraded my application that I use for trainings and our main
> application at my job.
> Both work without any issues, but the latter is just to be able to test
> Wicket 8.x, it won't go in production until Wicket 8.0.0 is released.
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Thu, Sep 15, 2016 at 9:57 PM, Sebastien  wrote:
>
> > Hi,
> >
> > I'm already using M1 on 2 projects, and it works well! Of course, you
> > should keep in mind that there could be some API breaks until the final
> > release...
> >
> > Best regards,
> > Sebastien
> >
>


Wicket 8.0

2016-09-15 Thread durairaj t
Do I need to wait for the stable version ? Can I migrate application to
wicket 8?


Re: ModalWindow.PageCreator()#createPage() is loading login page unexpectedly sometimes

2016-09-12 Thread durairaj t
Thank you martin.

let me upgrade to wicket 7.x. it may resolve.

On Mon, Sep 12, 2016 at 11:33 AM, Martin Grigorov 
wrote:

> On Mon, Sep 12, 2016 at 5:26 PM, durairaj t 
> wrote:
>
> > Hi Martin,
> >
> > DefaultPageStore#storePage(SerializedPage page) is holding only 40 pages
> > in
> > cache and removes others. It seems pageSotre appending every new versions
> > and deleting old one. Like, cache.remove(0).
> >
>
> You seem to use pretty old version of Wicket.
> This store has been disabled 2.5 years ago (https://issues.apache.
> org/jira/browse/WICKET-5554).
>
> In YourApplication#init() do: getStoreSettings.setInmemoryCacheSize(0);
>
>
> >
> > I'm keeping my page in session and trying to fetch from session . But
> > wicket looking into the PageStore not in the session.
> >
> > why it is not checking in session?
> >
> > Can I directly store a page by calling the
> > DefaultPageStore#storePage(SerializedPage page) in a page to refresh the
> > page version in pageStore?
> >
> > Ex: DefaultPageStore#storePage(this)
> >
> >
> > Following code works for me, but I don't know whether this is the right
> > solution for the issue.
> >
> > IDataStore dataStore=new HttpSessionDataStore(pageManagerContext,new
> > PageNumberEvictionStrategy(500));
> >
> > Any Help?
> >
> >
> > On Thu, Sep 8, 2016 at 3:12 PM, Martin Grigorov 
> > wrote:
> >
> > > Hi,
> > >
> > >
> > > On Thu, Sep 8, 2016 at 8:38 PM, durairaj t 
> > wrote:
> > >
> > > > I have added the below code in my WebApp.java to keep the pages in
> > > session
> > > > alive. Is it correct? Any help?
> > > >
> > > > setPageManagerProvider(new DefaultPageManagerProvider(this)
> > > >   {
> > > >   protected IDataStore newDataStore()
> > > >   {
> > > >   //new HttpSessionDataStore(getPageManagerContext(), new
> > > > MemorySizeEvictionStrategy (null ) )
> > >
> > >
> > > According to the code "MemorySizeEvictionStrategy(null)" should throw
> > > IllegalArgumentException. The size (maxBytes) could not be null!
> > >
> > >
> > > > ;
> > > >   return  new HttpSessionDataStore(getPageManagerContext(),
> > new
> > > > PageNumberEvictionStrategy(10));
> > > >
> > >
> > > This is very big number!
> > > You could easily run your web server out of memory!
> > > Consider more sane value!
> > >
> > >
> > > The reasons for PageExpiredException are listed in its javadoc.
> > > I'd bet the first one is the real reason - the page has never been
> stored
> > > due to some problem, e.g. NotSerializableException.
> > > Put a breakpoint
> > > at org.apache.wicket.pageStore.memory.HttpSessionDataStore#storeData()
> > and
> > > make sure the page is being stored.
> > > Ajax requests *override* existing entries in the page store. So the
> store
> > > size doesn't change much.
> > >
> > >
> > > >   }
> > > >   });
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > On Thu, Sep 8, 2016 at 9:20 AM, durairaj t 
> > > wrote:
> > > >
> > > > > Hi Martin,
> > > > >
> > > > > I got the exact error  message while debugging in eclipse;
> > > > >
> > > > > *Error*:  " org.apache.wicket.protocol.http.PageExpiredException:
> > Page
> > > > > with id '3' has expired."
> > > > >
> > > > >
> > > > > I tried following code snippet in the page constructor. It seems
> the
> > > > > following code updating the page until I'm moving out from the
> > current
> > > > > (search modal window) page.
> > > > >
> > > > > *Solun 1:*
> > > > >
> > > > > moduleForm.add(new AjaxSelfUpdatingTimerBehavior(
> > Duration.seconds(1)){
> > > > >  //one second
> > > > >
> > > > > private static final long serialVersionUID = 1L;
> > > > > @Override
> > > > > protected void onPostProcessTarget(AjaxRequestTarget target) {
> > > > > // TODO Auto-generated method stub
> > > > > super.onPostProcessTarget(target);
> &

Re: ModalWindow.PageCreator()#createPage() is loading login page unexpectedly sometimes

2016-09-12 Thread durairaj t
Hi Martin,

DefaultPageStore#storePage(SerializedPage page) is holding only 40 pages in
cache and removes others. It seems pageSotre appending every new versions
and deleting old one. Like, cache.remove(0).

I'm keeping my page in session and trying to fetch from session . But
wicket looking into the PageStore not in the session.

why it is not checking in session?

Can I directly store a page by calling the
DefaultPageStore#storePage(SerializedPage page) in a page to refresh the
page version in pageStore?

Ex: DefaultPageStore#storePage(this)


Following code works for me, but I don't know whether this is the right
solution for the issue.

IDataStore dataStore=new HttpSessionDataStore(pageManagerContext,new
PageNumberEvictionStrategy(500));

Any Help?


On Thu, Sep 8, 2016 at 3:12 PM, Martin Grigorov 
wrote:

> Hi,
>
>
> On Thu, Sep 8, 2016 at 8:38 PM, durairaj t  wrote:
>
> > I have added the below code in my WebApp.java to keep the pages in
> session
> > alive. Is it correct? Any help?
> >
> > setPageManagerProvider(new DefaultPageManagerProvider(this)
> >   {
> >   protected IDataStore newDataStore()
> >   {
> >   //new HttpSessionDataStore(getPageManagerContext(), new
> > MemorySizeEvictionStrategy (null ) )
>
>
> According to the code "MemorySizeEvictionStrategy(null)" should throw
> IllegalArgumentException. The size (maxBytes) could not be null!
>
>
> > ;
> >   return  new HttpSessionDataStore(getPageManagerContext(), new
> > PageNumberEvictionStrategy(10));
> >
>
> This is very big number!
> You could easily run your web server out of memory!
> Consider more sane value!
>
>
> The reasons for PageExpiredException are listed in its javadoc.
> I'd bet the first one is the real reason - the page has never been stored
> due to some problem, e.g. NotSerializableException.
> Put a breakpoint
> at org.apache.wicket.pageStore.memory.HttpSessionDataStore#storeData() and
> make sure the page is being stored.
> Ajax requests *override* existing entries in the page store. So the store
> size doesn't change much.
>
>
> >   }
> >   });
> >
> >
> >
> >
> >
> >
> > On Thu, Sep 8, 2016 at 9:20 AM, durairaj t 
> wrote:
> >
> > > Hi Martin,
> > >
> > > I got the exact error  message while debugging in eclipse;
> > >
> > > *Error*:  " org.apache.wicket.protocol.http.PageExpiredException: Page
> > > with id '3' has expired."
> > >
> > >
> > > I tried following code snippet in the page constructor. It seems the
> > > following code updating the page until I'm moving out from the current
> > > (search modal window) page.
> > >
> > > *Solun 1:*
> > >
> > > moduleForm.add(new AjaxSelfUpdatingTimerBehavior(Duration.seconds(1)){
> > >  //one second
> > >
> > > private static final long serialVersionUID = 1L;
> > > @Override
> > > protected void onPostProcessTarget(AjaxRequestTarget target) {
> > > // TODO Auto-generated method stub
> > > super.onPostProcessTarget(target);
> > > System.out.println(" i'm alive");
> > > }
> > > });
> > >
> > > *Solun 2:*
> > > moduleForm.add(new AbstractAjaxTimerBehavior(Duration.seconds(1)) {
> > >  //one second
> > > protected void onTimer(final AjaxRequestTarget target) {
> > > System.out.println(" i'm alive");
> > > }
> > > });
> > >
> > >
> > > How to extend the page life time?
> > >
> > >
> > > On Wed, Aug 31, 2016 at 3:29 PM, durairaj t 
> > > wrote:
> > >
> > >> Thank you martin! Let me try this.
> > >>
> > >>
> > >>
> > >>
> > >> On Wed, Aug 31, 2016 at 2:27 PM, Martin Grigorov <
> mgrigo...@apache.org>
> > >> wrote:
> > >>
> > >>> Hi,
> > >>>
> > >>> Put a breakpoint at RequestCycle#setResponsePage(Class,
> > PageParameters)
> > >>> and
> > >>> see who and why is calling it. This will tell you the reason.
> > >>> If this doesn't help then put breakpoints in
> > >>> RestartReponseAtInterceptPageException constructors.
> > >>>
> > >>> Martin Grigorov
> > >>> Wicket Training and Consulting
> > >>> https://twitter.com/mtgrigorov
> > >>>
> > >>> On Wed, Aug 31, 2016 at 5:06 P

Re: ModalWindow.PageCreator()#createPage() is loading login page unexpectedly sometimes

2016-09-08 Thread durairaj t
I have added the below code in my WebApp.java to keep the pages in session
alive. Is it correct? Any help?

setPageManagerProvider(new DefaultPageManagerProvider(this)
  {
  protected IDataStore newDataStore()
  {
  //new HttpSessionDataStore(getPageManagerContext(), new
MemorySizeEvictionStrategy (null ) );
  return  new HttpSessionDataStore(getPageManagerContext(), new
PageNumberEvictionStrategy(10));
  }
  });






On Thu, Sep 8, 2016 at 9:20 AM, durairaj t  wrote:

> Hi Martin,
>
> I got the exact error  message while debugging in eclipse;
>
> *Error*:  " org.apache.wicket.protocol.http.PageExpiredException: Page
> with id '3' has expired."
>
>
> I tried following code snippet in the page constructor. It seems the
> following code updating the page until I'm moving out from the current
> (search modal window) page.
>
> *Solun 1:*
>
> moduleForm.add(new AjaxSelfUpdatingTimerBehavior(Duration.seconds(1)){
>  //one second
>
> private static final long serialVersionUID = 1L;
> @Override
> protected void onPostProcessTarget(AjaxRequestTarget target) {
> // TODO Auto-generated method stub
> super.onPostProcessTarget(target);
> System.out.println(" i'm alive");
> }
> });
>
> *Solun 2:*
> moduleForm.add(new AbstractAjaxTimerBehavior(Duration.seconds(1)) {
>  //one second
> protected void onTimer(final AjaxRequestTarget target) {
> System.out.println(" i'm alive");
> }
> });
>
>
> How to extend the page life time?
>
>
> On Wed, Aug 31, 2016 at 3:29 PM, durairaj t 
> wrote:
>
>> Thank you martin! Let me try this.
>>
>>
>>
>>
>> On Wed, Aug 31, 2016 at 2:27 PM, Martin Grigorov 
>> wrote:
>>
>>> Hi,
>>>
>>> Put a breakpoint at RequestCycle#setResponsePage(Class, PageParameters)
>>> and
>>> see who and why is calling it. This will tell you the reason.
>>> If this doesn't help then put breakpoints in
>>> RestartReponseAtInterceptPageException constructors.
>>>
>>> Martin Grigorov
>>> Wicket Training and Consulting
>>> https://twitter.com/mtgrigorov
>>>
>>> On Wed, Aug 31, 2016 at 5:06 PM, durairaj t 
>>> wrote:
>>>
>>> > I got the same issue in Wicket 1.5, so I migrated it to 6.23, but
>>> still it
>>> > is happening.
>>> >
>>> > Moreover, I used "*Session.get().replaceSession()**;*" just to
>>> reproduce
>>> > the issue. it will not be in the actual application code.
>>> >
>>> > and I just used "* WebSession.get().clear(); *,
>>> *Session.get().clear(); , *
>>> > *WebSession.get().**replaceSession()*" to reproduce the issue. they
>>> are
>>> > also loading login page as it is happening in the application.
>>> >
>>> > I don't know the exact code or component or reason for this issue.
>>> >
>>> >
>>> > On Wed, Aug 31, 2016 at 10:51 AM, Francois Meillet <
>>> > francois.meil...@gmail.com> wrote:
>>> >
>>> > > Javadoc from Session # replaceSession() says : Call() upon login to
>>> > > protect against session fixation.
>>> > >
>>> > > Until Wicket version 6.21 the destroy method did not set the session
>>> id
>>> > to
>>> > > null.
>>> > > In 6.23, Session # destroy() set session#id to null, this is why
>>> Login
>>> > > Page is loaded.
>>> > >
>>> > > Hope this helps
>>> > >
>>> > > François
>>> > >
>>> > >
>>> > >
>>> > > > Le 31 août 2016 à 16:21, durairaj t  a
>>> écrit :
>>> > > >
>>> > > > Thank you for your quick response.
>>> > > >
>>> > > > *Session:* 30 minutes.
>>> > > >
>>> > > > *Html Header:*
>>> > > >
>>> > > > >> > > > http://www.w3.org/TR/html4/loose.dtd";>
>>> > > > http://wicket.apache.org";>
>>> > > >
>>> > > > 
>>> > > >>> type="image/ico"
>>> > > />
>>> > > >
>>> > > >
>>> > > >
>>> > > >
>>> > > >
>>> > > 

Re: ModalWindow.PageCreator()#createPage() is loading login page unexpectedly sometimes

2016-09-08 Thread durairaj t
Hi Martin,

I got the exact error  message while debugging in eclipse;

*Error*:  " org.apache.wicket.protocol.http.PageExpiredException: Page with
id '3' has expired."


I tried following code snippet in the page constructor. It seems the
following code updating the page until I'm moving out from the current
(search modal window) page.

*Solun 1:*

moduleForm.add(new AjaxSelfUpdatingTimerBehavior(Duration.seconds(1)){
 //one second

private static final long serialVersionUID = 1L;
@Override
protected void onPostProcessTarget(AjaxRequestTarget target) {
// TODO Auto-generated method stub
super.onPostProcessTarget(target);
System.out.println(" i'm alive");
}
});

*Solun 2:*
moduleForm.add(new AbstractAjaxTimerBehavior(Duration.seconds(1)) {  //one
second
protected void onTimer(final AjaxRequestTarget target) {
System.out.println(" i'm alive");
}
});


How to extend the page life time?


On Wed, Aug 31, 2016 at 3:29 PM, durairaj t  wrote:

> Thank you martin! Let me try this.
>
>
>
>
> On Wed, Aug 31, 2016 at 2:27 PM, Martin Grigorov 
> wrote:
>
>> Hi,
>>
>> Put a breakpoint at RequestCycle#setResponsePage(Class, PageParameters)
>> and
>> see who and why is calling it. This will tell you the reason.
>> If this doesn't help then put breakpoints in
>> RestartReponseAtInterceptPageException constructors.
>>
>> Martin Grigorov
>> Wicket Training and Consulting
>> https://twitter.com/mtgrigorov
>>
>> On Wed, Aug 31, 2016 at 5:06 PM, durairaj t 
>> wrote:
>>
>> > I got the same issue in Wicket 1.5, so I migrated it to 6.23, but still
>> it
>> > is happening.
>> >
>> > Moreover, I used "*Session.get().replaceSession()**;*" just to
>> reproduce
>> > the issue. it will not be in the actual application code.
>> >
>> > and I just used "* WebSession.get().clear(); *, *Session.get().clear();
>> , *
>> > *WebSession.get().**replaceSession()*" to reproduce the issue. they are
>> > also loading login page as it is happening in the application.
>> >
>> > I don't know the exact code or component or reason for this issue.
>> >
>> >
>> > On Wed, Aug 31, 2016 at 10:51 AM, Francois Meillet <
>> > francois.meil...@gmail.com> wrote:
>> >
>> > > Javadoc from Session # replaceSession() says : Call() upon login to
>> > > protect against session fixation.
>> > >
>> > > Until Wicket version 6.21 the destroy method did not set the session
>> id
>> > to
>> > > null.
>> > > In 6.23, Session # destroy() set session#id to null, this is why Login
>> > > Page is loaded.
>> > >
>> > > Hope this helps
>> > >
>> > > François
>> > >
>> > >
>> > >
>> > > > Le 31 août 2016 à 16:21, durairaj t  a
>> écrit :
>> > > >
>> > > > Thank you for your quick response.
>> > > >
>> > > > *Session:* 30 minutes.
>> > > >
>> > > > *Html Header:*
>> > > >
>> > > > > > > > http://www.w3.org/TR/html4/loose.dtd";>
>> > > > http://wicket.apache.org";>
>> > > >
>> > > > 
>> > > >> type="image/ico"
>> > > />
>> > > >
>> > > >
>> > > >
>> > > >
>> > > >
>> > > > -
>> > > >  -
>> > > >
>> > > >
>> > > >
>> > > >> > href="theme/pageBlocking.css">
>> > > >> > href="Calendar/css/jscal2.css"
>> > > />
>> > > >> > > > href="Calendar/css/border-radius.css" />
>> > > >> rel="stylesheet"
>> > > > href="Calendar/css/steel/steel.css" />
>> > > >
>> > > >
>> > > >
>> > > >> > > > src="javascripts/pageBlocking.js">
>> > > >> > > > src="javascripts/aim-hrs-autocomplete.js">
>> > > >
>> > > 
>> > > ></scr
>> ipt>
>> > > ><script type="text/javascript" src="javascripts/masks.js"></s
>> cript>
>> > > ><script ty

Re: ModalWindow.PageCreator()#createPage() is loading login page unexpectedly sometimes

2016-08-31 Thread durairaj t
Thank you martin! Let me try this.




On Wed, Aug 31, 2016 at 2:27 PM, Martin Grigorov 
wrote:

> Hi,
>
> Put a breakpoint at RequestCycle#setResponsePage(Class, PageParameters)
> and
> see who and why is calling it. This will tell you the reason.
> If this doesn't help then put breakpoints in
> RestartReponseAtInterceptPageException constructors.
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Wed, Aug 31, 2016 at 5:06 PM, durairaj t 
> wrote:
>
> > I got the same issue in Wicket 1.5, so I migrated it to 6.23, but still
> it
> > is happening.
> >
> > Moreover, I used "*Session.get().replaceSession()**;*" just to reproduce
> > the issue. it will not be in the actual application code.
> >
> > and I just used "* WebSession.get().clear(); *, *Session.get().clear();
> , *
> > *WebSession.get().**replaceSession()*" to reproduce the issue. they are
> > also loading login page as it is happening in the application.
> >
> > I don't know the exact code or component or reason for this issue.
> >
> >
> > On Wed, Aug 31, 2016 at 10:51 AM, Francois Meillet <
> > francois.meil...@gmail.com> wrote:
> >
> > > Javadoc from Session # replaceSession() says : Call() upon login to
> > > protect against session fixation.
> > >
> > > Until Wicket version 6.21 the destroy method did not set the session id
> > to
> > > null.
> > > In 6.23, Session # destroy() set session#id to null, this is why Login
> > > Page is loaded.
> > >
> > > Hope this helps
> > >
> > > François
> > >
> > >
> > >
> > > > Le 31 août 2016 à 16:21, durairaj t  a
> écrit :
> > > >
> > > > Thank you for your quick response.
> > > >
> > > > *Session:* 30 minutes.
> > > >
> > > > *Html Header:*
> > > >
> > > >  > > > http://www.w3.org/TR/html4/loose.dtd";>
> > > > http://wicket.apache.org";>
> > > >
> > > > 
> > > > type="image/ico"
> > > />
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > -
> > > >  -
> > > >
> > > >
> > > >
> > > > > href="theme/pageBlocking.css">
> > > > > href="Calendar/css/jscal2.css"
> > > />
> > > > > > > href="Calendar/css/border-radius.css" />
> > > > rel="stylesheet"
> > > > href="Calendar/css/steel/steel.css" />
> > > >
> > > >
> > > >
> > > > > > > src="javascripts/pageBlocking.js">
> > > > > > > src="javascripts/aim-hrs-autocomplete.js">
> > > >
> > > 
> > > >
> > > ></
> script>
> > > ><script type="text/javascript" src="javascripts/yetii.js"></
> script>
> > > ><script language="JavaScript"
> > > > src="jspspellcheck/spellcheck-caller.js">
> > > >
> > > >
> > > >
> > > >
> > > >//credit: <a  rel="nofollow" href="http://psacake.com/web/js.asp">http://psacake.com/web/js.asp</a>
> > > >function imposeMaxLength(Object, evt, MaxLen) {
> > > >var e = window.event ? event.keyCode : evt.which
> > > >if (e == 8 || e == 46 || (e >= 37 && e <= 40)) return
> true;
> > > > //bs, del, arrows
> > > >return (Object.value.length <= MaxLen);
> > > >}
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >div.wicket-aa {
> > > >font-family: sans-serif;
> > > >font-size: 12px;
> > > >background-color: white;
> > > >border-width: 2px;
> > > >border-color: gray;
> > > >border-style: solid;
> > > >padding: 2px;
> > > >margin: 1px 0 0 0;
> > > >text-align: left;
> > > >width: 120px;
> > > >}
> > >

Re: ModalWindow.PageCreator()#createPage() is loading login page unexpectedly sometimes

2016-08-31 Thread durairaj t
I got the same issue in Wicket 1.5, so I migrated it to 6.23, but still it
is happening.

Moreover, I used "*Session.get().replaceSession()**;*" just to reproduce
the issue. it will not be in the actual application code.

and I just used "* WebSession.get().clear(); *, *Session.get().clear(); , *
*WebSession.get().**replaceSession()*" to reproduce the issue. they are
also loading login page as it is happening in the application.

I don't know the exact code or component or reason for this issue.


On Wed, Aug 31, 2016 at 10:51 AM, Francois Meillet <
francois.meil...@gmail.com> wrote:

> Javadoc from Session # replaceSession() says : Call() upon login to
> protect against session fixation.
>
> Until Wicket version 6.21 the destroy method did not set the session id to
> null.
> In 6.23, Session # destroy() set session#id to null, this is why Login
> Page is loaded.
>
> Hope this helps
>
> François
>
>
>
> > Le 31 août 2016 à 16:21, durairaj t  a écrit :
> >
> > Thank you for your quick response.
> >
> > *Session:* 30 minutes.
> >
> > *Html Header:*
> >
> >  > http://www.w3.org/TR/html4/loose.dtd";>
> > http://wicket.apache.org";>
> >
> > 
> > />
> >
> >
> >
> >
> >
> > -
> >  -
> >
> >
> >
> >
> > />
> > > href="Calendar/css/border-radius.css" />
> > > href="Calendar/css/steel/steel.css" />
> >
> >
> >
> > > src="javascripts/pageBlocking.js">
> > > src="javascripts/aim-hrs-autocomplete.js">
> >
> 
> >
> >
> >
> > > src="jspspellcheck/spellcheck-caller.js">
> >
> >
> >
> >
> >//credit: <a  rel="nofollow" href="http://psacake.com/web/js.asp">http://psacake.com/web/js.asp</a>
> >function imposeMaxLength(Object, evt, MaxLen) {
> >var e = window.event ? event.keyCode : evt.which
> >if (e == 8 || e == 46 || (e >= 37 && e <= 40)) return true;
> > //bs, del, arrows
> >return (Object.value.length <= MaxLen);
> >}
> >
> >
> >
> >
> >
> >div.wicket-aa {
> >font-family: sans-serif;
> >font-size: 12px;
> >background-color: white;
> >border-width: 2px;
> >border-color: gray;
> >border-style: solid;
> >padding: 2px;
> >margin: 1px 0 0 0;
> >text-align: left;
> >width: 120px;
> >}
> >
> >div.wicket-aa ul {
> >list-style: none;
> >padding: 2px;
> >margin: 0;
> >width: 100px;
> >}
> >
> >div.wicket-aa ul li.selected {
> >background-color: #DEEFF7;
> >padding: 2px;
> >margin: 0;
> >width: 100px;
> >}
> >
> >div.imxt-vista tr.imxt-grid-row:hover td.imxt-cell,
> >div.imxt-vista tr.imxt-grid-row:hover td.imxt-sorted {}
> >
> >
> >
> > 
> >
> >
> > *Java Code:*
> >
> >
> >
> > String timeout= "175";
> > if(AppSession.getObjAimShell() != null &&
> > AppSession.getObjAimShell().getTimeoutLimit() !=null)
> > timeout = "" + ((AppSession.getObjAimShell().getTimeoutLimit() *
> 0.9)*1000);
> > final Model sessionTimeoutInterval = new Model(timeout);
> > HiddenField sessionTimeoutIntervalField = new
> > HiddenField("sessionTimeoutInterval", sessionTimeoutInterval) ;
> > sessionTimeoutIntervalField.setOutputMarkupId(true);
> > sessionTimeoutIntervalField.setMarkupId("sessionTimeoutInterval");
> > add(sessionTimeoutIntervalField);
> >
> >
> > *Java Script:*
> > var sessionPingTime = 175;
> > var sessionTimerId = null;
> >
> > function resetSessionTimer() {
> > try{
> > if(document.getElementById('sessionTimeoutInterval')) {
> > sessionPingTime = document.getElementById('sessionTimeoutInterval').
> value;
> > }
> > if(parent) {
> > parent.clearTimeout(parent.sessionTimerId);
> > parent.sessionTimerId = null;
> > parent.sessionTimerId = parent.setTimeout("windowCloseSignOff();",
&

Re: ModalWindow.PageCreator()#createPage() is loading login page unexpectedly sometimes

2016-08-31 Thread durairaj t
Thank you for your quick response.

*Session:* 30 minutes.

*Html Header:*

http://www.w3.org/TR/html4/loose.dtd";>
http://wicket.apache.org";>








 -
  -





















//credit: <a  rel="nofollow" href="http://psacake.com/web/js.asp">http://psacake.com/web/js.asp</a>
function imposeMaxLength(Object, evt, MaxLen) {
var e = window.event ? event.keyCode : evt.which
if (e == 8 || e == 46 || (e >= 37 && e <= 40)) return true;
//bs, del, arrows
return (Object.value.length <= MaxLen);
}





div.wicket-aa {
font-family: sans-serif;
font-size: 12px;
background-color: white;
border-width: 2px;
border-color: gray;
border-style: solid;
padding: 2px;
margin: 1px 0 0 0;
text-align: left;
width: 120px;
}

div.wicket-aa ul {
list-style: none;
padding: 2px;
margin: 0;
width: 100px;
}

div.wicket-aa ul li.selected {
background-color: #DEEFF7;
padding: 2px;
margin: 0;
width: 100px;
}

div.imxt-vista tr.imxt-grid-row:hover td.imxt-cell,
div.imxt-vista tr.imxt-grid-row:hover td.imxt-sorted {}






*Java Code:*



String timeout= "175";
if(AppSession.getObjAimShell() != null &&
AppSession.getObjAimShell().getTimeoutLimit() !=null)
timeout = "" + ((AppSession.getObjAimShell().getTimeoutLimit() * 0.9)*1000);
final Model sessionTimeoutInterval = new Model(timeout);
HiddenField sessionTimeoutIntervalField = new
HiddenField("sessionTimeoutInterval", sessionTimeoutInterval) ;
sessionTimeoutIntervalField.setOutputMarkupId(true);
sessionTimeoutIntervalField.setMarkupId("sessionTimeoutInterval");
add(sessionTimeoutIntervalField);


*Java Script:*
var sessionPingTime = 175;
 var sessionTimerId = null;

function resetSessionTimer() {
try{
if(document.getElementById('sessionTimeoutInterval')) {
sessionPingTime = document.getElementById('sessionTimeoutInterval').value;
}
if(parent) {
parent.clearTimeout(parent.sessionTimerId);
parent.sessionTimerId = null;
parent.sessionTimerId = parent.setTimeout("windowCloseSignOff();",
sessionPingTime);
}else {
clearTimeout(parent.sessionTimerId);
sessionTimerId = null;
sessionTimerId = setTimeout("windowCloseSignOff();", sessionPingTime);
}
}catch(c){showScriptError(c, 'resetSessionTimer');}
}


On Wed, Aug 31, 2016 at 10:05 AM, Francois Meillet <
francois.meil...@gmail.com> wrote:

> Hi,
>
> What is the session-timeout ?
> Can you show the html page header ? and any java code that modify it.
>
> François
>
>
>
> > Le 31 août 2016 à 15:49, durairaj t  a écrit :
> >
> > I'm migrating to wicket 6.23, createPage()  is working as expected in
> many
> > modules, but not in the below scenario.
> >
> >
> > There is a search modal window in the application, which is used to
> search
> > data and keep the entire Page in session to retrieve the data back from
> the
> > session (for the Back button functionality).
> >
> > *Issue:*
> >
> > The search window is just working for 10 to 15 minutes as expected and
> then
> > loading Login Page suddenly.
> >
> > In debug: (I verified the below in the eclipse debugging mode)
> >
> >  1. Returning page from session
> >  2. Page from session is *NOT *null.
> >  3. Session ID is *NOT *modified anywhere in the application.
> >  4. It is just happening only in the search window until I'm clearing the
> > Search Page object (SrcPage) . But application is not asking me to
> re-login
> > once it happened.
> >
> > *Code snippet:*
> >
> >  public Page createPage() {
> > return AppSession.getObjAppShell().getSrcPage();
> > });
> >
> >
> > *Reproducing Issue:*
> >
> > I can reproduce the issue by replacing the session in the createPage()
> > block, but I'm not sure whether the problem is session or something else.
> >
> > Example;
> >
> > public Page createPage() {
> > Session.get().replaceSession();// used to reproduce the issue.
> >return
> > AppSession.getObjAppShell().getSrcPage();
> > });
> >
> >
> > *Any help?*
> >
> >
> >
> >
> > Thank you.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


ModalWindow.PageCreator()#createPage() is loading login page unexpectedly sometimes

2016-08-31 Thread durairaj t
I'm migrating to wicket 6.23, createPage()  is working as expected in many
modules, but not in the below scenario.


There is a search modal window in the application, which is used to search
data and keep the entire Page in session to retrieve the data back from the
session (for the Back button functionality).

*Issue:*

The search window is just working for 10 to 15 minutes as expected and then
loading Login Page suddenly.

In debug: (I verified the below in the eclipse debugging mode)

  1. Returning page from session
  2. Page from session is *NOT *null.
  3. Session ID is *NOT *modified anywhere in the application.
  4. It is just happening only in the search window until I'm clearing the
Search Page object (SrcPage) . But application is not asking me to re-login
once it happened.

*Code snippet:*

  public Page createPage() {
return AppSession.getObjAppShell().getSrcPage();
});


*Reproducing Issue:*

I can reproduce the issue by replacing the session in the createPage()
block, but I'm not sure whether the problem is session or something else.

Example;

 public Page createPage() {
Session.get().replaceSession();// used to reproduce the issue.
return
AppSession.getObjAppShell().getSrcPage();
});


*Any help?*




Thank you.


Re: How to get the browser height and width in wicket 1.5 ?

2016-07-25 Thread durairaj t
Ok. Thank you!

On Mon, Jul 25, 2016 at 11:04 AM, Martin Grigorov 
wrote:

> We recommend you to upgrade to Wicket 6.x or even 7.x.
> 1.5.x is no more maintained. It receives only security related patches.
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Mon, Jul 25, 2016 at 4:57 PM, durairaj t 
> wrote:
>
> > There is no intermediate page. I did not see anything in between the
> > current page to the targeted page.
> >
> > When I'm running my application in wicket 1.4.x with the below code it
> > gives correct width and height, also it returns true for isJavaEnabled().
> >
> > Wicket1.4.x: int width = ((WebClientInfo)
> > getRequestCycle().getClientInfo()).getProperties().getBrowserWidth();
> >
> > On Mon, Jul 25, 2016 at 10:49 AM, Martin Grigorov 
> > wrote:
> >
> > > Do you see an intermediate page that says something like "You'll be
> > > redirected in a second" ?
> > > This page collects the client properties.
> > >
> > > Martin Grigorov
> > > Wicket Training and Consulting
> > > https://twitter.com/mtgrigorov
> > >
> > > On Mon, Jul 25, 2016 at 4:41 PM, durairaj t 
> > > wrote:
> > >
> > > > It is already added in my app.java.
> > > >
> > > > isJavaEnabled() - returns false; I set it true, but still it is not
> > > > working.
> > > >
> > >
> > > This is not related.
> > > This property says whether Java (not JavaScript) is enabled in your
> > > browser. Usually it is disabled due to the amount of bugs in Java
> > Applets.
> > >
> > >
> > > >
> > > > On Mon, Jul 25, 2016 at 10:23 AM, ndongo yaya 
> > > > wrote:
> > > >
> > > > > Hello,
> > > > >
> > > > > I believe you need to add
> > > > > *getRequestCycleSettings().setGatherExtendedBrowserInfo(true)
> > > > > *to your application's init method.
> > > > > Take a look at *ClientProperties.class* for the complete javadoc.
> > > > >
> > > > > Regards,
> > > > > Yaya
> > > > >
> > > > > 2016-07-25 15:26 GMT+02:00 durairaj t :
> > > > >
> > > > > > The below code is giving *-1* for height and width,
> > > > > >
> > > > > >  ClientProperties properties =
> > > > > > ((WebClientInfo)Session.get().getClientInfo()).getProperties();
> > > > > > int height =  properties.getBrowserHeight();
> > > > > >
> > > > > > System.out.println("height:"+ height );
> > > > > >
> > > > > > *height : -1*
> > > > > >
> > > > > > Any help?
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Yaya NDONGO
> > > > >
> > > >
> > >
> >
>


Re: How to get the browser height and width in wicket 1.5 ?

2016-07-25 Thread durairaj t
There is no intermediate page. I did not see anything in between the
current page to the targeted page.

When I'm running my application in wicket 1.4.x with the below code it
gives correct width and height, also it returns true for isJavaEnabled().

Wicket1.4.x: int width = ((WebClientInfo)
getRequestCycle().getClientInfo()).getProperties().getBrowserWidth();

On Mon, Jul 25, 2016 at 10:49 AM, Martin Grigorov 
wrote:

> Do you see an intermediate page that says something like "You'll be
> redirected in a second" ?
> This page collects the client properties.
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Mon, Jul 25, 2016 at 4:41 PM, durairaj t 
> wrote:
>
> > It is already added in my app.java.
> >
> > isJavaEnabled() - returns false; I set it true, but still it is not
> > working.
> >
>
> This is not related.
> This property says whether Java (not JavaScript) is enabled in your
> browser. Usually it is disabled due to the amount of bugs in Java Applets.
>
>
> >
> > On Mon, Jul 25, 2016 at 10:23 AM, ndongo yaya 
> > wrote:
> >
> > > Hello,
> > >
> > > I believe you need to add
> > > *getRequestCycleSettings().setGatherExtendedBrowserInfo(true)
> > > *to your application's init method.
> > > Take a look at *ClientProperties.class* for the complete javadoc.
> > >
> > > Regards,
> > > Yaya
> > >
> > > 2016-07-25 15:26 GMT+02:00 durairaj t :
> > >
> > > > The below code is giving *-1* for height and width,
> > > >
> > > >  ClientProperties properties =
> > > > ((WebClientInfo)Session.get().getClientInfo()).getProperties();
> > > > int height =  properties.getBrowserHeight();
> > > >
> > > > System.out.println("height:"+ height );
> > > >
> > > > *height : -1*
> > > >
> > > > Any help?
> > > >
> > >
> > >
> > >
> > > --
> > > Yaya NDONGO
> > >
> >
>


Re: How to get the browser height and width in wicket 1.5 ?

2016-07-25 Thread durairaj t
It is already added in my app.java.

isJavaEnabled() - returns false; I set it true, but still it is not working.

On Mon, Jul 25, 2016 at 10:23 AM, ndongo yaya  wrote:

> Hello,
>
> I believe you need to add
> *getRequestCycleSettings().setGatherExtendedBrowserInfo(true)
> *to your application's init method.
> Take a look at *ClientProperties.class* for the complete javadoc.
>
> Regards,
> Yaya
>
> 2016-07-25 15:26 GMT+02:00 durairaj t :
>
> > The below code is giving *-1* for height and width,
> >
> >  ClientProperties properties =
> > ((WebClientInfo)Session.get().getClientInfo()).getProperties();
> > int height =  properties.getBrowserHeight();
> >
> > System.out.println("height:"+ height );
> >
> > *height : -1*
> >
> > Any help?
> >
>
>
>
> --
> Yaya NDONGO
>


How to get the browser height and width in wicket 1.5 ?

2016-07-25 Thread durairaj t
The below code is giving *-1* for height and width,

 ClientProperties properties =
((WebClientInfo)Session.get().getClientInfo()).getProperties();
int height =  properties.getBrowserHeight();

System.out.println("height:"+ height );

*height : -1*

Any help?


Re: IResourceListener#onResourceRequested() is not being called in IE11.

2016-07-21 Thread durairaj t
It is Resolved. It was a components Hierarchy issue.

Thanks!


On Thu, Jul 21, 2016 at 12:49 PM, durairaj t  wrote:

> IResourceListener#onResourceRequested() is not being called in IE11. but
> it is working with Google Chrome.
>
> I referred the below URL for the PDF file generation. My requirement is
> same as it is in the below URL.
>
> URL:
> https://github.com/reiern70/antilia-bits/blob/master/content-iframe/src/main/java/com/antilia/iframe/DocumentInlineFrame.java
> .
>
>
> Any help?
>


IResourceListener#onResourceRequested() is not being called in IE11.

2016-07-21 Thread durairaj t
IResourceListener#onResourceRequested() is not being called in IE11. but it
is working with Google Chrome.

I referred the below URL for the PDF file generation. My requirement is
same as it is in the below URL.

URL:
https://github.com/reiern70/antilia-bits/blob/master/content-iframe/src/main/java/com/antilia/iframe/DocumentInlineFrame.java
.


Any help?


IOnChangeListener#onSelectionChanged() is not being called in 1.5

2016-06-24 Thread durairaj t
"onSelectionChanged()" is not being called in 1.5.  It's working in 1.4.

Do I need to do any modification in my AppRadioChoice Class?

I have copied the main code snippet below,



   1.

   AppRadioChoice  deleteRadio = new AppRadioChoice("
   rdbutton",RadioChoiceEnum.YESNO){
   2.

   *public* *void* onSelectionChanged()
   3.

   {
   4.

   super.onSelectionChanged();
   5.

   System.out.println("Test");
   6.

   }
   7.

   *protected* *boolean* wantOnSelectionChangedNotifications()
   8.

   {
   9.

   *return* *true*;
   10.

   }
   11.

   }


AppRadioChoice.Java:

   1.

   *public* *class* AppRadioChoice *extends* *AbstractSingleSelectChoice*
   *implements* IOnChangeListener{
   2.

   *public* *void* onSelectionChanged()
   3.

   {
   4.

   convertInput();
   5.

   updateModel();
   6.

   onSelectionChanged(getDefaultModelObject());

   }
   7.

   }

Any help?


Re: wicket 1.4.12 https issue - Is it a wicket version compatibility issue with the other software's?

2016-06-15 Thread durairaj t
Thank you Martin!
let me try with 6.x or 7.x.

On Wed, Jun 15, 2016 at 3:28 AM, Martin Grigorov 
wrote:

> Hi,
>
> Wicket 1.4.x and 1.5.x use vanilla JavaScript for the Ajax stuff.
> Since Wicket 6.x we use jQuery for better browser compatibility.
> Try with Wicket 6.23.0/7.3.0 if you can!
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Wed, Jun 15, 2016 at 12:36 AM, durairaj t 
> wrote:
>
> > I'm migrating wicket1.4.12 to 1.5.x, but wicket 1.4.12 is still running
> in
> > the production.
> >
> > Users facing IE 11 browser crash when they are working in this
> application.
> >
> > It is happening in https but not in http.
> >
> >  Is it a wicket version compatibility issue with the other new versions
> of
> > the software's (like Ajax,JDK,IE11, JRE,...etc)?
> >
> >
> > Any help?
> >
>


wicket 1.4.12 https issue - Is it a wicket version compatibility issue with the other software's?

2016-06-14 Thread durairaj t
I'm migrating wicket1.4.12 to 1.5.x, but wicket 1.4.12 is still running in
the production.

Users facing IE 11 browser crash when they are working in this application.

It is happening in https but not in http.

 Is it a wicket version compatibility issue with the other new versions of
the software's (like Ajax,JDK,IE11, JRE,...etc)?


Any help?


Re: AutoCompleteTextField printing values in bullet points, not as it is appearing in the examples7.x

2016-05-17 Thread durairaj t
Sorry, CSS was not formed well in my HTML, it is fixed and working good now.

Thanks.

On Mon, May 16, 2016 at 6:00 PM, durairaj t  wrote:

> Hi,
>
> The "AutoCompleteTextField"  is printing the suggested values in the
> bullet point,but not showing as it is appearing in the examples7x.
>
> Expected Result:
>
> Wicket exapmles URL:
> http://examples7x.wicket.apache.org/ajax/autocomplete?0&q=i
>
> Actual result:
>
>
>- China
>- Chile
>- Canada
>- Cuba
>
> Wicket versions tried in: Wicket 5.x & Wicket7.x. Result same in both.
>
> Any Help?
>


AutoCompleteTextField printing values in bullet points, not as it is appearing in the examples7.x

2016-05-16 Thread durairaj t
Hi,

The "AutoCompleteTextField"  is printing the suggested values in the bullet
point,but not showing as it is appearing in the examples7x.

Expected Result:

Wicket exapmles URL:
http://examples7x.wicket.apache.org/ajax/autocomplete?0&q=i

Actual result:


   - China
   - Chile
   - Canada
   - Cuba

Wicket versions tried in: Wicket 5.x & Wicket7.x. Result same in both.

Any Help?


Re: wicket/bookmarkable

2016-05-02 Thread durairaj t
OK. I will check my code. Thank you.

On Fri, Apr 29, 2016 at 7:55 PM, Martin Grigorov 
wrote:

> Hi,
>
> On Apr 29, 2016 11:35 PM, "durairaj t"  wrote:
> >
> > I’m seeing different URL’s while navigating to the different pages.
> > Whenever wicket writes “wicket/bookmarkable” in the URL everything looks
>
> Wicket generates wicket/bookmarkable/com.example.YourPage when the page has
> not be explicitly mounted at a custom path.
>
> > good in a page, but sometimes it gives (http://hostname/wic/app/r1?2)
>
> It seems here you use a page mounted at "r1".
> The problem with the images must be something else.
>
> > without “bookmarkable” and it removes all the images from the page.
> >
> >
> > “mountPage(",")” is working in this case, but I have more than 87  module
> > (main) page classes and they are not in one package.   Mounting all these
> > pages in App.java may not be a good idea.
>
> I always mount all my pages explicitly. Just to have nicer urls.
>
> >
> >
> >  Any help?
>


wicket/bookmarkable

2016-04-29 Thread durairaj t
I’m seeing different URL’s while navigating to the different pages.
Whenever wicket writes “wicket/bookmarkable” in the URL everything looks
good in a page, but sometimes it gives (http://hostname/wic/app/r1?2)
without “bookmarkable” and it removes all the images from the page.


“mountPage(",")” is working in this case, but I have more than 87  module
(main) page classes and they are not in one package.   Mounting all these
pages in App.java may not be a good idea.


 Any help?


Re: Panel.this always giving previous version of the object but not the modified one.

2016-04-26 Thread durairaj t
Hi Martin,

event.getPayload() giving AjaxRequestTarget not the GridValueChangeEvent.

If I change the "IEventSink" as *FieldSearchTextField.this *in
send(--,--,--)  it gives GridValueChangeEvent, but it is not working in
WindowClosedCallback().

FieldSearchTextField is a customized text component not a page. so whenever
I tried to get page by PageReference its always giving parent page.





On Mon, Apr 25, 2016 at 2:49 PM, Martin Grigorov 
wrote:

> Hi,
>
> You need:
>
> Page openerPage = getPageReference().getPage();
> openerPage.send(openerPage, Broadcast.BREADTH, new
> GridValueChangeEvent(target, selectedRow));
>
> Then any component inside 'openerPage' will receive this event and can read
> and store the selected row from it.
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Mon, Apr 25, 2016 at 4:53 PM, durairaj t 
> wrote:
>
> >  Please refer the below formatted code snippet.
> >
> > I'm setting selectedRow value in page creator and expecting the same
> > in window close call back (Line number 24), I tried with the Inter
> > component communication examples as you suggested. But I don't know how
> to
> > update the selectedRow in line #24 with onEven(IEvent event).
> >
> >
> >
> > Paste Bin URL: http://pastebin.com/Y2KA2LNn
> >
> >
> >
> >1.
> >2. public class FieldSearchTextField  extends MaskedTextField{
> >3.ResultRow selectedRow;
> >4.
> >5./* other business code here*/
> >6.
> >7./*   page creator */
> >8.   modalWindow.setPageCreator (new ModalWindow.PageCreator() {
> >9.  public Page createPage() {
> >10.  FieldSearchModalPage casePartyModalPage = new
> > FieldSearchModalPage(searchOption, modalWindow){
> >11.@Override
> >12.  public void updateValue(ResultRow row, AjaxRequestTarget
> >target) {
> >13.   selectedRow = row; /* selectedRow is not null here*/
> >14.   getPageReference().getPage().send( getPage(),
> >Broadcast.BREADTH,new   GridValueChangeEvent(target));
> >15.}
> >16.  }
> >17.}
> >18.  }
> >19.
> >20./* window close call back*/
> >21. modalWindow.setWindowClosedCallback(new
> >ModalWindow.WindowClosedCallback()  {
> >22.  @Override
> >23.  public void onClose(AjaxRequestTarget target){
> >24. /* how to get the selectedRow value here? */
> >25.  onFieldSearchWindowClose(selectedRow, target);*// selectedRow
> >is null here.*
> >26.   }
> >27.  }
> >28.
> >29.  /*onEvent implementation*/
> >30. @Override
> >31. public void onEvent(IEvent event) {
> >32. super.onEvent(event);
> >33. if(event.getPayload() instanceof GridValueChangeEvent) {
> >34. GridValueChangeEvent gridValueChangeEvent =
> >((GridValueChangeEvent) event.
> >35. getPayload());
> >36. gridValueChangeEvent.getTarget().add(this);
> >37. }
> >38. }
> >39.   /* Grid value change event class*/
> >40.public class GridValueChangeEvent {
> >41. private final AjaxRequestTarget target;
> >42.
> >43. public GridValueChangeEvent(AjaxRequestTarget target) {
> >44. this.target = target;
> >45. }
> >    46. public AjaxRequestTarget getTarget() {
> >47. return target;
> >48. }
> >49.  }
> >50.
> >51.   }
> >
> >
> > On Fri, Apr 22, 2016 at 4:53 PM, Martin Grigorov 
> > wrote:
> >
> > > Please use some pastebin service.
> > > It is hard to read and follow this code.
> > >
> > > Martin Grigorov
> > > Wicket Training and Consulting
> > > https://twitter.com/mtgrigorov
> > >
> > > On Fri, Apr 22, 2016 at 10:43 PM, durairaj t 
> > > wrote:
> > >
> > > > Thank you Martin. I tried with examples but those are not working in
> my
> > > > case. I don't know how to call the onEvent in line number 19 in the
> > below
> > > > code snippet. Please share me if you have any examples.
> > > >
> > > >
> > > > 1. public class FieldSearchTextField  extends MaskedTextField{
> > > &g

Re: Panel.this always giving previous version of the object but not the modified one.

2016-04-25 Thread durairaj t
 Please refer the below formatted code snippet.

I'm setting selectedRow value in page creator and expecting the same
in window close call back (Line number 24), I tried with the Inter
component communication examples as you suggested. But I don't know how to
update the selectedRow in line #24 with onEven(IEvent event).



Paste Bin URL: http://pastebin.com/Y2KA2LNn



   1.
   2. public class FieldSearchTextField  extends MaskedTextField{
   3.ResultRow selectedRow;
   4.
   5./* other business code here*/
   6.
   7./*   page creator */
   8.   modalWindow.setPageCreator (new ModalWindow.PageCreator() {
   9.  public Page createPage() {
   10.  FieldSearchModalPage casePartyModalPage = new
FieldSearchModalPage(searchOption, modalWindow){
   11.@Override
   12.  public void updateValue(ResultRow row, AjaxRequestTarget
   target) {
   13.   selectedRow = row; /* selectedRow is not null here*/
   14.   getPageReference().getPage().send( getPage(),
   Broadcast.BREADTH,new   GridValueChangeEvent(target));
   15.}
   16.  }
   17.}
   18.  }
   19.
   20./* window close call back*/
   21. modalWindow.setWindowClosedCallback(new
   ModalWindow.WindowClosedCallback()  {
   22.  @Override
   23.  public void onClose(AjaxRequestTarget target){
   24. /* how to get the selectedRow value here? */
   25.  onFieldSearchWindowClose(selectedRow, target);*// selectedRow
   is null here.*
   26.   }
   27.  }
   28.
   29.  /*onEvent implementation*/
   30. @Override
   31. public void onEvent(IEvent event) {
   32. super.onEvent(event);
   33. if(event.getPayload() instanceof GridValueChangeEvent) {
   34. GridValueChangeEvent gridValueChangeEvent =
   ((GridValueChangeEvent) event.
   35. getPayload());
   36. gridValueChangeEvent.getTarget().add(this);
   37. }
   38. }
   39.   /* Grid value change event class*/
   40.public class GridValueChangeEvent {
   41. private final AjaxRequestTarget target;
   42.
   43. public GridValueChangeEvent(AjaxRequestTarget target) {
   44. this.target = target;
   45. }
   46. public AjaxRequestTarget getTarget() {
   47. return target;
   48. }
   49.  }
   50.
   51.   }


On Fri, Apr 22, 2016 at 4:53 PM, Martin Grigorov 
wrote:

> Please use some pastebin service.
> It is hard to read and follow this code.
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Fri, Apr 22, 2016 at 10:43 PM, durairaj t 
> wrote:
>
> > Thank you Martin. I tried with examples but those are not working in my
> > case. I don't know how to call the onEvent in line number 19 in the below
> > code snippet. Please share me if you have any examples.
> >
> >
> > 1. public class FieldSearchTextField  extends MaskedTextField{
> > 2.  ResultRow selectedRow;
> > 3. /*   page creator */
> > 4.   modalWindow.setPageCreator (new ModalWindow.PageCreator() {
> > 5.public Page createPage() {
> > 6. FieldSearchModalPage casePartyModalPage = new
> >  FieldSearchModalPage(searchOption, modalWindow){
> > 7. @Override
> > 8.public void updateValue(ResultRow row, AjaxRequestTarget target) {
> > 9. selectedRow = row;* //selectedRow is not null here*
> > 10. getPageReference().getPage().send( getPage(), Broadcast.BREADTH,new
> >  GridValueChangeEvent(target));
> > 11. }
> > 12.}
> > 13.   }
> > 14.  }
> > 15.  /* window close call back*/
> > 16.modalWindow.setWindowClosedCallback(new
> >  ModalWindow.WindowClosedCallback()  {
> > 17.@Override
> > 18.public void onClose(AjaxRequestTarget target){
> > 19. *??*
> > 20. onFieldSearchWindowClose(selectedRow, target);*// selectedRow is
> > null here.*
> > 21.}
> > 22.   }
> > 23.  @Override
> > 24. public void onEvent(IEvent event) {
> > 25. if(event.getPayload() instanceof GridValueChangeEvent) {
> > 26. GridValueChangeEvent gridValueChangeEvent = ((GridValueChangeEvent)
> > event.getPayload());
> > 27.}
> > 28. }
> > 29.  }
> > 30.
> >
> >
> > On Sat, Apr 16, 2016 at 3:03 PM, Martin Grigorov 
> > wrote:
> >
> > > Hi,
> > >
> > > The problem is the same.
> > > In your first question you were asking for MyPanel.this, now you ask
> for
> > > TextField.this.
> > >
> > > If you cannot use Panel backed ModalWindow then use
> > > pageRef.getPage().send(pageRef.getPage

Re: Panel.this always giving previous version of the object but not the modified one.

2016-04-22 Thread durairaj t
Thank you Martin. I tried with examples but those are not working in my
case. I don't know how to call the onEvent in line number 19 in the below
code snippet. Please share me if you have any examples.


1. public class FieldSearchTextField  extends MaskedTextField{
2.  ResultRow selectedRow;
3. /*   page creator */
4.   modalWindow.setPageCreator (new ModalWindow.PageCreator() {
5.public Page createPage() {
6. FieldSearchModalPage casePartyModalPage = new
 FieldSearchModalPage(searchOption, modalWindow){
7. @Override
8.public void updateValue(ResultRow row, AjaxRequestTarget target) {
9. selectedRow = row;* //selectedRow is not null here*
10. getPageReference().getPage().send( getPage(), Broadcast.BREADTH,new
 GridValueChangeEvent(target));
11. }
12.}
13.   }
14.  }
15.  /* window close call back*/
16.modalWindow.setWindowClosedCallback(new
 ModalWindow.WindowClosedCallback()  {
17.@Override
18.public void onClose(AjaxRequestTarget target){
19. *??*
20. onFieldSearchWindowClose(selectedRow, target);*// selectedRow is
null here.*
21.}
22.   }
23.  @Override
24. public void onEvent(IEvent event) {
25. if(event.getPayload() instanceof GridValueChangeEvent) {
26. GridValueChangeEvent gridValueChangeEvent = ((GridValueChangeEvent)
event.getPayload());
27.}
28. }
29.  }
30.


On Sat, Apr 16, 2016 at 3:03 PM, Martin Grigorov 
wrote:

> Hi,
>
> The problem is the same.
> In your first question you were asking for MyPanel.this, now you ask for
> TextField.this.
>
> If you cannot use Panel backed ModalWindow then use
> pageRef.getPage().send(pageRef.getPage(), Broadcast.BREADTH, new
> MyModalClosedEvent()) and listen for this event in all components which
> should be repainted.
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Fri, Apr 15, 2016 at 4:01 PM, durairaj t 
> wrote:
>
> > "openerPage.getPageReference()"  is working with the pages, not in the
> > customized wicket component classes (like TextField and Panels..etc). do
> we
> > have any other way to get the modified objects from the customized
> > component classes?
> >
> > for example;
> > --
> > public class FieldSearchTextField  extends MaskedTextField{
> >
> >  ResultRow selectedRow;
> >
> > /* window close call back*/
> >
> >modalWindow.setWindowClosedCallback(new
> > ModalWindow.WindowClosedCallback()  {
> >@Override
> >public void onClose(AjaxRequestTarget target)
> >{
> > onFieldSearchWindowClose(selectedRow, target);*// selectedRow is null
> > here.*
> >}
> >
> > /*   page creator */
> >
> >   modalWindow.setPageCreator (new ModalWindow.PageCreator() {
> >public Page createPage() {
> >   FieldSearchModalPage casePartyModalPage = new
> > FieldSearchModalPage(searchOption, modalWindow){
> > @Override
> >public void updateValue(ResultRow row, AjaxRequestTarget target) {
> > selectedRow = row;* //selectedRow is not null here*
> > }
> >}
> >   }
> >  }
> >
> >
> > Parent classes:
> > -
> > public class MaskedTextField  extends StringTextField implements
> > ITextFormatProvider {}
> > public class StringTextField extends ErroringTextField {}
> > public class ErroringTextField  extends TextField {}
> >
> > Like "MyTextFieldPanel" I'm not getting modified values in the customized
> > components. This is the cases I'm facing in all the customized components
> > not only in the "MyTextFieldPanel".
> >
> >
> > Any help?
> >
> >
> > On Tue, Apr 12, 2016 at 4:54 AM, Martin Grigorov 
> > wrote:
> >
> > > Hi,
> > >
> > > If you use ModalWindow based on a Page then you have to keep a
> reference
> > to
> > > that page by using openerPage.getPageReference().
> > > Later when you need to update the opener page you have to use
> > > "pageRef.getPage()".
> > > You can see
> > >
> > >
> >
> https://github.com/apache/wicket/blob/686058119dd795b3de7f2016e3e64fb8f025f813/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/modal/ModalContent1Page.java
> > > for example.
> > >
> > > The problem in your case is that the opener's instance of
> > MyTextFieldPanel
> > > is serialized when the modal window's page is opened. Later when you
> > close
> > > the modal it works on the old version, not the lates

Re: Panel.this always giving previous version of the object but not the modified one.

2016-04-15 Thread durairaj t
"openerPage.getPageReference()"  is working with the pages, not in the
customized wicket component classes (like TextField and Panels..etc). do we
have any other way to get the modified objects from the customized
component classes?

for example;
--
public class FieldSearchTextField  extends MaskedTextField{

 ResultRow selectedRow;

/* window close call back*/

   modalWindow.setWindowClosedCallback(new
ModalWindow.WindowClosedCallback()  {
   @Override
   public void onClose(AjaxRequestTarget target)
   {
onFieldSearchWindowClose(selectedRow, target);*// selectedRow is null
here.*
   }

/*   page creator */

  modalWindow.setPageCreator (new ModalWindow.PageCreator() {
   public Page createPage() {
  FieldSearchModalPage casePartyModalPage = new
FieldSearchModalPage(searchOption, modalWindow){
@Override
   public void updateValue(ResultRow row, AjaxRequestTarget target) {
selectedRow = row;* //selectedRow is not null here*
}
   }
  }
 }


Parent classes:
-
public class MaskedTextField  extends StringTextField implements
ITextFormatProvider {}
public class StringTextField extends ErroringTextField {}
public class ErroringTextField  extends TextField {}

Like "MyTextFieldPanel" I'm not getting modified values in the customized
components. This is the cases I'm facing in all the customized components
not only in the "MyTextFieldPanel".


Any help?


On Tue, Apr 12, 2016 at 4:54 AM, Martin Grigorov 
wrote:

> Hi,
>
> If you use ModalWindow based on a Page then you have to keep a reference to
> that page by using openerPage.getPageReference().
> Later when you need to update the opener page you have to use
> "pageRef.getPage()".
> You can see
>
> https://github.com/apache/wicket/blob/686058119dd795b3de7f2016e3e64fb8f025f813/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/modal/ModalContent1Page.java
> for example.
>
> The problem in your case is that the opener's instance of MyTextFieldPanel
> is serialized when the modal window's page is opened. Later when you close
> the modal it works on the old version, not the latest one that is
> deserialized with the opener page.
>
> If you use ModalWindow with a Panel then there is no such issue.
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Mon, Apr 11, 2016 at 10:42 PM, durairaj t 
> wrote:
>
> > Hi,
> >
> >
> >
> > I'm using "*new* ModalWindow.WindowClosedCallback(){}" to update the
> > modified value in a text field box by invoking the * target.add(*
> > *MyTextFieldPanel.this**)*, but it is always giving the old values.
> >
> >
> > I'm seeing only old values in *MyTextFieldPanel.this. *
> >
> >
> > Code snippet for a clear picture.
> >
> >
> > public class AimShuttleTextFieldPanel extends Panel
> >
> >
> > modalShuttleWindow.setWindowClosedCallback(new
> > ModalWindow.WindowClosedCallback() {
> >
> > public void onClose(AjaxRequestTarget target) {
> >
> > target.add(*MyTextFieldPanel.this*);
> >
> > onWindowClose(target);
> >
> > }
> >
> > });
> >
> >
> > Any help?
> >
> >
> >
> > Thanks,
> >
>


Re: Panel.this always giving previous version of the object but not the modified one.

2016-04-11 Thread durairaj t
Class name replaced with the correct name in the code snippet;

.


public class *MyTextFieldPanel *extends Panel


modalShuttleWindow.setWindowClosedCallback(new
ModalWindow.WindowClosedCallback() {

public void onClose(AjaxRequestTarget target) {

target.add(*MyTextFieldPanel.this*);

onWindowClose(target);

}

});

On Mon, Apr 11, 2016 at 4:42 PM, durairaj t  wrote:

> Hi,
>
>
>
> I'm using "*new* ModalWindow.WindowClosedCallback(){}" to update the
> modified value in a text field box by invoking the * target.add(*
> *MyTextFieldPanel.this**)*, but it is always giving the old values.
>
>
> I'm seeing only old values in *MyTextFieldPanel.this. *
>
>
> Code snippet for a clear picture.
>
>
> public class AimShuttleTextFieldPanel extends Panel
>
>
> modalShuttleWindow.setWindowClosedCallback(new
> ModalWindow.WindowClosedCallback() {
>
> public void onClose(AjaxRequestTarget target) {
>
> target.add(*MyTextFieldPanel.this*);
>
> onWindowClose(target);
>
> }
>
> });
>
>
> Any help?
>
>
>
> Thanks,
>


Panel.this always giving previous version of the object but not the modified one.

2016-04-11 Thread durairaj t
Hi,



I'm using "*new* ModalWindow.WindowClosedCallback(){}" to update the
modified value in a text field box by invoking the * target.add(*
*MyTextFieldPanel.this**)*, but it is always giving the old values.


I'm seeing only old values in *MyTextFieldPanel.this. *


Code snippet for a clear picture.


public class AimShuttleTextFieldPanel extends Panel


modalShuttleWindow.setWindowClosedCallback(new
ModalWindow.WindowClosedCallback() {

public void onClose(AjaxRequestTarget target) {

target.add(*MyTextFieldPanel.this*);

onWindowClose(target);

}

});


Any help?



Thanks,


Re: ListMultipleChoice - How to wrap the text in the list.

2016-03-29 Thread durairaj t
Thank you Martin!



On Tue, Mar 29, 2016 at 10:33 AM, Martin Grigorov 
wrote:

> Hi,
>
> Which text exactly you need to be wrapped ?
> ListMultipleChoice should be used with a , so I guess you mean
> THIS TEXT. I am not sure you can do any CSS manipulation
> on this text. You can
> override
> org.apache.wicket.markup.html.form.AbstractChoice#appendOptionHtml()
> and cut long text at the server side.
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Tue, Mar 29, 2016 at 4:28 PM, durairaj t 
> wrote:
>
> > Is it possible to Wrap text in the wicket ListMultipleChoice? I tried
> > through CSS and  SimpleAttributeModifier (I used: "word-wrap"and
> >  "overflow-x:scroll" ), both are not working.
> >
> > Any help?
> >
> > Thanks.
> >
>


ListMultipleChoice - How to wrap the text in the list.

2016-03-29 Thread durairaj t
Is it possible to Wrap text in the wicket ListMultipleChoice? I tried
through CSS and  SimpleAttributeModifier (I used: "word-wrap"and
 "overflow-x:scroll" ), both are not working.

Any help?

Thanks.


Re: In Wicket 1.5, How to get a modified value from a Panel to Page?

2016-02-15 Thread durairaj t
Hi Martin -


 In the below code snippet; (Line # 6) textFieldID.isModified()from the
TestPanel object is always returning default value as "false" at run time
in the TestWebPage, but I'm modifying the boolean value as "true" at
runtime in the TestPanel. It should return the modified value in the
TestWebPage.

it is working in 1.4, but not in 1.5.



*TestWebPage.java:*

1. TestWebPage extends WebPage{

2. TestPanel textFieldID = *new* TestPanel(“textFieldID
”,modelObject,arrayList1,arrayList2,0,100,this);

3.   moduleForm.addComponent(textFieldID,FlagsEnum.*enCoutiesId*, w
ebMarkupContainer);

4. // some other code here

5. //following code returns default value always at run time.

6. textFieldID.isModified(); //

7. }




* TestPanel.java:*



1.  TestPanel extends Panel{

2.

3.  //some other instance variables

4.

5.  private boolean isModified=false;

6.

7.  //some other code here

8.

9.  *public* *boolean* isModified() {

10. *return* modified;

11. }

12.

13. }// closing class


Following workarounds are working only in Pages and Inner classes,

1. TestPanel.this
2. getPageReference()




Thanks.

On Mon, Feb 15, 2016 at 3:19 PM, Martin Grigorov 
wrote:

> Hi,
>
> It is not very clear what you are trying to achieve.
> Please re-phrase.
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Mon, Feb 15, 2016 at 8:54 PM, durairaj t 
> wrote:
>
> >  I'm trying to get a modified Panel object in a Page,
> >
> >  I tried with "TestPage.this.getPageReference().getPage();" and
> > "TestPanel.this" both are not working.
> >
> > I can use Session but have to get more than a modified values.
> >
> > Any help?
> >
> > Thanks.
> >
>


In Wicket 1.5, How to get a modified value from a Panel to Page?

2016-02-15 Thread durairaj t
 I'm trying to get a modified Panel object in a Page,

 I tried with "TestPage.this.getPageReference().getPage();" and
"TestPanel.this" both are not working.

I can use Session but have to get more than a modified values.

Any help?

Thanks.


Fwd: Wicket migration 1.4 to 1.5.13 issue with WebmarkupContainer /WebComponent/ByteArrayResource

2015-12-21 Thread durairaj t
Can any one help on this issue?




-- Forwarded message --
From: durairaj t 
Date: Fri, Dec 18, 2015 at 4:29 PM
Subject: Wicket migration 1.4 to 1.5.13 issue with WebmarkupContainer
/WebComponent/ByteArrayResource
To: users@wicket.apache.org


Hi Team -


How to change the below wicket version1.4 code to 1.5.13 , I tried
with WebComponent(String ,IModel model), it doesn't work.

When I'm using the below code its placing the pdf content in the form
component but not in the WebmarkupContainer.
*getRequestCycle().scheduleRequestHandlerAfterCurrent(new
ResourceRequestHandler(byteArrayResource,null));*

Thanks for any help.

*xyzPage.java*
*--*

pdfPanel = new WebMarkupContainer("pdfPanel") {
public boolean isVisible() {
return irMode != IRMODE.EDIT;
}
};
pdfPanel.setOutputMarkupId(true);
pdfPanel.setMarkupId("pdfPanel");
pdfPanel.setOutputMarkupPlaceholderTag(true);
add(pdfPanel);

pdfPanel.add(new EmbeddedPDFComponent("pdfReport", null) {
/**
*
*/
private static final long serialVersionUID = 1L;
transient byte[] data = null;

public boolean isVisible() {
return irMode != IRMODE.EDIT;
}

@Override
public boolean showToolbar() {
return false;// irMode == IRMODE.PRINT;
}

public void onResourceRequested() {
DynamicWebResource pdfResource = new DynamicWebResource() {

/**
*
*/
private static final long serialVersionUID = 1L;

@Override
protected ResourceState getResourceState() {
// TODO Auto-generated method stub
return new ResourceState() {

@Override
public String getContentType() {
return "application/pdf";
}

@Override
public byte[] getData() {
if (data == null  {
try {
data = generatePdfIr();
refreshPrint = false;
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
return data;
}

};
}

};
pdfResource.onResourceRequested();

}
}.setOutputMarkupId(true).setMarkupId("pdfReport"));

moduleForm.ClearBooleanFlags();

}

*EmbeddedPDFComponent.java:*

public class EmbeddedPDFComponent extends WebComponent implements
IResourceListener
{

private static final long serialVersionUID = 1L;
protected final DynamicWebResource resource;

/**
* Construcxt.
*
* @param componentID
*component componentID
* @param resource
*the resource
*/
public EmbeddedPDFComponent(String componentID, DynamicWebResource resource)
{
super(componentID);
this.resource = resource;
}

/**
* @see wicket.IResourceListener#onResourceRequested()
*/
public void onResourceRequested()
{
resource.onResourceRequested();
}

/**
* @see wicket.Component#onComponentTag(wicket.markup.ComponentTag)
*/
protected void onComponentTag(ComponentTag tag)
{
if (!"object".equalsIgnoreCase(tag.getName()))
{
findMarkupStream().throwMarkupException(
"Component "
+ getId() + " must be applied to a tag of type 'object' not "
+ tag.toUserDebugString());
}
if(showToolbar())
tag.put("data",
getResponse().encodeURL(urlFor(IResourceListener.INTERFACE))+"#toolbar=1&statusbar=0&messages=0&navpanes="
+ (showNavPane()?"1":"0"));
else
tag.put("data",
getResponse().encodeURL(urlFor(IResourceListener.INTERFACE))+"#toolbar=0&statusbar=0&messages=0&navpanes="
+ (showNavPane()?"1":"0"));
tag.put("type","application/pdf");
super.onComponentTag(tag);
}
public boolean showToolbar(){
return false;
}
public boolean showNavPane(){
return false;
}
}


Wicket migration 1.4 to 1.5.13 issue with WebmarkupContainer /WebComponent/ByteArrayResource

2015-12-18 Thread durairaj t
Hi Team -


How to change the below wicket version1.4 code to 1.5.13 , I tried
with WebComponent(String ,IModel model), it doesn't work.

When I'm using the below code its placing the pdf content in the form
component but not in the WebmarkupContainer.
*getRequestCycle().scheduleRequestHandlerAfterCurrent(new
ResourceRequestHandler(byteArrayResource,null));*

Thanks for any help.

*xyzPage.java*
*--*

pdfPanel = new WebMarkupContainer("pdfPanel") {
public boolean isVisible() {
return irMode != IRMODE.EDIT;
}
};
pdfPanel.setOutputMarkupId(true);
pdfPanel.setMarkupId("pdfPanel");
pdfPanel.setOutputMarkupPlaceholderTag(true);
add(pdfPanel);

pdfPanel.add(new EmbeddedPDFComponent("pdfReport", null) {
/**
*
*/
private static final long serialVersionUID = 1L;
transient byte[] data = null;

public boolean isVisible() {
return irMode != IRMODE.EDIT;
}

@Override
public boolean showToolbar() {
return false;// irMode == IRMODE.PRINT;
}

public void onResourceRequested() {
DynamicWebResource pdfResource = new DynamicWebResource() {

/**
*
*/
private static final long serialVersionUID = 1L;

@Override
protected ResourceState getResourceState() {
// TODO Auto-generated method stub
return new ResourceState() {

@Override
public String getContentType() {
return "application/pdf";
}

@Override
public byte[] getData() {
if (data == null  {
try {
data = generatePdfIr();
refreshPrint = false;
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
return data;
}

};
}

};
pdfResource.onResourceRequested();

}
}.setOutputMarkupId(true).setMarkupId("pdfReport"));

moduleForm.ClearBooleanFlags();

}

*EmbeddedPDFComponent.java:*

public class EmbeddedPDFComponent extends WebComponent implements
IResourceListener
{

private static final long serialVersionUID = 1L;
protected final DynamicWebResource resource;

/**
* Construcxt.
*
* @param componentID
*component componentID
* @param resource
*the resource
*/
public EmbeddedPDFComponent(String componentID, DynamicWebResource resource)
{
super(componentID);
this.resource = resource;
}

/**
* @see wicket.IResourceListener#onResourceRequested()
*/
public void onResourceRequested()
{
resource.onResourceRequested();
}

/**
* @see wicket.Component#onComponentTag(wicket.markup.ComponentTag)
*/
protected void onComponentTag(ComponentTag tag)
{
if (!"object".equalsIgnoreCase(tag.getName()))
{
findMarkupStream().throwMarkupException(
"Component "
+ getId() + " must be applied to a tag of type 'object' not "
+ tag.toUserDebugString());
}
if(showToolbar())
tag.put("data",
getResponse().encodeURL(urlFor(IResourceListener.INTERFACE))+"#toolbar=1&statusbar=0&messages=0&navpanes="
+ (showNavPane()?"1":"0"));
else
tag.put("data",
getResponse().encodeURL(urlFor(IResourceListener.INTERFACE))+"#toolbar=0&statusbar=0&messages=0&navpanes="
+ (showNavPane()?"1":"0"));
tag.put("type","application/pdf");
super.onComponentTag(tag);
}
public boolean showToolbar(){
return false;
}
public boolean showNavPane(){
return false;
}
}