Making Autocomplete Form Stateless

2012-03-08 Thread toytown
 I am really facing some hard time making Autocomplete Form statless. The
problem basically stems from 
AutoCompleteBehavior which extends AbstractAutoCompleteBehavior which
evetually extends AbstractAjaxBehavior.

AbstractAjaxBehavior implements IBehaviorListener. I saw in the the
Component class that the method
public boolean getStatelessHint(Component component)
{
if (this instanceof IBehaviorListener)
{
// this behavior implements a callback interface, so it 
cannot be
stateless
return false;
}
return true;
}

So any behaviour implementing IBehaviourlistner is stateful in nature (which
I think is little too restrictive) and closes down possibility to make
AutoComplete behaviour stateless.

Perhaps I am insane  but I do not see any point why Autocomplete behaviour
should be Stateful all the time and in every context of Web Page.  I fully
understand the advantages of being Stateful in most of complex web
interaction but to have a way to make some components Stateless in nature
would be nice.

 
I am not Wicket expert but I would rather do something like 

extends IBehaviorListener and include a method

 getStatelessHint(Component c) ;

 
then in org.apache.wicket.Component class implement the method
getStatelessHint in a slightly different way

public boolean getStatelessHint(Component component)
{
if (this instanceof IBehaviorListener)
{
return this.getStatelessHint(component);
}
return true;
}



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Making-Autocomplete-Form-Stateless-tp4455817p4455817.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Making Autocomplete Form Stateless

2012-03-08 Thread Martin Grigorov
Hi,

I see you are not expert in Java either ;-)
Your code suggestion will lead to StackOverflowError because it goes
in infinite recursion.

Wicket's Ajax behaviors are stateful. To be able to find the component
that will feed the autocompleter the page should be preserved.
There are some stateless Ajax behaviors provided by Jolira
(https://github.com/jolira/wicket-stateless) but we have several times
discussed here in the mailing list that they don't work in all use
cases so they cannot be part of Wicket framework itself.

Additionally #getStatelessHint() method is not final. You can always
override it and tweak it until it works as you wish. But in this case
obviously we will not support any problems caused by these tweaks.

I recommend you to use an autocompleter provided by your favorite JS
library that will get its data from either Wicket IResource or just a
plain Servlet.

On Thu, Mar 8, 2012 at 10:01 AM, toytown prasanna.tulad...@gmail.com wrote:
  I am really facing some hard time making Autocomplete Form statless. The
 problem basically stems from
 AutoCompleteBehavior which extends AbstractAutoCompleteBehavior which
 evetually extends AbstractAjaxBehavior.

 AbstractAjaxBehavior implements IBehaviorListener. I saw in the the
 Component class that the method
        public boolean getStatelessHint(Component component)
        {
                if (this instanceof IBehaviorListener)
                {
                        // this behavior implements a callback interface, so 
 it cannot be
 stateless
                        return false;
                }
                return true;
        }

 So any behaviour implementing IBehaviourlistner is stateful in nature (which
 I think is little too restrictive) and closes down possibility to make
 AutoComplete behaviour stateless.

 Perhaps I am insane  but I do not see any point why Autocomplete behaviour
 should be Stateful all the time and in every context of Web Page.  I fully
 understand the advantages of being Stateful in most of complex web
 interaction but to have a way to make some components Stateless in nature
 would be nice.


 I am not Wicket expert but I would rather do something like

 extends IBehaviorListener and include a method

  getStatelessHint(Component c) ;


 then in org.apache.wicket.Component class implement the method
 getStatelessHint in a slightly different way

        public boolean getStatelessHint(Component component)
        {
                if (this instanceof IBehaviorListener)
                {
                        return this.getStatelessHint(component);
                }
                return true;
        }



 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Making-Autocomplete-Form-Stateless-tp4455817p4455817.html
 Sent from the Users forum mailing list archive at Nabble.com.

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




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

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



Re: Adding Columns on Button Click in Wicket

2012-03-08 Thread karthik
Thanks Martin,
Shall try to explore your suggestions.

regards,
Karthik

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Adding-Columns-on-Button-Click-in-Wicket-tp4455701p4455858.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Links with old PageID do not work

2012-03-08 Thread André Schütz
Hi,

I will check this once more. If I can not find a solution,
I will create a quickstart for further debugging.

Andre

 Original-Nachricht 
 Datum: Thu, 8 Mar 2012 09:24:55 +0200
 Von: Martin Grigorov mgrigo...@apache.org
 An: users@wicket.apache.org
 Betreff: Re: Links with old PageID do not work

 Hi,
 
 The debug statement in your page's constructor wont show anything. At
 this time the page is not rendered yet and the value will be the
 initial one - 0.
 You need to put a breakpoint at org.apache.wicket.Page#renderPage()
 and see why it is being incremented second time.
 
 Or just create a ticket with a quickstart and we'll try to debug it.
 
 2012/3/7 Andre Schütz andre-p...@gmx.de:
  Anybody any idea?
 
  On Tue, 6 Mar 2012 22:17:10 +0100
  Andre Schütz andre-p...@gmx.de wrote:
 
  Hi,
 
  I tested my application and checked for the renderCount variable. I
 made a
  breakpoint and checked the variable in the Debugger. Surprisingly, the
  renderCount variable was not increased and remained 0 during the whole
  test.
 
  To verify my result, I made a System.out.println in the constructor of
 Page2
  that showed the PageID and the value of renderCount variable. The
 result was
  the same.
  It looked like the following:
 
  (1) Tab1 starts with Page1, url is:
  localhost:8080/myapp?0
  PageID: 2 renderCount: 0
 
  (2) Tab2 starts with Page1, url is:
  localhost:8080/myapp?1
  PageID: 2 renderCount: 0
 
  (3) Tab1 makes a submit from Page1 to Page2, url is:
  localhost:8080/myapp?2q=word1
  PageID: 2 renderCount: 0
 
  (4) Tab2 makes a submit from Page1 to Page2, url is:
  localhost:8080/myapp?3q=word2
  PageID: 3 renderCount: 0
 
  (5) Tab1 clicks on a link, the link does not work, but the page is
 rerendered, url is:
  localhost:8080/myapp?4q=word1
  PageID: 4 renderCount: 0
 
  (6) Tab1 clicks on a link, the link works as expected and the page is
 rerendered, url is:
  localhost:8080/myapp?5q=word1filter=linkPage1
  PageID: 5 renderCount: 0
 
  (7) Tab2 clicks on a link, the link does not work, but the page is
 rerendered, url is:
  localhost:8080/myapp?6q=word2
  PageID: 6 renderCount: 0
 
  (8) Tab2 clicks on a link, the link works as expected and the page is
 rerendered, url is:
  localhost:8080/myapp?7q=word2filter=linkPage2
  PageID: 7 renderCount: 0
 
  (9) Tab2 clicks on another link, the link works as expected and the
 page is rerendered, url is:
  localhost:8080/myapp?8q=word2filter=linkPage2;linkPage2b
  PageID: 8 renderCount: 0
 
  You can see, that the renderCount does not increase and the links need
 a rerender of
  the pages when the pageID is not the highest.
 
  Any ideas about such a constellation?
  Andre
 
  On Tue, 6 Mar 2012 09:13:26 +0200
  Martin Grigorov mgrigo...@apache.org wrote:
 
   2012/3/5 Andre Schütz andre-p...@gmx.de:
Hi,
   
thank you for the answer. I will test this and reply with my
 results.
   
I have three questions depending on the test you have mentioned.
   
(1)
Can you tell me more about this o.a.w.Page? I did not really find
something about it.
  
   org.apache.wicket.Page
  
   
(2)
Can you explain me a little bit more in detail, what I should try
to find out with the breakpoint regarding the 'renderCount'. What
could be the interesting parts regarding 'renderCount'?
  
   See why renderCount is incremented after the the html generation.
  
   
(3)
I have my .html files stored in src/main/html, my .properties files
 in
src/main/resources and modified my pom.xml with:
   
build
resources
   resource
       filteringfalse/filtering
       directorysrc/main/resources/directory
   /resource
   resource
       directorysrc/main/html/directory
   /resource
   resource
       filteringfalse/filtering
       directorysrc/main/java/directory
       includes
           include**/include
       /includes
       excludes
           exclude**/*.java/exclude
       /excludes
   /resource
/resources
testResources
   testResource
       filteringfalse/filtering
       directorysrc/test/java/directory
       includes
           include**/include
       /includes
       excludes
           exclude**/*.java/exclude
       /excludes
   /testResource
/testResources
   
If I start the jetty server, I get a MarkupNotFoundException. After
 storing the
.html files to the class files in the src/main/java path, it works
 and only the
properties files are not found.
   
Can you tell me, how I have to modify the pom.xml that it will find
 the .html
and the .properties files in their different paths?
  
   I guess you need to reimport the project in your IDE so that it also
   knows about these additional source folders
  
   
Thank you,
Andre
   
   
On Mon, 5 Mar 2012 09:49:38 +0200
Martin Grigorov mgrigo...@apache.org wrote:
   
Hi,
   
It 

Re: Adding Columns on Button Click in Wicket

2012-03-08 Thread Martin Grigorov
In this case you may need to implement
org.apache.wicket.markup.IMarkupResourceStreamProvider to be able to
provide dynamic markup.

On Thu, Mar 8, 2012 at 1:04 PM, karthik
karthik.anik...@infotech-enterprises.com wrote:
 Hi Martin ,

 Reload the Table with New Columns .

 How would i add the new column markup in my html page for this newly added
 Column in the table ?

 Will that be added dynamically ?

 In the code below , the first column here is a check box, and the second one
 is a input field.

 Thanks in advance

 Karthik


 My html file excerpt:



 thead
     tr
        th   wicket:message  key=abc/  /th
        th   wicket:message key=xyz/  /th
                /tr
 /thead


 tbody wicket:id=TestTable 

          tr wicket:id=wmc 
                       tdinput wicket:id=abc value=abcValue 
 type=checkbox
 name=cbAbc/td
                       tdinput wicket:id=xyz /td
             /tr
 /tbody




 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Adding-Columns-on-Button-Click-in-Wicket-tp4455701p4456140.html
 Sent from the Users forum mailing list archive at Nabble.com.

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




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

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



Re: Only one page in session

2012-03-08 Thread Martin Grigorov
Hi,

On Thu, Mar 8, 2012 at 12:47 PM, zlatko99 zlatko.suslev...@gmail.com wrote:
 Hi all,

 I'm using Wicket 6 SNAPSHOT.

Good! Let us know if you find any problems!


 How can I limit the pagemap to keep ONLY one page in memory, in total?

 My intention is to have one and only one page in session, and that should be
 the current one. If the user goes to another page, I want that page to be
 recreated from scratch, put into session, and old one removed. I don't need
 support for back-button or history of changes.

Read this: https://cwiki.apache.org/confluence/x/qIaoAQ


 Thank you,
 Zlatko

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Only-one-page-in-session-tp4456112p4456112.html
 Sent from the Users forum mailing list archive at Nabble.com.

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




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

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



Re: wicket wizard init

2012-03-08 Thread Gytis
So I created a method like:

private Component text(String pId){
Label text = new Label(pId){
@Override
protected void onConfigure() {
// TODO Auto-generated method stub
super.onConfigure();

setDefaultModelObject(getAgreementText);
}
}

then in Step2 I made
add(text(user.text));

and it Worked!
Thank you Andrea Del Bene-2 so much!!!



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/wicket-wizard-init-tp4446076p4456290.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: NullPointerException at Session line 492 - current RequestCycle is null

2012-03-08 Thread Martin Grigorov
Hi,

You can invalidate the http session. Since Wicket Session is an
attribute in the http session it will be removed as well.

On Wed, Mar 7, 2012 at 6:35 PM, Martin A wml...@gmail.com wrote:
 Hello,
 I've got a REST service which is behind a Wicket Session Filter (due to the
 need to obtain the wicket current session at the service), and this REST
 service is being periodically hit by a Flash client (embedded in wicket
 page)
 At this REST service I've got a method that retrieves the wicket session,
 and it holds this snippet of code:

    if (session.hasExpired()) {
      session.invalidateNow();
      throw new SessionExpiredException();
    }

 The reason I do this and rely not on wicket's session timeout is because
 Wicket will create a new session if previous one is expired, so it'll lack
 all data I've stored in the session.

 The problem is that, this piece of code being called by the client via the
 REST service throws NullPointerException at Session line 492, which means
 that current RequestCycle is null. This happens due to calling
 invalidateNow(). I'm using wicket 1.5.0.

 Would you please tell me how to invalidate the session immediately in this
 case?

 Best regards,
 Martin



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

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



Re: seo - canonical link element

2012-03-08 Thread armhold
Yes, I worked on an app with a search engine component, so it's common for
users to come to the same page via slightly different urls.

link rel=canonical href=# wicket:id=canonical/

Label canonical = new Label(canonical, );
canonical.add(new AttributeModifier(href,
Model.of(getCanonicalUrl(;
canonical.setVisible(! isCanonicalUrl());

Your page can implement isCanonicalUrl() to check page params, etc.


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/seo-canonical-link-element-tp4449729p4456354.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Dynamically sized image

2012-03-08 Thread jarnis
Hey Guys

I'm using an Image rendered with a DynamicImageResource (in this case a
JFreeChart chart, but it could have been anything). I would like the image
to fill the panel it is placed in which is sized relatively to the web page
it is on. For the rendering to work I have to know the width and height when
Image.getImageResource() is called, or at least inside my
DynamicImageResource.getImageData(Attributes atrbts) method. I have searched
for a while now, but I can't find a good way to get the image's dimensions
at runtime.

Am I using the classes wrong, or should I use a different kind of component?
I am open to alternative suggestions, as long as it produces a clean
solution (preferably, but not necessarily, without depending on
AJAX/js/jQuery directly).

Thanks in advance.

Jarnis Bertelsen
Developer
Exedio




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Dynamically-sized-image-tp4456657p4456657.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Form with variable number of inputs

2012-03-08 Thread Bertrand Guay-Paquet
Thanks for the input Martin. Essentially, it's possible, but I'd have to 
rewrite form handling code and lose functionality :)


Another idea: maybe it is possible to handle the variable number of form 
components with page parameters. Something like 
http://numPhones=n; where numPhones would be set by the add 
phone number button. A stateless form in a stateless page would then be 
able to add the required number of form components to process the 
received input.


One way or another, this doesn't look like a very easy task. I'll 
definitely work on some other parts of the site before attempting this.


On 08/03/2012 2:50 AM, Martin Grigorov wrote:

Hi,

One way to accomplish this is to submit to a page, not to a Form, and
handle the request parameters manually.
But this way it wont be Ajax anymore and you'll go to a new page.
Additionally you will lose the form validation.

On Wed, Mar 7, 2012 at 9:52 PM, Bertrand Guay-Paquet
ber...@step.polymtl.ca  wrote:

Hi,

I have a form with a list of FormComponentPanels for phone numbers.
Currently, adding a new phone number to the list involves an ajax request to
add a new FormComponentPanel instance to the form and then another request
to submit the form.

Is there a way to achieve this without the intermediate ajax roundtrip which
adds the new component? Adding a new FormComponentPanel to the client's DOM
can easily be done with javascript, but can Wicket's form processing handle
a variable size array of inputs?

The input array would be of the form:
phoneNumber[0]=...
phoneType[0]=...
phoneNumber[n]=...
phoneType[n]=...

Besides less requests sent to the server, this is also necessary to make
such a form stateless.

Thanks,
Bertrand

-
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: Dynamically sized image

2012-03-08 Thread Martin Grigorov
Hi,

Maybe you do this with the WebClientInfo.
See how http://www.wicket-library.com/wicket-examples/hellobrowser
extracts client info like browser dimensions.
You can use this information to calculate the size of the div and
respetivelly the image that you have to generate.

HTH

On Thu, Mar 8, 2012 at 5:06 PM, jarnis jarnis.bertel...@exedio.com wrote:
 Hey Guys

 I'm using an Image rendered with a DynamicImageResource (in this case a
 JFreeChart chart, but it could have been anything). I would like the image
 to fill the panel it is placed in which is sized relatively to the web page
 it is on. For the rendering to work I have to know the width and height when
 Image.getImageResource() is called, or at least inside my
 DynamicImageResource.getImageData(Attributes atrbts) method. I have searched
 for a while now, but I can't find a good way to get the image's dimensions
 at runtime.

 Am I using the classes wrong, or should I use a different kind of component?
 I am open to alternative suggestions, as long as it produces a clean
 solution (preferably, but not necessarily, without depending on
 AJAX/js/jQuery directly).

 Thanks in advance.

 Jarnis Bertelsen
 Developer
 Exedio




 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Dynamically-sized-image-tp4456657p4456657.html
 Sent from the Users forum mailing list archive at Nabble.com.

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




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

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



GAE and file uploads

2012-03-08 Thread Chris Merrill
I've run to an issue with file uploads on GAE - after the file upload
exceeds a certain size (~10k?), the default file upload implementation
writes to disk, which is not allowed in GAE.

I found this previous post:
http://apache-wicket.1842946.n4.nabble.com/Wicket-and-FileUpload-on-Google-App-Engine-td1889030.html
by Uud Ashr with a solution.

However, that solution appears to be for Wicket 1.4 (or earlier?).
The Wicket-stuff GAE package, which I'm using, doesn't address file uploads.


So I'm planning to upgrade the code proposed by Mr Ashr to 1.5, but
thought I should check here first so I don't re-invent the wheel.

Does anyone know if this problem has already been solved for GAE,
Wicket 1.5 and file uploads?

TIA!
Chris

-- 
 -
Chris Merrill   |  Web Performance, Inc.
ch...@webperformance.com|  http://webperformance.com
919-433-1762|  919-845-7601

Web Performance: Website Load Testing Software  Services
 -

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



Re: GAE and file uploads

2012-03-08 Thread Martin Grigorov
Hi Chris,

I'm glad you find gae-initializer project useful!
Your can make a pull request with the upgraded to 1.5 code so other
people can gain from it too.

On Thu, Mar 8, 2012 at 6:43 PM, Chris Merrill ch...@webperformance.com wrote:
 I've run to an issue with file uploads on GAE - after the file upload
 exceeds a certain size (~10k?), the default file upload implementation
 writes to disk, which is not allowed in GAE.

 I found this previous post:
 http://apache-wicket.1842946.n4.nabble.com/Wicket-and-FileUpload-on-Google-App-Engine-td1889030.html
 by Uud Ashr with a solution.

 However, that solution appears to be for Wicket 1.4 (or earlier?).
 The Wicket-stuff GAE package, which I'm using, doesn't address file uploads.


 So I'm planning to upgrade the code proposed by Mr Ashr to 1.5, but
 thought I should check here first so I don't re-invent the wheel.

 Does anyone know if this problem has already been solved for GAE,
 Wicket 1.5 and file uploads?

 TIA!
 Chris

 --
  -
 Chris Merrill                           |  Web Performance, Inc.
 ch...@webperformance.com                |  http://webperformance.com
 919-433-1762                            |  919-845-7601

 Web Performance: Website Load Testing Software  Services
  -

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




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

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



Re: Dynamically sized image

2012-03-08 Thread jarnis

Martin Grigorov-4 wrote
 
 Maybe you do this with the WebClientInfo.
 
Using WebClientInfo does seem to offer a possible workaround. However, as I
see it, there are a few drawbacks:

It requires the Java code to know the percentage of the page that the
panel's div is taking. Hard-coding this would be a bit against the purpose
of wicket (as I understand it) as it would depend on the html/css not
changing and thereby limit the freedom of the designers. It might be
possible to get this info programatically however, I have not yet
investigated this. In this case where I am both programmer and designer, the
actual problem would not be that great.

It seems the WebClientInfo is not updated when the browser window is
resized. There may be a way to force this, I have not yet checked this
throughly.

If no better solution is possible, this can definitely be used. I would
still like a solution that fit a little better with Wicket's spirit.

In any case, thanks a lot for your suggestion, Martin

Jarnis 



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Dynamically-sized-image-tp4456657p4456981.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Nested Modal Window Problem - IE8 - 404 Error

2012-03-08 Thread Will
Hi,

I have the same problem and i'm also working with the released version
1.5.4. However nested modal windows show a http 404 not found response and
a Socket Exception is also shown in the console

It´s important to say that this only happens with nested modal windows, a
simple modal works just fine.

Socket Exception:

ClientAbortException:  java.net.SocketException: Connection reset by peer:
socket write error
at
org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:322)
at 
org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:291)
at org.apache.catalina.connector.Response.flushBuffer(Response.java:559)
at
org.apache.catalina.connector.ResponseFacade.flushBuffer(ResponseFacade.java:293)
at
org.apache.wicket.protocol.http.servlet.ServletWebResponse.flush(ServletWebResponse.java:250)
at
org.apache.wicket.protocol.http.HeaderBufferingWebResponse.flush(HeaderBufferingWebResponse.java:92)
at
org.apache.wicket.request.resource.AbstractResource.flushResponseAfterHeaders(AbstractResource.java:623)
at
org.apache.wicket.request.resource.AbstractResource.setResponseHeaders(AbstractResource.java:609)
at
org.apache.wicket.request.resource.AbstractResource.respond(AbstractResource.java:485)
at
org.apache.wicket.request.handler.resource.ResourceRequestHandler.respond(ResourceRequestHandler.java:74)
at
org.apache.wicket.request.handler.resource.ResourceReferenceRequestHandler.respond(ResourceReferenceRequestHandler.java:105)
at
org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:781)
at
org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
at
org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:255)
at
org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:212)
at
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:283)
at
org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:162)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:218)
at
com.seon.cascade.CascadeWicketFilter.doFilter(CascadeWicketFilter.java:173)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:244)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.apache.wicket.protocol.http.servlet.WicketSessionFilter.doFilter(WicketSessionFilter.java:151)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:244)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:550)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:380)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:243)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:188)
at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:288)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.net.SocketException: Connection reset by peer: socket write
error
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
at
org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:228)
at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:437)
at
org.apache.coyote.http11.InternalOutputBuffer.flush(InternalOutputBuffer.java:131)
at
org.apache.coyote.http11.AbstractHttp11Processor.action(AbstractHttp11Processor.java:763)
at org.apache.coyote.Response.action(Response.java:170)
at
org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:317)
... 36 more

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Nested-Modal-Window-Problem-IE8-404-Error-tp4311638p4457032.html
Sent from the 

A Panel inside another Panel

2012-03-08 Thread Kayode Odeyemi
I have an application structured such that I have 2 version for header
panels. One for anonymous(HeaderPanel) users and one for
authenticated(AuthenticatedHeaderPanel) users. Both of these are Panels
included in their respective pages.

Now I added another Panel (SearchPanel. It contains a Form) inside the
AuthenticatedHeaderPanel, then included the AuthenticatedHeaderPanel inside
a Page (ProfilePage). Somehow, the ProfilePage couldn't find the markups in
the SearchPanel.

AuthenticatedHeaderPanel.java
-
public class AuthenticatedHeaderPanel extends Panel {

  public AuthenticatedHeaderPanel(String id, IModel? model) {
super(id, model);
add(new SearchPanel(searchPanel));
  }
}

AuthenticatedHeaderPanel.html
--
div wicket:id=searchPanel/div

SearchPanel.java
-
public class SearchPanel extends Panel {

  public SearchPanel(String id) {
super(id);
Form loginForm = new Form(searchForm) {

};
add(loginForm);
loginForm.add(new TextField(searchtextfield));
  }
}

SearchPanel.html
-
wicket:panel
  form wicket:id=searchForm
input wicket:id=searchtextfield type=text /
input type=submit /
  /form
wicket:panel

AuthenticatedBasePage.java
--
public class AuthenticatedBasePage extends WebPage {

  public AuthenticatedBasePage() {
super();
add(new AuthenticatedHeaderPanel(state-header, new Model()));
  }
}

ProfilePage.html

span wicket:id=state-header /

ProfilePage.java
---
public class ProfilePage extends AuthenticatedBasePage {

  public ProfilePage() {
super();
  }
}

What could I be doing wrong?

Thanks

-- 
Odeyemi 'Kayode O.
http://ng.linkedin.com/in/kayodeodeyemi. t: @charyorde blog:
http://sinati.com/tree/java-cheat-sheet


Re: GAE and file uploads

2012-03-08 Thread Chris Merrill
On 3/8/2012 11:55 AM, Martin Grigorov wrote:
 I'm glad you find gae-initializer project useful!
 Your can make a pull request with the upgraded to 1.5 code so other
 people can gain from it too.

What is a pull request?  Is it a different kind of file upload?


-- 
 -
Chris Merrill   |  Web Performance, Inc.
ch...@webperformance.com|  http://webperformance.com
919-433-1762|  919-845-7601

Web Performance: Website Load Testing Software  Services
 -

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



Re: A Panel inside another Panel

2012-03-08 Thread Andrea Del Bene

Hi,

can you show the complete stacktrace of the exception?

I have an application structured such that I have 2 version for header
panels. One for anonymous(HeaderPanel) users and one for
authenticated(AuthenticatedHeaderPanel) users. Both of these are Panels
included in their respective pages.

Now I added another Panel (SearchPanel. It contains a Form) inside the
AuthenticatedHeaderPanel, then included the AuthenticatedHeaderPanel inside
a Page (ProfilePage). Somehow, the ProfilePage couldn't find the markups in
the SearchPanel.

AuthenticatedHeaderPanel.java
-
public class AuthenticatedHeaderPanel extends Panel {

   public AuthenticatedHeaderPanel(String id, IModel?  model) {
 super(id, model);
 add(new SearchPanel(searchPanel));
   }
}

AuthenticatedHeaderPanel.html
--
div wicket:id=searchPanel/div

SearchPanel.java
-
public class SearchPanel extends Panel {

   public SearchPanel(String id) {
 super(id);
 Form loginForm = new Form(searchForm) {

 };
 add(loginForm);
 loginForm.add(new TextField(searchtextfield));
   }
}

SearchPanel.html
-
wicket:panel
   form wicket:id=searchForm
 input wicket:id=searchtextfield type=text /
 input type=submit /
   /form
wicket:panel

AuthenticatedBasePage.java
--
public class AuthenticatedBasePage extends WebPage {

   public AuthenticatedBasePage() {
 super();
 add(new AuthenticatedHeaderPanel(state-header, new Model()));
   }
}

ProfilePage.html

span wicket:id=state-header /

ProfilePage.java
---
public class ProfilePage extends AuthenticatedBasePage {

   public ProfilePage() {
 super();
   }
}

What could I be doing wrong?

Thanks




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



Re: Dynamically sized image

2012-03-08 Thread Dan Retzlaff
Hi Jarnis,

We have a similar challenge: we determine pageable views' itemsPerPage
based on available screen height. Since many of our pages have such views,
we include JavaScript in each page that stores the current known height,
and reports back any changes with jQuery (after a slight delay).

window.trackerHeight = current known size;
window.trackerTimeout = null;
var updateSize = function() {
$.ajax({url:'/XXX/height?h=' + $(window).height()});
};
$(window).resize(function() {
if(window.trackerHeight != $(window).height()) {
window.trackerHeight = $(window).height();
clearTimeout(window.trackerTimeout);
window.trackerTimeout = setTimeout(updateSize, 3000);
}
});
updateSize();

The height Wicket resource puts the value in the Session. The dynamically
sized component then just needs to know the number of height pixels to
reserve for other content, and uses up the remainder. And yes, this
reserved height, and the height-per-row are static finals in Java. :)

This works well for us, but may be overkill for you. It also violates your
no-AJAX and no-jQuery goals.

HTH,
Dan

On Thu, Mar 8, 2012 at 8:57 AM, jarnis jarnis.bertel...@exedio.com wrote:


 Martin Grigorov-4 wrote
 
  Maybe you do this with the WebClientInfo.
 
 Using WebClientInfo does seem to offer a possible workaround. However, as I
 see it, there are a few drawbacks:

 It requires the Java code to know the percentage of the page that the
 panel's div is taking. Hard-coding this would be a bit against the purpose
 of wicket (as I understand it) as it would depend on the html/css not
 changing and thereby limit the freedom of the designers. It might be
 possible to get this info programatically however, I have not yet
 investigated this. In this case where I am both programmer and designer,
 the
 actual problem would not be that great.

 It seems the WebClientInfo is not updated when the browser window is
 resized. There may be a way to force this, I have not yet checked this
 throughly.

 If no better solution is possible, this can definitely be used. I would
 still like a solution that fit a little better with Wicket's spirit.

 In any case, thanks a lot for your suggestion, Martin

 Jarnis



 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Dynamically-sized-image-tp4456657p4456981.html
 Sent from the Users forum mailing list archive at Nabble.com.

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




Re: A Panel inside another Panel

2012-03-08 Thread Kayode Odeyemi
Here it is:

Root cause:

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

1. [SearchForm [Component id = searchForm]]
2. [TextField [Component id = searchtextfield]]

 at org.apache.wicket.Page.checkRendering(Page.java:693)
 at org.apache.wicket.Page.onAfterRender(Page.java:849)
 at
org.apache.wicket.markup.html.WebPage.onAfterRender(WebPage.java:213)
 at org.apache.wicket.Component.afterRender(Component.java:950)
 at org.apache.wicket.Component.render(Component.java:2298)
 at org.apache.wicket.Page.renderPage(Page.java:1041)
 at
org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:105)
 at
org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:224)
 at
org.apache.wicket.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:167)
 at
org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:781)
 at
org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
 at
org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:255)
 at
org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:212)
 at
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:283)
 at
org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:162)
 at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:218)
 at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
 at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:312)
 at
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116)
 at
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
 at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:324)
 at
org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:95)
 at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:324)
 at
org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:100)
 at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:324)
 at
org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:79)
 at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:324)
 at
org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
 at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:324)
 at
org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:35)
 at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:324)
 at
org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:119)
 at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:324)
 at
org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:187)
 at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:324)
 at
org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
 at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:324)
 at
org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)
 at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:324)
 at
org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:165)
 at
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
 at
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
 at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
 at
com.google.appengine.tools.development.HeaderVerificationFilter.doFilter(HeaderVerificationFilter.java:35)
 at

IndicatingAjaxButton and progressbar from browser

2012-03-08 Thread devlam
I'm using the IndicatingAjaxButton from my wicket-application. When the user
hits the button the indicator shows correctly but it is going away after a
successfull finish of the AJAX-call.
I'm using this on a webservice call which is returning information on
approx. 100 items. It will take some time before the actual result is
displayed on the screen. In the meantime the indicator has gone and the
progressbar of the statusbar from the bottom of the browser is showing the
progress.

What I would like that also during the time the Ajax-call has finished and
the actual result is displayed the same indicator is shown as during the
Ajax-call. Most likely instead of the progress bar of the browser but
showing both is also fine with me.

Is this possible?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/IndicatingAjaxButton-and-progressbar-from-browser-tp4457415p4457415.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: ResourceReferenceRegistry

2012-03-08 Thread grazia

Still not clear what I did wrong. 
With wicket 1.4 my code was:

public final class PageHeaderComponent extends WebComponent {

 public PageHeaderComponent(final String id, final String
changeDestination) {
super(id);
add(CSSPackageResource.getHeaderContribution(/css/header.css));
}
(...)
}

and it created what I needed
link rel=stylesheet type=text/css href=/css/header.css /

Now with wicket 1.5, my code is:

public final class PageHeaderComponent extends WebComponent {

 public PageHeaderComponent(final String id, final String
changeDestination) {
super(id);
add(new Behavior() {
private final ResourceReference headerCss = new
PackageResourceReference(/css/header.css);

@Override
public void renderHead(Component component, IHeaderResponse
response) {
response.renderCSSReference(headerCss);
}
});
}
(...)
}

and it creates: 
link rel=stylesheet type=text/css
href=wicket/resource/org.apache.wicket.Application/css/header-ver-F274BBEF68106E265B1DB7EE2B7DF144.css
/

The warning being logged is: 

WARNING: Asked to auto-create a ResourceReference, but
ResourceReferenceRegistry
.createDefaultResourceReference() return null.  [scope:
org.apache.wicket.Application; name: css/header.css; locale: null; style:
null; variation: null]



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/ResourceReferenceRegistry-tp4453457p4457469.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: A Panel inside another Panel

2012-03-08 Thread Andrea Del Bene
Your code seems good, I can't find any reason why it should not work. 
I've seen you have deployed your code on Google Appengine, maybe your 
problem is related with this running environment. Can you run you 
project locally and reproduce the problem?

Here it is:

Root cause:

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

1. [SearchForm [Component id = searchForm]]
2. [TextField [Component id = searchtextfield]]

  at org.apache.wicket.Page.checkRendering(Page.java:693)
  at org.apache.wicket.Page.onAfterRender(Page.java:849)
  at
org.apache.wicket.markup.html.WebPage.onAfterRender(WebPage.java:213)
  at org.apache.wicket.Component.afterRender(Component.java:950)
  at org.apache.wicket.Component.render(Component.java:2298)
  at org.apache.wicket.Page.renderPage(Page.java:1041)
  at
org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:105)
  at
org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:224)
  at
org.apache.wicket.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:167)
  at
org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:781)
  at
org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
  at
org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:255)
  at
org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:212)
  at
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:283)
  at
org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:162)
  at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:218)
  at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
  at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:312)
  at
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116)
  at
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
  at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:324)
  at
org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:95)
  at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:324)
  at
org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:100)
  at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:324)
  at
org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:79)
  at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:324)
  at
org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
  at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:324)
  at
org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:35)
  at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:324)
  at
org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:119)
  at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:324)
  at
org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:187)
  at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:324)
  at
org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
  at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:324)
  at
org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)
  at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:324)
  at
org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:165)
  at
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
  at

Wizard step with three textfields and one is required

2012-03-08 Thread Andre Schütz
Hello,

I want to create a WizardStep with three textfields. On of the three fields 
must be filled. If none of the fields is filled, the user should get a feedback.
I don't think that it is possible to use RequiredTextField's? How can I make it 
possible that the system knows it just has to check for at least one of them?

Thank you,
Andre

-- 
Andre Schütz schuetz.an...@gmx.net

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



Re: How to Reference a /WebContent File from Wicket

2012-03-08 Thread eugenebalt
I got it, it's

Application.class.getResourceAsStream(file.pdf);

(assuming file.pdf is directly under /WebContent).

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-Reference-a-WebContent-File-from-Wicket-tp4454190p4457546.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Wizard step with three textfields and one is required

2012-03-08 Thread Dan Retzlaff
See Form#add(IFormValidator). Depending on the setup, it can also make
sense to group the three fields in a FormComponentPanel with its own,
smaller-scoped IValidator.

Dan

2012/3/8 Andre Schütz andre-p...@gmx.de

 Hello,

 I want to create a WizardStep with three textfields. On of the three
 fields must be filled. If none of the fields is filled, the user should get
 a feedback.
 I don't think that it is possible to use RequiredTextField's? How can I
 make it possible that the system knows it just has to check for at least
 one of them?

 Thank you,
 Andre

 --
 Andre Schütz schuetz.an...@gmx.net

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




Tree onClick() question...

2012-03-08 Thread mlabs
I'm using a Tree and I have declared an onClick() handler in the usual way :

new Tree(treeID, treeModel){
@Override
protected MarkupContainer newNodeLink(MarkupContainer parent, String id,
final TreeNode){
 return newLink(parent, id, new ILinkCallback(){
 public void onClick(AjaxRequestLink target){
 
// why is target always null in here?
 }
 });
}

My question is why is target always null in the onClick handler? 
My problem is that I want to alter the model of another component when the
user clicks a tree node, and then refresh that component in the page... so
I'm thinking I need to make a target.addComponent(..) call at the end of
this... but, well, I don't appear to have a target?
What am I missing?
TIA


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Tree-onClick-question-tp4457980p4457980.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: proper way to refresh a DataTable?

2012-03-08 Thread Bertrand Guay-Paquet

Hi,

Have you added the datatable to the AjaxRequestTarget of the link's 
onClick method? That should do it.


On 08/03/2012 7:56 PM, mlabs wrote:

I'm trying to refresh the model of a DataTable when the user clicks an ajax
link on my page...
I pass an instance of SortableDataProviderfoo  to the table
In the onClick() handler of the ajax link I call detach() on it ... hoping
that this will trigger a rebuild..but it doesn't ... the iterator() code
never gets hit again...
Here is my dataprovider.. some code omitted for clarity..

public class SortableFooDataProvider extends SortableDataProviderFoo{
   private ListFoo  mRows;
   public SortableFooDataProvider(){..}

   @Override
   public Iterator(int i, int j){
 if (mRows==null)
   mRows = new ArrayListFoo();

 // fill mRows with rows.

 return mRows.iterator();
   }

   @Override
   public int size(){
 return (mRows!=null)?mRows.size():0;
   }

   @Override
   public IModelFoo  model(Foo f) {return new Model(f);}

   @Override
   public void detach(){
 mRows = null;
 super.detach();
   }
}

any ideas what I'm doing wrong?

TIA




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/proper-way-to-refresh-a-DataTable-tp4458199p4458199.html
Sent from the Users forum mailing list archive at Nabble.com.

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



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



Re: Best practice for adding style to a component

2012-03-08 Thread Igor Vaynberg
html is best for static classes

for java subclass the component and override oncomponenttag and set
the class from there.

if you cannot do that or you have some cross-component-cutting logic
then use an attribute modifier.

-igor


On Thu, Mar 8, 2012 at 12:58 PM, Uvex andrei.niculesc...@gmail.com wrote:
 I am new in wicket and programming and I'll be grateful if someone could tell
 me what is the best practice for adding css style to a component (or setting
 a css class): from the .java file or from the .html file?


 OR
 control.add(new SimpleAttributeModifier(class, HelloCssClass));

 Thank you.

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Best-practice-for-adding-style-to-a-component-tp4457648p4457648.html
 Sent from the Users forum mailing list archive at Nabble.com.

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


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



Enable debug messages for org.apache.wicket.util.resource to get a list of all filenames tried

2012-03-08 Thread mlabs
how exactly do I enable these debug messages?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Enable-debug-messages-for-org-apache-wicket-util-resource-to-get-a-list-of-all-filenames-tried-tp4458722p4458722.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Enable debug messages for org.apache.wicket.util.resource to get a list of all filenames tried

2012-03-08 Thread François Meillet
 if you use logback, add the line
 logger name=org.apache.wicket.util.resource level=debug/
in your log config file

Le 9 mars 2012 à 08:28, mlabs a écrit :

 how exactly do I enable these debug messages?
 
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Enable-debug-messages-for-org-apache-wicket-util-resource-to-get-a-list-of-all-filenames-tried-tp4458722p4458722.html
 Sent from the Users forum mailing list archive at Nabble.com.
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 


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