not serializable exception

2015-11-19 Thread Ciocoiu Elvis
Hello,

After upgrading to wicket 6.21.0 I've get a strange serialization error
when adding the debug bar to ajax target. I do this on every ajax event in
development and it worked until today. The stacktrace extras:

Caused by: java.lang.RuntimeException: An error occurred while getting the
model object for Component: [Component id = data, page =
ro.emp.wicket.StandaloneHomePage, path =
2:debugBar:content:contributors:3:contrib:link:data.Label, isVisible =
true, isVersioned = true, markup = [markup =
jar:file:/home/fanfy/.m2/repository/org/apache/wicket/wicket-devutils/6.21.0/wicket-devutils-6.21.0.jar!/org/apache/wicket/devutils/debugbar/StandardDebugPanel.html
, index = 0, current =  '' (line 0, column 0)]]
at org.apache.wicket.Component.getDefaultModelObject(Component.java:1617)
~[wicket-core-6.21.0.jar:6.21.0]
at
org.apache.wicket.Component.getDefaultModelObjectAsString(Component.java:1640)
~[wicket-core-6.21.0.jar:6.21.0]
at
org.apache.wicket.markup.html.basic.Label.onComponentTagBody(Label.java:131)
~[wicket-core-6.21.0.jar:6.21.0]
at
org.apache.wicket.markup.html.panel.DefaultMarkupSourcingStrategy.onComponentTagBody(DefaultMarkupSourcingStrategy.java:71)
~[wicket-core-6.21.0.jar:6.21.0]
at org.apache.wicket.Component.internalRenderComponent(Component.java:2536)
~[wicket-core-6.21.0.jar:6.21.0]
... 132 common frames omitted
Caused by: org.apache.wicket.WicketRuntimeException: Internal error cloning
object
at
org.apache.wicket.core.util.lang.WicketObjects.cloneObject(WicketObjects.java:361)
~[wicket-core-6.21.0.jar:6.21.0]
at
org.apache.wicket.core.util.lang.WicketObjects.sizeof(WicketObjects.java:425)
~[wicket-core-6.21.0.jar:6.21.0]
at
org.apache.wicket.devutils.debugbar.PageSizeDebugPanel$2.getObject(PageSizeDebugPanel.java:96)
~[wicket-devutils-6.21.0.jar:6.21.0]
at
org.apache.wicket.devutils.debugbar.PageSizeDebugPanel$2.getObject(PageSizeDebugPanel.java:89)
~[wicket-devutils-6.21.0.jar:6.21.0]
at org.apache.wicket.Component.getDefaultModelObject(Component.java:1612)
~[wicket-core-6.21.0.jar:6.21.0]
... 136 common frames omitted
Caused by: java.io.NotSerializableException:
org.apache.wicket.ajax.AjaxRequestHandler$1
- field (class
"org.apache.wicket.ajax.AbstractAjaxResponse$AjaxHtmlHeaderContainer",
name: "this$0", type: "class org.apache.wicket.ajax.AbstractAjaxResponse")
- object (class
"org.apache.wicket.ajax.AbstractAjaxResponse$AjaxHtmlHeaderContainer",
[AjaxHtmlHeaderContainer [Component id = _header_]])
- element of array (index: 9)
- array (class "[Ljava.lang.Object;", size: 18)
- field (class "org.apache.wicket.MarkupContainer$ChildList", name:
"childs", type: "class [Ljava.lang.Object;")
- object (class "org.apache.wicket.MarkupContainer$ChildList", [[Component
id = applicationTitle], [FocusComponentFeedbackPanel [Component id =
feedbackPanel]], [DebugBar [Component id = debugBar]],
[StackComponentContainerImpl [Component id = contentContainer]],
[GlobalMenuPanel [Component id = menu]], [Fragment [Component id =
customHeader]], [Fragment [Component id = customFooter]],
[WebMarkupContainer [Component id = localeContainer]], [WebMarkupContainer
[Component id = userInformations]], [AjaxHtmlHeaderContainer [Component id
= _header_]]])
- field (class "org.apache.wicket.MarkupContainer", name: "children", type:
"class java.lang.Object")
- root object (class "ro.emp.wicket.StandaloneHomePage", [Page class =
ro.emp.wicket.StandaloneHomePage, id = 2, render count = 3])
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1180)
~[na:1.7.0_80]
at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1547)
~[na:1.7.0_80]
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1508)
~[na:1.7.0_80]
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1431)
~[na:1.7.0_80]
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1177)
~[na:1.7.0_80]
at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1377)
~[na:1.7.0_80]
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1173)
~[na:1.7.0_80]
at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1547)
~[na:1.7.0_80]
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1508)
~[na:1.7.0_80]
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1431)
~[na:1.7.0_80]
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1177)
~[na:1.7.0_80]
at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1547)
~[na:1.7.0_80]
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1508)
~[na:1.7.0_80]
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1431)
~[na:1.7.0_80]
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1177)
~[na:1.7.0_80]
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:347)
~[na:1.7.0_80]
at
org.apache.wicket.core.util.lang.WicketObjects.cloneObject(WicketObjects.java:306)
~[wicket-core-6

Re: Ajax download stops AjaxSelfUpdatingTimer

2015-01-26 Thread Ciocoiu Elvis
Hello again,

Thank you for your hints. Ajax debug shows nothing interesting. It seems it
has to do with
 target.appendJavaScript("setTimeout(\"window.location.href='" + url +
"'\", 100);"); from AjaxDownload. If I comment this the timer works but not
file is downloaded. I refreshed manually the component with the attached
AjaxSelfUpdatingTimer and after the download finished the behavior's
property 'hasTimeout'  is true.
If i manually
call target.appendJavaScript("setTimeout(\"window.location.href='" +
getCallbackUrl() + "'\", 100);"); in an ajax behavior (after the download
finished) the timer is back to normal.

Do you have any ideas?

Thank you.


On Mon, Jan 12, 2015 at 3:10 PM, Martin Grigorov 
wrote:

> Enable Ajax debug panel and see whether there are any interesting log
> messages.
> For example:
>
> https://github.com/apache/wicket/blob/4d2e5680b23e55984e8ac159bdce63629e57df12/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js#L288
> If your JS knowledge is good enough then you may try to debug
> Wicket.Ajax.ajax() yourself. The timer should fire calls to this method but
> they are suppressed for some reason. Either the channel is busy, or there
> is a precondition that stops the ajax calls.
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Mon, Jan 12, 2015 at 1:58 PM, elvis.ciocoiu  >
> wrote:
>
> > Hi again,
> >
> > Basically I have a label refreshed automatically with:
> >
> >
> > It is refreshed automatically by the timer until I click an ajax link
> like
> > the following:
> >
> >
> > After I click the download link the file is downloaded but the ajax timer
> > behavior is not triggered anymore.
> >
> > Thank you.
> >
> > --
> > View this message in context:
> >
> http://apache-wicket.1842946.n4.nabble.com/Ajax-download-stops-AjaxSelfUpdatingTimer-tp4668978p4668983.html
> > Sent from the Users forum mailing list archive at Nabble.com.
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>



-- 
_
Elvis Ciocoiu
Senior Consultant

Everlight Solutions ROMANIA

address: http://www.everlight.ro 
e-mail: elvis.cioc...@everlight.ro 
mobile : (40) 0745 13 75 85

This message and any attachments contain information, which may be
confidential or privileged.
If you are not the intended recipient, please refrain from any
disclosure, copying, distribution or use of this information.
Please be aware that such actions are prohibited. If you have received
this transmission in error, kindly notify us by email to
off...@everlight.ro . We appreciate your cooperation.


Re: wicket portlet in Liferay 6.2

2014-07-08 Thread Ciocoiu Elvis
Maybe BookmarkableListenerInterfaceRequestHandler should be handled also in
PortletRequestHandler similar to how ListenerInterfaceRequstHandler is
encoded (the BookmarkableListenerInterface... now is just ignored and
mapHandler returns the url without encoding it for portal environment).

Anyway, thank you for your suggestions.


On Tue, Jul 8, 2014 at 2:19 PM, Martin Grigorov 
wrote:

> It is the best we have at the moment.
> Suggestions how to make it better for Portlets are welcome!
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
>
> On Tue, Jul 8, 2014 at 2:13 PM, Ciocoiu Elvis 
> wrote:
>
> > If i use
> > Application.getPageSettings().setRecreateMountedPagesAfterExpiry(false)
> my
> > AjaxLink works but I\m not sure about the implications. Is the
> > Component.urlFor(...) implementation in wicket > 6.13 the correct one?
> >
> > Thank you
> >
> >
> >
> > On Tue, Jul 8, 2014 at 1:58 PM, Ciocoiu Elvis <
> elvis.cioc...@everlight.ro>
> > wrote:
> >
> > > I think I found the problem ... in wicket 6.13
> > >
> > > Component.urlFor(final Behavior behaviour, RequestListenerInterface
> > > listener, final PageParameters parameters)
> > >
> > > the decision to use BookmarkableListenerInterfaceRequestHandler
> > > or ListenerInterfaceRequestHandler is different from wicket 6.12 where
> > only
> > > isStateless() was called. In my case the BookmarkableListener maps to
> the
> > > wrong url. Any idea?
> > >
> > > Thank you.
> > >
> > >
> > > On Tue, Jul 8, 2014 at 1:49 PM, Martin Grigorov 
> > > wrote:
> > >
> > >> Oh, sorry.
> > >> I read that it is OK in 6.10 and not OK in 6.12.
> > >>
> > >> Here is the changelog for 6.13.0 -
> > >>
> > >>
> >
> https://issues.apache.org/jira/issues/?jql=project%20%3D%20WICKET%20AND%20fixVersion%20%3D%206.13.0
> > >> There are few tickets related to statelessness of the page. I'm not
> sure
> > >> whether it is related but it is easy to test: add
> > setStatelessHint(false)
> > >> to the page's constructor.
> > >>
> > >> Martin Grigorov
> > >> Wicket Training and Consulting
> > >> https://twitter.com/mtgrigorov
> > >>
> > >>
> > >> On Tue, Jul 8, 2014 at 1:36 PM, Ciocoiu Elvis <
> > elvis.cioc...@everlight.ro
> > >> >
> > >> wrote:
> > >>
> > >> > In 6.10, 6.11, 6.12 the url is rendered ok. In 6.13, 6.14, 6.15,
> 6.16
> > >> the
> > >> > url is wrong.
> > >> >
> > >> >
> > >> > On Tue, Jul 8, 2014 at 1:17 PM, Martin Grigorov <
> mgrigo...@apache.org
> > >
> > >> > wrote:
> > >> >
> > >> > > https://github.com/wicketstuff/core/issues/172
> > >> > > this sounds like related but the change has been made in an
> earlier
> > >> > version
> > >> > >
> > >> > > Martin Grigorov
> > >> > > Wicket Training and Consulting
> > >> > > https://twitter.com/mtgrigorov
> > >> > >
> > >> > >
> > >> > > On Tue, Jul 8, 2014 at 1:11 PM, Martin Grigorov <
> > mgrigo...@apache.org
> > >> >
> > >> > > wrote:
> > >> > >
> > >> > > > What about 6.11.0 ?
> > >> > > >
> > >> > > > Martin Grigorov
> > >> > > > Wicket Training and Consulting
> > >> > > > https://twitter.com/mtgrigorov
> > >> > > >
> > >> > > >
> > >> > > > On Tue, Jul 8, 2014 at 12:55 PM, Ciocoiu Elvis <
> > >> > > elvis.cioc...@everlight.ro
> > >> > > > > wrote:
> > >> > > >
> > >> > > >> Seems that in 6.10.0 to 6.12.0 the url for my AjaxLink is ok
> > >> > > >>
> > >> > > >>
> > >> > > >>
> > >> > >
> > >> >
> > >>
> >
> http://localhost:8080/web/guest/welcome?p_p_id=test_WAR_wicketportalportlet_INSTANCE_2JbV4Gjuyvej&p_p_lifecycle=2&p_p_state=normal&p_p_mode=view&p_p_resource_id=/test/%3F0-1.IBehaviorListener.0-refreshTimeLink&p_p_cacheability=cacheLevelPage&p_p_col_id=column-1&p_p_col_count=1&a

Re: wicket portlet in Liferay 6.2

2014-07-08 Thread Ciocoiu Elvis
If i use
Application.getPageSettings().setRecreateMountedPagesAfterExpiry(false) my
AjaxLink works but I\m not sure about the implications. Is the
Component.urlFor(...) implementation in wicket > 6.13 the correct one?

Thank you



On Tue, Jul 8, 2014 at 1:58 PM, Ciocoiu Elvis 
wrote:

> I think I found the problem ... in wicket 6.13
>
> Component.urlFor(final Behavior behaviour, RequestListenerInterface
> listener, final PageParameters parameters)
>
> the decision to use BookmarkableListenerInterfaceRequestHandler
> or ListenerInterfaceRequestHandler is different from wicket 6.12 where only
> isStateless() was called. In my case the BookmarkableListener maps to the
> wrong url. Any idea?
>
> Thank you.
>
>
> On Tue, Jul 8, 2014 at 1:49 PM, Martin Grigorov 
> wrote:
>
>> Oh, sorry.
>> I read that it is OK in 6.10 and not OK in 6.12.
>>
>> Here is the changelog for 6.13.0 -
>>
>> https://issues.apache.org/jira/issues/?jql=project%20%3D%20WICKET%20AND%20fixVersion%20%3D%206.13.0
>> There are few tickets related to statelessness of the page. I'm not sure
>> whether it is related but it is easy to test: add setStatelessHint(false)
>> to the page's constructor.
>>
>> Martin Grigorov
>> Wicket Training and Consulting
>> https://twitter.com/mtgrigorov
>>
>>
>> On Tue, Jul 8, 2014 at 1:36 PM, Ciocoiu Elvis > >
>> wrote:
>>
>> > In 6.10, 6.11, 6.12 the url is rendered ok. In 6.13, 6.14, 6.15, 6.16
>> the
>> > url is wrong.
>> >
>> >
>> > On Tue, Jul 8, 2014 at 1:17 PM, Martin Grigorov 
>> > wrote:
>> >
>> > > https://github.com/wicketstuff/core/issues/172
>> > > this sounds like related but the change has been made in an earlier
>> > version
>> > >
>> > > Martin Grigorov
>> > > Wicket Training and Consulting
>> > > https://twitter.com/mtgrigorov
>> > >
>> > >
>> > > On Tue, Jul 8, 2014 at 1:11 PM, Martin Grigorov > >
>> > > wrote:
>> > >
>> > > > What about 6.11.0 ?
>> > > >
>> > > > Martin Grigorov
>> > > > Wicket Training and Consulting
>> > > > https://twitter.com/mtgrigorov
>> > > >
>> > > >
>> > > > On Tue, Jul 8, 2014 at 12:55 PM, Ciocoiu Elvis <
>> > > elvis.cioc...@everlight.ro
>> > > > > wrote:
>> > > >
>> > > >> Seems that in 6.10.0 to 6.12.0 the url for my AjaxLink is ok
>> > > >>
>> > > >>
>> > > >>
>> > >
>> >
>> http://localhost:8080/web/guest/welcome?p_p_id=test_WAR_wicketportalportlet_INSTANCE_2JbV4Gjuyvej&p_p_lifecycle=2&p_p_state=normal&p_p_mode=view&p_p_resource_id=/test/%3F0-1.IBehaviorListener.0-refreshTimeLink&p_p_cacheability=cacheLevelPage&p_p_col_id=column-1&p_p_col_count=1&_=1404812714838
>> > > >>
>> > > >> Starting from 6.13.0 the url is
>> > > >>
>> > > >>
>> > > >>
>> > >
>> >
>> http://localhost:8080/web/guest/?0-1.IBehaviorListener.0-refreshTimeLink&_=1404812884161
>> > > >>
>> > > >> Any idea what change broke the wicket-portlet?
>> > > >>
>> > > >> Thank you.
>> > > >>
>> > > >>
>> > > >>
>> > > >> On Tue, Jul 8, 2014 at 10:55 AM, Ciocoiu Elvis <
>> > > >> elvis.cioc...@everlight.ro>
>> > > >> wrote:
>> > > >>
>> > > >> > I'll try to downgrade step by step. Until recently I didn't use
>> > wicket
>> > > >> in
>> > > >> > portal environment. All I know is that with wicket 1.5 (tested
>> until
>> > > >> 1.5.9)
>> > > >> > my library was ok in Liferay 6.1. In the mean time I upgraded my
>> > > >> library to
>> > > >> > wicket 6 but it seems that was not a wise decision :) . I'll
>> post my
>> > > >> > conclusions later.
>> > > >> >
>> > > >> > Thank you.
>> > > >> >
>> > > >> >
>> > > >> > On Tue, Jul 8, 2014 at 10:00 AM, Martin Grigorov <
>> > > mgrigo...@apache.org>
>> > > >> > wrote:
>> > > >> >
>> >

Re: wicket portlet in Liferay 6.2

2014-07-08 Thread Ciocoiu Elvis
I think I found the problem ... in wicket 6.13

Component.urlFor(final Behavior behaviour, RequestListenerInterface
listener, final PageParameters parameters)

the decision to use BookmarkableListenerInterfaceRequestHandler
or ListenerInterfaceRequestHandler is different from wicket 6.12 where only
isStateless() was called. In my case the BookmarkableListener maps to the
wrong url. Any idea?

Thank you.


On Tue, Jul 8, 2014 at 1:49 PM, Martin Grigorov 
wrote:

> Oh, sorry.
> I read that it is OK in 6.10 and not OK in 6.12.
>
> Here is the changelog for 6.13.0 -
>
> https://issues.apache.org/jira/issues/?jql=project%20%3D%20WICKET%20AND%20fixVersion%20%3D%206.13.0
> There are few tickets related to statelessness of the page. I'm not sure
> whether it is related but it is easy to test: add setStatelessHint(false)
> to the page's constructor.
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
>
> On Tue, Jul 8, 2014 at 1:36 PM, Ciocoiu Elvis 
> wrote:
>
> > In 6.10, 6.11, 6.12 the url is rendered ok. In 6.13, 6.14, 6.15, 6.16 the
> > url is wrong.
> >
> >
> > On Tue, Jul 8, 2014 at 1:17 PM, Martin Grigorov 
> > wrote:
> >
> > > https://github.com/wicketstuff/core/issues/172
> > > this sounds like related but the change has been made in an earlier
> > version
> > >
> > > Martin Grigorov
> > > Wicket Training and Consulting
> > > https://twitter.com/mtgrigorov
> > >
> > >
> > > On Tue, Jul 8, 2014 at 1:11 PM, Martin Grigorov 
> > > wrote:
> > >
> > > > What about 6.11.0 ?
> > > >
> > > > Martin Grigorov
> > > > Wicket Training and Consulting
> > > > https://twitter.com/mtgrigorov
> > > >
> > > >
> > > > On Tue, Jul 8, 2014 at 12:55 PM, Ciocoiu Elvis <
> > > elvis.cioc...@everlight.ro
> > > > > wrote:
> > > >
> > > >> Seems that in 6.10.0 to 6.12.0 the url for my AjaxLink is ok
> > > >>
> > > >>
> > > >>
> > >
> >
> http://localhost:8080/web/guest/welcome?p_p_id=test_WAR_wicketportalportlet_INSTANCE_2JbV4Gjuyvej&p_p_lifecycle=2&p_p_state=normal&p_p_mode=view&p_p_resource_id=/test/%3F0-1.IBehaviorListener.0-refreshTimeLink&p_p_cacheability=cacheLevelPage&p_p_col_id=column-1&p_p_col_count=1&_=1404812714838
> > > >>
> > > >> Starting from 6.13.0 the url is
> > > >>
> > > >>
> > > >>
> > >
> >
> http://localhost:8080/web/guest/?0-1.IBehaviorListener.0-refreshTimeLink&_=1404812884161
> > > >>
> > > >> Any idea what change broke the wicket-portlet?
> > > >>
> > > >> Thank you.
> > > >>
> > > >>
> > > >>
> > > >> On Tue, Jul 8, 2014 at 10:55 AM, Ciocoiu Elvis <
> > > >> elvis.cioc...@everlight.ro>
> > > >> wrote:
> > > >>
> > > >> > I'll try to downgrade step by step. Until recently I didn't use
> > wicket
> > > >> in
> > > >> > portal environment. All I know is that with wicket 1.5 (tested
> until
> > > >> 1.5.9)
> > > >> > my library was ok in Liferay 6.1. In the mean time I upgraded my
> > > >> library to
> > > >> > wicket 6 but it seems that was not a wise decision :) . I'll post
> my
> > > >> > conclusions later.
> > > >> >
> > > >> > Thank you.
> > > >> >
> > > >> >
> > > >> > On Tue, Jul 8, 2014 at 10:00 AM, Martin Grigorov <
> > > mgrigo...@apache.org>
> > > >> > wrote:
> > > >> >
> > > >> >> Hi,
> > > >> >>
> > > >> >> Portlets is grey area for me...
> > > >> >> When the problem started appearing ? With Wicket 6.16 or earlier
> ?
> > > >> >> There are no changes in wicketstuff-portlet since a while so I
> > guess
> > > >> it is
> > > >> >> a change in Wicket that may broke it.
> > > >> >>
> > > >> >> Martin Grigorov
> > > >> >> Wicket Training and Consulting
> > > >> >> https://twitter.com/mtgrigorov
> > > >> >>
> > > >> >>
> > > >> >> On Mon, Jul 7, 2014 at 8:51 PM, Cioc

Re: wicket portlet in Liferay 6.2

2014-07-08 Thread Ciocoiu Elvis
In 6.10, 6.11, 6.12 the url is rendered ok. In 6.13, 6.14, 6.15, 6.16 the
url is wrong.


On Tue, Jul 8, 2014 at 1:17 PM, Martin Grigorov 
wrote:

> https://github.com/wicketstuff/core/issues/172
> this sounds like related but the change has been made in an earlier version
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
>
> On Tue, Jul 8, 2014 at 1:11 PM, Martin Grigorov 
> wrote:
>
> > What about 6.11.0 ?
> >
> > Martin Grigorov
> > Wicket Training and Consulting
> > https://twitter.com/mtgrigorov
> >
> >
> > On Tue, Jul 8, 2014 at 12:55 PM, Ciocoiu Elvis <
> elvis.cioc...@everlight.ro
> > > wrote:
> >
> >> Seems that in 6.10.0 to 6.12.0 the url for my AjaxLink is ok
> >>
> >>
> >>
> http://localhost:8080/web/guest/welcome?p_p_id=test_WAR_wicketportalportlet_INSTANCE_2JbV4Gjuyvej&p_p_lifecycle=2&p_p_state=normal&p_p_mode=view&p_p_resource_id=/test/%3F0-1.IBehaviorListener.0-refreshTimeLink&p_p_cacheability=cacheLevelPage&p_p_col_id=column-1&p_p_col_count=1&_=1404812714838
> >>
> >> Starting from 6.13.0 the url is
> >>
> >>
> >>
> http://localhost:8080/web/guest/?0-1.IBehaviorListener.0-refreshTimeLink&_=1404812884161
> >>
> >> Any idea what change broke the wicket-portlet?
> >>
> >> Thank you.
> >>
> >>
> >>
> >> On Tue, Jul 8, 2014 at 10:55 AM, Ciocoiu Elvis <
> >> elvis.cioc...@everlight.ro>
> >> wrote:
> >>
> >> > I'll try to downgrade step by step. Until recently I didn't use wicket
> >> in
> >> > portal environment. All I know is that with wicket 1.5 (tested until
> >> 1.5.9)
> >> > my library was ok in Liferay 6.1. In the mean time I upgraded my
> >> library to
> >> > wicket 6 but it seems that was not a wise decision :) . I'll post my
> >> > conclusions later.
> >> >
> >> > Thank you.
> >> >
> >> >
> >> > On Tue, Jul 8, 2014 at 10:00 AM, Martin Grigorov <
> mgrigo...@apache.org>
> >> > wrote:
> >> >
> >> >> Hi,
> >> >>
> >> >> Portlets is grey area for me...
> >> >> When the problem started appearing ? With Wicket 6.16 or earlier ?
> >> >> There are no changes in wicketstuff-portlet since a while so I guess
> >> it is
> >> >> a change in Wicket that may broke it.
> >> >>
> >> >> Martin Grigorov
> >> >> Wicket Training and Consulting
> >> >> https://twitter.com/mtgrigorov
> >> >>
> >> >>
> >> >> On Mon, Jul 7, 2014 at 8:51 PM, Ciocoiu Elvis <
> >> elvis.cioc...@everlight.ro
> >> >> >
> >> >> wrote:
> >> >>
> >> >> > Hi,
> >> >> >
> >> >> > I'm facing a problem with wicketstuff-portlet-6.16 in Liferay 6.2.
> >> I'm
> >> >> > using AjaxLink in a portlet and WicketAjax call failure with: Error
> >> >> while
> >> >> > parsing response: Invalid XML. I know there were some problems
> >> (starting
> >> >> > with wicket 1.5.9) but this problems were solved using a custom
> >> >> > IRequestCycleProvider. Can anybody help me with an answer if some
> >> >> > workaround is needed in wicketstuff-portlet 6.16?
> >> >> >
> >> >> > Thank you
> >> >> >
> >> >> > --
> >> >> > _
> >> >> > Elvis Ciocoiu
> >> >> > Senior Consultant
> >> >> >
> >> >> > Everlight Solutions ROMANIA
> >> >> >
> >> >> > address: http://www.everlight.ro <http://www.synthesys.ro/>
> >> >> > e-mail: elvis.cioc...@everlight.ro 
> >> >> > mobile : (40) 0745 13 75 85
> >> >> >
> >> >> > This message and any attachments contain information, which may be
> >> >> > confidential or privileged.
> >> >> > If you are not the intended recipient, please refrain from any
> >> >> > disclosure, copying, distribution or use of this information.
> >> >> > Please be aware that such actions are prohibited. If you have
> >> received
> >> >> > t

Re: wicket portlet in Liferay 6.2

2014-07-08 Thread Ciocoiu Elvis
Seems that in 6.10.0 to 6.12.0 the url for my AjaxLink is ok

http://localhost:8080/web/guest/welcome?p_p_id=test_WAR_wicketportalportlet_INSTANCE_2JbV4Gjuyvej&p_p_lifecycle=2&p_p_state=normal&p_p_mode=view&p_p_resource_id=/test/%3F0-1.IBehaviorListener.0-refreshTimeLink&p_p_cacheability=cacheLevelPage&p_p_col_id=column-1&p_p_col_count=1&_=1404812714838

Starting from 6.13.0 the url is

http://localhost:8080/web/guest/?0-1.IBehaviorListener.0-refreshTimeLink&_=1404812884161

Any idea what change broke the wicket-portlet?

Thank you.



On Tue, Jul 8, 2014 at 10:55 AM, Ciocoiu Elvis 
wrote:

> I'll try to downgrade step by step. Until recently I didn't use wicket in
> portal environment. All I know is that with wicket 1.5 (tested until 1.5.9)
> my library was ok in Liferay 6.1. In the mean time I upgraded my library to
> wicket 6 but it seems that was not a wise decision :) . I'll post my
> conclusions later.
>
> Thank you.
>
>
> On Tue, Jul 8, 2014 at 10:00 AM, Martin Grigorov 
> wrote:
>
>> Hi,
>>
>> Portlets is grey area for me...
>> When the problem started appearing ? With Wicket 6.16 or earlier ?
>> There are no changes in wicketstuff-portlet since a while so I guess it is
>> a change in Wicket that may broke it.
>>
>> Martin Grigorov
>> Wicket Training and Consulting
>> https://twitter.com/mtgrigorov
>>
>>
>> On Mon, Jul 7, 2014 at 8:51 PM, Ciocoiu Elvis > >
>> wrote:
>>
>> > Hi,
>> >
>> > I'm facing a problem with wicketstuff-portlet-6.16 in Liferay 6.2. I'm
>> > using AjaxLink in a portlet and WicketAjax call failure with: Error
>> while
>> > parsing response: Invalid XML. I know there were some problems (starting
>> > with wicket 1.5.9) but this problems were solved using a custom
>> > IRequestCycleProvider. Can anybody help me with an answer if some
>> > workaround is needed in wicketstuff-portlet 6.16?
>> >
>> > Thank you
>> >
>> > --
>> > _
>> > Elvis Ciocoiu
>> > Senior Consultant
>> >
>> > Everlight Solutions ROMANIA
>> >
>> > address: http://www.everlight.ro <http://www.synthesys.ro/>
>> > e-mail: elvis.cioc...@everlight.ro 
>> > mobile : (40) 0745 13 75 85
>> >
>> > This message and any attachments contain information, which may be
>> > confidential or privileged.
>> > If you are not the intended recipient, please refrain from any
>> > disclosure, copying, distribution or use of this information.
>> > Please be aware that such actions are prohibited. If you have received
>> > this transmission in error, kindly notify us by email to
>> > off...@everlight.ro . We appreciate your
>> cooperation.
>> >
>>
>
>
>
> --
> _
> Elvis Ciocoiu
> Senior Consultant
>
> Everlight Solutions ROMANIA
>
> address: http://www.everlight.ro <http://www.synthesys.ro/>
> e-mail: elvis.cioc...@everlight.ro 
> mobile : (40) 0745 13 75 85
>
> This message and any attachments contain information, which may be
> confidential or privileged.
> If you are not the intended recipient, please refrain from any
> disclosure, copying, distribution or use of this information.
> Please be aware that such actions are prohibited. If you have received
> this transmission in error, kindly notify us by email to
> off...@everlight.ro . We appreciate your cooperation.
>



-- 
_
Elvis Ciocoiu
Senior Consultant

Everlight Solutions ROMANIA

address: http://www.everlight.ro <http://www.synthesys.ro/>
e-mail: elvis.cioc...@everlight.ro 
mobile : (40) 0745 13 75 85

This message and any attachments contain information, which may be
confidential or privileged.
If you are not the intended recipient, please refrain from any
disclosure, copying, distribution or use of this information.
Please be aware that such actions are prohibited. If you have received
this transmission in error, kindly notify us by email to
off...@everlight.ro . We appreciate your cooperation.


Re: wicket portlet in Liferay 6.2

2014-07-08 Thread Ciocoiu Elvis
I'll try to downgrade step by step. Until recently I didn't use wicket in
portal environment. All I know is that with wicket 1.5 (tested until 1.5.9)
my library was ok in Liferay 6.1. In the mean time I upgraded my library to
wicket 6 but it seems that was not a wise decision :) . I'll post my
conclusions later.

Thank you.


On Tue, Jul 8, 2014 at 10:00 AM, Martin Grigorov 
wrote:

> Hi,
>
> Portlets is grey area for me...
> When the problem started appearing ? With Wicket 6.16 or earlier ?
> There are no changes in wicketstuff-portlet since a while so I guess it is
> a change in Wicket that may broke it.
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
>
> On Mon, Jul 7, 2014 at 8:51 PM, Ciocoiu Elvis 
> wrote:
>
> > Hi,
> >
> > I'm facing a problem with wicketstuff-portlet-6.16 in Liferay 6.2. I'm
> > using AjaxLink in a portlet and WicketAjax call failure with: Error while
> > parsing response: Invalid XML. I know there were some problems (starting
> > with wicket 1.5.9) but this problems were solved using a custom
> > IRequestCycleProvider. Can anybody help me with an answer if some
> > workaround is needed in wicketstuff-portlet 6.16?
> >
> > Thank you
> >
> > --
> > _
> > Elvis Ciocoiu
> > Senior Consultant
> >
> > Everlight Solutions ROMANIA
> >
> > address: http://www.everlight.ro <http://www.synthesys.ro/>
> > e-mail: elvis.cioc...@everlight.ro 
> > mobile : (40) 0745 13 75 85
> >
> > This message and any attachments contain information, which may be
> > confidential or privileged.
> > If you are not the intended recipient, please refrain from any
> > disclosure, copying, distribution or use of this information.
> > Please be aware that such actions are prohibited. If you have received
> > this transmission in error, kindly notify us by email to
> > off...@everlight.ro . We appreciate your
> cooperation.
> >
>



-- 
_
Elvis Ciocoiu
Senior Consultant

Everlight Solutions ROMANIA

address: http://www.everlight.ro <http://www.synthesys.ro/>
e-mail: elvis.cioc...@everlight.ro 
mobile : (40) 0745 13 75 85

This message and any attachments contain information, which may be
confidential or privileged.
If you are not the intended recipient, please refrain from any
disclosure, copying, distribution or use of this information.
Please be aware that such actions are prohibited. If you have received
this transmission in error, kindly notify us by email to
off...@everlight.ro . We appreciate your cooperation.


wicket portlet in Liferay 6.2

2014-07-07 Thread Ciocoiu Elvis
Hi,

I'm facing a problem with wicketstuff-portlet-6.16 in Liferay 6.2. I'm
using AjaxLink in a portlet and WicketAjax call failure with: Error while
parsing response: Invalid XML. I know there were some problems (starting
with wicket 1.5.9) but this problems were solved using a custom
IRequestCycleProvider. Can anybody help me with an answer if some
workaround is needed in wicketstuff-portlet 6.16?

Thank you

-- 
_
Elvis Ciocoiu
Senior Consultant

Everlight Solutions ROMANIA

address: http://www.everlight.ro 
e-mail: elvis.cioc...@everlight.ro 
mobile : (40) 0745 13 75 85

This message and any attachments contain information, which may be
confidential or privileged.
If you are not the intended recipient, please refrain from any
disclosure, copying, distribution or use of this information.
Please be aware that such actions are prohibited. If you have received
this transmission in error, kindly notify us by email to
off...@everlight.ro . We appreciate your cooperation.


Re: inmethod grid cachedPageCount

2013-03-04 Thread Ciocoiu Elvis
Thank you Paul,

But in my case I'm using IDataSource from immethod grid to retrieve the
current page. In client code after inserting the new record in the database
I'm obtaining the corresponding page number (greater than the one cached by
inmethod grid) and let the grid display itself (internally calls get page
from IDataSource). What I need is the easiest way to update the inmethod
grid to know that there is one more page). The most appropiate idea was to
set the current grid page to the last one but even if the grid let me do
that through its api (used also by the navigator) crashes because of this
internally cached page count. All the logic to retrieve the page based on
the current sort and filter is implemented. I don't want to change the
widget for the moment (inmethod grid is ok except this usecase) so I must
stick to IDataSource and it's usage.
On Feb 28, 2013 3:50 AM, "Paul Bors"  wrote:

> Well, reading your post a second time around...
>
> If you really want to add a record and then paginate to the page that
> contains it, you'd have to re-run your SQL right?
>
> I think it would make more sence to KISS it. Change your DataProvider by
> re-running the SQL and provide the record ID (primary key, hash or
> something
> unique to your new saved record) then add a new constructor for your table
> or DataProvider to handle the pagination by looking through your collection
> for the element with that unique ID page by page or by implementing the
> pagination in SQL (search with the record ID given your fileters and sort
> order and forward your cursor to the page that contains your record).
>
> Mersi mult, si chiar am nevoie mare :)
>
>
>
> -
> ~ Thank you,
> p...@bors.ws
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/inmethod-grid-cachedPageCount-tp4656739p4656875.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


multipart ajax upload

2013-02-24 Thread Ciocoiu Elvis
Hi,

I'm fighting with a strange problem when using a form (multipart) with a
required TextField and a FileUploadField. Sometimes works as expected (the
required error message is displayed in FeedbackPanel) but most of the times
the feedback message is not displayed. Also, after submiting for a while
with empty text field I've got a message in Wicket Ajax Debug:

   1. Wicket.Ajax: Wicket.Ajax.Call.failure: Error while parsing response:
   Could not find root  element
   
wicket-ajax-debug-ver-1359989915360.js:91
  1. 
WicketAjaxDebug.logErrorwicket-ajax-debug-ver-1359989915360.js:91
  2. 
Wicket.Log.errorwicket-ajax-ver-1359989915360.js:116
  3. 
Wicket.Ajax.Call.failurewicket-ajax-ver-1359989915360.js:1108
  4. Wicket.Ajax.Call.loadedCallback
  
wicket-ajax-ver-1359989915360.js:1307
  5. Wicket.Ajax.Call.handleMultipartComplete


The main problem is when clicking multiple times the form onSubmit is
called (even if the text field has no value). It seems that
FeedbackMessages.hasError(...) returns false ...

Can somebody help me with this? I'm using wicket 1.5.9. The problem appear
without selecting a file in the FileUploadField. I just submit an empty
form multiple times.

Thank you.
-- 
_
Elvis Ciocoiu
Senior Consultant

Synthesys Consulting ROMANIA

address: http://www.synthesys.ro
e-mail: elvis.cioc...@synthesys.ro
mobile : (40) 0745 13 75 85

This message and any attachments contain information, which may be
confidential or privileged.
If you are not the intended recipient, please refrain from any
disclosure, copying, distribution or use of this information.
Please be aware that such actions are prohibited. If you have received
this transmission in error, kindly notify us by email to
off...@synthesys.ro. We appreciate your cooperation.


inmethod grid cachedPageCount

2013-02-24 Thread Ciocoiu Elvis
Hi,

I'm trying to select a item of inmethod grid after adding it in an ajax
call. Based on the current sort properties and filters, after I effectively
add the element in the database but in the same ajax call I'm determining
the element's page number and try to set it as current page in the grid. My
code works except in the case when the created element is in the last page
(the current grid page page count is cached internally in
AbstractPageableView.cachedPageCount). In this case the cachedPageCount is
equal to the create element page and when calling
grid.setCurrentPage(newPage) { ... if (page < 0 || page >= pageCount &&
pageCount > 0) ... } throws IndexOutOfBounds exception. I want to clear the
cachedPageCount somehow ... or maybe there is another solution? I want to
select the new page in the same ajax call. For the moment if I encounter
this situation I select the previous page ... but the my newly created
element is on the next one :(

Can somebody help me with some hints?

Thank you

-- 
_
Elvis Ciocoiu
Senior Consultant

Synthesys Consulting ROMANIA

address: http://www.synthesys.ro
e-mail: elvis.cioc...@synthesys.ro
mobile : (40) 0745 13 75 85

This message and any attachments contain information, which may be
confidential or privileged.
If you are not the intended recipient, please refrain from any
disclosure, copying, distribution or use of this information.
Please be aware that such actions are prohibited. If you have received
this transmission in error, kindly notify us by email to
off...@synthesys.ro. We appreciate your cooperation.


Re: wicket portlet with ajax

2012-10-05 Thread Ciocoiu Elvis
I solve it. The problem was the portlet-name must be equal with the string
used by the wicket filter. Thank you.

On Sat, Oct 6, 2012 at 1:25 AM, elvis.ciocoiu wrote:

> Hello,
>
> I'm stuck building a portlet using wicketstuff-portlet-1.5.8 and deploying
> it to liferay 6.1.1. My page renders ok but when I click an
> AjaxFallbackLink
> I got a FileNotFoundException: the requested resource (/dac-plugin/dac)  is
> not available.
>
> *web.xml fragment*
>
>
>
> *portlet.xml*
>
>
>
> I'm using liferay-web-xml-enabled=false so the wicket filter is kept in
> web.xml (the page is rendered correctly). The problem seems to be on any
> ajax call (I also use inmethod grid and when trying to resize a column I
> get
> the same exception ... with a different url).
>
> The exception is generated from rd.include(...) in
> WicketPortlet.processMimeResponseRequest(...):
>
>
>
> Can you please give me some hints? From wicketstuff-portlet's javadoc it
> seems that ajax is supported. Are there any limitations?
>
> Thank you.
>
>
> If it helps here is my stacktrace:
>
>
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/wicket-portlet-with-ajax-tp4652713.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
_
Elvis Ciocoiu
Senior Consultant

Synthesys Consulting ROMANIA

address: http://www.synthesys.ro
e-mail: elvis.cioc...@synthesys.ro
mobile : (40) 0745 13 75 85

This message and any attachments contain information, which may be
confidential or privileged.
If you are not the intended recipient, please refrain from any
disclosure, copying, distribution or use of this information.
Please be aware that such actions are prohibited. If you have received
this transmission in error, kindly notify us by email to
off...@synthesys.ro. We appreciate your cooperation.


Re: custom listeners

2012-05-17 Thread Ciocoiu Elvis
EditorContext {
void registerPropertyProvider(PropertyProvider propertyProvider);

 PropertyAccessor createPropertyAccessor(String propertyName);
...
}
...


public class SomePanel extends LazyPanel {
 @BasicField(lookup = true)
private City city;
 @BasicField(lookup = true, showActions = true)
private List persons;
 @Override
protected void onCreate() {
EditorContext editorContext = new EditorContext();
 PropertyAccessor selectedCityAccessor =
editorContext.createPropertyAccessor("city");
 selectedCityAccessor.registerPropertyChangeListener(new
PropertyChangeListener() {
@Override
void onPropertyChanged(City oldValue, City newValue) {
// do something here, for example refresh the personsPanel ... or filter it
}
});
 Panel cityPanel = editorContext.createFieldPanel("city");
Panel personsPanel = editorContext.createFieldPanel("persons");
 add(cityPanel);
add(personsPanel);
}

}


The problem is that the personsPanel generates some links for CRUD
operations on personsList ... and creates panels for creating/updating the
selected person. The editorContext is shared between these fieldPanels and
can register listeners ... my question where is the proper place to
unregister them?

For the moment I try to minimize  this usage but it's not only the
listeners mechanism that I'm fighting with ... The framework let me
register configurers at runtime that also must be unregistered ... so I'm
trying to find some sort of a callback to clean whatever the component did
at creation time.

I'll adapt it to events in 1.5 but right now I'm closing the 1.4 chapter.

On Thu, May 17, 2012 at 9:59 AM, Ciocoiu Elvis
wrote:

> Sorry for that... OnCreate is my method method ... Called only first time
> in onbeforender. I'll adapt it to event mechanism when upgrading to 1.5 but
> for now i'm using 1.4.
>
>
> On Wed, May 16, 2012 at 9:29 PM, Martin Grigorov wrote:
>
>> Hi,
>>
>> On Wed, May 16, 2012 at 7:43 PM, Ciocoiu Elvis
>>  wrote:
>> > I'm working on a framework that builds the user interface (input fields,
>> > labels, containers for layout, grids, ...) and one of the features is
>> that
>> > a custom field editor (for example a dropdown) can publish events (for
>> > example value changed). Internally when creating the field editor I
>> > register it it as a PropertyProvider somewhere ... in a shared
>> > EditorContext. So this EditorContext is a central point in building a
>> > particular form. One other fieldEditor can declare it's interest in
>> events
>> > of type valueCHanged published by the first field editor (the dropdown).
>> > Well in EditorContext I have a map of propertyProviders and
>> > PropertyChangeListeners ... But my framework generates also some links
>> for
>> > filtering and CRUD features ... and replaces dynamically the components
>> > (for example the user click on add link and the list of persons is
>> replaced
>> > with a form that creates a new person). FInally every dynamically
>> generated
>> > form can have a field that listen for property change so I need a way to
>> > unregister somewhere. Can I do it using the wicket component callbacks
>> ...
>> > like register the listener in onCreate and unregister it in onDestroy?
>> (I
>> > know that there is no onDestroy for component ... but maybe other
>> > callbacks).
>>
>> Which #onCreate() method do you mean ?
>> There is ISessionListener#onCreated() but nothing with that name for
>> the components.
>> Maybe you mean #onInitialize().
>>
>> Have you considered using Wicket's event system ?
>> See the code of http://www.wicket-library.com/wicket-examples/events
>> Basically, every Component can broadcast events with Component@send()
>> method and every Component, Behavior, RequestCycle, Session and
>> Application can listen for there events by overriding their
>> #onEvent(Event) method. Depending on the type of the event's payload
>> you can decide whether you should do something or just ignore it.
>>
>> >
>> >
>> > Thank you
>> > On Wed, May 16, 2012 at 4:41 PM, Fernando Wermus
>> > wrote:
>> >
>> >> May you explain further your user case? Thus, we can understand the
>> needs.
>> >>
>> >>
>> >> Fernando Wermus.
>> >>
>> >> www.linkedin.com/in/fernandowermus
>> >>
>> >>
>> >>
>> >> On Wed, May 16, 2012 at 7:00 AM, elvis.ciocoiu
>> >> wrote:
>> >>
>> >> > I'm working on something that uses custom information attached to 

Re: custom listeners

2012-05-17 Thread Ciocoiu Elvis
Sorry for that... OnCreate is my method method ... Called only first time
in onbeforender. I'll adapt it to event mechanism when upgrading to 1.5 but
for now i'm using 1.4.


On Wed, May 16, 2012 at 9:29 PM, Martin Grigorov wrote:

> Hi,
>
> On Wed, May 16, 2012 at 7:43 PM, Ciocoiu Elvis
>  wrote:
> > I'm working on a framework that builds the user interface (input fields,
> > labels, containers for layout, grids, ...) and one of the features is
> that
> > a custom field editor (for example a dropdown) can publish events (for
> > example value changed). Internally when creating the field editor I
> > register it it as a PropertyProvider somewhere ... in a shared
> > EditorContext. So this EditorContext is a central point in building a
> > particular form. One other fieldEditor can declare it's interest in
> events
> > of type valueCHanged published by the first field editor (the dropdown).
> > Well in EditorContext I have a map of propertyProviders and
> > PropertyChangeListeners ... But my framework generates also some links
> for
> > filtering and CRUD features ... and replaces dynamically the components
> > (for example the user click on add link and the list of persons is
> replaced
> > with a form that creates a new person). FInally every dynamically
> generated
> > form can have a field that listen for property change so I need a way to
> > unregister somewhere. Can I do it using the wicket component callbacks
> ...
> > like register the listener in onCreate and unregister it in onDestroy? (I
> > know that there is no onDestroy for component ... but maybe other
> > callbacks).
>
> Which #onCreate() method do you mean ?
> There is ISessionListener#onCreated() but nothing with that name for
> the components.
> Maybe you mean #onInitialize().
>
> Have you considered using Wicket's event system ?
> See the code of http://www.wicket-library.com/wicket-examples/events
> Basically, every Component can broadcast events with Component@send()
> method and every Component, Behavior, RequestCycle, Session and
> Application can listen for there events by overriding their
> #onEvent(Event) method. Depending on the type of the event's payload
> you can decide whether you should do something or just ignore it.
>
> >
> >
> > Thank you
> > On Wed, May 16, 2012 at 4:41 PM, Fernando Wermus
> > wrote:
> >
> >> May you explain further your user case? Thus, we can understand the
> needs.
> >>
> >>
> >> Fernando Wermus.
> >>
> >> www.linkedin.com/in/fernandowermus
> >>
> >>
> >>
> >> On Wed, May 16, 2012 at 7:00 AM, elvis.ciocoiu
> >> wrote:
> >>
> >> > I'm working on something that uses custom information attached to the
> >> > components and needs some sort of a listeners mechanism. The path
> taken
> >> was
> >> > to register the needed listeners in onCreate() of some component but I
> >> > don't
> >> > have a solution to unregister ... The onRemove doesn't help because
> it's
> >> > called when replacing the component with another in an ajax call. Is
> >> there
> >> > a
> >> > way to be notified that a component is reatached to component
> hierarchy?
> >> > I'm
> >> > using wicket 1.4. Is there another solution? Imagine that using a
> >> ListView
> >> > that creates elements and every element registers some listeners ... I
> >> need
> >> > to clear those listeners when the element is destroyed.
> >> > Thak you
> >> >
> >> > --
> >> > View this message in context:
> >> >
> >>
> http://apache-wicket.1842946.n4.nabble.com/custom-listeners-tp4641122.html
> >> > Sent from the Users forum mailing list archive at Nabble.com.
> >> >
> >> > -
> >> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >> > For additional commands, e-mail: users-h...@wicket.apache.org
> >> >
> >> >
> >>
> >
> >
> >
> > --
> > _
> > Elvis Ciocoiu
> > Senior Consultant
> >
> > Synthesys Consulting ROMANIA
> >
> > address: http://www.synthesys.ro
> > e-mail: elvis.cioc...@synthesys.ro
> > mobile : (40) 0745 13 75 85
> >
> > This message and any attachments contain information, which may be
> >

Re: custom listeners

2012-05-16 Thread Ciocoiu Elvis
I'm working on a framework that builds the user interface (input fields,
labels, containers for layout, grids, ...) and one of the features is that
a custom field editor (for example a dropdown) can publish events (for
example value changed). Internally when creating the field editor I
register it it as a PropertyProvider somewhere ... in a shared
EditorContext. So this EditorContext is a central point in building a
particular form. One other fieldEditor can declare it's interest in events
of type valueCHanged published by the first field editor (the dropdown).
Well in EditorContext I have a map of propertyProviders and
PropertyChangeListeners ... But my framework generates also some links for
filtering and CRUD features ... and replaces dynamically the components
(for example the user click on add link and the list of persons is replaced
with a form that creates a new person). FInally every dynamically generated
form can have a field that listen for property change so I need a way to
unregister somewhere. Can I do it using the wicket component callbacks ...
like register the listener in onCreate and unregister it in onDestroy? (I
know that there is no onDestroy for component ... but maybe other
callbacks).


Thank you
On Wed, May 16, 2012 at 4:41 PM, Fernando Wermus
wrote:

> May you explain further your user case? Thus, we can understand the needs.
>
>
> Fernando Wermus.
>
> www.linkedin.com/in/fernandowermus
>
>
>
> On Wed, May 16, 2012 at 7:00 AM, elvis.ciocoiu
> wrote:
>
> > I'm working on something that uses custom information attached to the
> > components and needs some sort of a listeners mechanism. The path taken
> was
> > to register the needed listeners in onCreate() of some component but I
> > don't
> > have a solution to unregister ... The onRemove doesn't help because it's
> > called when replacing the component with another in an ajax call. Is
> there
> > a
> > way to be notified that a component is reatached to component hierarchy?
> > I'm
> > using wicket 1.4. Is there another solution? Imagine that using a
> ListView
> > that creates elements and every element registers some listeners ... I
> need
> > to clear those listeners when the element is destroyed.
> > Thak you
> >
> > --
> > View this message in context:
> >
> http://apache-wicket.1842946.n4.nabble.com/custom-listeners-tp4641122.html
> > Sent from the Users forum mailing list archive at Nabble.com.
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>



-- 
_
Elvis Ciocoiu
Senior Consultant

Synthesys Consulting ROMANIA

address: http://www.synthesys.ro
e-mail: elvis.cioc...@synthesys.ro
mobile : (40) 0745 13 75 85

This message and any attachments contain information, which may be
confidential or privileged.
If you are not the intended recipient, please refrain from any
disclosure, copying, distribution or use of this information.
Please be aware that such actions are prohibited. If you have received
this transmission in error, kindly notify us by email to
off...@synthesys.ro. We appreciate your cooperation.