Making proper "form component"

2011-05-09 Thread Joseph Pachod
Hi

A while ago, we needed to do heavily reused form components and we ended
going for the FormComponentPanel through a dedicated DecoratedEdit.

However, we had some issues with it, which are:
- some methods one would have wanted to override, like clearInput or
getConvertedInput, are final. For example, for clearInput, some cleanInput
method was added there and there, but it breaks consistency...
- how to handle in form editing, where one form component relies on some
other component current input/value even if the form isn't validated and
updateModel called? We ended having a tmp object in our DecoratedEdit that
all sub classes had to use for "on going" edit. For the pre existing/default
formComponent, it was never clear to me what should be used to access this
in between state(especially since convertedInput is transient...). Sometime
it ended in convertInput/updateModel being called in a row to have the "on
going" state properly known...
- some surprises appeared as well, like the behavior of getModelComparator
- quite often we needed to make publicly available some inner components for
ajax behavior triggered from the outside

Overall, this way of wrapping FormComponent does mainly its job but came
with a few surprises and added burden. It felt a bit like wicket internal
tweaking without big picture.

In the end, I sometime wonder if we missed something obvious on how to do
proper "good form component citizen" or if this is the proper way...

Mind to share your view ?

Thanks in advance
best
joseph


Re: Question on sessions

2011-05-09 Thread Peter Karich
 ok stupid question. seems to be nothing related to android or wicket ...

it was a jetwick.com vs. www.jetwick.com issue so good old apache is the
bad man ;)

>  Hi,
>
>> and effectively bind it to a real session
> What do you mean with this?
>
> I'm having exactly the same issue, that a new session is opened after
> redirection
>  ... but only for android devices (built-in browser+opera)!? For desktop
> firefox it works.
>
> The redirect-url looks in both cases similar to:
> http://jetwick.com/login/callback/true/slide/true?oauth_token=oat&oauth_verifier=oav
>
> Is this a browser issue or probably a tomcat 6 issue when appending the
> session id? Or is this wicket (1.4.17) related?
>
> Here is the code from my Login class:
> Form form = new Form("form") {
> @Override public void onSubmit() {
> // create url:
> String url = ...;
> setRedirect(true);
> getRequestCycle().setRequestTarget(new RedirectRequestTarget(url));
> }
> ...
>
> When receiving the redirect-url I'm doing the following in my login class:
>
> String callback = parameters.getString("callback");
> if ("true".equals(callback)) {
>parameters.remove("callback");
>setRedirect(true);
>setResponsePage(new Jetslide(parameters));
>return;
> }
>
> Regards,
> Peter.
>
> BTW: I was having session related issues with desktop browsers when
> doing setResponsePage(Jetslide.class, params) instead of
> setResponsePage(new Jetslide(params)) !?
>
>> just and idea, declare an anonymous role in your app. and effectively bind
>> it to a real session, once the token is obtained elevate the users right.
>>
>> On Mon, Apr 25, 2011 at 6:35 PM, nimmy [via Apache Wicket] <
>> ml-node+3474193-959482693-65...@n4.nabble.com> wrote:
>>
>>> Hi,
>>>
>>> I have a user who has a temporary session (i.e. is not logged in).  I need
>>> to redirect him/her to an external page for to get an access token (e.g.
>>> Facebook/Flickr access token).
>>>
>>> Is there anyway to keep the same session? I find that the user has a
>>> different session after the redirection.
>>>
>>> Thanks for your help.
>>>
>>> Cheers,
>>> Nim
>>>
>>> --
>>>  If you reply to this email, your message will be added to the discussion
>>> below:
>>>
>>> http://apache-wicket.1842946.n4.nabble.com/Question-on-sessions-tp3474193p3474193.html
>>>  To start a new topic under Apache Wicket, email
>>> ml-node+1842946-398011874-65...@n4.nabble.com
>>> To unsubscribe from Apache Wicket, click 
>>> here.
>>>
>>>
>>
>


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



Re: Question on sessions

2011-05-09 Thread Peter Karich
 Hi,

> and effectively bind it to a real session

What do you mean with this?

I'm having exactly the same issue, that a new session is opened after
redirection
 ... but only for android devices (built-in browser+opera)!? For desktop
firefox it works.

The redirect-url looks in both cases similar to:
http://jetwick.com/login/callback/true/slide/true?oauth_token=oat&oauth_verifier=oav

Is this a browser issue or probably a tomcat 6 issue when appending the
session id? Or is this wicket (1.4.17) related?

Here is the code from my Login class:
Form form = new Form("form") {
@Override public void onSubmit() {
// create url:
String url = ...;
setRedirect(true);
getRequestCycle().setRequestTarget(new RedirectRequestTarget(url));
}
...

When receiving the redirect-url I'm doing the following in my login class:

String callback = parameters.getString("callback");
if ("true".equals(callback)) {
   parameters.remove("callback");
   setRedirect(true);
   setResponsePage(new Jetslide(parameters));
   return;
}

Regards,
Peter.

BTW: I was having session related issues with desktop browsers when
doing setResponsePage(Jetslide.class, params) instead of
setResponsePage(new Jetslide(params)) !?

> just and idea, declare an anonymous role in your app. and effectively bind
> it to a real session, once the token is obtained elevate the users right.
>
> On Mon, Apr 25, 2011 at 6:35 PM, nimmy [via Apache Wicket] <
> ml-node+3474193-959482693-65...@n4.nabble.com> wrote:
>
>> Hi,
>>
>> I have a user who has a temporary session (i.e. is not logged in).  I need
>> to redirect him/her to an external page for to get an access token (e.g.
>> Facebook/Flickr access token).
>>
>> Is there anyway to keep the same session? I find that the user has a
>> different session after the redirection.
>>
>> Thanks for your help.
>>
>> Cheers,
>> Nim
>>
>> --
>>  If you reply to this email, your message will be added to the discussion
>> below:
>>
>> http://apache-wicket.1842946.n4.nabble.com/Question-on-sessions-tp3474193p3474193.html
>>  To start a new topic under Apache Wicket, email
>> ml-node+1842946-398011874-65...@n4.nabble.com
>> To unsubscribe from Apache Wicket, click 
>> here.
>>
>>
>
>


-- 
http://jetwick.com open twitter search


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



Re: Children components

2011-05-09 Thread andrea del bene

Hi,

iterator() method returns an iterator that iterates through children. 
Maybe is what you need.



Wicketers,



How can I get a list of children components, for example, I need modify
some things

on the children components of a Form.



Debuging I saw an attribute "children" but I've not found a method that
can list

that components for me.



How can I do that?



Thanks

Vitor



PS: My Wicket version is 1.4.15.





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



Re: Children components

2011-05-09 Thread Martin Grigorov
On Mon, May 9, 2011 at 8:58 PM, Pedro Santos  wrote:
> Hi Vitor, use an IVisitor
That is - #visitChildren()
>
> On Mon, May 9, 2011 at 3:50 PM, Vitor Granzinoli Vellozo
>  wrote:
>>
>>
>> Wicketers,
>>
>>
>>
>> How can I get a list of children components, for example, I need modify
>> some things
>>
>> on the children components of a Form.
>>
>>
>>
>> Debuging I saw an attribute "children" but I've not found a method that
>> can list
>>
>> that components for me.
>>
>>
>>
>> How can I do that?
>>
>>
>>
>> Thanks
>>
>> Vitor
>>
>>
>>
>> PS: My Wicket version is 1.4.15.
>>
>>
>
>
>
> --
> Pedro Henrique Oliveira dos Santos
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>



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

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



Re: Children components

2011-05-09 Thread Pedro Santos
Hi Vitor, use an IVisitor

On Mon, May 9, 2011 at 3:50 PM, Vitor Granzinoli Vellozo
 wrote:
>
>
> Wicketers,
>
>
>
> How can I get a list of children components, for example, I need modify
> some things
>
> on the children components of a Form.
>
>
>
> Debuging I saw an attribute "children" but I've not found a method that
> can list
>
> that components for me.
>
>
>
> How can I do that?
>
>
>
> Thanks
>
> Vitor
>
>
>
> PS: My Wicket version is 1.4.15.
>
>



-- 
Pedro Henrique Oliveira dos Santos

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



Children components

2011-05-09 Thread Vitor Granzinoli Vellozo
 

Wicketers,

 

How can I get a list of children components, for example, I need modify
some things

on the children components of a Form.

 

Debuging I saw an attribute "children" but I've not found a method that
can list

that components for me.

 

How can I do that?

 

Thanks

Vitor

 

PS: My Wicket version is 1.4.15.



Re: Refreshing loadable detachable model object inside an ajax call

2011-05-09 Thread lucast
I have finally solved this issue.
In my original scenario, I was implementing an anonymous class and inside
that anonymous class I was calling parentService().load(Parent.class, id);.
To solve this, created an inner class to replace the anonymous class and
when initialising the inner class objects, I passed the containing panel's
model (which is a loadableDetachableModel object).
I simply called the (Parent) model.getObject();  on the inner class function
that responds to ajax calls in order to have a fresh parent object from the
db.

That solved all the problems mentioned in my original post.


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Refreshing-loadable-detachable-model-object-inside-an-ajax-call-tp3446979p3509490.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Problems with @SpringBean

2011-05-09 Thread Martin Grigorov
transient is right.
for the second problem you need to upgrade to newer version

On Mon, May 9, 2011 at 3:55 PM, Vitor Granzinoli Vellozo
 wrote:
>
> Martin,
>
> I'm using the wicket-1.4.15 version, not from my choice, it's company 
> structure.
> So, using this version, must I use "transient", right?
>
> Thanks,
> Vitor
>
>
>
> -Mensagem original-
> De: Martin Grigorov [mailto:mgrigo...@apache.org]
> Enviada em: segunda-feira, 9 de maio de 2011 10:29
> Para: users@wicket.apache.org
> Assunto: Re: Problems with @SpringBean
>
> This is fixed in latest versions of Wicket.
> Check the release notes at
> https://issues.apache.org/jira/browse/WICKET#selectedTab=com.atlassian.jira.plugin.system.project%3Achangelog-panel
> or 
> https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12310561&version=12316329
> I'm not sure whether it is 1.4.17 or 1.4.18 (not releases yet)
>
> On Mon, May 9, 2011 at 3:18 PM, Vitor Granzinoli Vellozo
>  wrote:
>>
>> Martin,
>>
>> Thanks for quickly response!
>>
>> I removed all "transient" from these objects. Now, when I click back, it's 
>> ok! But, when I click to go forward appears
>> that below error, something relative about deserialization.
>>
>> What could be?
>>
>> Thanks!
>> Vitor
>>
>>
>> 2011-05-09 10:13:36,185 [tomcat-http--16] TEST-APP ERROR 
>> org.apache.wicket.RequestCycle                               - Could not 
>> deserialize object using 
>> `org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory` 
>> object factory
>> java.lang.RuntimeException: Could not deserialize object using 
>> `org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory` 
>> object factory
>>        at 
>> org.apache.wicket.util.lang.Objects.byteArrayToObject(Objects.java:435) 
>> ~[na:na]
>>        at 
>> org.apache.wicket.protocol.http.pagestore.AbstractPageStore.deserializePage(AbstractPageStore.java:234)
>>  ~[na:na]
>>        at 
>> org.apache.wicket.protocol.http.pagestore.DiskPageStore.getPage(DiskPageStore.java:735)
>>  ~[na:na]
>>        at 
>> org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLevelCachePageMap.get(SecondLevelCacheSessionStore.java:310)
>>  ~[na:na]
>>        at org.apache.wicket.Session.getPage(Session.java:774) ~[na:na]
>>        at 
>> org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(AbstractRequestCycleProcessor.java:458)
>>  ~[na:na]
>>        at 
>> org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:144)
>>  ~[na:na]
>>        at org.apache.wicket.RequestCycle.step(RequestCycle.java:1310) [na:na]
>>        at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1436) 
>> [na:na]
>>        at org.apache.wicket.RequestCycle.request(RequestCycle.java:545) 
>> [na:na]
>>        at 
>> org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:486) 
>> [na:na]
>>        at 
>> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:319) 
>> [na:na]
>>        at 
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>>  [na:na]
>>        at 
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>>  [na:na]
>>        at 
>> org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:83)
>>  [na:na]
>>        at 
>> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
>>  [na:na]
>>        at 
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>>  [na:na]
>>        at 
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>>  [na:na]
>>        at 
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>>  [na:na]
>>        at 
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>>  [na:na]
>>        at 
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
>>  [na:na]
>>        at 
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
>>  [na:na]
>>        at 
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
>>  [na:na]
>>        at 
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
>>  [na:na]
>>        at 
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>>  [na:na]
>>        at 
>> com.springsource.insight.collection.tcserver.request.HttpRequestOperationCollectionValve.traceNextValve(HttpRequestOperationCollectionValve.java:92)
>>  [na:na]
>>        at 
>> com.springsource.insight.collection.tcserver.request.HttpRequestOperationCollectionValve.invoke(HttpRequestOperationCollectionValve.java:74)
>>  [na:na]
>>        at 
>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) 
>> [na:

RES: Problems with @SpringBean

2011-05-09 Thread Vitor Granzinoli Vellozo

Martin,

I'm using the wicket-1.4.15 version, not from my choice, it's company structure.
So, using this version, must I use "transient", right?

Thanks,
Vitor



-Mensagem original-
De: Martin Grigorov [mailto:mgrigo...@apache.org] 
Enviada em: segunda-feira, 9 de maio de 2011 10:29
Para: users@wicket.apache.org
Assunto: Re: Problems with @SpringBean

This is fixed in latest versions of Wicket.
Check the release notes at
https://issues.apache.org/jira/browse/WICKET#selectedTab=com.atlassian.jira.plugin.system.project%3Achangelog-panel
or 
https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12310561&version=12316329
I'm not sure whether it is 1.4.17 or 1.4.18 (not releases yet)

On Mon, May 9, 2011 at 3:18 PM, Vitor Granzinoli Vellozo
 wrote:
>
> Martin,
>
> Thanks for quickly response!
>
> I removed all "transient" from these objects. Now, when I click back, it's 
> ok! But, when I click to go forward appears
> that below error, something relative about deserialization.
>
> What could be?
>
> Thanks!
> Vitor
>
>
> 2011-05-09 10:13:36,185 [tomcat-http--16] TEST-APP ERROR 
> org.apache.wicket.RequestCycle                               - Could not 
> deserialize object using 
> `org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory` 
> object factory
> java.lang.RuntimeException: Could not deserialize object using 
> `org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory` 
> object factory
>        at 
> org.apache.wicket.util.lang.Objects.byteArrayToObject(Objects.java:435) 
> ~[na:na]
>        at 
> org.apache.wicket.protocol.http.pagestore.AbstractPageStore.deserializePage(AbstractPageStore.java:234)
>  ~[na:na]
>        at 
> org.apache.wicket.protocol.http.pagestore.DiskPageStore.getPage(DiskPageStore.java:735)
>  ~[na:na]
>        at 
> org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLevelCachePageMap.get(SecondLevelCacheSessionStore.java:310)
>  ~[na:na]
>        at org.apache.wicket.Session.getPage(Session.java:774) ~[na:na]
>        at 
> org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(AbstractRequestCycleProcessor.java:458)
>  ~[na:na]
>        at 
> org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:144)
>  ~[na:na]
>        at org.apache.wicket.RequestCycle.step(RequestCycle.java:1310) [na:na]
>        at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1436) [na:na]
>        at org.apache.wicket.RequestCycle.request(RequestCycle.java:545) 
> [na:na]
>        at 
> org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:486) 
> [na:na]
>        at 
> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:319) 
> [na:na]
>        at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>  [na:na]
>        at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>  [na:na]
>        at 
> org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:83)
>  [na:na]
>        at 
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
>  [na:na]
>        at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>  [na:na]
>        at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>  [na:na]
>        at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>  [na:na]
>        at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>  [na:na]
>        at 
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
>  [na:na]
>        at 
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
>  [na:na]
>        at 
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) 
> [na:na]
>        at 
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) 
> [na:na]
>        at 
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>  [na:na]
>        at 
> com.springsource.insight.collection.tcserver.request.HttpRequestOperationCollectionValve.traceNextValve(HttpRequestOperationCollectionValve.java:92)
>  [na:na]
>        at 
> com.springsource.insight.collection.tcserver.request.HttpRequestOperationCollectionValve.invoke(HttpRequestOperationCollectionValve.java:74)
>  [na:na]
>        at 
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) 
> [na:na]
>        at 
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857) 
> [na:na]
>        at 
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
>  [na:na]
>        at 
> org.apache.tomcat.util.net.JIoEndpoint$SocketProcesso

Re: building dynamic charts in wicket

2011-05-09 Thread lambdad...@gmail.com
Thanks for the prompt reply!

In the given scenario, the charts on the central web application reflects
the status of the individual machines which either shown as a mashes of the
charts which are suppose to be hosted on the individual machines.
Alternatively, the metrics could be"push"ed directly to the central wicket
application or pulled periodically through some remote interface, which (the
central app) then can generate the chart - event based.

The former approach is lightweight but latter has some merits as well
(probably).

While on hunt, I have found the following two links. But unsure if the
libraries are fresh enough to be  consumed :)

wicket mashup
http://code.google.com/p/wicket-mashup/

from the Wicket stuff source base
https://github.com/wicketstuff/core/tree/master/jdk-1.5-parent/googlecharts-parent/googlecharts-examples/src/main/java/org/wicketstuff/googlecharts/examples

Daku

On Mon, May 9, 2011 at 2:41 PM, Wilhelmsen Tor Iver wrote:

> Sounds like a combo of a dynamic image resource component (using e.g.
> JFreeChart or the like) and an AjaxSelfUpdatingTimerBehavior is needed.
>
> mvh
> - Tor Iver Wilhelmsen, Arrive AS
>
> -Original Message-
> From: lambdad...@gmail.com [mailto:lambdad...@googlemail.com]
> Sent: 9. mai 2011 14:32
> To: users@wicket.apache.org
> Subject: building dynamic charts in wicket
>
> Hi,
>
> I would like add an extra page to my Web application which shows a graph
> similar to jconsole or google charts (displaying time series analysis). It
> is required to be dynamic in nature which means the graph should update
> itself (using wicket ajax) as soon as the new new readings/metrics are
> available. Are there any efforts have been made so far relevant to this
> direction?
>
> cheers
> Daku
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Problems with @SpringBean

2011-05-09 Thread Martin Grigorov
This is fixed in latest versions of Wicket.
Check the release notes at
https://issues.apache.org/jira/browse/WICKET#selectedTab=com.atlassian.jira.plugin.system.project%3Achangelog-panel
or 
https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12310561&version=12316329
I'm not sure whether it is 1.4.17 or 1.4.18 (not releases yet)

On Mon, May 9, 2011 at 3:18 PM, Vitor Granzinoli Vellozo
 wrote:
>
> Martin,
>
> Thanks for quickly response!
>
> I removed all "transient" from these objects. Now, when I click back, it's 
> ok! But, when I click to go forward appears
> that below error, something relative about deserialization.
>
> What could be?
>
> Thanks!
> Vitor
>
>
> 2011-05-09 10:13:36,185 [tomcat-http--16] TEST-APP ERROR 
> org.apache.wicket.RequestCycle                               - Could not 
> deserialize object using 
> `org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory` 
> object factory
> java.lang.RuntimeException: Could not deserialize object using 
> `org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory` 
> object factory
>        at 
> org.apache.wicket.util.lang.Objects.byteArrayToObject(Objects.java:435) 
> ~[na:na]
>        at 
> org.apache.wicket.protocol.http.pagestore.AbstractPageStore.deserializePage(AbstractPageStore.java:234)
>  ~[na:na]
>        at 
> org.apache.wicket.protocol.http.pagestore.DiskPageStore.getPage(DiskPageStore.java:735)
>  ~[na:na]
>        at 
> org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLevelCachePageMap.get(SecondLevelCacheSessionStore.java:310)
>  ~[na:na]
>        at org.apache.wicket.Session.getPage(Session.java:774) ~[na:na]
>        at 
> org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(AbstractRequestCycleProcessor.java:458)
>  ~[na:na]
>        at 
> org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:144)
>  ~[na:na]
>        at org.apache.wicket.RequestCycle.step(RequestCycle.java:1310) [na:na]
>        at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1436) [na:na]
>        at org.apache.wicket.RequestCycle.request(RequestCycle.java:545) 
> [na:na]
>        at 
> org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:486) 
> [na:na]
>        at 
> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:319) 
> [na:na]
>        at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>  [na:na]
>        at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>  [na:na]
>        at 
> org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:83)
>  [na:na]
>        at 
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
>  [na:na]
>        at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>  [na:na]
>        at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>  [na:na]
>        at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>  [na:na]
>        at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>  [na:na]
>        at 
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
>  [na:na]
>        at 
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
>  [na:na]
>        at 
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) 
> [na:na]
>        at 
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) 
> [na:na]
>        at 
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>  [na:na]
>        at 
> com.springsource.insight.collection.tcserver.request.HttpRequestOperationCollectionValve.traceNextValve(HttpRequestOperationCollectionValve.java:92)
>  [na:na]
>        at 
> com.springsource.insight.collection.tcserver.request.HttpRequestOperationCollectionValve.invoke(HttpRequestOperationCollectionValve.java:74)
>  [na:na]
>        at 
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) 
> [na:na]
>        at 
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857) 
> [na:na]
>        at 
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
>  [na:na]
>        at 
> org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:409)
>  [na:na]
>        at 
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:651)
>  [na:1.5.0_22]
>        at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:676)
>  [na:1.5.0_22]
>        at java.lang.Thread.run(Thread.java:595) [na:1.5.0_22]
> Caused by: java.io.InvalidClass

RES: Problems with @SpringBean

2011-05-09 Thread Vitor Granzinoli Vellozo

Martin,

Thanks for quickly response!

I removed all "transient" from these objects. Now, when I click back, it's ok! 
But, when I click to go forward appears
that below error, something relative about deserialization.

What could be?

Thanks!
Vitor


2011-05-09 10:13:36,185 [tomcat-http--16] TEST-APP ERROR 
org.apache.wicket.RequestCycle   - Could not 
deserialize object using 
`org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory` 
object factory
java.lang.RuntimeException: Could not deserialize object using 
`org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory` 
object factory
at 
org.apache.wicket.util.lang.Objects.byteArrayToObject(Objects.java:435) ~[na:na]
at 
org.apache.wicket.protocol.http.pagestore.AbstractPageStore.deserializePage(AbstractPageStore.java:234)
 ~[na:na]
at 
org.apache.wicket.protocol.http.pagestore.DiskPageStore.getPage(DiskPageStore.java:735)
 ~[na:na]
at 
org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLevelCachePageMap.get(SecondLevelCacheSessionStore.java:310)
 ~[na:na]
at org.apache.wicket.Session.getPage(Session.java:774) ~[na:na]
at 
org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(AbstractRequestCycleProcessor.java:458)
 ~[na:na]
at 
org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:144)
 ~[na:na]
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1310) [na:na]
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1436) [na:na]
at org.apache.wicket.RequestCycle.request(RequestCycle.java:545) [na:na]
at 
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:486) 
[na:na]
at 
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:319) 
[na:na]
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 [na:na]
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 [na:na]
at 
org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:83)
 [na:na]
at 
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
 [na:na]
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 [na:na]
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 [na:na]
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 [na:na]
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 [na:na]
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
 [na:na]
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
 [na:na]
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) 
[na:na]
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) 
[na:na]
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 [na:na]
at 
com.springsource.insight.collection.tcserver.request.HttpRequestOperationCollectionValve.traceNextValve(HttpRequestOperationCollectionValve.java:92)
 [na:na]
at 
com.springsource.insight.collection.tcserver.request.HttpRequestOperationCollectionValve.invoke(HttpRequestOperationCollectionValve.java:74)
 [na:na]
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) 
[na:na]
at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857) 
[na:na]
at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
 [na:na]
at 
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:409)
 [na:na]
at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:651)
 [na:1.5.0_22]
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:676) 
[na:1.5.0_22]
at java.lang.Thread.run(Thread.java:595) [na:1.5.0_22]
Caused by: java.io.InvalidClassException: 
org.test.contact.facade.ContactServiceFacade; could not resolve class 
[org.test.contacts.facade.ContactServiceFacade] when deserializing proxy
at 
org.apache.wicket.proxy.LazyInitProxyFactory$ProxyReplacement.readResolve(LazyInitProxyFactory.java:236)
 ~[na:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
~[na:1.5.0_22]
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
~[na:1.5.0_22]
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 ~[na:1.5.0_22]
at java.

Re: Problems with @SpringBean

2011-05-09 Thread James Carman
Don't make it transient
On May 9, 2011 8:48 AM, "Vitor Granzinoli Vellozo" <
vitor.vell...@cpmbraxis.com> wrote:
>
>
> Hi all,
>
>
>
> I'm new here, and I have problem with @SpringBean when I click in
> browser back Button.
>
> The Spring resource come null... when I load the Page first time,
> everything works, but when
>
> go back, the Spring component comes null.
>
>
>
> It happens when I call the Spring component in load() method of a
> LoadableDetachabelModel.
>
> It's strange for me, because it seems correct, it works firts time.
>
>
>
> Below the code:
>
>
>
> @SpringBean
>
> private transient ContactServiceFacade contactServiceFacade;
>
>
>
> class ContactListModel extends LoadableDetachableModel> {
>
> private static final long serialVersionUID = 2171287027239366394L;
>
>
>
> @Override
>
> public List load() {
>
> return contactServiceFacade.listContacts(); //Here firt time
> works, on back is null.
>
> }
>
> }
>
>
>
> Regards,
>
> Vitor
>
>
>
>
>


Re: Problems with @SpringBean

2011-05-09 Thread Martin Grigorov
Remove 'transient'
The injected bean is a JDK Proxy which is serializable and lightweight

On Mon, May 9, 2011 at 2:46 PM, Vitor Granzinoli Vellozo
 wrote:
>
>
> Hi all,
>
>
>
> I'm new here, and I have problem with @SpringBean when I click in
> browser back Button.
>
> The Spring resource come null... when I load the Page first time,
> everything works, but when
>
> go back, the Spring component comes null.
>
>
>
> It happens when I call the Spring component in load() method of a
> LoadableDetachabelModel.
>
> It's strange for me, because it seems correct, it works firts time.
>
>
>
> Below the code:
>
>
>
> @SpringBean
>
> private transient ContactServiceFacade contactServiceFacade;
>
>
>
> class ContactListModel extends LoadableDetachableModel> {
>
>      private static final long serialVersionUID = 2171287027239366394L;
>
>
>
>      @Override
>
>      public List load() {
>
>            return contactServiceFacade.listContacts(); //Here firt time
> works, on back is null.
>
>      }
>
> }
>
>
>
> Regards,
>
> Vitor
>
>
>
>
>
>



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

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



Problems with @SpringBean

2011-05-09 Thread Vitor Granzinoli Vellozo
 

Hi all,

 

I'm new here, and I have problem with @SpringBean when I click in
browser back Button.

The Spring resource come null... when I load the Page first time,
everything works, but when

go back, the Spring component comes null.

 

It happens when I call the Spring component in load() method of a
LoadableDetachabelModel.

It's strange for me, because it seems correct, it works firts time.

 

Below the code:

 

@SpringBean

private transient ContactServiceFacade contactServiceFacade;

 

class ContactListModel extends LoadableDetachableModel> {

  private static final long serialVersionUID = 2171287027239366394L;

 

  @Override

  public List load() {

return contactServiceFacade.listContacts(); //Here firt time
works, on back is null.

  }

}

 

Regards,

Vitor

 

 



RE: building dynamic charts in wicket

2011-05-09 Thread Wilhelmsen Tor Iver
Sounds like a combo of a dynamic image resource component (using e.g. 
JFreeChart or the like) and an AjaxSelfUpdatingTimerBehavior is needed.

mvh
- Tor Iver Wilhelmsen, Arrive AS

-Original Message-
From: lambdad...@gmail.com [mailto:lambdad...@googlemail.com] 
Sent: 9. mai 2011 14:32
To: users@wicket.apache.org
Subject: building dynamic charts in wicket

Hi,

I would like add an extra page to my Web application which shows a graph
similar to jconsole or google charts (displaying time series analysis). It
is required to be dynamic in nature which means the graph should update
itself (using wicket ajax) as soon as the new new readings/metrics are
available. Are there any efforts have been made so far relevant to this
direction?

cheers
Daku

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



Re: building dynamic charts in wicket

2011-05-09 Thread Martin Makundi
You mean regular ajax or ajax push
(http://www.mail-archive.com/users@wicket.apache.org/msg49259.html)?

**
Martin

2011/5/9 lambdad...@gmail.com :
> Hi,
>
> I would like add an extra page to my Web application which shows a graph
> similar to jconsole or google charts (displaying time series analysis). It
> is required to be dynamic in nature which means the graph should update
> itself (using wicket ajax) as soon as the new new readings/metrics are
> available. Are there any efforts have been made so far relevant to this
> direction?
>
> cheers
> Daku
>

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



building dynamic charts in wicket

2011-05-09 Thread lambdad...@gmail.com
Hi,

I would like add an extra page to my Web application which shows a graph
similar to jconsole or google charts (displaying time series analysis). It
is required to be dynamic in nature which means the graph should update
itself (using wicket ajax) as soon as the new new readings/metrics are
available. Are there any efforts have been made so far relevant to this
direction?

cheers
Daku