org.apache.wicket.WicketRuntimeException: Unable to write the response

2010-06-30 Thread tommaso


Hello,

I have just noticed that the various components I have that render the same 
underlying data, when the exception occurs, then they all have a different 
instance of the underlying data.


I have used:

add(new CompnentX(getSession().getMyData()))

so they were all constructed with the same data from the session object 
(final reference). However, after the exception occurs, different components 
have different underlying data. I have a workaround, before rendering I have 
to call things replace(new CompnentX(getSession().getMyData())), this is 
a workaround.


Not sure what's happening and why I have to sprinkle the code with replace 
or for listviews setList before rendering is suffiicient.


Thanks and best regards,


Tommaso


- Original Message - 
From: Tommy

To: users@wicket.apache.org
Sent: Tuesday, June 29, 2010 10:57 PM
Subject: Re: org.apache.wicket.WicketRuntimeException: Unable to write the 
response




Martjin,

Thanks, I suppose that solves part of my problem. The wait is only 1 sec 
or so, so using a lazy panel is a great idea, but does not eliminate my 
underliying problem. For instance the user can still press the refresh 
button causing the same exception and the same problem (some sort of 
corruption, things do not work well anymore, for example I have various 
wicket-ids that render differently but based on the same data and some of 
those stop rendering consistent things).


As I am not familiar with wicket yet, I am struggling to understand what's 
happening under the hood. I am also not too familiar with the threading 
model. However, I am not even sure it's concurrency problem yet.


Some of those parts using the same data  that I have mentioned above are 
JFreeCharts and if I take those out, then the problem seems to go away 
completely. Even by putting a sleep 1000 in the rendering code for the 
list view (table), I cannot reproduce the problem (and not even the 
exception to be fair).


JFreeChartImage extends Image and I took the sample from 
https://cwiki.apache.org/WICKET/jfreechart-and-wicket-example.html



Thanks,

Tommy


- Original Message - 
From: Martijn Dashorst To: users@wicket.apache.org

Sent: Tuesday, June 29, 2010 8:05 AM
Subject: Re: org.apache.wicket.WicketRuntimeException: Unable to write the 
response



Don't let the user wait. Use a lazy panel to render the long stuff in
the background, or if it even takes longer than that, calculate your
model data in a background thread and use a timer to poll and see if
the thread has finished, and use the result in a panel that you
replace on your page.

Martijn

On Tue, Jun 29, 2010 at 8:45 AM, Tommy wrote:

Hello,

This is my first post. I am not a web developer, I usually develop other 
kinds of systems, but for a quick project I have to do, I looked at JSF 
and I really did not like it. Finally, I have come across wicket and it 
was love at first sight.


Now, so far everything has been straightforward, but I am now facing the 
first puzzle...


I have a page that takes a while to render and, while it's rendering, if 
the user does anything, then I get:


org.apache.wicket.WicketRuntimeException: Unable to write the response
at org.apache.wicket.Response.handleException(Response.java:286)
at org.apache.wicket.Response.write(Response.java:310)
at 
org.apache.wicket.request.target.resource.ResourceStreamRequestTarget.respond(ResourceStreamRequestTarget.java:160)
at 
org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:105)

at org.apache.wicket.RequestCycle.respond(RequestCycle.java:1267)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1334)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1428)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
at 
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:479)
at 
org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:138)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
 etc ...
Caused by: EOFException(java.net.SocketException: Connection reset by 
peer: socket write error)
at 
org.mortbay.http.BufferedOutputStream.flush(BufferedOutputStream.java:195)
at 
org.mortbay.util.ByteBufferOutputStream.ensureSpareCapacity(ByteBufferOutputStream.java:342)
at 
org.mortbay.util.ByteBufferOutputStream.write(ByteBufferOutputStream.java:182)
at 
org.mortbay.http.BufferedOutputStream.write(BufferedOutputStream.java:135)

at org.mortbay.http.HttpOutputStream.write(HttpOutputStream.java:442)
at org.mortbay.jetty.servlet.ServletOut.write(ServletOut.java:42)
at org.apache.wicket.util.io.Streams.copy(Streams.java:121)
at org.apache.wicket.util.io.Streams.copy(Streams.java:88)
at org.apache.wicket.Response.write(Response.java:306)
... 23 more

00:39:32.335 WARN!! Invalid length: Content-Length=9491 written=4096 for 
http://127.0.0.1:8081/quickstart/app/

ERROR - WicketFilter - closing the buffer error

org.apache.wicket.WicketRuntimeException: Unable to write the response

2010-06-29 Thread tommaso
Hello,

This is my first post. I am not a web developer, I usually develop other kinds 
of systems, but for a quick project I have to do, I looked at JSF and I really 
did not like it. Finally, I have come across wicket and it was love at first 
sight. 

Now, so far everything has been straightforward, but I am now facing the first 
puzzle...

I have a page that takes a while to render and, while it's rendering, if the 
user does anything, then I get:

org.apache.wicket.WicketRuntimeException: Unable to write the response
 at org.apache.wicket.Response.handleException(Response.java:286)
 at org.apache.wicket.Response.write(Response.java:310)
 at 
org.apache.wicket.request.target.resource.ResourceStreamRequestTarget.respond(ResourceStreamRequestTarget.java:160)
 at 
org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:105)
 at org.apache.wicket.RequestCycle.respond(RequestCycle.java:1267)
 at org.apache.wicket.RequestCycle.step(RequestCycle.java:1334)
 at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1428)
 at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
 at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:479)
 at org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:138)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
 etc ...
Caused by: EOFException(java.net.SocketException: Connection reset by peer: 
socket write error)
 at org.mortbay.http.BufferedOutputStream.flush(BufferedOutputStream.java:195)
 at 
org.mortbay.util.ByteBufferOutputStream.ensureSpareCapacity(ByteBufferOutputStream.java:342)
 at 
org.mortbay.util.ByteBufferOutputStream.write(ByteBufferOutputStream.java:182)
 at org.mortbay.http.BufferedOutputStream.write(BufferedOutputStream.java:135)
 at org.mortbay.http.HttpOutputStream.write(HttpOutputStream.java:442)
 at org.mortbay.jetty.servlet.ServletOut.write(ServletOut.java:42)
 at org.apache.wicket.util.io.Streams.copy(Streams.java:121)
 at org.apache.wicket.util.io.Streams.copy(Streams.java:88)
 at org.apache.wicket.Response.write(Response.java:306)
 ... 23 more

00:39:32.335 WARN!! Invalid length: Content-Length=9491 written=4096 for 
http://127.0.0.1:8081/quickstart/app/
ERROR - WicketFilter   - closing the buffer error
java.lang.IllegalStateException
 at 
org.mortbay.jetty.servlet.ServletHttpResponse.getWriter(ServletHttpResponse.java:540)
 at org.apache.wicket.protocol.http.WebResponse.write(WebResponse.java:392)
 etc ...

Now, this would be ok, I suppose. The user clicks something while wicket is 
sending stuff and that operation has to abort. However, this except really 
corrupts things, after this exception the web page behaves very strangely, some 
of wicket:ids do not update well anymore etc...
In the book Wicket in Action it says that a page is single threaded and all I 
am doing here is using one single page, one sesion, two request, quickly one 
after the other, before the first one completes.

I am using: INFO  - WebApplication - [QuickStartApplication] 
Started Wicket version 1.4.8 in development mode
And I have downlowded a hello world project (quickstart) adapted it to 1.4.8 
(generics pretty much) and not yet refactored things as I am concentrating on 
business logic for a quick prototype. The webserver is jetty.

Ok, sorry for the long post, and I hope someone of you will be able to give me 
a couple of hints/tips (tried to google it, but did not find much).


Thanks,

Tommy




Re: org.apache.wicket.WicketRuntimeException: Unable to write the response

2010-06-29 Thread tommaso

Marjin,

Thanks, I suppose that solves part of my problem. The wait is only 1 sec or 
so, so using a lazy panel is a great idea, but does not eliminate my 
underliying problem. For instance the user can still press the refresh 
button causing the same exception and the same problem (some sort of 
corruption, things do not work well anymore, for example I have various 
wicket-ids that render differently but based on the same data and some of 
those stop rendering consistent things).


As I am not familiar with wicket yet, I am struggling to understand what's 
happening under the hood. I am also not too familiar with the threading 
model. However, I am not even sure it's concurrency problem yet.


Some of those parts using the same data  that I have mentioned above are 
JFreeCharts and if I take those out, then the problem seems to go away 
completely. Even by putting a sleep 1000 in the rendering code for the list 
view (table), I cannot reproduce the problem (and not even the exception to 
be fair).


JFreeChartImage extends Image and I took the sample from 
https://cwiki.apache.org/WICKET/jfreechart-and-wicket-example.html



Thanks,

Tommy


- Original Message - 
From: Martijn Dashorst martijn.dasho...@gmail.com

To: users@wicket.apache.org
Sent: Tuesday, June 29, 2010 8:05 AM
Subject: Re: org.apache.wicket.WicketRuntimeException: Unable to write the 
response



Don't let the user wait. Use a lazy panel to render the long stuff in
the background, or if it even takes longer than that, calculate your
model data in a background thread and use a timer to poll and see if
the thread has finished, and use the result in a panel that you
replace on your page.

Martijn

On Tue, Jun 29, 2010 at 8:45 AM,  tomm...@lantaka.it wrote:

Hello,

This is my first post. I am not a web developer, I usually develop other 
kinds of systems, but for a quick project I have to do, I looked at JSF 
and I really did not like it. Finally, I have come across wicket and it 
was love at first sight.


Now, so far everything has been straightforward, but I am now facing the 
first puzzle...


I have a page that takes a while to render and, while it's rendering, if 
the user does anything, then I get:


org.apache.wicket.WicketRuntimeException: Unable to write the response
at org.apache.wicket.Response.handleException(Response.java:286)
at org.apache.wicket.Response.write(Response.java:310)
at 
org.apache.wicket.request.target.resource.ResourceStreamRequestTarget.respond(ResourceStreamRequestTarget.java:160)
at 
org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:105)

at org.apache.wicket.RequestCycle.respond(RequestCycle.java:1267)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1334)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1428)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
at 
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:479)
at 
org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:138)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
 etc ...
Caused by: EOFException(java.net.SocketException: Connection reset by 
peer: socket write error)
at 
org.mortbay.http.BufferedOutputStream.flush(BufferedOutputStream.java:195)
at 
org.mortbay.util.ByteBufferOutputStream.ensureSpareCapacity(ByteBufferOutputStream.java:342)
at 
org.mortbay.util.ByteBufferOutputStream.write(ByteBufferOutputStream.java:182)
at 
org.mortbay.http.BufferedOutputStream.write(BufferedOutputStream.java:135)

at org.mortbay.http.HttpOutputStream.write(HttpOutputStream.java:442)
at org.mortbay.jetty.servlet.ServletOut.write(ServletOut.java:42)
at org.apache.wicket.util.io.Streams.copy(Streams.java:121)
at org.apache.wicket.util.io.Streams.copy(Streams.java:88)
at org.apache.wicket.Response.write(Response.java:306)
... 23 more

00:39:32.335 WARN!! Invalid length: Content-Length=9491 written=4096 for 
http://127.0.0.1:8081/quickstart/app/

ERROR - WicketFilter - closing the buffer error
java.lang.IllegalStateException
at 
org.mortbay.jetty.servlet.ServletHttpResponse.getWriter(ServletHttpResponse.java:540)

at org.apache.wicket.protocol.http.WebResponse.write(WebResponse.java:392)
 etc ...

Now, this would be ok, I suppose. The user clicks something while wicket 
is sending stuff and that operation has to abort. However, this except 
really corrupts things, after this exception the web page behaves very 
strangely, some of wicket:ids do not update well anymore etc...
In the book Wicket in Action it says that a page is single threaded and 
all I am doing here is using one single page, one sesion, two request, 
quickly one after the other, before the first one completes.


I am using: INFO - WebApplication - [QuickStartApplication] Started Wicket 
version 1.4.8 in development mode
And I have downlowded a hello world project (quickstart) adapted it to 
1.4.8 (generics pretty much) and not yet refactored things 

Memory leak using UndoPageVersionManager

2009-12-21 Thread Tommaso Torti
Hi all,

i'm trying to investigate a memory leak. I have taken an heap memory
snapshot from the production and actually i know which wicket page retains a
lot of memory without releasing it.
It's a simple org.apache.wicket.markup.html.WebPage containing a
org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable
updated every 2-3 seconds via ajax calls.
The page uses a  UndoPageVersionManager, even if it doesn't need it (the
user cannot hit back button in browser) which in turn contains a ChangeList.
My analisys suggests that not all the ChangeList are released by garbage
collector. I have verified that my code never hits the method
UndoPageVersionManager.componentRemoved
(so, any delete operation  of objects inside the ChangeList collection is
never called).

Unfortunatly, i cannot reproduce the problem in my local environment.
My hope is that adding 'setVersioned(false);' in my Page the problem should
be fixed, but i'm not sure.

What do you think about?

Thanks,

-- 
Tommaso Torti
Sourcesense - making sense of Open Source: http://www.sourcesense.com


Re: Wicket in Italy

2009-09-24 Thread Paolo Di Tommaso
Roma (~)


On Thu, Sep 24, 2009 at 8:46 AM, francesco dicarlo
evilsephir...@gmail.comwrote:

 Hi, i've just worked on a project with wicket for a software house in Bari.

 But now i'm in Rome.

 Hope to see you in an event XD

 2009/9/24 Luca Provenzani eufor...@gmail.com




Re: Ajax indicator turning off

2009-07-26 Thread Paolo Di Tommaso
Yep, intercept the ajax call and inc/dec a counter

-- paolo


On Sat, Jul 25, 2009 at 10:03 AM, John Patterson jdpatter...@gmail.comwrote:

 Hi, I notice that when I have two ajax requests overlapping the indicator
 is turned off when the first one completes.

 Start AJAX request A - turns on the indicator
 Start AJAX request B
 Return AJAX request A - turns off the indicator
 Return AJAX request B

 Would a possible solution be to replace the call to wicketShow(id) with
 something like wicketIncrementShow(id) which increments a counter against
 the id and wicketDecrementHide(id) would only hide the component when the
 count got to 0?

 John.

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




Re: ExtJS

2009-07-24 Thread Paolo Di Tommaso
John,

Despite the sources has been commented the javadoc isn't available.

The best and quickest way to deep into Wicket-Ext is to have a look to the
component integration gallery sample application.

We are using that code in a production application and it works pretty
nicely, but Wicket-ext does cover all the huge ExtJS components library.

Grid are supported as GroupingGrid as well, but unfortunately not the
editable grids.


Regards, Paolo


On Fri, Jul 24, 2009 at 1:36 AM, John Armstrong siber...@siberian.orgwrote:

 Hi all,
  Does anyone have access to the javadocs for the ext-js
 implementation at http://code.google.com/p/wicket-ext/ ? When I
 attempt to download them with maven I get an empty archive that says
 'not-available'.

  On that note, does anyone (Paolo?) know if the Grid supports inplace
 cell editing via the form components as ext-js does?

  Seems like a cool project but I am not sure how mature it is and my
 UX guy is getting pushy..

 John-

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




Re: dzone refcard

2009-07-06 Thread Paolo Di Tommaso
It would be nice

-- paolo

On Mon, Jul 6, 2009 at 6:07 PM, Luther Baker lutherba...@gmail.com wrote:

 Is anyone aware of a wicket
 refcardhttp://refcardz.dzone.com/refcardz/core-java-concurrency
 initiative?
 Thoughts?

 -Luther



Re: Wicket-like JavaScript Components

2009-06-17 Thread Paolo Di Tommaso
Say your boss to engage more java developers ;)

-- p

On Tue, Jun 16, 2009 at 9:23 PM, Dane Laverty danelave...@gmail.com wrote:

 I'm currently the only Java programmer on staff, and I'm already
 maintaining
 two Wicket applications, so my boss is concerned that if I start a third
 project in Java that no one else will be able to maintain it. It's a
 reasonable concern, but kind of too bad nonetheless. I'm using JQuery as my
 main JS resource for the application. All of the business logic is managed
 through Ajax calls.

 On Tue, Jun 16, 2009 at 12:05 PM, Jeremy Thomerson 
 jer...@wickettraining.com wrote:

  Yeah - but I would guess that it wouldn't fit where I'm limited to
  using only JavaScript
 
  Out of curiosity - what do you mean where I'm limited to using only
  JavaScript?  I mean, can you use HTML?  What does this app do -
  obviously not much if it's only JS.  What does it tie in with to do
  business logic, etc?  Were these requirements written by a PHB?
 
  --
  Jeremy Thomerson
  http://www.wickettraining.com
 
 
 
 
  On Tue, Jun 16, 2009 at 11:56 AM, Nicolas
  Melendeznmelen...@getsense.com.ar wrote:
   GWT is a good framework.You can code in java and then it is translated
 to
   javascript.
   NM
  
   On Tue, Jun 16, 2009 at 4:05 PM, nino martinez wael 
   nino.martinez.w...@gmail.com wrote:
  
   You can also have a look at wicketstuff and see what integrations
   already exists :)
  
   2009/6/15 Dane Laverty danelave...@gmail.com:
I'm working on a small project where I'm limited to using only
   JavaScript. I
love the Wicket programming model, especially reusable components.
 Is
   anyone
aware of a JavaScript framework or JavaScript techniques that would
  allow
   me
to approximate Wicket components?
   
  
   -
   To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
   For additional commands, e-mail: users-h...@wicket.apache.org
  
  
  
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 



Re: Wicket-like JavaScript Components

2009-06-16 Thread Paolo Di Tommaso
Extjs is a good choice, we have integrated it successfully with Wicket.

Check it out at http://code.google.com/p/wicket-ext/

Paolo


On Mon, Jun 15, 2009 at 6:31 PM, Dane Laverty danelave...@gmail.com wrote:

 I'm working on a small project where I'm limited to using only JavaScript.
 I
 love the Wicket programming model, especially reusable components. Is
 anyone
 aware of a JavaScript framework or JavaScript techniques that would allow
 me
 to approximate Wicket components?



Re: Wicket in Php

2009-05-20 Thread Paolo Di Tommaso
In other words .. impossible

-- paolo

On Wed, May 20, 2009 at 6:24 PM, Jeremy Thomerson jer...@wickettraining.com
 wrote:

 That's for you to decide.  Typically it involves some kind of jump
 page between the two applications that once you are signed in, it
 sends the user to a page in the other app with a key (perhaps a UUID,
 etc) that correlates to that user in the DB so that the other app can
 automatically sign the user in.

 The problem of course will be keeping session data in sync between the
 two since they can't share the same object.  This typically means
 persisting much of the session state to a database or memcache layer.

 --
 Jeremy Thomerson
 http://www.wickettraining.com




 On Wed, May 20, 2009 at 11:20 AM, Ajayi Yinka
 iamstyaj...@googlemail.com wrote:
  Thanks
 
 
  May I get the description on how to do the integration. I may not mind
 the
  integration, provided it can handle my session for me (As in if a user
 log
  in through a wicket page, we can use this same log in instance to manage
 the
  wicket page).
 
 
  regards,
  yinka
 
  On Wed, May 20, 2009 at 4:45 PM, Jeremy Thomerson 
 jer...@wickettraining.com
  wrote:
 
  Wicket is written in Java.  You would need to build an application in
  Java, running in a servlet container.  Perhaps you could do an
  integration and have some pages running in PHP and some in Java, but
  you are looking at a complex project.
 
  --
  Jeremy Thomerson
  http://www.wickettraining.com
 
 
 
 
  On Wed, May 20, 2009 at 10:39 AM, Ajayi Yinka
  iamstyaj...@googlemail.com wrote:
   Hi,
  
   Can anyone give me an insight on how I can integrate wicket into php
   project.
  
   I already have an application that is written in php.
  
   I will like to upgrade the application with some new features in which
 I
   prefer to use  wicket.
  
   I am afraid if this is possible?
  
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 

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




Re: Wicket, FOP, Markup Inheritance and Markup Type

2008-12-16 Thread Paolo Di Tommaso
Adrian, is not a strange question, I've implemented it and works very well.

And in some use cases is a perfect choice.

In my implementation I use  a FopPage that declares page#getmarkuptype() {
return fop}

The nice thing is that all panel added in that page will look for an
associated markup will a suffix .fop (instead of .html).

This means that you can have a panel implementing a common business logic
with two skins, one html and one fop.

When used in html page it will use the HTML panel and when added in the FOP
page will produce the FOP markup.


Paolo







On Mon, Dec 15, 2008 at 11:14 PM, Adrian Wiesmann awiesm...@somap.orgwrote:

 Hello everybody

 A quick question out of curiosity. Has anybody played around or tried to
 generate XSL-FO from within your Wicket project?

 What I mean is this:

 - Add an XML file to every HTML file.
 - Tell Wicket to use the XML instead of the HTML file for the markup.
 - Have Wicket do the markup inheritance magic and rendering of a FO file
 (instead of plain HTML).
 - Use the resulting FO to render PDF with Apache FOP.
 - Present the PDF file instead the HTML to the client.

 Anyone did so? Anyone played with Wicket and did so in a Swing application
 (instead the web environment)?

 I know, these questions may sound strange, but I am currently thinking
 about the possibilities of Wicket's markup inheritance and if it is
 possible (and makes sense) to use Wicket as a reports generator. Not what
 it is intended to do, but just pretend everything makes sense. :)

 Thanks for your comments.

 Cheers,
 Adrian

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




Re: Wicket session back button support

2008-12-12 Thread Paolo Di Tommaso
Good, in this way it works.

I'm apply the onBeforeRender trick to propagate the previous state in the
session.


Thank guys, long live to Wicket

Paolo

On Thu, Dec 11, 2008 at 6:27 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote:

 or instead of pages use panels as content. that way you use the same
 menu instance across multiple pages and the menu can keep its own
 state.

 -igor

 On Thu, Dec 11, 2008 at 2:37 AM, Paolo Di Tommaso
 paolo.ditomm...@gmail.com wrote:
  Nice question. Consider the following use case:
 
  You have the main application menu bar. The user chooses an item from it.
 
  What happens is that all the following pages will be related to that
 choice,
  for example the second level menu in the page (that is contextual to the
  above choice) and I would avoid to specify it as a parameter every time I
  create a new page .
 
  Possible solution, store those variables in the page also and initialize
  them taking the values from the session.
 
  When the user clicks on the back button re-sync the session variables -
 if
  changed - overriding the onBeforeRender() method.
 
  Other solution could be to create a custom UrlEncodingStrategy to
 propagate
  the session vars on URL ...
 
 
  What do you think ?
 
  -- Paolo
 
 
  On Thu, Dec 11, 2008 at 12:29 AM, Matej Knopp matej.kn...@gmail.com
 wrote:
 
  No. You have to track the changes yourself. Or use Page as the scope.
  What's the reason to put values in session anyway?
 
  -Matej
 
  On Wed, Dec 10, 2008 at 11:18 PM, Paolo Di Tommaso
  paolo.ditomm...@gmail.com wrote:
   Dear community,
  
   I'm facing with a really ugly problem. In my web app I need to store
 some
   variables in the Wicket session.
  
   But this cause some nasty side-effects when users click on the browser
  back
   button.
  
   The page displays the previous content correctly but some components,
  which
   model is based on session values, do not.
  
   Is there any best practice for Wicket session to support the browser
 back
   button (so that coming back the session is restored to the previous
  state)?
  
   Thank you,
  
   Paolo
  
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 

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




Re: [OT] wicket users around the world

2008-12-12 Thread Paolo Di Tommaso
Paolo Di Tommaso, Roma - IT

On Fri, Dec 12, 2008 at 3:40 PM, Steve Flasby st...@flasby.org wrote:

 Brit (actually a Yorkshireman) working in Zürich, Switzerland.



Re: Wicket session back button support

2008-12-11 Thread Paolo Di Tommaso
Nice question. Consider the following use case:

You have the main application menu bar. The user chooses an item from it.

What happens is that all the following pages will be related to that choice,
for example the second level menu in the page (that is contextual to the
above choice) and I would avoid to specify it as a parameter every time I
create a new page .

Possible solution, store those variables in the page also and initialize
them taking the values from the session.

When the user clicks on the back button re-sync the session variables - if
changed - overriding the onBeforeRender() method.

Other solution could be to create a custom UrlEncodingStrategy to propagate
the session vars on URL ...


What do you think ?

-- Paolo


On Thu, Dec 11, 2008 at 12:29 AM, Matej Knopp [EMAIL PROTECTED] wrote:

 No. You have to track the changes yourself. Or use Page as the scope.
 What's the reason to put values in session anyway?

 -Matej

 On Wed, Dec 10, 2008 at 11:18 PM, Paolo Di Tommaso
 [EMAIL PROTECTED] wrote:
  Dear community,
 
  I'm facing with a really ugly problem. In my web app I need to store some
  variables in the Wicket session.
 
  But this cause some nasty side-effects when users click on the browser
 back
  button.
 
  The page displays the previous content correctly but some components,
 which
  model is based on session values, do not.
 
  Is there any best practice for Wicket session to support the browser back
  button (so that coming back the session is restored to the previous
 state)?
 
  Thank you,
 
  Paolo
 

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




Wicket session back button support

2008-12-10 Thread Paolo Di Tommaso
Dear community,

I'm facing with a really ugly problem. In my web app I need to store some
variables in the Wicket session.

But this cause some nasty side-effects when users click on the browser back
button.

The page displays the previous content correctly but some components, which
model is based on session values, do not.

Is there any best practice for Wicket session to support the browser back
button (so that coming back the session is restored to the previous state)?

Thank you,

Paolo


Re: Wicket and Ext JS integration

2008-10-23 Thread Paolo Di Tommaso
I could be interested to share experience about that, but now I'm really in
early stage so I think it would be too early to share the code.


Anyway the main idea is to use the Wicket behaviour feature to attach an
Ext component to the associated Wicket component.

This is the easiest part. More complex integration like Data Store could be
always done using a Wicket ajax behavior.

But I' haven't yet tryed to integrate more complex stuff like editable
grids, groups and so on . .


Paolo




On Thu, Oct 23, 2008 at 1:41 PM, Richard Allen [EMAIL PROTECTED]wrote:

 The licensing is a pain. We started using ExtJS when it was LGPL, then they
 switched to GPL. By then we were already invested, so we bought a
 commercial
 license -- kind of feel like we got suckered into that one. If I had a
 chance to do it again I would just use YUI. We use ExtJS on top of YUI.
 However, ExtJS is a good product, even though they made a poor licensing
 decision.

 The licensing problem is just a fact that we have to deal with now, so I'm
 trying to find out what the easiest path is for integrating ExtJS 2.2 with
 Wicket. If someone else has already done the effort or started the effort,
 then that would help. The amount of work involved in integrating ExtJS 2.2
 with Wicket is part of our new web framework evaluation criteria.

 Thanks,
 Richard Allen

 On Wed, Oct 22, 2008 at 2:05 PM, Nino Saturnino Martinez Vazquez Wael 
 [EMAIL PROTECTED] wrote:

  I thought there were a licensing issue! Could'nt just remember if it were
  the guy doing the wicket contrib or ext js..
 
  Martijn Dashorst wrote:
 
  The GPL licensing of ExtJS is really a brain damage inflicting mess.
  Personally I would stay very far away from JS libraries that are GPL
  licensed (it is not clear how the viral aspect infects your server
  side code, possibly requiring you to ship your server side code to
  your users—you *are* distributing the GPL licensed code, which is
  linked to your product)
 
  Martijn
 
 
 
 
  --
  -Wicket for love
 
  Nino Martinez Wael
  Java Specialist @ Jayway DK
  http://www.jayway.dk
  +45 2936 7684
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 



Re: Wicket and Ext JS integration

2008-10-23 Thread Paolo Di Tommaso
Yes, I'm working for a no-profit organization and it could be an interesting
option to release it as an OSS.

Do you have any suggestion where the project could be hosted?  Google code?
and any idea about the licence?


Thank you, Paolo


On Thu, Oct 23, 2008 at 2:19 PM, Richard Allen [EMAIL PROTECTED]wrote:

 Paolo,

 Is this an open source effort? What version of ExtJS are you using?

 If we were to choose to go with Wicket, we would be willing to contribute.

 Thanks,
 Richard Allen

 On Wed, Oct 22, 2008 at 10:20 AM, Paolo Di Tommaso 
 [EMAIL PROTECTED] wrote:

  I'm working on a wicket-ext integration project.
 
  Until now I've done just really simple stuff, like simple TextField,
  DateField, TimeField, ComboBox, AutoComplete field and basic (static)
 grid
  elements.
 
  Though my implementation is trivial I would say that is really promising
  and
  I've not found any evident obstacle to a more complete integration.
 
 
  Paolo
 
  On Wed, Oct 22, 2008 at 1:53 PM, Richard Allen 
 [EMAIL PROTECTED]
  wrote:
 
   We currently use Ext JS 2.2 (http://extjs.com) with Struts 1.x, and we
  are
   considering migrating to Wicket. I have seen on the mail archive that
  some
   people have integrated Wicket and Ext JS with mixed success. In
  particular,
   I found the wicket-tools-extjs project,
   http://www.wickettools.org/index.php/extjs-integrationm, which is
  version
   0.1.0, published in February 2008.
  
   Is the wicket-tools-extjs project in active development or was that
  project
   abandoned? Is there any other significant work undergoing to integrate
   Wicket and Ext JS?
  
   Thanks,
   Richard Allen
  
 



Re: Wicket and Ext JS integration

2008-10-22 Thread Paolo Di Tommaso
I'm working on a wicket-ext integration project.

Until now I've done just really simple stuff, like simple TextField,
DateField, TimeField, ComboBox, AutoComplete field and basic (static) grid
elements.

Though my implementation is trivial I would say that is really promising and
I've not found any evident obstacle to a more complete integration.


Paolo

On Wed, Oct 22, 2008 at 1:53 PM, Richard Allen [EMAIL PROTECTED]wrote:

 We currently use Ext JS 2.2 (http://extjs.com) with Struts 1.x, and we are
 considering migrating to Wicket. I have seen on the mail archive that some
 people have integrated Wicket and Ext JS with mixed success. In particular,
 I found the wicket-tools-extjs project,
 http://www.wickettools.org/index.php/extjs-integrationm, which is version
 0.1.0, published in February 2008.

 Is the wicket-tools-extjs project in active development or was that project
 abandoned? Is there any other significant work undergoing to integrate
 Wicket and Ext JS?

 Thanks,
 Richard Allen



Seamless Wicket

2008-10-01 Thread Paolo Di Tommaso
A really interesting post showing how integrate Wicket in the lastest JBoss
Seam.

http://in.relation.to/Bloggers/SeamlessWicket

Enjoy, Paolo


Re: Wicket/Seam on Tomcat 6?

2008-09-30 Thread Paolo Di Tommaso
I've successfully run it on Tomcat 5.5 ..

-- Paolo

On Tue, Sep 30, 2008 at 1:49 PM, Martijn Lindhout
[EMAIL PROTECTED]wrote:

 Hi all,

 Has anyone a running setup of Wicket/Seam on Tomcat. No EJB's, just JPA.

 I get a string ClassNotFoundException on a class that is present in
 WEB-INF/classes

 --
 Martijn Lindhout
 JointEffort IT Services
 http://www.jointeffort.nl
 [EMAIL PROTECTED]
 +31 (0)6 18 47 25 29

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




Best to strategy to have a Wicket page returns a binary content by default

2008-09-23 Thread Paolo Di Tommaso
Guys,

I'm using Wicket to create pdf content using Apache FOP. The idea is to have
a FopPage that extends the root wicket Page component and declares fo as
marketType. The FopPage parses FOP markup instead HTML markup.

I'm able to manage the fop to pdf binary conversion using a custom
PdfRequestTarget, but it requires to specify it explicitly, invoking
RequestCycle.get().setRequestTarget(new PdfRequestTarget(this)); every time.


So the question: is there a way to make a custom RequestTarget the default
to certain pages? Or exists a better strategy to override the default render
strategy to return a content different from HTML ?


Thank you,

-- Paolo


Re: Best to strategy to have a Wicket page returns a binary content by default

2008-09-23 Thread Paolo Di Tommaso
Interesting .. so I could extend QueryStringUrlCodingStrategy overriding the
decode() method to return my PdfRequestTarget.

Cool! Thank you,

-- Paolo

On Tue, Sep 23, 2008 at 3:04 PM, Matej Knopp [EMAIL PROTECTED] wrote:

 You don't have to do this from the pages. You can create your own
 simple IRequestTargetUrlCodingStrategy that resolves to your request
 target and mount the strategy.

 -Matej

 On Tue, Sep 23, 2008 at 12:45 PM, Paolo Di Tommaso
 [EMAIL PROTECTED] wrote:
  Guys,
 
  I'm using Wicket to create pdf content using Apache FOP. The idea is to
 have
  a FopPage that extends the root wicket Page component and declares fo
 as
  marketType. The FopPage parses FOP markup instead HTML markup.
 
  I'm able to manage the fop to pdf binary conversion using a custom
  PdfRequestTarget, but it requires to specify it explicitly, invoking
  RequestCycle.get().setRequestTarget(new PdfRequestTarget(this)); every
 time.
 
 
  So the question: is there a way to make a custom RequestTarget the
 default
  to certain pages? Or exists a better strategy to override the default
 render
  strategy to return a content different from HTML ?
 
 
  Thank you,
 
  -- Paolo
 

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




Re: Re: Best to strategy to have a Wicket page returns a binary content by default

2008-09-23 Thread Paolo Di Tommaso
Because, I want to use Wicket to render PDF content in a trasparent way -
just extending a base page - as normally it is done for a WebPage.

-- Paolo

On Tue, Sep 23, 2008 at 6:08 PM, [EMAIL PROTECTED] wrote:

 Why don't you use the DownloadLink component?

 Just create a file in the java.tmp.dir and setDeleteAfterDownload (true);


 http://wicket.apache.org/docs/wicket-1.3.2/wicket/apidocs/org/apache/wicket/markup/html/link/DownloadLink.html

 Regards,
 Bruno

 On Sep 23, 2008 11:30am, Paolo Di Tommaso [EMAIL PROTECTED]
 wrote:

 Interesting .. so I could extend QueryStringUrlCodingStrategy overriding

 the


 decode() method to return my PdfRequestTarget.



 Cool! Thank you,



 -- Paolo





Apache FOP and Wicket

2008-09-11 Thread Paolo Di Tommaso
Dear all,

If I'm not wrong Wicket is able to manage any king of markup not just HTML.


So it would be possibile to use Wicket to generate an Apache FOP markup to
rendere a PDF file? Any suggestions?

Thank you,
-- Paolo


Re: Apache FOP and Wicket

2008-09-11 Thread Paolo Di Tommaso
Why not? I was remembering that Wicket can manage any markup, not just HTML
. .

Am I missing something ?

Paolo

On Thu, Sep 11, 2008 at 3:03 PM, Edvin Syse [EMAIL PROTECTED] wrote:

 I don't think Wicket is the right tool for that, try Freemarker instead.
 You can still serve up the file through Wicket though :)

 -- Edvin

 Paolo Di Tommaso skrev:

  Dear all,

 If I'm not wrong Wicket is able to manage any king of markup not just
 HTML.


 So it would be possibile to use Wicket to generate an Apache FOP markup to
 rendere a PDF file? Any suggestions?

 Thank you,
 -- Paolo




 --
 Med vennlig hilsen

 Edvin Syse
 Programutvikler

 www.sysedata.no / [EMAIL PROTECTED]
 Tlf: 333 49700  / Faks: 333 49701
 Adresse: Møllegaten 12, 3111 Tønsberg

 Syse Data AS -Profesjonelle IT-tjenester

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




Wicket integration in Seam 2.1

2008-08-05 Thread Paolo Di Tommaso
Guys,

A very interesting interview to Pete Muir about the upcoming JBoss Seam 2.1,
especially regarding Wicket integration as presentation layer.


[..] Firstly, we want to support Wicket, as a first class view layer. Well,
what does this actually mean, with some sort of technical details. Well,
what we want to be able to do is allow you, obviously, to be able to access
your Seam components for a Wicket club, using annotation controlled
injection, to be able to control conversations, with annotations from inside
your Wicket class, to be able to control your business process management
tasks and your business process management processes themselves. So
basically, all the orchestration stuff that you need to do with writing the
view side of your app. [..] 

http://java.dzone.com/articles/whats-new-seam-21-an-interview


Enjoy.

-- Paolo


Re: Issue with the FileUploadField

2008-07-16 Thread Paolo Di Tommaso
The trick is based on a hidden iframe, like the following:

iframe id=upload_target wicket:id=upload_target name=upload_target
style=width:0px;height:0px;border:0  /iframe
form wicket:id=form0 target=upload_target 
div id=upload-field-handler style=position: absolute; z-index: 100;
display: none
input id=upload_field wicket:id=upload_field type=file
class=DisplayText size=55 onchange=upload(this) /
/div
/form

And tell wicket to do not redirect on form upload when the submit is
terminated:

public void onSubmit() {
getRequestCycle().setRedirect(false);

getRequestCycle().setRequestTarget(EmptyRequestTarget.getInstance());
}

I'm attaching my code so you can check details.

Have fun

-- Paolo



On Wed, Jul 9, 2008 at 4:35 PM, Arun Wagle [EMAIL PROTECTED] wrote:

 Hello All,

 I have an issue with the file upload
 I have a Fileupload input filed on a tabbed panel.  The first time when I
 select a file and submit,  the following returns null
 FileUpload upload = fileUploadField.getFileUpload(); return null.
 But if I select the same file again and submit I get the value. Have anyone
 encountered this before ?

 If this can be of any help, the TabbedPanel link is a AJAXSubmit as I need
 to retain some of the form values on tab change .
 Also the above action occurs on the submit of another File Upload button
 on the form and not on the Tabbed link Submit

 Also is there a AJAX Fileupload component anyone know of or has written? .

 Thank you all in advance

 Regards,
 Arun Wagle

package org.fao.ocd.applications.coin.web.ui.widget;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.fao.ocd.applications.coin.web.wicket.AjaxUtils;

import org.apache.wicket.ajax.AjaxEventBehavior;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.IAjaxCallDecorator;
import org.apache.wicket.ajax.calldecorator.AjaxCallDecorator;
import org.apache.wicket.feedback.FeedbackMessage;
import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.form.upload.FileUpload;
import org.apache.wicket.markup.html.form.upload.FileUploadField;
import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.request.target.basic.EmptyRequestTarget;
import org.apache.wicket.util.lang.Bytes;

/**
 * A specialized Panel aimed at file uploading management.
 * 
 * pThe components to render the attachments list should look like this:br/
 * code 
 *	lt;div wicket:id=attachment_container gt;br/
 *		lt;table id=attach-tablegt;br/
 *			lt;tr wicket:id=attachments gt;br/
 *lt;td class=menuListItemgt;lt;img wicket:id=clip height=15 width=15 /gt; lt;/tdgt;br/
 *lt;td class=menuListItemgt;lt;a wicket:id=link gt;lt;span wicket:id=filename gt;filename (size)lt;/spangt;lt;/agt;lt;/tdgt;br/
 *lt;td class=menuListItemgt;lt;a wicket:id=delete gt;deletelt;/agt;lt;/tdgt;br/
 *			lt;/trgt;br/
 *  	lt;/tablegt;br/
 *	lt;/divgt;br/
 *	lt;div id=upload-field-position class=menuListItem style=height: 22px gt;br/
 *	lt;a id=attach-link href=javascript:void(0) onclick=showUploadField(); gt;Attach a filelt;/agt;br/lt;/divgt; br/
 *  /code
 *  /p
 *  p
 *  There are a few naming contraints you need to follow to make it work, due to the fact that some components' names are explicitly referenced in the Javascript code
 *  contained in UploadPanel.html:br/
 *  1) the last DIV in the code above must have id=upload-field-position;br/
 *  2) the anchor inside it must have id=attach-link and onclick=showUploadField();.
 *  /p
 *  
 * @author Fabio Fioretti
 *
 */
public class UploadPanel extends Panel{
	
	private static final Log log = LogFactory.getLog(UploadPanel.class);
	
	private UploadForm uploadForm;
	

	public UploadPanel(String id) {
		super(id);
		
		// the hidden frame
		createUploadTargetFrame(this);

		/*
		 * The uploading form
		 */
		add( uploadForm = new UploadForm(form0) );

	}
	
	public UploadPanel(String id, int sizeMB) {
		super(id);
		
		// the hidden frame
		createUploadTargetFrame(this);

		/*
		 * The uploading form
		 */
		add( uploadForm = new UploadForm(form0, sizeMB) );

	}
	
	private WebMarkupContainer createUploadTargetFrame(Panel container) {
		WebMarkupContainer frame = new WebMarkupContainer(upload_target);
		frame.add( new AjaxEventBehavior(onload) {
			
			protected IAjaxCallDecorator getAjaxCallDecorator() {
return new AjaxCallDecorator() { 
	public CharSequence decorateScript( CharSequence script ) { 
		return  if(__cload++0) { +script+ } ;
	}
};
			}
			
			protected void onEvent(AjaxRequestTarget target) {
try { 
	if( uploadForm.error != null ) { 
		AjaxUtils.alert(target, String.valueOf(uploadForm.error.getMessage()) );
		// on error we will reload the form
		target.addComponent( uploadForm );
		// clear raising error
		uploadForm.error = null;
	}
	else { 
		// on hidden frame reload we will refresh 

Re: [ANNOUNCE] Apache Wicket 1.3.4 is released!

2008-06-28 Thread Paolo Di Tommaso
Really a good news. Congratulations!

-- Paolo


On Fri, Jun 27, 2008 at 12:35 AM, Martijn Dashorst [EMAIL PROTECTED]
wrote:

 The Apache Wicket team is proud to announce the availability of the fourth
 maintenance release: Apache Wicket 1.3.4. A lot of bugs have been squashed
 and
 several improvements implemented. Two noteworthy bugs have been squashed:

  - cross session leakage due to a dangling thread local in exceptional
   circumstances
  - memory leak in localizer (WICKET-1667)

 It is therefore recommended you update to Wicket 1.3.4 at your earliest
 convenience.

 Eager people click here to download the distribution, others can read
 further:

 http://www.apache.org/dyn/closer.cgi/wicket/1.3.4

 We thank you for your patience and support.

 - The Wicket Team


 Apache Wicket

 Apache Wicket is a component oriented Java web application framework. With
 proper mark-up/logic separation, a POJO data model, and a refreshing lack
 of
 XML, Apache Wicket makes developing web-apps simple and enjoyable again.
 Swap
 the boilerplate, complex debugging and brittle code for powerful, reusable
 components written with plain Java and HTML.

 You can find out more about Apache Wicket on our website:

 http://wicket.apache.org


 This release

 This release is the fourth maintenance release for the Wicket 1.3 product.
 This release fixes several bugs and adds some minor improvements. You can
 find
 out about the changes at the bottom of this announcement.


 Migrating from 1.2

 If you are coming from Wicket 1.2, you really want to read our migration
 guide, found on the wiki:

 http://cwiki.apache.org/WICKET/migrate-13.html


 Downloading the release

 You can download the release from the official Apache mirror system, and
 you
 can find it through the following link:

 http://www.apache.org/dyn/closer.cgi/wicket/1.3.4/

 For the Maven and Ivy fans out there: update your pom's to the following,
 and
 everything will be downloaded automatically:

 dependency
   groupIdorg.apache.wicket/groupId
   artifactIdwicket/artifactId
   version1.3.4/version
 /dependency

 Substitute the artifact ID with the projects of your liking to get the
 other
 projects.

 Please note that we don't prescribe a Logging implementation for SLF4J. You
 need to specify yourself which one you prefer. Read more about SLF4J here:
 http://slf4j.org


 Validating the release

 The release has been signed by Martijn Dashorst, your release manager for
 today. The public key can be found in the KEYS file in the download area.
 Download the KEYS file only from the Apache website.

 http://www.apache.org/dist/wicket/1.3.4/KEYS

 Instructions on how to validate the release can be found here:

 http://www.apache.org/dev/release-signing.html#check-integrity


 Reporting bugs

 In case you do encounter a bug, we would appreciate a report in our JIRA:

 http://issues.apache.org/jira/browse/WICKET


 The distribution

 In the distribution you will find a README. The README contains
 instructions
 on how to build from source yourself. You also find a CHANEGELOG-1.3 which
 contains a list of all things that have been fixed, added and/or removed
 since
 Wicket 1.3.0.

 Release Notes - Wicket - Version 1.3.4

 ** Bug
* [WICKET-613] - Prototype scoped Spring beans
* [WICKET-1152] - MetaDataRoleAuthorizationStrategy.unauthorize()
 doesn't work
* [WICKET-1292] - WicketTester continueToOriginalDestination()
 uses application home page instead of original redictor
* [WICKET-1366] - ava.lang.IllegalStateException: No Page found
 for component when collapsing nodes in a LinkTree
* [WICKET-1418] - org.apache.wicket.MarkupContainer swallows
 AbortException
* [WICKET-1453] - WicketServlet does not set content type on fallback()
* [WICKET-1473] - BaseWicketTester.isComponentOnAjaxResponse()
 test is too strong
* [WICKET-1476] - Referencing Page may cause StackOverflowError
* [WICKET-1499] - AjaxEditableMultiLineLabel + race condition /
* [WICKET-1501] - MarkupCache.putIntoCache doesn't behave correctly!!
* [WICKET-1504] - AutoCompleteTextField - javascript error type
 mismatch in line 227 in IE
* [WICKET-1507] - MarkupCache style/variation/locale support broken
* [WICKET-1510] - FormDispatcherRequest creates invalid parameter map
* [WICKET-1521] - ClassCastException in MixedUrlCodingStrategy
* [WICKET-1527] - WicketTester can not deal with null values in
 page parameters
* [WICKET-1536] - Enclosure permanently hides direct children
 after it has been itself hidden once
* [WICKET-1537] - SelectOption generates non xhtml compliant markup
* [WICKET-1541] - PopupSettings' windowName fixes for IE
* [WICKET-1544] - Update Javadoc for AbstractValidator
* [WICKET-1547] - Add getterfor IPageable to PagingNavigation
* [WICKET-1548] - PagingNavigator calls factory methods from constructor
* [WICKET-1549] - Memory leak with PropertyResolver (in running test
 suites)
* [WICKET-1551] - 

Re: using wicket to create dynamic chart

2008-05-15 Thread Paolo Di Tommaso
Pure JavaScript .. simple stunning!

http://people.iola.dk/olau/flot/examples/graph-types.html

// Paolo

On Thu, May 15, 2008 at 9:11 PM, Ryan Gravener [EMAIL PROTECTED]
wrote:

 These look pretty nice for free:

 http://teethgrinder.co.uk/open-flash-chart/

 On Thu, May 15, 2008 at 11:29 AM, Jonathan Locke [EMAIL PROTECTED]
 
 wrote:

 
 
  if you mean it changes in the browser after the page is finished loading,
  you are probably talking client-side technologies: JS, flash, applets,
  something like that.
 
 
  emee wrote:
  
   Hello ,
  
   I would like to use wicket to create a dynamic chart, I mean the values
  of
   my chart change in the time. I use googleChart to create my chart but
 it
   is a static chart and  all the example I have with wicket to create
  static
   chart any idea how I can create a dynamic chart by using wicket ?
  
   Thank you
  
  
 
  --
  View this message in context:
 
 http://www.nabble.com/using-wicket-to-create-dynamic-chart-tp17251826p17255946.html
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


 --
 Ryan Gravener
 http://twitter.com/ryangravener



Re: JmxPanel

2008-04-30 Thread Paolo Di Tommaso
YESS! You are right, now it works.

Thank you, Paolo



On Wed, Apr 30, 2008 at 11:15 AM, Benjamin Ernst [EMAIL PROTECTED]
wrote:

 Hi Paolo,

 I had just the same problem as you.

 The display:none has nothing to do with this. It just hides the root of
 the tree.

 The problem was that the domain is skipped, because it doesen´t have the
 same name as my Application.

 So I removed the the filter part from the createTreeModel()-Method in the
 JmxPanel.java like this:

 // process all available domains
for (int i = 0; i  domains.length; i++)
{
// skip unwanted domains
 *//if (!getDomainFilter().accept(domains[i]))
 //{
 //continue;
 //}*
// create domain tree node and add to root
JmxTreeNode domain = new JmxTreeNode(domains[i], null);
rootNode.add(domain);
..

 Now I can see all domains in my jmx-Panel

 I hope it helps.

 Benjamin





 On Wed, Apr 23, 2008 at 11:09 PM, Paolo Di Tommaso 
 [EMAIL PROTECTED] wrote:

  No. Just a plain html page without any custom css.
 
  What version of Wicket/Wicket-stuff-jmx-panel are you using ?
 
 
  Thanks,
 
  // Paolo
 
  On Wed, Apr 23, 2008 at 7:20 PM, Gerolf Seitz [EMAIL PROTECTED]
  wrote:
 
   nope, did the same thing you did.
   do you have any custom css that might cause this?
  
Gerolf
  
   On Wed, Apr 23, 2008 at 7:02 PM, Paolo Di Tommaso 
   [EMAIL PROTECTED]
   wrote:
  
Absolutely, JMX feature is enabled.
   
I'm adding a JmxPanel in my page using a simple:
   
add(new JmxPanel(jmx));
   
   
but nothing is displayed ..
   
You have it working? Have you used any trick?
   
// Paolo
   
   
On Wed, Apr 23, 2008 at 3:46 PM, Gerolf Seitz 
 [EMAIL PROTECTED]
wrote:
   
 Paolo,
 I'm not sure where the display:none comes from,
 but i'm pretty sure it's not from the JmxPanel.

 do you have jmx enabled at all?

 Gerolf

 On Thu, Apr 17, 2008 at 9:07 AM, Paolo Di Tommaso 
 [EMAIL PROTECTED]
 wrote:

  Guys,
 
  someone has soem experience with the nice JmxPanel describe
 here?
 
  http://chillenious.wordpress.com/2007/08/29/jmx-wicket-panel/
 
  Adding a JmxPanel instance to my page I always get the following
   EMPTY
  panel
  ..
 
 
  div class=jmxTreePanel
  table
  tr
   tddiv id=tree1 class=jmxTree
   div style=display:none id=tree1_0/div
   /div/td
 tddiv id=detailPanel2
  /div/td
  /tr
  /table
  /div
  div style=clear:both/div
 
 
  Any ideas ?
 
  Thanks.
 
  // Paolo
 

   
  
 



Re: JmxPanel

2008-04-30 Thread Paolo Di Tommaso
Cool, good to know.

Thanks, Paolo

On Wed, Apr 30, 2008 at 11:59 AM, Gerolf Seitz [EMAIL PROTECTED]
wrote:

 heh, didn't think of that ;)
 the correct way would be to override the methode getDomainFilter
 and return IDomainFilter.ALL (or something like that)

 Gerolf

 On Wed, Apr 30, 2008 at 11:49 AM, Paolo Di Tommaso 
 [EMAIL PROTECTED] wrote:

  YESS! You are right, now it works.
 
  Thank you, Paolo
 
 
 
  On Wed, Apr 30, 2008 at 11:15 AM, Benjamin Ernst 
 [EMAIL PROTECTED]
  
  wrote:
 
   Hi Paolo,
  
   I had just the same problem as you.
  
   The display:none has nothing to do with this. It just hides the root
  of
   the tree.
  
   The problem was that the domain is skipped, because it doesen´t have
 the
   same name as my Application.
  
   So I removed the the filter part from the createTreeModel()-Method in
  the
   JmxPanel.java like this:
  
   // process all available domains
  for (int i = 0; i  domains.length; i++)
  {
  // skip unwanted domains
   *//if (!getDomainFilter().accept(domains[i]))
   //{
   //continue;
   //}*
  // create domain tree node and add to root
  JmxTreeNode domain = new JmxTreeNode(domains[i], null);
  rootNode.add(domain);
  ..
  
   Now I can see all domains in my jmx-Panel
  
   I hope it helps.
  
   Benjamin
  
  
  
  
  
   On Wed, Apr 23, 2008 at 11:09 PM, Paolo Di Tommaso 
   [EMAIL PROTECTED] wrote:
  
No. Just a plain html page without any custom css.
   
What version of Wicket/Wicket-stuff-jmx-panel are you using ?
   
   
Thanks,
   
// Paolo
   
On Wed, Apr 23, 2008 at 7:20 PM, Gerolf Seitz 
 [EMAIL PROTECTED]
wrote:
   
 nope, did the same thing you did.
 do you have any custom css that might cause this?

  Gerolf

 On Wed, Apr 23, 2008 at 7:02 PM, Paolo Di Tommaso 
 [EMAIL PROTECTED]
 wrote:

  Absolutely, JMX feature is enabled.
 
  I'm adding a JmxPanel in my page using a simple:
 
  add(new JmxPanel(jmx));
 
 
  but nothing is displayed ..
 
  You have it working? Have you used any trick?
 
  // Paolo
 
 
  On Wed, Apr 23, 2008 at 3:46 PM, Gerolf Seitz 
   [EMAIL PROTECTED]
  wrote:
 
   Paolo,
   I'm not sure where the display:none comes from,
   but i'm pretty sure it's not from the JmxPanel.
  
   do you have jmx enabled at all?
  
   Gerolf
  
   On Thu, Apr 17, 2008 at 9:07 AM, Paolo Di Tommaso 
   [EMAIL PROTECTED]
   wrote:
  
Guys,
   
someone has soem experience with the nice JmxPanel describe
   here?
   
   
 http://chillenious.wordpress.com/2007/08/29/jmx-wicket-panel/
   
Adding a JmxPanel instance to my page I always get the
  following
 EMPTY
panel
..
   
   
div class=jmxTreePanel
table
tr
 tddiv id=tree1 class=jmxTree
 div style=display:none id=tree1_0/div
 /div/td
   tddiv id=detailPanel2
/div/td
/tr
/table
/div
div style=clear:both/div
   
   
Any ideas ?
   
Thanks.
   
// Paolo
   
  
 

   
  
 



WebRequestCycle and Open-session-in-view pattern

2008-04-28 Thread Paolo Di Tommaso
Dear Wicket Gurus,

I'm implementing the Open-session-in-view pattern overriding the
onBeginRequest and onEndRequest method of a custom WebRequestCycle.

Is there any way to avoid to open a new hibernate session for non-view
request, for example resources request (css, javascript, images, etc)
served through the wicket application?

Basically I'm looking for a method to identify requests for static resources
that does not requires n open hibernate session.


Thank you,

// Paolo


Re: JmxPanel

2008-04-23 Thread Paolo Di Tommaso
I tried this trick but the JmxPanel still does not work ..

Have someone used successfully the JmxPanel ?!

Thank you

// Paolo


On Thu, Apr 17, 2008 at 2:20 PM, gumnaam23 [EMAIL PROTECTED] wrote:


 Download the jmx panel source code and add an empty DIV element before the
 the JmxPanel.html

 here's patch,   (you need stuff between --START and -- END )

 svn diff src/main/java/org/wicketstuff/jmx/markup/html/JmxPanel.html

 -- START

 Index: src/main/java/org/wicketstuff/jmx/markup/html/JmxPanel.html
 ===
 --- src/main/java/org/wicketstuff/jmx/markup/html/JmxPanel.html (revision
 3817)
 +++ src/main/java/org/wicketstuff/jmx/markup/html/JmxPanel.html (working
 copy)
 @@ -15,6 +15,7 @@
limitations under the License.
  --
  wicket:panel
 +   div style=clear:both /div
div wicket:id=jmxBeanTable/div
 div style=clear:both/div
 /wicket:panel

 -- END

 Or you can ask the author of JMX panel to include this patch in the next
 release.





Re: JmxPanel

2008-04-23 Thread Paolo Di Tommaso
Absolutely, JMX feature is enabled.

I'm adding a JmxPanel in my page using a simple:

add(new JmxPanel(jmx));


but nothing is displayed ..

You have it working? Have you used any trick?

// Paolo


On Wed, Apr 23, 2008 at 3:46 PM, Gerolf Seitz [EMAIL PROTECTED]
wrote:

 Paolo,
 I'm not sure where the display:none comes from,
 but i'm pretty sure it's not from the JmxPanel.

 do you have jmx enabled at all?

 Gerolf

 On Thu, Apr 17, 2008 at 9:07 AM, Paolo Di Tommaso 
 [EMAIL PROTECTED]
 wrote:

  Guys,
 
  someone has soem experience with the nice JmxPanel describe here?
 
  http://chillenious.wordpress.com/2007/08/29/jmx-wicket-panel/
 
  Adding a JmxPanel instance to my page I always get the following EMPTY
  panel
  ..
 
 
  div class=jmxTreePanel
  table
  tr
   tddiv id=tree1 class=jmxTree
   div style=display:none id=tree1_0/div
   /div/td
 tddiv id=detailPanel2
  /div/td
  /tr
  /table
  /div
  div style=clear:both/div
 
 
  Any ideas ?
 
  Thanks.
 
  // Paolo
 



Re: JmxPanel

2008-04-23 Thread Paolo Di Tommaso
No. Just a plain html page without any custom css.

What version of Wicket/Wicket-stuff-jmx-panel are you using ?


Thanks,

// Paolo

On Wed, Apr 23, 2008 at 7:20 PM, Gerolf Seitz [EMAIL PROTECTED]
wrote:

 nope, did the same thing you did.
 do you have any custom css that might cause this?

  Gerolf

 On Wed, Apr 23, 2008 at 7:02 PM, Paolo Di Tommaso 
 [EMAIL PROTECTED]
 wrote:

  Absolutely, JMX feature is enabled.
 
  I'm adding a JmxPanel in my page using a simple:
 
  add(new JmxPanel(jmx));
 
 
  but nothing is displayed ..
 
  You have it working? Have you used any trick?
 
  // Paolo
 
 
  On Wed, Apr 23, 2008 at 3:46 PM, Gerolf Seitz [EMAIL PROTECTED]
  wrote:
 
   Paolo,
   I'm not sure where the display:none comes from,
   but i'm pretty sure it's not from the JmxPanel.
  
   do you have jmx enabled at all?
  
   Gerolf
  
   On Thu, Apr 17, 2008 at 9:07 AM, Paolo Di Tommaso 
   [EMAIL PROTECTED]
   wrote:
  
Guys,
   
someone has soem experience with the nice JmxPanel describe here?
   
http://chillenious.wordpress.com/2007/08/29/jmx-wicket-panel/
   
Adding a JmxPanel instance to my page I always get the following
 EMPTY
panel
..
   
   
div class=jmxTreePanel
table
tr
 tddiv id=tree1 class=jmxTree
 div style=display:none id=tree1_0/div
 /div/td
   tddiv id=detailPanel2
/div/td
/tr
/table
/div
div style=clear:both/div
   
   
Any ideas ?
   
Thanks.
   
// Paolo
   
  
 



Re: integrating extjs with wicket

2008-04-22 Thread Paolo Di Tommaso
Dear AT ... unfortunately I didn't had time to work out on this integration.


I will let you know in future.

// Paolo



On Mon, Apr 21, 2008 at 4:58 PM, Advanced Technology(R) [EMAIL PROTECTED]
wrote:

 Hi Paulo,
 Did you have sucess integrating Ext.form.FormPanel ???
 Can you upload  Wicket-Extjs integration Test App ?


 AT

 2008/1/9, Paolo Di Tommaso [EMAIL PROTECTED]:
 
  This is really an interesting topic!
 
  I've made some Wicket-Extjs integration tests and I haven't found any
  particular issues to make them work smoothly together.
 
  Extjs UI widgets can be created dynamically or can be attach to existing
  HTML elements using the element IDs.
 
  Following the latter approach is quite easy integrate Extjs with Wicket.
 
  The simplest way I've tried is using a behavior to 'attach' an Extjs
  widget
  to Wicket component.
 
  For example:
 
  public class ExtDateFieldBehavior extends ExtAbstractBehavior{
 
  @Override
  String getExtjsClassName() {
  return Ext.form.DateField;
  }
 
  }
 
  public abstract class ExtAbstractBehavior extends AbstractBehavior {
 
 
  /**
   * Used to add all common Extjs required JavaScript and CSS
 resources
   */
  @Override
  public void bind(Component component) {
  if( component == null ) throw new
  IllegalArgumentException(Argument
  cannot be null);
  component.setOutputMarkupId(true);
  component.add(HeaderContributor.forCss( Extjs.Css.EXT_ALL ));
  component.add(HeaderContributor.forJavaScript( Extjs.Js.EXT_BASE
  ));
  component.add(HeaderContributor.forJavaScript(
  Extjs.Js.EXT_ALL_DEBUG ));
  }
 
 
  abstract String getExtjsClassName();
 
  abstract String getOptions();
 
  @Override
  public void onRendered( Component component ) {
  /* create a copy of options */
  Config options = new Config( config );
  /* initialization */
  config(component,options);
  /* get the string version */
  String sConfig = Extjs.serialize(options);
 
  String extjs = new  + getExtjsClassName() + ( + getOptions()
 +
  );;
  //TODO log here
 
  Response r = component.getResponse();
  r.write( JavascriptUtils.SCRIPT_OPEN_TAG );
  r.write( extjs );
  r.write( JavascriptUtils.SCRIPT_CLOSE_TAG );
  }
  }
 
 
  That's all!
 
  Obviously this is just a simple test but it works and can be extended
  easily
  for other widgets.
 
 
  What I've found not trivial is to pass/define the Extjs widget
  property/configuration in a easy/elegant way.
 
  Would be interesting discuss this...
 
 
  -- Paolo
 
 
 
 
 
  On Jan 9, 2008 6:25 PM, Jeremy Fergason [EMAIL PROTECTED]
 wrote:
 
   wicket seems to provide some nice management classes like TextField,
  that
   do
   things like set the value for you, I don't see how to integrate this
  with
   a
   javascript solution like ExtJs which does not use an input
 type=text
   ...
   tag.  It could be something very simple and I am just missing it, if
 so
   please point me in the right direction.
  
   Thanks!
  
   On Jan 9, 2008 10:19 AM, Martijn Dashorst [EMAIL PROTECTED]
   wrote:
  
What is keeping you from building it?
   
Martijn
   
On Jan 9, 2008 6:15 PM, Reinout van Schouwen [EMAIL PROTECTED]
  wrote:

 Op woensdag 09-01-2008 om 09:07 uur [tijdzone -0700], schreef
 Jeremy
 Fergason:

  I'm just starting out with wicket and I would like to use a
client-side
  javascript library--ExtJs, to enhance the end user experience.

 +1

 At my company we use Ext2 and are very enthousiastic about it.
 I want to move us from Struts to Wicket but lack of support for
 Ext2
 would be a roadblock...

 --
 Reinout van Schouwen





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


   
   
   
--
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.0 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0
   
   
 -
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   
   
  
 



 --
 AT(R)



Re: JmxPanel

2008-04-18 Thread Paolo Di Tommaso
Thanks, I will try it. Anyway strange that there's this still this issue ..


// Paolo

On Thu, Apr 17, 2008 at 2:20 PM, gumnaam23 [EMAIL PROTECTED] wrote:


 Download the jmx panel source code and add an empty DIV element before the
 the JmxPanel.html

 here's patch,   (you need stuff between --START and -- END )

 svn diff src/main/java/org/wicketstuff/jmx/markup/html/JmxPanel.html

 -- START

 Index: src/main/java/org/wicketstuff/jmx/markup/html/JmxPanel.html
 ===
 --- src/main/java/org/wicketstuff/jmx/markup/html/JmxPanel.html (revision
 3817)
 +++ src/main/java/org/wicketstuff/jmx/markup/html/JmxPanel.html (working
 copy)
 @@ -15,6 +15,7 @@
limitations under the License.
  --
  wicket:panel
 +   div style=clear:both /div
div wicket:id=jmxBeanTable/div
 div style=clear:both/div
 /wicket:panel

 -- END

 Or you can ask the author of JMX panel to include this patch in the next
 release.


 paolo di tommaso wrote:
 
  Guys,
 
  someone has soem experience with the nice JmxPanel describe here?
 
  http://chillenious.wordpress.com/2007/08/29/jmx-wicket-panel/
 
  Adding a JmxPanel instance to my page I always get the following EMPTY
  panel
  ..
 
 
  div class=jmxTreePanel
  table
  tr
   tddiv id=tree1 class=jmxTree
div style=display:none id=tree1_0/div
/div/td
  tddiv id=detailPanel2
  /div/td
  /tr
  /table
  /div
  div style=clear:both/div
 
 
  Any ideas ?
 
  Thanks.
 
  // Paolo
 
 

 --
 View this message in context:
 http://www.nabble.com/JmxPanel-tp16740210p16743671.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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




Re: AW: Wicket + CMS

2008-04-18 Thread Paolo Di Tommaso
Someones in this thread have ever seen Riot CMS ?!

*Riot is a web-based Open Source Content Management System written in Java.
It's quite different from other systems as it has been designed to match the
needs of custom applications, [..]*

http://www.riotfamily.org


I think would be relatively easy to add Wicket support to it.


// Paolo



On Fri, Apr 18, 2008 at 9:28 PM, Frank van Lankvelt 
[EMAIL PROTECTED] wrote:

 Hi Uwe,

   plug shameless=true
  
   The repository is a JCR (JackRabbit) repository extended with workflow
   and faceted navigation.  The CMS is composed as a set of plugins.
  These
   Wicket components can be configured and that can be dynamically
 swapped
   in and out of the application.  We use this for example for the
   templates.  Templates consist of a set of (template) plugins and a
   configuration in the repository.  The template configuration can be
   edited in the CMS itself!
  
   /plug
 
  will the actual delivery be done by a JSP frontend, or a Wicket
 frontend?
 
 at the moment, we're focussing on JSP.  A custom tag library is under
 development that accesses the repository and allows url mapping.

 It should certainly be possible to develop a frontend in Wicket; the
 models that we use to access the repository are easily reused.
 To embed plugins, e.g. those used by the CMS, does require some support
 from the environment.  The Wicket session needs to provide a valid JCR
 session, for example.

  And if JSP will be delivering, can we build CMS-agnostic wicket
  components that could wor as they would in a normal wicket app (wrapped
  by some plugin adapter of course)?
 
 yes, if you're components don't need to have any interaction with the
 CMS then this is certainly possible.

 When you do want to have an interaction, some additional constaints will
 (likely) be present due to the possible actions of other plugins.

 If you want to further discuss the Hippo CMS, then we should move the
 discussion to the hipporepos-dev mailing list.  You can subscribe and
 visit the archives at
 http://lists.hippo.nl/mailman/listinfo/hipporepos-dev
 The traffic mainly consists of JIRA updates and svn-logs, but it should
 be possible to filter these out if you want to.

 thanks for the interest!

 cheers, Frank


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




JmxPanel

2008-04-17 Thread Paolo Di Tommaso
Guys,

someone has soem experience with the nice JmxPanel describe here?

http://chillenious.wordpress.com/2007/08/29/jmx-wicket-panel/

Adding a JmxPanel instance to my page I always get the following EMPTY panel
..


div class=jmxTreePanel
table
tr
 tddiv id=tree1 class=jmxTree
  div style=display:none id=tree1_0/div
  /div/td
tddiv id=detailPanel2
/div/td
/tr
/table
/div
div style=clear:both/div


Any ideas ?

Thanks.

// Paolo


Check validator existence

2008-04-14 Thread Paolo Di Tommaso
Guys,

is there an API in wicket to know if a Validator instance has been added to
a form?

Something like Form#contains( IValidator ) or any workaround to know it?


Thanks,


// Paolo


Re: Check validator existence

2008-04-14 Thread Paolo Di Tommaso
I've done so .. thanks.

// Paolo

On Mon, Apr 14, 2008 at 9:17 PM, Igor Vaynberg [EMAIL PROTECTED]
wrote:

 just have a boolean that marks the fact that you have added the
 validator to the form...

 -igor





How page handle a request wiki page

2008-04-12 Thread Paolo Di Tommaso
I think the content of this page describing how page handle a request is
outdated by wicket 1.3.x

http://cwiki.apache.org/WICKET/lifecycle-of-a-wicket-application.html#LifecycleofaWicketApplication-HowPageHandlesaRequest

It is still making reference to onBeginRequest and onAfterRequest methods
that have been deprecated. Haven't they?


Thank Paolo


Re: onBeforeRender vs. prepareForRender

2008-04-12 Thread Paolo Di Tommaso
Here it is a good reference

http://cwiki.apache.org/WICKET/user-code-context.html


// Paolo

On Sat, Apr 12, 2008 at 7:29 PM, Stefan Simik [EMAIL PROTECTED]
wrote:


 One additional question,

 is it valid to change to component hierarchy in these methods ?

 I tried it, but it didnt work:



 SHORT EXAMPLE:
 -

 AjaxFallbackLink updateLink = new AjaxFallbackLink(updateLink) {

  @Override
  public void prepareForRender() {
super.prepareForRender();

// if some condition true - render additional attribute
if (isUpdateProcessRunning()) {
add(new
 StyleAttributeAppender(text-decoration: none;));
}
  }
 };


  and result was, that no STYLE attribute was rendered.

 But when I write:
updateLink.add(new StyleAttributeAppender(text-decoration: none;));
 then, the STYLE attribute is rendered.


 I cannot find out, what I am doing wrong here..

 Thanks a lot.
 --
 View this message in context:
 http://www.nabble.com/onBeforeRender-vs.-prepareForRender-tp16653398p16653658.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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




Re: Seam Wicket integration and conversation scope

2008-03-23 Thread Paolo Di Tommaso
Nice and interesting. This could be a valid alternative to simulate the Seam
conversation-scoped persistent context.

Although doing so the presentation layer is too tied to persistent session
handling aspect. I think this could be really useful in a simple scenario
with few pages, but in complex use causes (and integrating other frameworks
like jbpm that need to share the same hibernate session) it will drive in a
hell.


Thank you.

// Paolo

On Sun, Mar 23, 2008 at 2:25 AM, Igor Vaynberg [EMAIL PROTECTED]
wrote:

 conversation scope is slightly different, for long running hibernate
 sessions it is an equivalent of doing:

 class conversationpage extends webpage {
  private org.hibernate.Session session;

  public conversationpage(Session session) {
this.session=session;
  }

  protected Session getSession() {
if (!session.isconnected()) { session.reconnect(); }
return session;
  }

  protected void ondetach() { session.disconnect(); }
 }

 so in this case the conversation would be propogated so:

 setresponsepage(new edituserstep2page(getsession(), usermodel));

 -igor


 On Sat, Mar 22, 2008 at 6:13 PM, brian.diekelman [EMAIL PROTECTED]
 wrote:
 
   I have only read up on Seam a few times, so help me out where I'm
   incorrect...
 
   As far as I can tell Seam uses the conversation scope as a step between
   request scope and session scope to persist values across a couple of
   requests, for instance a user creation wizard, etc.
 
   I don't know what integration they've enabled or how it works, but
 passing
   an object between requests is simple and straight forward in wicket.
  Say
   that you want to pass a user object (or any other combination of
 objects)
   from one page to another when the user clicks a link:
 
   public class SimplePage extends WebPage
   {
public SimplePage(final User user)
{
  add(new Link(link)
  {
public void onClick()
{
  setResponsePage(new SomeOtherPage(user));
}
  }
}
   }
 
   You would pass it directly by reference.  Like I said, I don't know how
 Seam
   is integrating, but when you're using Wicket you don't really have a
 need
   for something like a conversation scope.  You can use whatever
 granularity
   you'd like to pass objects between pages, not necessarily bound to any
   particular scope.
 
   Please let me know if I'm just completely missing your point here.
 
   --
   View this message in context:
 http://www.nabble.com/Seam-Wicket-integration-and-conversation-scope-tp16228793p16230158.html
   Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
 
 

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




Seam Wicket integration and conversation scope

2008-03-22 Thread Paolo Di Tommaso
I'm playing with the latest Seam release (2.1.0.A1) containing a really
interesting integration of Apache Wicket.

The current implementation appear to be really promising and I hope it will
improved in next release.

One of the most interesting feature already implemented is the conversation
scope that enables conversation-scoped persistent context.

I've noticed that the conversation between different wicket pages is
maintained only navigating by a form submit action BUT it doesn't when
moving between pages using other components i.e. Link, AjaxLink, Button,
AjaxBehavior .. and so on.

This makes it useless, in particular with Ajax interactions where it is
expected to have the maximum benefits (no more LazyInitializationException
.. ).

Is this a know issue? It is planned in next release to maintained the
conversation between Wicket pages navigating by Link and AjaxBehavior also?

Thank you,

// Paolo


Re: wicket-datetime

2008-03-06 Thread Paolo Di Tommaso
If you don't have licence matter you can download the old 1.2.x datepicker
available here

http://wicketstuff.org/confluence/display/STUFFWIKI/wicket-contrib-datepicker

and refactor to make it use the Wicket 1.3.x core classes.


That's all .

/ Paolo


On Thu, Mar 6, 2008 at 11:23 AM, Charlie Dobbie [EMAIL PROTECTED] wrote:

 Hi all,

 This is causing me some issues as well.  I have a page which contains
 21 datepickers...  These add 59KB of JavaScript to the head and I now
 believe might be the cause of a ~three second browser pause I'm seeing
 when the entering the page.

 The 1.2.6 datepicker component kept its JavaScript in external
 libraries, so they were only loaded once, and made a call to
 Calendar.setup to do the work for each component.  Obviously, they're
 both different technologies behind the scenes, so the same approach
 might not work.  Anyone got any suggestions?

 Charlie.



 On Thu, Mar 6, 2008 at 9:42 AM, Ned Collyer [EMAIL PROTECTED] wrote:
 
   Hi Igor,
 
   The picker works fine - its the implementation I'm concerned about.
 
   If you have 2 instances, then all the javascript exists twice.  All the
   translations exist twice.
 
   The demo does not show 2 date pickers and you can clearly see the
 dependance
   on initdateTextField2 being pasted into the middle of the script
 area.
 
   eg, say you need to specify a date range - or multiple date ranges for
   something like a search input, or you have multiple panels with date
   pickers.
 
   Is this purely to satisfy the requirement of the example? -ie, not
 suitable
   for anything more than date of birth checking and 1 instance per
 page.
 
 
 
   igor.vaynberg wrote:
   
it seems to be working just fine here
   
http://wicketstuff.org/wicket13/dates/
   
   
-igor

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




Re: Bookmarkable page absolute url

2008-03-04 Thread Paolo Di Tommaso
Nice. thank you!

But the real problem is that the RequestCycle#urlFor( Class, PageParams ) is
returning a relating path like:

../?wicket:bookmarkablePage=the.class.Name

Well the javadoc for urlFor() states:

*Returns a bookmarkable URL that references a given page class using a given
set of page
parameters. Since the URL which is returned contains all information
necessary to instantiate
and render the page, it can be stored in a user's browser as a stable
bookmark.*

But a RELATIVE url (like the above) how can be considered a stable
bookmarkable url?

Am I missing something ?


Thanks.

/ Paolo


On Tue, Mar 4, 2008 at 12:47 PM, Daniel Frisk [EMAIL PROTECTED] wrote:

 I use RequestUtils to convert the path to an absolute path, seems to
 work like a charm :-)

 import org.apache.wicket.protocol.http.RequestUtils;

 RequestUtils.toAbsolutePath(relativePath);

 Regards
 // Daniel




Cross fields validation

2008-02-29 Thread Paolo Di Tommaso
Guys,

Which the best pattern using wicket to write validation rule that span over
more than one field?!

Take in consideration the following use case:

There is a form with two field Field-A and Field-B.

Field-A is mandatory and contains a date value. So this is trivial:
setRequired(true) + a DateValidator

Field-B validation depends on the date value entered in Field-A and is
mandatory only for certain date value entered in Field-A.

So basically how write a validator that depends on values entered in other
fields?


Thank you.

/ Paolo


Re: Cross fields validation

2008-02-29 Thread Paolo Di Tommaso
Thanks!

On Fri, Feb 29, 2008 at 10:55 AM, Kai Mütz [EMAIL PROTECTED] wrote:

 [EMAIL PROTECTED]  wrote:
  Guys,
 
  Which the best pattern using wicket to write validation rule that
  span over
  more than one field?!

 http://cwiki.apache.org/WICKET/validating-related-fields.html

 HTH, Kai


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




Wicket 1.3.x PageParameters

2008-02-25 Thread Paolo Di Tommaso
Guys,

I'm migrating to Wicket 1.3.x but my application is raising the following
exception

java.lang.IllegalArgumentException: PageParameters can only contain String
or String[]
at org.apache.wicket.request.target.coding.WebRequestEncoder.addValue(
WebRequestEncoder.java:71)
at
org.apache.wicket.request.target.coding.QueryStringUrlCodingStrategy.appendParameters
(QueryStringUrlCodingStrategy.java:139)
at
org.apache.wicket.request.target.coding.BookmarkablePageRequestTargetUrlCodingStrategy.encode
(BookmarkablePageRequestTargetUrlCodingStrategy.java:135)
at
org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.pathForTarget
(WebRequestCodingStrategy.java:459)
at org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.encode(
WebRequestCodingStrategy.java:236)
at
org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond
(BookmarkablePageRequestTarget.java:224)
at org.apache.wicket.request.AbstractRequestCycleProcessor.respond(
AbstractRequestCycleProcessor.java:103)
at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java
:1172)

Is the PageParameters contract changed to contains only String as values?!
Any workaround to have to change all my PageParameters composition?

Thank you,

/ Paolo


Re: Wicket 1.3.x DatePicket drop-in replacement

2008-02-23 Thread Paolo Di Tommaso
Yes, I know that. But I would just to use the previous (and nice) JSCalendar
DatePicker.

I was expecting that the drop-in replacement was a .. drop-in replacement.
But it is still requiring the Wicket 1.2.x core classes (!), being so
migrating to 1.3.x and using the DatePicker drop-in replacement jar it would
require also to deploy also the wicket 1.2.x core classes .. this seems a
bit strange.

Am I missing something ?

Thanks,

- Paolo


On Fri, Feb 22, 2008 at 6:11 PM, Igor Vaynberg [EMAIL PROTECTED]
wrote:

 there is wicket-datetime that has a yui datepicker

 there is also wicket-stuff-calendar (or something that is
 wicket-*-calendar) that uses dhtml gooies datepicker

 -igor


 On Fri, Feb 22, 2008 at 5:15 AM, Paolo Di Tommaso
 [EMAIL PROTECTED] wrote:
  Guys,
 
   as stated in the migration 1.3 migration guide I'm trying to use the
 drop-in
   replacement for the old (JSCalendar based) DatePicker.
 
   http://cwiki.apache.org/WICKET/migrate-13.html#Migrate-1.3-DatePicker
 
   But the download jar named wicket-contrib-datepicker-1.2.jar still
 make
   references to 1.2.x wicket classes (wicket.xxx.Xxx classes) so I'm
 unable to
   use together the wicket 1.3 core classes.
 
 
   Is there a distribution of the previous DatePicker that works with
 Wicket
   1.3 ?
 
 
   Thank you,
 
 
   Paolo
 

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




Wicket 1.3.x DatePicket drop-in replacement

2008-02-22 Thread Paolo Di Tommaso
Guys,

as stated in the migration 1.3 migration guide I'm trying to use the drop-in
replacement for the old (JSCalendar based) DatePicker.

http://cwiki.apache.org/WICKET/migrate-13.html#Migrate-1.3-DatePicker

But the download jar named wicket-contrib-datepicker-1.2.jar still make
references to 1.2.x wicket classes (wicket.xxx.Xxx classes) so I'm unable to
use together the wicket 1.3 core classes.


Is there a distribution of the previous DatePicker that works with Wicket
1.3 ?


Thank you,


Paolo


Re: the flow of wicket

2008-01-12 Thread Paolo Di Tommaso
I disagree with this answer.

The fact that request handling stuff is not a public api, is A GOOD REASON
because it should be documented better, not viceversa.

And I really don't understand in which way this could prevent you to change
- eventually - in future wicket versions.

I not a newbie user and I'm really a Wicket enthusiastic user and pleased to
be involved in its great community, but I have to admit that some topics are
still obscure.

The request flow handling is one of the most important topic to know in a
web application framework, being so I think it would be very interesting to
have only a brief description, for example a sequence diagram showing the
components interaction starting from the WicketFilter (and/or the
WicketServlet) involved in a web request handling.

Hiding this stuff or, even worse, asking the users to debug the framework to
understand what it should important to know I don't think is a good approach
because it is precisely this that leads to wrong assumptions, that could
break in future.

Thank you,

- Paolo



On Jan 11, 2008 2:09 AM, Igor Vaynberg [EMAIL PROTECTED] wrote:

 you guys want to know about internal implementation details. it has no
 publically exposed api, so why should you care? why should we document
 something that can change without affecting our users? does the jee
 spec detail how the request gets to the servlet? no, that is left up
 to the implementor of the servlet container.

 you want to know about it?  set a break point in
 wicketfilter.dofilter() and walk the code.

 -igor


 On Jan 10, 2008 5:06 PM, Dan Kaplan [EMAIL PROTECTED] wrote:
  seconded
 
 
  -Original Message-
  From: Beyonder Unknown [mailto:[EMAIL PROTECTED]
  Sent: Thursday, January 10, 2008 5:05 PM
  To: WICKET USER
  Subject: the flow of wicket
 
 
  Hi All,
 
  I am studying wicket from the WicketFilter to the WebApplication, but I
  don't understand the concept of RequestCycleProcessor and how does it
 get
  invoked.  I read the Wicket In Action and Pro Wicket but the
 explanation
  is not that detailed. Does anybody know of a primer with regards to how
  Wicket process really works? I want to know the flow, from startup of
 the
  servlet container, like what is being instantiated, and when  request is
  made.
 
  I can't seem to trace how RequestTarget being consumed by
  RequestCycleProcessor, from the page.
 
  Thank you very much!
 
  Best,
  Wen Tong
 
  --
  The only constant in life is change.
 
 
 
 
 
 
 
  
  Be a better friend, newshound, and
  know-it-all with Yahoo! Mobile.  Try it now.
  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 

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




Re: integrating extjs with wicket

2008-01-09 Thread Paolo Di Tommaso
This is really an interesting topic!

I've made some Wicket-Extjs integration tests and I haven't found any
particular issues to make them work smoothly together.

Extjs UI widgets can be created dynamically or can be attach to existing
HTML elements using the element IDs.

Following the latter approach is quite easy integrate Extjs with Wicket.

The simplest way I've tried is using a behavior to 'attach' an Extjs widget
to Wicket component.

For example:

public class ExtDateFieldBehavior extends ExtAbstractBehavior{

@Override
String getExtjsClassName() {
return Ext.form.DateField;
}

}

public abstract class ExtAbstractBehavior extends AbstractBehavior {


/**
 * Used to add all common Extjs required JavaScript and CSS resources
 */
@Override
public void bind(Component component) {
if( component == null ) throw new IllegalArgumentException(Argument
cannot be null);
component.setOutputMarkupId(true);
component.add(HeaderContributor.forCss( Extjs.Css.EXT_ALL ));
component.add(HeaderContributor.forJavaScript( Extjs.Js.EXT_BASE ));
component.add(HeaderContributor.forJavaScript(
Extjs.Js.EXT_ALL_DEBUG ));
}


abstract String getExtjsClassName();

abstract String getOptions();

@Override
public void onRendered( Component component ) {
/* create a copy of options */
Config options = new Config( config );
/* initialization */
config(component,options);
/* get the string version */
String sConfig = Extjs.serialize(options);

String extjs = new  + getExtjsClassName() + ( + getOptions() +
);;
//TODO log here

Response r = component.getResponse();
r.write( JavascriptUtils.SCRIPT_OPEN_TAG );
r.write( extjs );
r.write( JavascriptUtils.SCRIPT_CLOSE_TAG );
}
}


That's all!

Obviously this is just a simple test but it works and can be extended easily
for other widgets.


What I've found not trivial is to pass/define the Extjs widget
property/configuration in a easy/elegant way.

Would be interesting discuss this...

-- Paolo




On Jan 9, 2008 6:25 PM, Jeremy Fergason [EMAIL PROTECTED] wrote:

 wicket seems to provide some nice management classes like TextField, that
 do
 things like set the value for you, I don't see how to integrate this with
 a
 javascript solution like ExtJs which does not use an input type=text
 ...
 tag.  It could be something very simple and I am just missing it, if so
 please point me in the right direction.

 Thanks!

 On Jan 9, 2008 10:19 AM, Martijn Dashorst [EMAIL PROTECTED]
 wrote:

  What is keeping you from building it?
 
  Martijn
 
  On Jan 9, 2008 6:15 PM, Reinout van Schouwen [EMAIL PROTECTED] wrote:
  
   Op woensdag 09-01-2008 om 09:07 uur [tijdzone -0700], schreef Jeremy
   Fergason:
  
I'm just starting out with wicket and I would like to use a
  client-side
javascript library--ExtJs, to enhance the end user experience.
  
   +1
  
   At my company we use Ext2 and are very enthousiastic about it.
   I want to move us from Struts to Wicket but lack of support for Ext2
   would be a roadblock...
  
   --
   Reinout van Schouwen
  
  
  
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
 
 
  --
  Buy Wicket in Action: http://manning.com/dashorst
  Apache Wicket 1.3.0 is released
  Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 



Re: [Wicket 1.2.6] How to get Wizard's form from inside a WizardStep?

2008-01-07 Thread Paolo Di Tommaso
I would propose the following patch to AjaxFormSubmitBehavior.

Basically adding a form-less constructor so that when the form obejct is not
specified it will discovered using the findParent(Form.class) method.


Core developers what do you think about it ?

Paolo


abstract public class AjaxFormSubmitBehavior extends AjaxEventBehavior{

private Form form;


public LazyFormSubmitBehavior(String event) {
super(event);
}

public LazyFormSubmitBehavior( Form form, String event ) {
super(event);
this.form = form;
}

protected Form getForm() {
if( form == null ) {
form = (Form) getComponent().findParent(Form.class);
/* form component cannot be null */
if( form == null ) {
throw new IllegalStateException(Unable to discover parent
form object. Try to override getForm() method with different deferred
strategy);
}
}

return form;
}

@Override
protected CharSequence getEventHandler()
{
final String formId = getForm().getMarkupId();
final CharSequence url = getCallbackUrl();


AppendingStringBuffer call = new
AppendingStringBuffer(wicketSubmitFormById(').append(formId).append(',
').append(url).append(', );

if (getComponent() instanceof Button)
{

call.append(').append(((FormComponent)getComponent()).getInputName()).append('
);
}
else
{
call.append(null);
}

return getCallbackScript(call, null, null) + ;;
}

@Override
protected void onEvent(AjaxRequestTarget target)
{
getForm().onFormSubmitted();
if (!getForm().hasError())
{
onSubmit(target);
}
else
{
onError(target);
}
}

protected abstract void onSubmit(AjaxRequestTarget target);

protected void onError(AjaxRequestTarget target)
{

}

}

On Jan 7, 2008 9:45 AM, Fabio Fioretti [EMAIL PROTECTED] wrote:

 Thanks everybody for the precious help, a custom lazy
 AjaxFormSubmitBehavior was the way to go.


 Fabio Fioretti - WindoM

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




Re: [Wicket 1.2.6] How to get Wizard's form from inside a WizardStep?

2008-01-07 Thread Paolo Di Tommaso
Emh .. not really because that source IS the patch ;)


On Jan 8, 2008 4:52 AM, Timo Rantalaiho [EMAIL PROTECTED] wrote:

 On Mon, 07 Jan 2008, Paolo Di Tommaso wrote:
  I would propose the following patch to AjaxFormSubmitBehavior.
 
  Basically adding a form-less constructor so that when the form obejct is
 not
  specified it will discovered using the findParent(Form.class) method.

 Could you get the same event by

  AjaxFormSubmitBehavior behavior =
  new AjaxFormSubmitBehavior(null, onchange) {
  @Override
  protected Form getForm() {
  return findParent(Form.class);
  }
  ...
  }

 as stated in the source code:

  /* form component cannot be null */
  if( form == null ) {
  throw new IllegalStateException(Unable to discover
 parent
  form object. Try to override getForm() method with different deferred
  strategy);

 Best wishes,
 Timo

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

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




Re: [Wicket 1.2.6] How to get Wizard's form from inside a WizardStep?

2008-01-05 Thread Paolo Di Tommaso
Let me guess .. you need the form to create a AjaxSubmitLink instance.

But the #findParent(Form.class) will return null until the component
hierarchy is constructed, being so you cannot invoke it at component
construction-time.

A possible workaround is to postpone the findParent(Form.class) method
invocation instantiating a the AjaxSubmitLink using a form proxy.

I've hacked this writing a custom AjaxFormSubmitBehavior that does not
require the form instance on its constructor but just discover it - invoking
#findParent(Form.class) method - when is required.

Me fate sempre lavora.. ;)

P


On Jan 4, 2008 12:43 PM, Fabio Fioretti [EMAIL PROTECTED] wrote:

 First of all, many compliments for the great Wicket 1.3 release: we're
 looking forward to port our application to the new cool version!

 How can I get the Wizard's form from inside a WizardStep? I need it to
 trigger an AjaxSubmitLink which should update a part of my model while
 remaining inside that step. What leaves me clueless is the fact that
 WizardStep instances are added to the WizardModel instead of the
 Wizard, so doing something like this from inside the WizardStep:

 Form form = (Form)WizardStep.this.findParent(Form.class);

 seems to return null; moreover, this makes me wonder how the same
 instruction inside WizardStep.AddFormValidatorAction.execute() can
 succeed.

 I'm sure I'm missing something really stupid. Please forgive me. :-)


 Thanks a lot,

 Fabio Fioretti - WindoM

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




Re: Ways of making components in a page optional?

2008-01-03 Thread Paolo Di Tommaso
Yes, I use this approach in conjunction to an ajax action to refresh/create
UI components in response  to user interaction.


Paolo

On Jan 3, 2008 7:43 AM, Timo Rantalaiho [EMAIL PROTECTED] wrote:

 On Wed, 02 Jan 2008, Paolo Di Tommaso wrote:
  An easy trick to avoid this is to use a Panel/Fragment instantiating
 just a
  WebMarkupContainer when you don't want to display/create the full
 component.

 Ah, you mean something like

  add(new WebmarkupContainer(myComplexComponent));

 at construction and then later on

  replace(new MyComplexComponent(myComplexComponent))

 ?

 That's an interesting idea, thanks!

 Best wishes,
 Timo

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

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




Re: Ways of making components in a page optional?

2008-01-02 Thread Paolo Di Tommaso
An easy trick to avoid this is to use a Panel/Fragment instantiating just a
WebMarkupContainer when you don't want to display/create the full component.


That's all

Paolo

On Jan 2, 2008 7:06 PM, Timo Rantalaiho [EMAIL PROTECTED] wrote:

 On Tue, 18 Dec 2007, wfaler wrote:
  Hmm, haven't tried that. That might work - sometimes you just don't
 check all
  the methods thoroughly enough.. :)

 Yep, as far as I know the Wicket Way (TM) of making
 components optional is controlling their visibility. This
 need becomes more obvious when you consider that (except
 repeaters) there is a 1:1 correspondence between HTML
 elements with wicket:id and Wicket components, and it
 wouldn't be nice to need to change the HTML files runtime :)

 One consequence is that all components of the page always
 get constructed even if they are not visible, so on one hand
 you don't want to do heavy work in the constructor of such
 component but on other hand you get more fail-fast with
 regard to component creation.

 Best wishes,
 Timo

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

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




Re: WicketTester failure (1.2.6)

2007-12-06 Thread Paolo Di Tommaso
Solved using

WicketTester#setStartPage( ITestPageSource ) instead of
WicketTester#setStartPage( Page )

Bye, Paolo

On Dec 5, 2007 4:18 PM, Paolo Di Tommaso [EMAIL PROTECTED] wrote:

 Guys,

 I'm getting a WicketRuntimeExceptionin this simple unit test:

 class SimpleTest {

 @Test
 public void createPage() {
 WicketTester tester = new WicketTester();

 PageParameters params = new PageParameters(office_code=FAAFG);
 Page page = new PremisesListPage(params);
 tester.startPage( page );
 tester.assertNoErrorMessage();
 }

 }


 I'm missing something to run test on page instances (instead of using
 WicketTester#startPage(Class) )

 Here it is the stack trace:

 wicket.WicketRuntimeException: Can not set the attribute. No RequestCycle
 available
 at wicket.Session.setAttribute(Session.java:933)
 at wicket.PageMap.put(PageMap.java :531)
 at wicket.Session.touch(Session.java:744)
 at wicket.util.tester.WicketTester.startPage(WicketTester.java:264)
 at
 org.fao.ocd.applications.coin.premises.ui.PremisesListPageTest.createListPage
 (PremisesListPageTest.java :52)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(
 NativeMethodAccessorImpl.java:39)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(
 DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at org.junit.internal.runners.TestMethodRunner.executeMethodBody(
 TestMethodRunner.java:99)
 at org.junit.internal.runners.TestMethodRunner.runUnprotected (
 TestMethodRunner.java:81)
 at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(
 BeforeAndAfterRunner.java:34)
 at org.junit.internal.runners.TestMethodRunner.runMethod(
 TestMethodRunner.java:75)
 at org.junit.internal.runners.TestMethodRunner.run(
 TestMethodRunner.java:45)
 at org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(
 TestClassMethodsRunner.java:66)
 at org.junit.internal.runners.TestClassMethodsRunner.run (
 TestClassMethodsRunner.java:35)
 at org.junit.internal.runners.TestClassRunner$1.runUnprotected(
 TestClassRunner.java:42)
 at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(
 BeforeAndAfterRunner.java :34)
 at org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java
 :52)
 at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(
 JUnit4TestReference.java:38)
 at org.eclipse.jdt.internal.junit.runner.TestExecution.run (
 TestExecution.java:38)
 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(
 RemoteTestRunner.java:460)
 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(
 RemoteTestRunner.java:673)
 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(
 RemoteTestRunner.java:386)
 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(
 RemoteTestRunner.java:196



 Thank, Paolo



Re: Mystery problem w/ Wicket + Glassfish v2?

2007-11-08 Thread Paolo Di Tommaso
Has Wicket 1.2.7 been released? I'm unable to find on 1.2.x download page ..


Thanks, Paolo

On Nov 5, 2007 10:17 PM, Johan Compagner [EMAIL PROTECTED] wrote:

 please upgrade to at least the latest version of 1.2 (1.2.7) because if i
 look at getContentType of an innerclass of DynamicWebResource
 then that is now a abstract method. So there are changes in that area.

 johan



 On 11/5/07, V. Jenks [EMAIL PROTECTED] wrote:
 
 
  OOps!  Sorry, in the Glassfish log-viewer they separate the top line of
  the
  stack from the rest, for some reason.  Here it is:
 
  null java.lang.NullPointerException at
  wicket.markup.html.DynamicWebResource$1.getContentType(
  DynamicWebResource.java
 
 
 
  Johan Compagner wrote:
  
   you miss the most importand part of the error:  the top!
  
  
   On 11/5/07, V. Jenks [EMAIL PROTECTED] wrote:
  
  
   Occasionally, my application will just start doing this - throwing
  this
   error.  I am using Wicket 1.2.4 because my application is stuck at
  that
   version for the time being.  I do not have the time to make the
 changes
   to
   upgrade to the latest version, right now.
  
   Rebooting the app server (Glassfish v2) usually fixes it but when
 it
   does
   happen, it prevents orders from going through and frustrates
   customers.  Not
   a good thing...
  
   I have no idea what causes this and don't know the internals of
  Glassfish
   to
   even begin to try and troubleshoot.  All I know for sure is; this
 NEVER
   happened on JBoss 4.0.x with Wicket.  I figured it was safe to assume
   this
   had nothing to do with my code - nowhere in the stack does it point
 to
   anything in my application (or any application running on it, for
 that
   matter.)
  
   I realize this is vague so hopefully someone else is experiencing
 this
   and
   can help troubleshoot.
  
   Here's the error:
  
   ***
  
   156) at wicket.Resource.onResourceRequested(Resource.java:119) at
   wicket.request.target.resource.SharedResourceRequestTarget.respond(
   SharedResourceRequestTarget.java:192)
   at
   wicket.request.compound.DefaultResponseStrategy.respond(
   DefaultResponseStrategy.java:49)
   at
   wicket.request.compound.AbstractCompoundRequestCycleProcessor.respond
 (
   AbstractCompoundRequestCycleProcessor.java:66)
   at wicket.RequestCycle.doProcessEventsAndRespond(RequestCycle.java
 :902)
   at
   wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:934) at
   wicket.RequestCycle.step(RequestCycle.java:1010) at
   wicket.RequestCycle.steps(RequestCycle.java:1084) at
   wicket.RequestCycle.request(RequestCycle.java:454) at
   wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:219) at
   javax.servlet.http.HttpServlet.service(HttpServlet.java:718) at
   javax.servlet.http.HttpServlet.service(HttpServlet.java:831) at
   org.apache.catalina.core.ApplicationFilterChain.servletService(
   ApplicationFilterChain.java:411)
   at
   org.apache.catalina.core.StandardWrapperValve.invoke(
   StandardWrapperValve.java:290)
   at
   org.apache.catalina.core.StandardContextValve.invokeInternal(
   StandardContextValve.java:271)
   at
   org.apache.catalina.core.StandardContextValve.invoke(
   StandardContextValve.java:202)
   at
   org.apache.catalina.core.StandardPipeline.doInvoke(
  StandardPipeline.java
   :632)
   at
   org.apache.catalina.core.StandardPipeline.doInvoke(
  StandardPipeline.java
   :577)
   at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94) at
   org.apache.catalina.core.StandardHostValve.invoke(
  StandardHostValve.java
   :206)
   at
   org.apache.catalina.core.StandardPipeline.doInvoke(
  StandardPipeline.java
   :632)
   at
   org.apache.catalina.core.StandardPipeline.doInvoke(
  StandardPipeline.java
   :577)
   at
   org.apache.catalina.core.StandardPipeline.invoke(
 StandardPipeline.java
   :571)
   at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java
  :1080)
   at
   org.apache.catalina.core.StandardEngineValve.invoke(
   StandardEngineValve.java:150)
   at
   org.apache.catalina.core.StandardPipeline.doInvoke(
  StandardPipeline.java
   :632)
   at
   org.apache.catalina.core.StandardPipeline.doInvoke(
  StandardPipeline.java
   :577)
   at
   org.apache.catalina.core.StandardPipeline.invoke(
 StandardPipeline.java
   :571)
   at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java
  :1080)
   at
   org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java
 :270)
   at
  
  
 
 com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter
   (DefaultProcessorTask.java:637)
   at
  
 com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess
  (
   DefaultProcessorTask.java:568)
   at
   com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process
 (
   DefaultProcessorTask.java:813)
   at
  
  
 
 com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask
   

Wicket-jmx download (?)

2007-10-27 Thread Paolo Di Tommaso
Folks,

I'm looking for Wicket (1.2.x) JMX download but I'm unable to find in the
download page:

http://wicket.sourceforge.net/wicket-1.2/Download.html

Is there another location? How to get it?

Thanks,

Paolo


Re: Wicket-jmx download (?)

2007-10-27 Thread Paolo Di Tommaso
Great .. thank you people!

On 10/27/07, Martijn Dashorst [EMAIL PROTECTED] wrote:


 http://sourceforge.net/project/showfiles.php?group_id=119783package_id=138753release_id=503024

 On 10/27/07, Paolo Di Tommaso [EMAIL PROTECTED] wrote:
  Folks,
 
  I'm looking for Wicket (1.2.x) JMX download but I'm unable to find in
 the
  download page:
 
  http://wicket.sourceforge.net/wicket-1.2/Download.html
 
  Is there another location? How to get it?
 
  Thanks,
 
  Paolo
 


 --
 Buy Wicket in Action: http://manning.com/dashorst
 Apache Wicket 1.3.0-beta4 is released
 Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta4/

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




Re: Weird Ajax non-English characters encoding problem.

2007-10-22 Thread Paolo Di Tommaso
I'm experiencing a similar problem i.e.  I'm able to submit any Latin
encoded characters but when I'm using an AjaxSubmitButton some characters
are not encoded properly. This happens also specifying the right encoding
with:

getRequestCycleSettings().setResponseRequestEncoding(ISO-8859-1);


So it appears to be clear that is an ajax encoding problem with wicket.


Looking at the Wicket ajax code I found the following fragment:

if (t != null) {
t.open(POST, url, this.async);
t.onreadystatechange = this.stateChangeCallback.bind(this);
t.setRequestHeader(Content-Type,
application/x-www-form-urlencoded);
t.setRequestHeader(Wicket-Ajax, true);
t.send(body);
return true;
} else {
   this.failure();
   return false;
}


Now, how is defined the content encoding of an ajax request? I was expecting
something like charset=defined encoding in the ajax request request
header.

Otherwise how the IRequestCycleSettings#setResponseRequestEncoding() will
affect the charset definition in the ajax call?

Thanks,

Paolo


On 10/22/07, Fabio Fioretti [EMAIL PROTECTED] wrote:

 Hi Matej and Johan,

 thanks for your replies.

 I'm using Latin1 because the page I'm talking about is part of a
 legacy web application fully encoded in ISO-8859-1. The application
 server it runs on is Tomcat 5.5, which defaults to Latin1, so it
 shouldn't be a problem.

 I tried to set the request/response encoding in the application main
 class using:

 getRequestCycleSettings().setResponseRequestEncoding(ISO-8859-1);

 but nothing changed, except that Wicket Ajax Debug now prints:

 INFO:
 ?xml version=1.0 encoding=ISO-8859-1?ajax-response/ajax-response

 The problem I'm facing seems the same Stefan Lindner faced last year,
 whithout apparently finding a solution. I tried everything he tried.
 See link:

 http://www.nabble.com/AjaxSubmitButton-and-Umlauts-with-ISO-8859-1-%28Wicket-2%29-tf2622064.html


 I could migrate the whole application to UTF-8, but I would't do that
 for a single textarea in a single page... :-) It's the only page that
 needs non-English input.


 Any suggestion?


 Thanks a lot,

 Fabio Fioretti - WindoM


 On 10/21/07, Matej Knopp [EMAIL PROTECTED] wrote:
  I don't know tbh. I believe the request body is encoded in UTF-8.
  People usually use UTF-8, so no-one was complaining before. Can't you
  just use UTF-8? It's much safer than latin1.
 
  -Matej
 
  On 10/20/07, Johan Compagner  [EMAIL PROTECTED] wrote:
   are you configuring wicket and you appserver correctly?
   in wicket you have to set the encoding you want to use
   why not just use utf8?
   else matej?
   How does the ajax submit work with encoding?
   It is still a normal post and how do we interpret it?
  
  
   On 10/19/07, Fabio Fioretti  [EMAIL PROTECTED] wrote:
Hi all,
   
thanks in advance for your time and suggestions.
   
I'm building a really simple page made up of a form with a text area

and a submit button (instance of Button). An AjaxFormSubmitBehavior
that performs the save operation is added to the button. The page
 is
encoded as follows:
   
meta http-equiv=Content-Type content=text/html;
 charset=ISO-8859-1
   
Everything works fine until a user submits a non-English text
 (French
or Spanish, with characters like íéñ, still supported by the
ISO-8859-1 encoding): all non-English characters are scrambled.
   
What appears weird to me is that the problem doesn't happen if I
 use,
for example, a SubmitLink instead of an Ajax-enabled Button.
   
This makes me point to Ajax as the responsible, and to the fact that
Wicket uses UTF-8 for requests... but I really have no clue about
 how
to fix it.
   
Any idea?
   
   
Thank you very much and have a nice week-end.
   
Fabio Fioretti - WindoM

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




Re: Invitation to Cocoon GetTogether 2007

2007-09-10 Thread Paolo Di Tommaso
I'm not a Wicket core developer guru, but I'm leading a big Wicket based
project in Rome.

I would pleased to attend Cocoon conference and bring my Wicket experience.


Paolo Di Tommaso


On 9/9/07, Grzegorz Kossakowski [EMAIL PROTECTED] wrote:

 Hello Wicket devs and users!

 On behalf of Cocoon GetTogether organizers I would invite you to Cocoon GT
 2007 that will take place
 in Rome, Italy this year!

 First two days are reserved for community meet up called Hackathon.
 Hackathon is informal event
 which essential function is to have fun while developers are hacking their
 favourite projects.

 All in all, GT is a great venue for you to spend few days out in a nice
 location and hack around
 your Wicket stuff or help us hack Wicket into Cocoon as we already plan to
 do so! :-)
 It is also a great chance for some cross-pollination and ideas sharing. We
 are going to have really
 much fun, food, beers in a one big room.
 With fancy Wi-Fi connected table and a glass of italian wine?
 Then come Rome and join us!

 More details on http://www.cocoongt.org/

 --
 Grzegorz Kossakowski
 Committer and PMC Member of Apache Cocoon
 http://reflectingonthevicissitudes.wordpress.com/

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




Twice Behavior on the same event handler (wicket 1.2.x)

2007-09-05 Thread Paolo Di Tommaso
Dear Community,

what happens if two or event behavior are added on the save event handler.

I mean something like that

Button b = new Button(the-button);l
b.add(new AjaxEventBehavior(onclick) {
protected void onEvent(AjaxRequestTarget target)
{
//DO THIS
}
});


b.add(new AjaxEventBehavior(onclick) {
protected void onEvent(AjaxRequestTarget target)
{
//DO THAT
}
});


Will be fired both? just the first? just the last?

Thank to all.

- P


Re: Alternative to Wicket data binding

2007-08-25 Thread Paolo Di Tommaso
I agree. If you make the PropertyModel access private getter and setter I
don't see any reason because it cannot access the attribute field directly
(when the getter and setter are omitted) .

- Paolo

On 8/24/07, Eelco Hillenius [EMAIL PROTECTED] wrote:

  Just to be pedantic they are not ignored:
  with public getXXX and private setXXX the property is read only
  with public getXXX and no setXXX the property is read only
  with no getXXX and public setXXX property is read and write

 I would say that if the field exists, it should always use that. I
 think we should improve it.

 WDYT?

 Eelco

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




Re: Layout Panel

2007-08-23 Thread Paolo Di Tommaso
Umh .. I think the best things are simple ..

Why don't just handle the components position using html or css in your
panel?


Bye, Paolo



On 8/23/07, andrea pantaleoni [EMAIL PROTECTED] wrote:


 Hi,
 I have a little problem with Panel
 In a table I added a Panel
 Now in this Panel I want to add two different components, let's say, a
 dropdownchoice up and a textfield down.
 If I remember well, in swing it could be possible to add a layout to a
 panel
 and then for example add a component in north or in the south.
 Is there in wicket something similar?
 If I want to add the dropdownchoice component in the north of the panel
 and
 the textfield in the south is that possible
 Thanks for any help
 Andrea
 --
 View this message in context:
 http://www.nabble.com/Layout-Panel-tf4317423.html#a12293248
 Sent from the Wicket - User mailing list archive at Nabble.com.


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




Re: Layout Panel

2007-08-23 Thread Paolo Di Tommaso
I'm still thinking that's a pure html problem, Try with a table like this:

table height=100%
tr
td valign=top wicketcomponentup /td
td valign=bottom wicketcomponentdown /td
/tr
/table

Paolo



On 8/23/07, andrea pantaleoni [EMAIL PROTECTED] wrote:


 the reason is that I need to consider the panel as a single component
 which
 is used inside a listview
 Anyway you could be right I saw that in wicket you can create a html
 markup
 for each single component naming the file in this way:
 pagename$componentname.html

 So maybe I can add the  drodownchoice and textfield to the panel component
 and fix the layout in the  html file pagename$panelname.html

 table
 tr
 tdwicketcomponentup
 td
 tdwicketcomponentdown
 td
 /tr
 /table
 What do you think about? could that work?

 Thanks Paolo




 paolo di tommaso wrote:
 
  Umh .. I think the best things are simple ..
 
  Why don't just handle the components position using html or css in your
  panel?
 
 
  Bye, Paolo
 
 
 
  On 8/23/07, andrea pantaleoni [EMAIL PROTECTED] wrote:
 
 
  Hi,
  I have a little problem with Panel
  In a table I added a Panel
  Now in this Panel I want to add two different components, let's say, a
  dropdownchoice up and a textfield down.
  If I remember well, in swing it could be possible to add a layout to a
  panel
  and then for example add a component in north or in the south.
  Is there in wicket something similar?
  If I want to add the dropdownchoice component in the north of the panel
  and
  the textfield in the south is that possible
  Thanks for any help
  Andrea
  --
  View this message in context:
  http://www.nabble.com/Layout-Panel-tf4317423.html#a12293248
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 

 --
 View this message in context:
 http://www.nabble.com/Layout-Panel-tf4317423.html#a12293520
 Sent from the Wicket - User mailing list archive at Nabble.com.


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




Re: Uploading files without page reload

2007-08-09 Thread Paolo Di Tommaso
I've done that having the upload form specifying an hidden iframe as target
and - above all - having the following code in the Form#onSubmit() method

// Tell Wicket we're going to do the redirect ourselves.
getRequestCycle().setRedirect(false);
// Make sure no output for the current cycle is ever sent.
getRequestCycle().setRequestTarget(
EmptyRequestTarget.getInstance());



Paolo

On 8/9/07, Al Maw [EMAIL PROTECTED] wrote:

 legol wrote:
  Hi all,
 
  I have problem with uploading files. My uploading file form is placed in
  modal window and after submitting comunicate appears that modal window
 will
  be closed. What I want is situation when after submitting modal window
 is
  still visible. The best solution would be not reloading page but i read
  somewhere that it is impossible  to upload file via ajax. I tried to do
  something with PageParameters but to show modal window AjaxRequstTarget.
 
  Pls help.

 The only way to do this, I think, is to embed your file upload inside an
 iframe. That way, you're doing a proper page submit.

 Regards,

 Al
 --
 Alastair Maw
 Wicket-biased blog at http://herebebeasties.com

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




Re: Resizing Table Columns Like Yahoo Mail

2007-08-05 Thread Paolo Di Tommaso
Really?! Strange .. from their home page:

Browser Compatibility

Build rich web applications that work across all major web browsers
including:

   - Internet Explorer 6+
   - FireFox 1.5+ (PC, Mac, *nix)
   - Safari 2+
   - Opera 9+ (Mac, PC)



Cheers.

- Paolo



On 8/5/07, Jan Kriesten [EMAIL PROTECTED] wrote:


 hi,

  Or an advanced one
  http://extjs.com/deploy/ext/examples/grid/array-grid.html
 
  That's sweet!

 only that it doesn't work in every browser (opera to be one)... :-/

 --- jan.


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




Re: Resizing Table Columns Like Yahoo Mail

2007-08-04 Thread Paolo Di Tommaso
A light one
http://webfx.eae.net/dhtml/collist/columnlist.html

Or an advanced one
http://extjs.com/deploy/ext/examples/grid/array-grid.html


Paolo

On 8/4/07, Ayodeji Aladejebi [EMAIL PROTECTED] wrote:

 Please does someone know of any javascript library that can be used to
 resize table columns via Drap
 or has someone implemented anything like dat here to share some knowledge
 of
 it

 thanks



How discover the caller page (wicket 1.2.x)

2007-08-03 Thread Paolo Di Tommaso
Dear Wicket gurus,

Suppose I have two Wicket page, let's say page A and B,
with the following simple navigation rule A -- B using something like

A. setResponsePage( new B() )

At compiles time A know B , but B does not know A.
It there a way to get - at runtime - from page B the reference to caller A
page instance?

Basically I'm trying to implement something like the HTTP referer mechanism.


Any ideas ?



Thanks, Paolo