Re: Does [Parent|Child]HeaderRenderStrategy work with wicket:head tag?

2011-11-17 Thread TH Lim
Bug posted

https://issues.apache.org/jira/browse/WICKET-4235

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Does-Parent-Child-HeaderRenderStrategy-work-with-wicket-head-tag-tp4075161p4079254.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



HttpsMapper creates HttpSession by default

2011-11-17 Thread Dirk Forchel
Our Wicket application is stateless and doesn't need a HttpSession (the
JSessionID is disabled by default for some SEO reasons for all requests). In
Wicket 1.4 we use our own CodingStrategy implementation to switch between
the Http/Https protocols if a secure annotation (RequireHttps) for a page
class is present. This is not an option with Wicket 1.5 because coding
strategies are replaced by IRequestMapper implementations.
So we use the HttpsMapper as RootRequestMapper to switch over to Https. As
I've noticed, using the HttpsMapper forces the application to create a
HttpsSession by default, even if no secure page would be present. In my
opinion, session binding should be done within the HttpsRequestChecker class
(checkSecureIncoming) and only if the switch to the Https protocol is really
required. Or do I miss something?
Setting the HttpsConfig.setPreferStateful(false) is also not an option. In
that case we end up with two sessions per user.

HttpsMapper.java:

public IRequestHandler mapRequest(final Request request)
{
IRequestHandler requestHandler = delegate.mapRequest(request);
if (requestHandler != null)
{
final IRequestHandler httpsHandler =
checker.checkSecureIncoming(requestHandler,
httpsConfig);
// XXX do we need to check if httpsHandler is instance 
of
SwitchProtocolRequestHandler
if (httpsConfig.isPreferStateful())
{
// we need to persist the session before a 
redirect to https so the
session lasts
// across both http and https calls.
Session.get().bind();
}
requestHandler = httpsHandler;
}
return requestHandler;
}

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/HttpsMapper-creates-HttpSession-by-default-tp4079305p4079305.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: HttpsMapper creates HttpSession by default

2011-11-17 Thread Martin Grigorov
Hi,

On Thu, Nov 17, 2011 at 10:34 AM, Dirk Forchel dirk.forc...@exedio.com wrote:
 Our Wicket application is stateless and doesn't need a HttpSession (the
 JSessionID is disabled by default for some SEO reasons for all requests). In
 Wicket 1.4 we use our own CodingStrategy implementation to switch between
 the Http/Https protocols if a secure annotation (RequireHttps) for a page
 class is present. This is not an option with Wicket 1.5 because coding
 strategies are replaced by IRequestMapper implementations.
 So we use the HttpsMapper as RootRequestMapper to switch over to Https. As
 I've noticed, using the HttpsMapper forces the application to create a
 HttpsSession by default, even if no secure page would be present. In my
 opinion, session binding should be done within the HttpsRequestChecker class
 (checkSecureIncoming) and only if the switch to the Https protocol is really
 required. Or do I miss something?
 Setting the HttpsConfig.setPreferStateful(false) is also not an option. In
 that case we end up with two sessions per user.

How that happens ?
This config option is there for exactly that purpose.


 HttpsMapper.java:

        public IRequestHandler mapRequest(final Request request)
        {
                IRequestHandler requestHandler = delegate.mapRequest(request);
                if (requestHandler != null)
                {
                        final IRequestHandler httpsHandler =
 checker.checkSecureIncoming(requestHandler,
                                httpsConfig);
                        // XXX do we need to check if httpsHandler is instance 
 of
 SwitchProtocolRequestHandler
                        if (httpsConfig.isPreferStateful())
                        {
                                // we need to persist the session before a 
 redirect to https so the
 session lasts
                                // across both http and https calls.
                                Session.get().bind();
                        }
                        requestHandler = httpsHandler;
                }
                return requestHandler;
        }

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/HttpsMapper-creates-HttpSession-by-default-tp4079305p4079305.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: HttpsMapper creates HttpSession by default

2011-11-17 Thread Dirk Forchel
I'm not sure. But this is the comment within the source of the
HttpsConfig.class:

/**
 * Sets whether or not a new session is created before redirecting from
{@code http} to {@code
 * https}
 * p
 * BE VERY CAREFUL WHEN SETTING THIS VALUE TO {@code false}.
 * 
 * If set to {@code false} it is possible that the session created when 
in
{@code https} pages
 * will not be accessible to {@code http} pages, and so you may end up 
with
two sessions per
 * user both potentially containing different login information.
 * /p
 * 
 * @param preferStateful
 */
public void setPreferStateful(boolean preferStateful)
{
this.preferStateful = preferStateful;
}

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/HttpsMapper-creates-HttpSession-by-default-tp4079305p4079330.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: AjaxLazyLoadPanel question

2011-11-17 Thread heapifyman
Hello,

I'm facing the same problem as the Matt above but honestly I must admit
that I do not really understand Pedro's advice.
Did you manage to implement his advice, Matt? Could I get a little more
information about how this IAjaxCallDecorator might actually look like?
That would be a great help.

Thanks in advance,
Philip



2011/2/4 Pedro Santos pedros...@gmail.com

 I Matt, try to decorate the AJAX javascript to show/hide the indicator
 using
 an IAjaxCallDecorator

 On Thu, Feb 3, 2011 at 5:40 PM, Matt Schmidt mschmid...@gmail.com wrote:

  I currently have a DataGridView loaded inside of an AjaxLazyLoadPanel,
  including the service call to get the data.
 
  myLazyLoadPanel = new AjaxLazyLoadPanel(id, new
 CollectionModelPojo())
  {
 public Component getLazyLoadComponent(String markupId) {
 if(getDefaultModelObject() == null) {
 setDefaultModelObject(myPojoService.readAll());
 }
 return new MyDataGridView(markupId, getDefaultModel()); //ignoring
  casting for simplicity
 }
  }
 
  That works great for loading the page before the service call is
 complete.
 
  But now I need to add a DropDownChoice to change the collection in the
 data
  grid via Ajax after the page is loaded. Is there anyway to get the
  DataGridView to be replaced with an Ajax indicator (like on page load)
  during an Ajax onchange event for the DropDownChoice? I've added an
 Ajax
  indicator to the DropDownChoice, but I would like the same behavior I get
  on
  page load for the AjaxLazyLoadPanel.
 
  This is what I have for the drop down for starters:
 
  myDropDownChoice.add(new AjaxFormComponentUpdateBehavior(onchange) {
 protected void onUpdate(AjaxRequestTarget target) {
 if(myDropDownChoice.getModelObject().equals(foo)) {
 
  myLazyLoadPanel.setDefaultModelObject(myPojoService.readFoo());
 }
 //check other selections
target.addComponent(myLazyLoadPanel);
 }
  }
 
  I may be looking at this entirely wrong... Any suggestions?
 



 --
 Pedro Henrique Oliveira dos Santos



Re: HttpsMapper creates HttpSession by default

2011-11-17 Thread Martin Grigorov
This setting is to tell Wicket whether to create a http session before
going https.
Otherwise if there is no http session until now and you create it in
https request then this session wont be visible to any http request.

Setting it to false wont bind the Session (i.e. wont create http session).

Register SessingBindingListener in web.xml and put a breakpoint in it
to see where is created the session.

On Thu, Nov 17, 2011 at 10:44 AM, Dirk Forchel dirk.forc...@exedio.com wrote:
 I'm not sure. But this is the comment within the source of the
 HttpsConfig.class:

 /**
         * Sets whether or not a new session is created before redirecting from
 {@code http} to {@code
         * https}
         * p
         * BE VERY CAREFUL WHEN SETTING THIS VALUE TO {@code false}.
         *
         * If set to {@code false} it is possible that the session created 
 when in
 {@code https} pages
         * will not be accessible to {@code http} pages, and so you may end up 
 with
 two sessions per
         * user both potentially containing different login information.
         * /p
         *
         * @param preferStateful
         */
        public void setPreferStateful(boolean preferStateful)
        {
                this.preferStateful = preferStateful;
        }

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/HttpsMapper-creates-HttpSession-by-default-tp4079305p4079330.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: Purely XML / JSON Result Page

2011-11-17 Thread TH Lim
Thanks for the tips.

I some help here too (in case anyone looking for the similar solution)

http://stackoverflow.com/questions/2086732/dynamic-markup-in-wicket

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Purely-XML-JSON-Result-Page-tp4075558p4079390.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: HttpsMapper creates HttpSession by default

2011-11-17 Thread Dirk Forchel
I know, that this setting tells Wicket when to create the HttpSession. And it
seems that if the HttpSession is created in the Https request, the created
Session is not visible to any Http request. In Wicket 1.4 we never switch
back to the Http protocol once the secure protocol is used. So probably this
problem never occured.
I try to use the listener to figure out what happens.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/HttpsMapper-creates-HttpSession-by-default-tp4079305p4079409.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



Wicket 1.5.2, stalls on one tomcat

2011-11-17 Thread nino martinez wael
Hi

I have a very strange problem. At a customers site we have 2 servers with 1
Tomcat 7 installed each. One day on one of the servers our application just
stalled after loading the sign in page, when you click the login button. Im
not sure this is a wicket problem. Heres what I've tried so far:


   - Restart Tomcat
   - Point the working application at the non working servers sql database,
   it still works.
   - Purge Tomcats session storage and temporary files
   - Restart the server
   - Redeploy the application, with the war from the working server (just
   to be sure)

I've even tried setting up SQL Profiler and sniffing on the database
connections, nothing strange goes on here. Just seems like the application
stalls when you try to login. Keep in mind that this works without problems
from the other server.



regards Nino


Re: wicket 1.5.3 problems with cookies

2011-11-17 Thread kamiseq
hi martin,
so yes previously I had a problem with unit tests when I was setting
cookie and redirecting with throw new RestartResponseException(new
MyOtherPage());
then you advised to used NonResettingRestartException but this for
some reason (I had no time yet to investigate) is breaking unittest so
now I am using setResponsePage(pageClass);

now I try to test it live with jetty and gae and for both servers it
is failing. (to redirect I use setResponsePage)

pozdrawiam
Paweł Kamiński

kami...@gmail.com
pkaminski@gmail.com
__

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



Re: Wicket 1.5.2, stalls on one tomcat

2011-11-17 Thread Andrea Del Bene
Profile the stalled server with Visual VM? It should detect existing 
deadlocks...

Hi

I have a very strange problem. At a customers site we have 2 servers with 1
Tomcat 7 installed each. One day on one of the servers our application just
stalled after loading the sign in page, when you click the login button. Im
not sure this is a wicket problem. Heres what I've tried so far:


- Restart Tomcat
- Point the working application at the non working servers sql database,
it still works.
- Purge Tomcats session storage and temporary files
- Restart the server
- Redeploy the application, with the war from the working server (just
to be sure)

I've even tried setting up SQL Profiler and sniffing on the database
connections, nothing strange goes on here. Just seems like the application
stalls when you try to login. Keep in mind that this works without problems
from the other server.



regards Nino




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



Re: Wicket 1.5.2, stalls on one tomcat

2011-11-17 Thread nino martinez wael
THANKS!

2011/11/17 Andrea Del Bene adelb...@ciseonweb.it

 Profile the stalled server with Visual VM? It should detect existing
 deadlocks...

 Hi

 I have a very strange problem. At a customers site we have 2 servers with
 1
 Tomcat 7 installed each. One day on one of the servers our application
 just
 stalled after loading the sign in page, when you click the login button.
 Im
 not sure this is a wicket problem. Heres what I've tried so far:


- Restart Tomcat
- Point the working application at the non working servers sql
 database,
it still works.
- Purge Tomcats session storage and temporary files
- Restart the server
- Redeploy the application, with the war from the working server (just

to be sure)

 I've even tried setting up SQL Profiler and sniffing on the database
 connections, nothing strange goes on here. Just seems like the application
 stalls when you try to login. Keep in mind that this works without
 problems
 from the other server.



 regards Nino



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




Re: wicket 302 redirect loop

2011-11-17 Thread thomas willomitzer
Hi,

Thanks for the advice! I follwed and traced the problem. Think it's a
combination of Wicket and Tomcat...

When i send the request for http://localhost/, wicket get's the session
from tomcat, renders the page and buffers the response (since
ONE_PASS_RENDER isn't default).
Wicket (1.5.3) also appends the ?1 and sends a 302 redirect to
http://localhost/?1 (in the 302 response header the cookie get's correctly
set - but not appended to the redirect URL).
Tomcat (7.0.22) doesn't append jsessionid to an url like http://localhost/?1.
Looks like it's still the empty path and tomcat problem that prohibits
the appending of jsessionid.

Now when I don't use cookies and follow the request to
http://localhost/?1how should wicket know which session we're talking
about?

Please note that this problem doesn't exist when sending a request to e.g.
http://localhost/login. I get a correct redirect to
http://localhost/login;jsessionid=xx.

I could think of the following workaround:
1.) For the homepage use ONE_PASS_RENDER

Is this a tomcat/wicket combination problem or am I doing something wrong?

Many thanks
Willo

On Wed, Nov 16, 2011 at 7:57 PM, Bertrand Guay-Paquet 
ber...@step.polymtl.ca wrote:

 I don't know of any other specific causes unfortunately...

 Try setting a breakpoint in RequestCycle#onBeginRequest() and see what
 happens. Try your page constructor too since it might be closer to the
 source of the problem.

 Good luck!
 Bertrand


 On 16/11/2011 12:21 PM, thomas willomitzer wrote:

 Hi,

 Thanks I checked but no getPageParameters() override ;)

 Regards
 Thomas

 On Wed, Nov 16, 2011 at 6:04 PM, Bertrand Guay-Paquet
 ber...@step.polymtl.ca  wrote:

  Hi,

 I had a redirect loop once because I added an override to
 Page#getPageParameters() by mistake. I wanted to use my method to
 generate
 a new PageParameters instance for a page but overriding the Page method
 gave your result.

 It's worth a shot!

 Regards,
 Bertrand


 On 16/11/2011 11:40 AM, thomas willomitzer wrote:

  Dear All,

 I've managed to get the jsessionid appended correctly when requesting a
 page without cookies enabled (wicket 1.5.3, tomcat 7.0.22).

 I get
 curl -v --insecure https://localhost/ -   Location:
 https://localhost/?1
 curl -v --insecure https://localhost/?1 -   Location:
 https://localhost/.;jsessionid=D62D2D693854214C847E7A75439909**
 **A3https://localhost/.;**jsessionid=**D62D2D693854214C847E7A75439909**A3
 https://localhost/.;**jsessionid=**D62D2D693854214C847E7A75439909**A3https://localhost/.;jsessionid=D62D2D693854214C847E7A75439909A3
 
 curl -v --insecure
 https://localhost/.;jsessionid=D62D2D693854214C847E7A75439909**
 **A3https://localhost/.;**jsessionid=**D62D2D693854214C847E7A75439909**A3
 https://localhost/.;**jsessionid=**D62D2D693854214C847E7A75439909**A3https://localhost/.;jsessionid=D62D2D693854214C847E7A75439909A3-
   HTTP 404


 change URL (erasing .) to
 curl -v --insecure
 https://localhost/;jsessionid=**D62D2D693854214C847E7A75439909**
 **A3https://localhost/;jsessionid=**D62D2D693854214C847E7A75439909**A3
 https://localhost/;**jsessionid=**D62D2D693854214C847E7A75439909**A3https://localhost/;jsessionid=D62D2D693854214C847E7A75439909A3-
   Location:

 https://localhost/?1

 When trying in a browser I get the warning that it's a redirect loop.

 Can somebody please point me to what I'm doing wrong here?

 Many Thanks
 Thomas


  --**
 --**-
 To unsubscribe, e-mail: 
 users-unsubscribe@wicket.**apa**che.orghttp://apache.org
 users-unsubscribe@**wicket.apache.orgusers-unsubscr...@wicket.apache.org
 

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





Re: Forum vs list question

2011-11-17 Thread Ian Marshall
Hi Neill,

I am in the same position as you. I prefer not to receive E-mails of all the
posts and look via my browser instead.

Once you have signed up, log in and:

  Visit the Apache Wicket › Users forum page
  Go to Options | Your subscription: Users forum (edit)
  Either
Select Receive new topics only and Daily digest and click the Save
Subscription button.
  or
Click the Unsubscribe button.

Believe it or not, if you follow the Save Subscription button step, then
you will then receive no E-mails (well, I don't get any anyway)!

Enjoy?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Forum-vs-list-question-tp4076276p4079663.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: EOFException(java.net.SocketException: Connection reset by peer: socket write error)

2011-11-17 Thread nhsoft.yhw
jira issues: https://issues.apache.org/jira/browse/WICKET-3869

Is only in IE6, IE7, IE8 will occur in this problem?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/EOFException-java-net-SocketException-Connection-reset-by-peer-socket-write-error-tp4043286p4079862.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



@SpringBean scope, where does it start-end?

2011-11-17 Thread bilgisever
Hello,
I am trying to integrate BIRT into Spring-Wicket combo.
*The case:*
So far, I wrote a class that instantiates report engine and added spring
annotations. I already have 
/context:component-scan base-package=blah.blah.andmoreblah //
in bean definition file. Now I can access it via @SpringBean annotation in
panels-webpages etc... but
*The Intent:*
I have some classes (that extends ByteArrayResource) that simply configures
the report engine to produce desired report.
*The Problem:*
On the other hand in the class that extends ByteArrayResource the
@SpringBean annotated instance comes *null*.

Any insights?

-
www.mehmetatas.info
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/SpringBean-scope-where-does-it-start-end-tp4080069p4080069.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: @SpringBean scope, where does it start-end?

2011-11-17 Thread Martin Grigorov
Only o.a.w.Component and o.a.w.Behavior (since 1.5.3) are auto injected.
For anything else you need:

class MyClass {

  @SpringBean private MyBean bean;

  public MyClass() {
// my stuff

   Injector.get().inject(this);
  }

}

On Thu, Nov 17, 2011 at 4:04 PM, bilgisever mehmetate...@hotmail.com wrote:
 Hello,
 I am trying to integrate BIRT into Spring-Wicket combo.
 *The case:*
 So far, I wrote a class that instantiates report engine and added spring
 annotations. I already have
 /context:component-scan base-package=blah.blah.andmoreblah //
 in bean definition file. Now I can access it via @SpringBean annotation in
 panels-webpages etc... but
 *The Intent:*
 I have some classes (that extends ByteArrayResource) that simply configures
 the report engine to produce desired report.
 *The Problem:*
 On the other hand in the class that extends ByteArrayResource the
 @SpringBean annotated instance comes *null*.

 Any insights?

 -
 www.mehmetatas.info
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/SpringBean-scope-where-does-it-start-end-tp4080069p4080069.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: @SpringBean scope, where does it start-end?

2011-11-17 Thread vineet semwal
in non component you can inject by
Injector.get().inject(this) in constructor

On Thu, Nov 17, 2011 at 7:34 PM, bilgisever mehmetate...@hotmail.com wrote:
 Hello,
 I am trying to integrate BIRT into Spring-Wicket combo.
 *The case:*
 So far, I wrote a class that instantiates report engine and added spring
 annotations. I already have
 /context:component-scan base-package=blah.blah.andmoreblah //
 in bean definition file. Now I can access it via @SpringBean annotation in
 panels-webpages etc... but
 *The Intent:*
 I have some classes (that extends ByteArrayResource) that simply configures
 the report engine to produce desired report.
 *The Problem:*
 On the other hand in the class that extends ByteArrayResource the
 @SpringBean annotated instance comes *null*.

 Any insights?

 -
 www.mehmetatas.info
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/SpringBean-scope-where-does-it-start-end-tp4080069p4080069.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





-- 
thank you,

regards,
Vineet Semwal

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



Re: @SpringBean scope, where does it start-end?

2011-11-17 Thread Ernesto Reinaldo Barreiro
SpringBean magic will only work for components. If you want to use for
non-componet you have to explicitly call

 Injector.get().inject(this);

for wicket 1.5.x or

InjectorHolder.getInjector().inject(this);  

for wicket 1.4.x

Ernesto

On Thu, Nov 17, 2011 at 3:04 PM, bilgisever mehmetate...@hotmail.com wrote:
 Hello,
 I am trying to integrate BIRT into Spring-Wicket combo.
 *The case:*
 So far, I wrote a class that instantiates report engine and added spring
 annotations. I already have
 /context:component-scan base-package=blah.blah.andmoreblah //
 in bean definition file. Now I can access it via @SpringBean annotation in
 panels-webpages etc... but
 *The Intent:*
 I have some classes (that extends ByteArrayResource) that simply configures
 the report engine to produce desired report.
 *The Problem:*
 On the other hand in the class that extends ByteArrayResource the
 @SpringBean annotated instance comes *null*.

 Any insights?

 -
 www.mehmetatas.info
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/SpringBean-scope-where-does-it-start-end-tp4080069p4080069.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



Unchanging url's

2011-11-17 Thread hfriederichs
Hello,

I read many posts on this, tried may suggestions, must be stupid, but I
can't figure it out.
I'm using Wicket 1.5.3, an application with a number of tabbed panels.

My application's url is, lets say http://localhost:9080/context/

When I enter this URL, the browse immediately changes this to
http://localhost:9080/context/?0

I don't want that!!

When I enter userdata and switch some tabs, nothing happens, but when I hit
F5 the URL changes to
http://localhost:9080/context/?9 or another number, depending on my
activity.

I don't want that!!

When I enter passed url's like http://localhost:9080/context/?37 or
http://localhost:9080/context/?154, I
get the prefilled pages that correspond to those url's.

I have no need for that!!

I just want http://localhost:9080/context/ to be addressable from my
favorites, that's all. 

Even CTRL+F5 doesn't give me a clean page, I have to remove the ?xx part
with my mouse.

Please help!

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Unchanging-url-s-tp4080178p4080178.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: Unchanging url's

2011-11-17 Thread Martin Grigorov
http://stackoverflow.com/questions/8081143/components-not-reloading-on-url-change-in-wicket-1-5-2
http://stackoverflow.com/questions/8135755/wicket-1-5-new-urls/8139152#8139152

On Thu, Nov 17, 2011 at 4:33 PM, hfriederichs h.friederi...@ohra.nl wrote:
 Hello,

 I read many posts on this, tried may suggestions, must be stupid, but I
 can't figure it out.
 I'm using Wicket 1.5.3, an application with a number of tabbed panels.

 My application's url is, lets say http://localhost:9080/context/

 When I enter this URL, the browse immediately changes this to
 http://localhost:9080/context/?0

 I don't want that!!

 When I enter userdata and switch some tabs, nothing happens, but when I hit
 F5 the URL changes to
 http://localhost:9080/context/?9 or another number, depending on my
 activity.

 I don't want that!!

 When I enter passed url's like http://localhost:9080/context/?37 or
 http://localhost:9080/context/?154, I
 get the prefilled pages that correspond to those url's.

 I have no need for that!!

 I just want http://localhost:9080/context/ to be addressable from my
 favorites, that's all.

 Even CTRL+F5 doesn't give me a clean page, I have to remove the ?xx part
 with my mouse.

 Please help!

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Unchanging-url-s-tp4080178p4080178.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: @SpringBean scope, where does it start-end?

2011-11-17 Thread bilgisever
   Thanks it worked like charm.

-
www.mehmetatas.info
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/SpringBean-scope-where-does-it-start-end-tp4080069p4080367.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: Apache Wicket is a Flawed Framework

2011-11-17 Thread Sven Meier

Thanks for the laugh. Where are the irony tags?

Sven

Am 17.11.2011 16:44, schrieb Eric Kizaki:

Violates Dry:  You must repeat the component hierarchy of your widgets that
are in HTML in Java Code for no good reason.  If you move your widget around
in the html it will break the Java and you get a stack trace if you change
the nesting.  You have to keep these two files synched.  A JSP file is more
maintainable.  At least the view code is in one place.

Not previewable:  One of the supposed benefits of Wicket is a clean template
that could make pages previewable for designers.  First, we don't have
seperate designers at my company.  Second, it is better if the samer person
does development and design.  Third, if you use extends your page will not
be priviewable outside an application server running Wicket.  This supposed
benefit does not exist.

Violates MVC:  It smashes view and controller code into the same Java file.
You have code that regulates page flow and code that changes css attributes
in the same file.  Even Spring MVC had better separation of concerns.
JSP/Servlets with Spring MVC is better.

Excessively verbose and complicated:  What is a LoadableDetachableModel?
The learning curve for Wicket is immense.

Breaks POJOS:  A real POJO does not need to implement an interface or extend
a class.  Wicket forces your beans to be Serializable.  This is like using
EJBs in how it forced you to implement interfaces.

Terrible AJAX:  Compared to a few lines of jQuery AJAX is excessively
complicated and verbose in Wicket.  A lot of things like “AJAX” links should
not be done via “AJAX” at all.  Hiding a div on the client would simply be
done with JavaScript on the client.  Wicket better not require a server
request for that.  You also have no JSON support and good luck debugging any
JavaScript or AJAX in Firefox.  Instead you have to use the subpar Wicket
debugging.

HTML5:  No support for HTML 5 form elements unless you upgrade to Wicket
1.5.  You will get a stack trace.  The upgrade to Wicket 1.5 is painful and
will break your code.  Good luck getting this to work with jQuery mobile.

Bad Defaults:  Most pages are stateless.  The default for Wicket is
stateful.  So if I want a decent URL and a bookmarkable page I have to mount
the page and use a bookmarkable page link with page parameters.  Using page
parameters is worse than how Spring MVC does binding.  I have to keep doing
this over and over for each page.  There is too much work involved to get a
decent stateless page with a nice URL. This should be the default.

Interferes with other libraries:  It screws up your jQuery code.  It forces
you into a restrictive way of doing web-development:  the Wicket Way.

Causes a redeploy whenever you add anything:  Maybe Java developers are used
to this, but in any other web development environment I do not need to
redeploy after adding a text box to the page.  It is completely absurd.
Only with JRebel is this alleviated.  No, embedded Jetty in debug mode still
slow.  Even a simple JSP file has hot reloading on Tomcat and if I make a
change to my view code the changes are immediately viewable in the browser
when I refresh.  This is WITHOUT JRebel.

HTTPSession Objects are not hard:  Most pages do not need state.  If you do
use HTTPSession it is simple.  Can you use a map?  Then you can use
HTTPSession.  This is less comlicated than most Wicket code.

Stateful Component based framework are a terrible idea:  Even at the
theoretical level this is a bad idea. It is a leaky abstraction over a
simple request/response cycle.  It made something simple and made it overly
complicated.  This remind me of Hibernate and ORMS.  I disagree that we
should abstract things to this level and do everything in verbose Java.
People are dropping Hibernate and going back to native SQL and Spring JDBC
template.  SQL and the relational model are easy.  Working with HTTP
requests is easy too.  What was wrong with JSPs/Servlets?  Keep it simple
stupid.  We know JSF was too complicated and it was terrible.  Spring MVC is
better and has rest support.  It just works with Spring and has great
support for the JSON Jackson mapper.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Apache-Wicket-is-a-Flawed-Framework-tp4080411p4080411.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: Apache Wicket is a Flawed Framework

2011-11-17 Thread Wilhelmsen Tor Iver
Ah, it's been a while since a JSF/JSP zealot bothered to annoy Wicket users. 

Now go away and cook up a tag library or five.

- Tor Iver


Can't Reset Form After DropDownChoice OnChange Handled

2011-11-17 Thread aksarben
I have a drop down choice component, and when the selection changes, I udpate
various form fields by Ajax, in the form as follows:

*public HistoryDropDown(final String id, final MapK, ? map, final
Component dateField, final
TrackDetailModel model, final TrackAttribute attribute) {

super(id, map);
final String originalValue = model.getOriginalValue(attribute);
add(new AjaxFormComponentUpdatingBehavior(onchange) {
private static final long serialVersionUID = -1;
@Override
protected void onUpdate(final AjaxRequestTarget target) {   
// When
selection changes

final String newValue = 
model.getAttributeValue(attribute); // What the
new choice?
if (newValue.equals(originalValue)) {   
// If back to original value
dateField.setEnabled(false);
// Disable date field
model.restoreOriginalDateAndUser(attribute);
// Restore original data
} else {
// If changing to new 
value
dateField.setEnabled(true); 
// Enable date field
model.setDefaultDateAndUser(attribute); 
// Effective date = today
}   
// User = 
current user
target.addComponent(dateField.getParent()); 
// Re-render fields
}
});
}
*
The updates work fine (the screen re-renders properly), but if I then click
the form's Reset button, nothing happens. I saw some other posts that said I
have to do a form.modelchanged(), but that didn't any effect.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Can-t-Reset-Form-After-DropDownChoice-OnChange-Handled-tp4080685p4080685.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



How to have a list of iframes ?

2011-11-17 Thread heikki
hello list,

I'd like to have a dynamically generated list of iframes in my page, where
each iframe has the same attributes except for its src attribute, which
should dynamically be inserted.

The iframes are embedded Youtube videos and I have a list of the urls to be
stuck in their src attributes. But my implementation does not work. The
error I get is

Last cause: A child with id 'videoframe' already exists:
[VideoListView [Component id = videoList]]
WicketMessage: Error attaching this container for rendering: [Page class =
my.package.page.VideoPage, id = 2, render count = 1]

In my VideoPage I have

public VideoPage() {
super();
videoListView = new VideoListView(videoList, new
LoadableDetachableModelListlt;String() {
protected ListString load() {
ListString urls = new ArrayListString();
// fill list with youtube urls
// .. 
return urls;
}
});
add(videoListView);
}

private class VideoListView extends ListViewString {
public VideoListView(String name, final IModelListlt;String
urls) {
super(name, urls);
}
protected void populateItem(ListItemString listItem) {
final String url = listItem.getModelObject();
final WebMarkupContainer videoFrame = new
WebMarkupContainer(videoframe);
videoFrame.add(new SimpleAttributeModifier(src, url));
// .. put other non-changing attributes here too
add(videoFrame);
}
}

and in my page I have

div wicket:id=videoList
   iframe wicket:id=videoframe class=dance-video
width=425 height=349 src= frameborder=0 allowfullscreen/iframe
/div

Anyone has an idea how to achieve this ? I've also looked at InlineFrame (to
use instead of WebMarkupContainer) but it seems most concerned with
instantiating a Page to render in an iframe, if I'm correct.

thanks in advance,
kind regards
Heikki Doeleman




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-have-a-list-of-iframes-tp4080744p4080744.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: How to have a list of iframes ?

2011-11-17 Thread Sven Meier

 add(videoFrame);


You have to add the frame to the ListItem, i.e.:

  listItem.add(videoFrame);

Sven


On 11/17/2011 06:15 PM, heikki wrote:

hello list,

I'd like to have a dynamically generated list of iframes in my page, where
each iframe has the same attributes except for its src attribute, which
should dynamically be inserted.

The iframes are embedded Youtube videos and I have a list of the urls to be
stuck in their src attributes. But my implementation does not work. The
error I get is

Last cause: A child with id 'videoframe' already exists:
[VideoListView [Component id = videoList]]
WicketMessage: Error attaching this container for rendering: [Page class =
my.package.page.VideoPage, id = 2, render count = 1]

In my VideoPage I have

 public VideoPage() {
 super();
 videoListView = new VideoListView(videoList, new
LoadableDetachableModelListlt;String() {
 protected ListString  load() {
 ListString  urls = new ArrayListString();
 // fill list with youtube urls
 // ..
 return urls;
 }
 });
 add(videoListView);
 }

 private class VideoListView extends ListViewString  {
 public VideoListView(String name, final IModelListlt;String
urls) {
 super(name, urls);
 }
 protected void populateItem(ListItemString  listItem) {
 final String url = listItem.getModelObject();
 final WebMarkupContainer videoFrame = new
WebMarkupContainer(videoframe);
 videoFrame.add(new SimpleAttributeModifier(src, url));
 // .. put other non-changing attributes here too
 add(videoFrame);
 }
 }

and in my page I have

 div wicket:id=videoList
iframe wicket:id=videoframe class=dance-video
width=425 height=349 src= frameborder=0 allowfullscreen/iframe
 /div

Anyone has an idea how to achieve this ? I've also looked at InlineFrame (to
use instead of WebMarkupContainer) but it seems most concerned with
instantiating a Page to render in an iframe, if I'm correct.

thanks in advance,
kind regards
Heikki Doeleman




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-have-a-list-of-iframes-tp4080744p4080744.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



Update Component on TextField Entry

2011-11-17 Thread Gregor Kaczor

Hi!

I need a hint how to solve the following problem.

I have a RepeaterView displaying a list of static links. Below there is 
a text field. As soon as  something is entered in that textfield (not 
whitespace) I would like to replace those links with a list of 
completely different links containing a parameter with content from the 
text field.


Both link lists have the same number of items.

I was thinking to use AutoCompleteTextField to do that, but how do I 
replace those links from  protected IteratorT getChoices(String input) ?


Kind Regards

Gregor

--
How to find files on the Internet? FindFiles.net http://findfiles.net!


Re: wicket 302 redirect loop

2011-11-17 Thread Igor Vaynberg
as long as we are passing the /?1 url through
servletresponse#encoderedirecturl() tomcat is responsible for
appending the JSESSIONID if its not yet available in a cookie...

-igor

On Thu, Nov 17, 2011 at 2:16 AM, thomas willomitzer wi...@test.at wrote:
 Hi,

 Thanks for the advice! I follwed and traced the problem. Think it's a
 combination of Wicket and Tomcat...

 When i send the request for http://localhost/, wicket get's the session
 from tomcat, renders the page and buffers the response (since
 ONE_PASS_RENDER isn't default).
 Wicket (1.5.3) also appends the ?1 and sends a 302 redirect to
 http://localhost/?1 (in the 302 response header the cookie get's correctly
 set - but not appended to the redirect URL).
 Tomcat (7.0.22) doesn't append jsessionid to an url like http://localhost/?1.
 Looks like it's still the empty path and tomcat problem that prohibits
 the appending of jsessionid.

 Now when I don't use cookies and follow the request to
 http://localhost/?1how should wicket know which session we're talking
 about?

 Please note that this problem doesn't exist when sending a request to e.g.
 http://localhost/login. I get a correct redirect to
 http://localhost/login;jsessionid=xx.

 I could think of the following workaround:
 1.) For the homepage use ONE_PASS_RENDER

 Is this a tomcat/wicket combination problem or am I doing something wrong?

 Many thanks
 Willo

 On Wed, Nov 16, 2011 at 7:57 PM, Bertrand Guay-Paquet 
 ber...@step.polymtl.ca wrote:

 I don't know of any other specific causes unfortunately...

 Try setting a breakpoint in RequestCycle#onBeginRequest() and see what
 happens. Try your page constructor too since it might be closer to the
 source of the problem.

 Good luck!
 Bertrand


 On 16/11/2011 12:21 PM, thomas willomitzer wrote:

 Hi,

 Thanks I checked but no getPageParameters() override ;)

 Regards
 Thomas

 On Wed, Nov 16, 2011 at 6:04 PM, Bertrand Guay-Paquet
 ber...@step.polymtl.ca  wrote:

  Hi,

 I had a redirect loop once because I added an override to
 Page#getPageParameters() by mistake. I wanted to use my method to
 generate
 a new PageParameters instance for a page but overriding the Page method
 gave your result.

 It's worth a shot!

 Regards,
 Bertrand


 On 16/11/2011 11:40 AM, thomas willomitzer wrote:

  Dear All,

 I've managed to get the jsessionid appended correctly when requesting a
 page without cookies enabled (wicket 1.5.3, tomcat 7.0.22).

 I get
 curl -v --insecure https://localhost/ -   Location:
 https://localhost/?1
 curl -v --insecure https://localhost/?1 -   Location:
 https://localhost/.;jsessionid=D62D2D693854214C847E7A75439909**
 **A3https://localhost/.;**jsessionid=**D62D2D693854214C847E7A75439909**A3
 https://localhost/.;**jsessionid=**D62D2D693854214C847E7A75439909**A3https://localhost/.;jsessionid=D62D2D693854214C847E7A75439909A3
 
 curl -v --insecure
 https://localhost/.;jsessionid=D62D2D693854214C847E7A75439909**
 **A3https://localhost/.;**jsessionid=**D62D2D693854214C847E7A75439909**A3
 https://localhost/.;**jsessionid=**D62D2D693854214C847E7A75439909**A3https://localhost/.;jsessionid=D62D2D693854214C847E7A75439909A3-
   HTTP 404


 change URL (erasing .) to
 curl -v --insecure
 https://localhost/;jsessionid=**D62D2D693854214C847E7A75439909**
 **A3https://localhost/;jsessionid=**D62D2D693854214C847E7A75439909**A3
 https://localhost/;**jsessionid=**D62D2D693854214C847E7A75439909**A3https://localhost/;jsessionid=D62D2D693854214C847E7A75439909A3-
   Location:

 https://localhost/?1

 When trying in a browser I get the warning that it's a redirect loop.

 Can somebody please point me to what I'm doing wrong here?

 Many Thanks
 Thomas


  --**
 --**-
 To unsubscribe, e-mail: 
 users-unsubscribe@wicket.**apa**che.orghttp://apache.org
 users-unsubscribe@**wicket.apache.orgusers-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: Apache Wicket is a Flawed Framework

2011-11-17 Thread Adam Gray
I'm curious why you wasted your time if you have already determined
that Stateful,
component-based frameworks are a terrible idea.  Html5 + jQuery + Restlet
is over -- http://www.restlet.org/

No framework is for everyone or even the best solution for every problem.
 If you have real suggestions for improvements:
https://issues.apache.org/jira/browse/WICKET.  If you're just trolling, I
had a good laugh.

This is not the framework you're looking for.
You can go about your business.
#jedimindtrick


On Thu, Nov 17, 2011 at 11:43 AM, Wilhelmsen Tor Iver toriv...@arrive.nowrote:

 Ah, it's been a while since a JSF/JSP zealot bothered to annoy Wicket
 users.

 Now go away and cook up a tag library or five.

 - Tor Iver



Re: wicket 302 redirect loop

2011-11-17 Thread thomas willomitzer
Fair enough ...

Looking at org.apache.catalina.connector.Response a url of e.g.
http://localhost/?1 results in a path of length 0 which doesn't append the
jsessionid.

if( sb.length()  0 ) { // jsessionid can't be first.

It's obviously a tomcat issue ... but given the fact that tomcat is widely
used ... can't we do something about that?
Well I did by using ONE_PASS_RENDER ;)

Thanks
Willo

/**
 * Return the specified URL with the specified session identifier
 * suitably encoded.
 *
 * @param url URL to be encoded with the session id
 * @param sessionId Session id to be included in the encoded URL
 */
protected String toEncoded(String url, String sessionId) {

if ((url == null) || (sessionId == null))
return (url);

String path = url;
String query = ;
String anchor = ;
int question = url.indexOf('?');
if (question = 0) {
path = url.substring(0, question);
query = url.substring(question);
}
int pound = path.indexOf('#');
if (pound = 0) {
anchor = path.substring(pound);
path = path.substring(0, pound);
}
StringBuilder sb = new StringBuilder(path);
if( sb.length()  0 ) { // jsessionid can't be first.
sb.append(;);
sb.append(ApplicationSessionCookieConfig.getSessionUriParamName(
request.getContext()));
sb.append(=);
sb.append(sessionId);
}
sb.append(anchor);
sb.append(query);
return (sb.toString());

}


On Thu, Nov 17, 2011 at 6:52 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote:

 as long as we are passing the /?1 url through
 servletresponse#encoderedirecturl() tomcat is responsible for
 appending the JSESSIONID if its not yet available in a cookie...

 -igor

 On Thu, Nov 17, 2011 at 2:16 AM, thomas willomitzer wi...@test.at wrote:
  Hi,
 
  Thanks for the advice! I follwed and traced the problem. Think it's a
  combination of Wicket and Tomcat...
 
  When i send the request for http://localhost/, wicket get's the session
  from tomcat, renders the page and buffers the response (since
  ONE_PASS_RENDER isn't default).
  Wicket (1.5.3) also appends the ?1 and sends a 302 redirect to
  http://localhost/?1 (in the 302 response header the cookie get's
 correctly
  set - but not appended to the redirect URL).
  Tomcat (7.0.22) doesn't append jsessionid to an url like
 http://localhost/?1.
  Looks like it's still the empty path and tomcat problem that prohibits
  the appending of jsessionid.
 
  Now when I don't use cookies and follow the request to
  http://localhost/?1how should wicket know which session we're talking
  about?
 
  Please note that this problem doesn't exist when sending a request to
 e.g.
  http://localhost/login. I get a correct redirect to
  http://localhost/login;jsessionid=xx.
 
  I could think of the following workaround:
  1.) For the homepage use ONE_PASS_RENDER
 
  Is this a tomcat/wicket combination problem or am I doing something
 wrong?
 
  Many thanks
  Willo
 
  On Wed, Nov 16, 2011 at 7:57 PM, Bertrand Guay-Paquet 
  ber...@step.polymtl.ca wrote:
 
  I don't know of any other specific causes unfortunately...
 
  Try setting a breakpoint in RequestCycle#onBeginRequest() and see what
  happens. Try your page constructor too since it might be closer to the
  source of the problem.
 
  Good luck!
  Bertrand
 
 
  On 16/11/2011 12:21 PM, thomas willomitzer wrote:
 
  Hi,
 
  Thanks I checked but no getPageParameters() override ;)
 
  Regards
  Thomas
 
  On Wed, Nov 16, 2011 at 6:04 PM, Bertrand Guay-Paquet
  ber...@step.polymtl.ca  wrote:
 
   Hi,
 
  I had a redirect loop once because I added an override to
  Page#getPageParameters() by mistake. I wanted to use my method to
  generate
  a new PageParameters instance for a page but overriding the Page
 method
  gave your result.
 
  It's worth a shot!
 
  Regards,
  Bertrand
 
 
  On 16/11/2011 11:40 AM, thomas willomitzer wrote:
 
   Dear All,
 
  I've managed to get the jsessionid appended correctly when
 requesting a
  page without cookies enabled (wicket 1.5.3, tomcat 7.0.22).
 
  I get
  curl -v --insecure https://localhost/ -   Location:
  https://localhost/?1
  curl -v --insecure https://localhost/?1 -   Location:
 
 https://localhost/.;jsessionid=D62D2D693854214C847E7A75439909**
  **A3
 https://localhost/.;**jsessionid=**D62D2D693854214C847E7A75439909**A3
  
 https://localhost/.;**jsessionid=**D62D2D693854214C847E7A75439909**A3
 https://localhost/.;jsessionid=D62D2D693854214C847E7A75439909A3
  
  curl -v --insecure
 
 https://localhost/.;jsessionid=D62D2D693854214C847E7A75439909**
  **A3
 https://localhost/.;**jsessionid=**D62D2D693854214C847E7A75439909**A3
  
 https://localhost/.;**jsessionid=**D62D2D693854214C847E7A75439909**A3
 https://localhost/.;jsessionid=D62D2D693854214C847E7A75439909A3-
HTTP 404
 
 
  

Re: Apache Wicket is a Flawed Framework

2011-11-17 Thread Nelson Segura
I am just a user of Wicket, but this make me laugh, since we are
desperately trying to get out of the JSP nightmare and have found
Wicket a quite nice framework. Nice.

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



Trying to use IAjaxCallDecorator after Modal Window close

2011-11-17 Thread mshaver
Hi all - I'm trying to add a busy indicator after a modal window is closed.
In my use case, the WindowClosedCallback's onClose method is performing a
few operations, and I just want to let the user know that the system is
actually doing something.

I noticed that CloseButtonBehavior has a getAjaxCallDecorator method, but in
this case my Modal Window is being closed by
ModalWindow.closeCurrent(target).

I'm currently using Wicket 1.4.18, but should be upgrading to 1.5.3
relatively soon.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Trying-to-use-IAjaxCallDecorator-after-Modal-Window-close-tp4081142p4081142.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: Apache Wicket is a Flawed Framework

2011-11-17 Thread Gabriel Landon
Is this April fool's day? Seriously?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Apache-Wicket-is-a-Flawed-Framework-tp4080411p4081149.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: Apache Wicket is a Flawed Framework

2011-11-17 Thread Alex Objelean
This is not an april fool's day, it is just an opinion of an 
http://www.linkedin.com/pub/eric-kizaki/30/2b1/1a4 inexperienced developer . 
Eric, if you have troubles in understanding wicket, you are definitely doing
it wrong. Wicket is not a silver bullet, but it is a great tool when
comparing to existing technologies.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Apache-Wicket-is-a-Flawed-Framework-tp4080411p4081174.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: Apache Wicket is a Flawed Framework

2011-11-17 Thread thomas willomitzer
Ooohh... I better double check what I'm writing on this list, Since the FBI
is around ... ;)

On Thu, Nov 17, 2011 at 7:56 PM, Alex Objelean alex.objel...@gmail.comwrote:

 This is not an april fool's day, it is just an opinion of an
 http://www.linkedin.com/pub/eric-kizaki/30/2b1/1a4 inexperienced
 developer .
 Eric, if you have troubles in understanding wicket, you are definitely
 doing
 it wrong. Wicket is not a silver bullet, but it is a great tool when
 comparing to existing technologies.

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Apache-Wicket-is-a-Flawed-Framework-tp4080411p4081174.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: wicket 302 redirect loop

2011-11-17 Thread Igor Vaynberg
would adding a bogus query param help there? so the url will look like
this: localhost/?1bogus=1

-igor

On Thu, Nov 17, 2011 at 10:21 AM, thomas willomitzer wi...@test.at wrote:
 Fair enough ...

 Looking at org.apache.catalina.connector.Response a url of e.g.
 http://localhost/?1 results in a path of length 0 which doesn't append the
 jsessionid.

 if( sb.length()  0 ) { // jsessionid can't be first.

 It's obviously a tomcat issue ... but given the fact that tomcat is widely
 used ... can't we do something about that?
 Well I did by using ONE_PASS_RENDER ;)

 Thanks
 Willo

    /**
     * Return the specified URL with the specified session identifier
     * suitably encoded.
     *
     * @param url URL to be encoded with the session id
     * @param sessionId Session id to be included in the encoded URL
     */
    protected String toEncoded(String url, String sessionId) {

        if ((url == null) || (sessionId == null))
            return (url);

        String path = url;
        String query = ;
        String anchor = ;
        int question = url.indexOf('?');
        if (question = 0) {
            path = url.substring(0, question);
            query = url.substring(question);
        }
        int pound = path.indexOf('#');
        if (pound = 0) {
            anchor = path.substring(pound);
            path = path.substring(0, pound);
        }
        StringBuilder sb = new StringBuilder(path);
        if( sb.length()  0 ) { // jsessionid can't be first.
            sb.append(;);
            sb.append(ApplicationSessionCookieConfig.getSessionUriParamName(
                    request.getContext()));
            sb.append(=);
            sb.append(sessionId);
        }
        sb.append(anchor);
        sb.append(query);
        return (sb.toString());

    }


 On Thu, Nov 17, 2011 at 6:52 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote:

 as long as we are passing the /?1 url through
 servletresponse#encoderedirecturl() tomcat is responsible for
 appending the JSESSIONID if its not yet available in a cookie...

 -igor

 On Thu, Nov 17, 2011 at 2:16 AM, thomas willomitzer wi...@test.at wrote:
  Hi,
 
  Thanks for the advice! I follwed and traced the problem. Think it's a
  combination of Wicket and Tomcat...
 
  When i send the request for http://localhost/, wicket get's the session
  from tomcat, renders the page and buffers the response (since
  ONE_PASS_RENDER isn't default).
  Wicket (1.5.3) also appends the ?1 and sends a 302 redirect to
  http://localhost/?1 (in the 302 response header the cookie get's
 correctly
  set - but not appended to the redirect URL).
  Tomcat (7.0.22) doesn't append jsessionid to an url like
 http://localhost/?1.
  Looks like it's still the empty path and tomcat problem that prohibits
  the appending of jsessionid.
 
  Now when I don't use cookies and follow the request to
  http://localhost/?1how should wicket know which session we're talking
  about?
 
  Please note that this problem doesn't exist when sending a request to
 e.g.
  http://localhost/login. I get a correct redirect to
  http://localhost/login;jsessionid=xx.
 
  I could think of the following workaround:
  1.) For the homepage use ONE_PASS_RENDER
 
  Is this a tomcat/wicket combination problem or am I doing something
 wrong?
 
  Many thanks
  Willo
 
  On Wed, Nov 16, 2011 at 7:57 PM, Bertrand Guay-Paquet 
  ber...@step.polymtl.ca wrote:
 
  I don't know of any other specific causes unfortunately...
 
  Try setting a breakpoint in RequestCycle#onBeginRequest() and see what
  happens. Try your page constructor too since it might be closer to the
  source of the problem.
 
  Good luck!
  Bertrand
 
 
  On 16/11/2011 12:21 PM, thomas willomitzer wrote:
 
  Hi,
 
  Thanks I checked but no getPageParameters() override ;)
 
  Regards
  Thomas
 
  On Wed, Nov 16, 2011 at 6:04 PM, Bertrand Guay-Paquet
  ber...@step.polymtl.ca  wrote:
 
   Hi,
 
  I had a redirect loop once because I added an override to
  Page#getPageParameters() by mistake. I wanted to use my method to
  generate
  a new PageParameters instance for a page but overriding the Page
 method
  gave your result.
 
  It's worth a shot!
 
  Regards,
  Bertrand
 
 
  On 16/11/2011 11:40 AM, thomas willomitzer wrote:
 
   Dear All,
 
  I've managed to get the jsessionid appended correctly when
 requesting a
  page without cookies enabled (wicket 1.5.3, tomcat 7.0.22).
 
  I get
  curl -v --insecure https://localhost/ -   Location:
  https://localhost/?1
  curl -v --insecure https://localhost/?1 -   Location:
 
 https://localhost/.;jsessionid=D62D2D693854214C847E7A75439909**
  **A3
 https://localhost/.;**jsessionid=**D62D2D693854214C847E7A75439909**A3
  
 https://localhost/.;**jsessionid=**D62D2D693854214C847E7A75439909**A3
 https://localhost/.;jsessionid=D62D2D693854214C847E7A75439909A3
  
  curl -v --insecure
 
 https://localhost/.;jsessionid=D62D2D693854214C847E7A75439909**
  **A3
 

Re: AjaxLazyLoadPanel question

2011-11-17 Thread Igor Vaynberg
you can replace the lazy load panel instance:

//check other selections
myLazyLoadPanel=myLazyLoadPanel.replaceWith(new
MyLazyLoadPanel(myLazyLoadPanel.getId(), ..)
target.addComponent(myLazyLoadPanel);

this will reset the state of lazyloadpanel to the not-yet-loaded

-igor

On Thu, Feb 3, 2011 at 11:40 AM, Matt Schmidt mschmid...@gmail.com wrote:
 I currently have a DataGridView loaded inside of an AjaxLazyLoadPanel,
 including the service call to get the data.

 myLazyLoadPanel = new AjaxLazyLoadPanel(id, new CollectionModelPojo()) {
    public Component getLazyLoadComponent(String markupId) {
        if(getDefaultModelObject() == null) {
            setDefaultModelObject(myPojoService.readAll());
        }
        return new MyDataGridView(markupId, getDefaultModel()); //ignoring
 casting for simplicity
    }
 }

 That works great for loading the page before the service call is complete.

 But now I need to add a DropDownChoice to change the collection in the data
 grid via Ajax after the page is loaded. Is there anyway to get the
 DataGridView to be replaced with an Ajax indicator (like on page load)
 during an Ajax onchange event for the DropDownChoice? I've added an Ajax
 indicator to the DropDownChoice, but I would like the same behavior I get on
 page load for the AjaxLazyLoadPanel.

 This is what I have for the drop down for starters:

 myDropDownChoice.add(new AjaxFormComponentUpdateBehavior(onchange) {
    protected void onUpdate(AjaxRequestTarget target) {
        if(myDropDownChoice.getModelObject().equals(foo)) {
            myLazyLoadPanel.setDefaultModelObject(myPojoService.readFoo());
        }
        //check other selections
       target.addComponent(myLazyLoadPanel);
    }
 }

 I may be looking at this entirely wrong... Any suggestions?


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



Re: Purely XML / JSON Result Page

2011-11-17 Thread Igor Vaynberg
why use a page at all? why not simple mount a resource or a
IRequestHandler that writes out json?

-igor

On Thu, Nov 17, 2011 at 1:11 AM, TH Lim ssh...@gmail.com wrote:
 Thanks for the tips.

 I some help here too (in case anyone looking for the similar solution)

 http://stackoverflow.com/questions/2086732/dynamic-markup-in-wicket

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Purely-XML-JSON-Result-Page-tp4075558p4079390.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: wicket 302 redirect loop

2011-11-17 Thread thomas willomitzer
No I'm afraid ... just tried

On Thu, Nov 17, 2011 at 8:19 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote:

 would adding a bogus query param help there? so the url will look like
 this: localhost/?1bogus=1

 -igor

 On Thu, Nov 17, 2011 at 10:21 AM, thomas willomitzer wi...@test.at
 wrote:
  Fair enough ...
 
  Looking at org.apache.catalina.connector.Response a url of e.g.
  http://localhost/?1 results in a path of length 0 which doesn't append
 the
  jsessionid.
 
  if( sb.length()  0 ) { // jsessionid can't be first.
 
  It's obviously a tomcat issue ... but given the fact that tomcat is
 widely
  used ... can't we do something about that?
  Well I did by using ONE_PASS_RENDER ;)
 
  Thanks
  Willo
 
 /**
  * Return the specified URL with the specified session identifier
  * suitably encoded.
  *
  * @param url URL to be encoded with the session id
  * @param sessionId Session id to be included in the encoded URL
  */
 protected String toEncoded(String url, String sessionId) {
 
 if ((url == null) || (sessionId == null))
 return (url);
 
 String path = url;
 String query = ;
 String anchor = ;
 int question = url.indexOf('?');
 if (question = 0) {
 path = url.substring(0, question);
 query = url.substring(question);
 }
 int pound = path.indexOf('#');
 if (pound = 0) {
 anchor = path.substring(pound);
 path = path.substring(0, pound);
 }
 StringBuilder sb = new StringBuilder(path);
 if( sb.length()  0 ) { // jsessionid can't be first.
 sb.append(;);
 
  sb.append(ApplicationSessionCookieConfig.getSessionUriParamName(
 request.getContext()));
 sb.append(=);
 sb.append(sessionId);
 }
 sb.append(anchor);
 sb.append(query);
 return (sb.toString());
 
 }
 
 
  On Thu, Nov 17, 2011 at 6:52 PM, Igor Vaynberg igor.vaynb...@gmail.com
 wrote:
 
  as long as we are passing the /?1 url through
  servletresponse#encoderedirecturl() tomcat is responsible for
  appending the JSESSIONID if its not yet available in a cookie...
 
  -igor
 
  On Thu, Nov 17, 2011 at 2:16 AM, thomas willomitzer wi...@test.at
 wrote:
   Hi,
  
   Thanks for the advice! I follwed and traced the problem. Think it's a
   combination of Wicket and Tomcat...
  
   When i send the request for http://localhost/, wicket get's the
 session
   from tomcat, renders the page and buffers the response (since
   ONE_PASS_RENDER isn't default).
   Wicket (1.5.3) also appends the ?1 and sends a 302 redirect to
   http://localhost/?1 (in the 302 response header the cookie get's
  correctly
   set - but not appended to the redirect URL).
   Tomcat (7.0.22) doesn't append jsessionid to an url like
  http://localhost/?1.
   Looks like it's still the empty path and tomcat problem that
 prohibits
   the appending of jsessionid.
  
   Now when I don't use cookies and follow the request to
   http://localhost/?1how should wicket know which session we're talking
   about?
  
   Please note that this problem doesn't exist when sending a request to
  e.g.
   http://localhost/login. I get a correct redirect to
   http://localhost/login;jsessionid=xx.
  
   I could think of the following workaround:
   1.) For the homepage use ONE_PASS_RENDER
  
   Is this a tomcat/wicket combination problem or am I doing something
  wrong?
  
   Many thanks
   Willo
  
   On Wed, Nov 16, 2011 at 7:57 PM, Bertrand Guay-Paquet 
   ber...@step.polymtl.ca wrote:
  
   I don't know of any other specific causes unfortunately...
  
   Try setting a breakpoint in RequestCycle#onBeginRequest() and see
 what
   happens. Try your page constructor too since it might be closer to
 the
   source of the problem.
  
   Good luck!
   Bertrand
  
  
   On 16/11/2011 12:21 PM, thomas willomitzer wrote:
  
   Hi,
  
   Thanks I checked but no getPageParameters() override ;)
  
   Regards
   Thomas
  
   On Wed, Nov 16, 2011 at 6:04 PM, Bertrand Guay-Paquet
   ber...@step.polymtl.ca  wrote:
  
Hi,
  
   I had a redirect loop once because I added an override to
   Page#getPageParameters() by mistake. I wanted to use my method to
   generate
   a new PageParameters instance for a page but overriding the Page
  method
   gave your result.
  
   It's worth a shot!
  
   Regards,
   Bertrand
  
  
   On 16/11/2011 11:40 AM, thomas willomitzer wrote:
  
Dear All,
  
   I've managed to get the jsessionid appended correctly when
  requesting a
   page without cookies enabled (wicket 1.5.3, tomcat 7.0.22).
  
   I get
   curl -v --insecure https://localhost/ -   Location:
   https://localhost/?1
   curl -v --insecure https://localhost/?1 -   Location:
  
  https://localhost/.;jsessionid=D62D2D693854214C847E7A75439909**
   **A3
  https://localhost/.;**jsessionid=**D62D2D693854214C847E7A75439909**A3
   
  

Re: Dealing with 3 choice components

2011-11-17 Thread Alberto
On 11/16/2011 10:38 PM, Andrea Del Bene wrote:
 Are you referring to the example from book Apache-Wicket-Cookbook,
 page n°34? If so, how do you populate the list of C? Maybe you should
 not set to null B model when you change value in A.
 If you can try to give an example of values from A,B and C.

I solved using Ajax.
In onUpdate() of AjaxFormComponentUpdatingBehavior of A, I add both
components (B and C) to the target.

thanks for the help

A



 On 11/16/2011 07:33 PM, Alberto wrote:
 On 11/16/2011 06:06 PM, Andrea Del Bene wrote:
 Hi,

 can you elaborate a little bit more what behavior you want to achieve?
 I mean, C becomes empty because  A#onSelectionChanged sets its model
 to null. This should not be strange.
 Yes, sounds obvious to me too. But I found an examples with 2
 dropdownchoice where in onSelectionChanged() of the first one is set to
 null the model of the second one.
 For two choices works well.
 Maybe is a wrong pattern, but I not found anything useful.
 Do you have other solutions?

 A

 I have a form with with 3 choice components:

 A) DropDownChoice
 B) DropDownChoice
 C) ListMultipleChoice

 The values of B depend on selected value of A.
 The values of C depend on selected values of A and B

 I override the wantOnSelectionChangedNotifications() and
 onSelectionChanged() methods of A and B.

 A#onSelectionChanged
 @Override
 protected void onSelectionChanged(IntegerSelectChoice newSelection) {
 super.onSelectionChanged(newSelection);
 SearchForm.this.getModelObject().setInstrument(null);
 SearchForm.this.getModelObject().setParams(null);
 }

 B#onSelectionChanged
 @Override
 protected void onSelectionChanged(IntegerSelectChoice newSelection) {
 super.onSelectionChanged(newSelection);
 SearchForm.this.getModelObject().setParams(null);
 }

 In A I set to null the model value of both B and C.
 In B I set to null the model value only of B.

 This code works only on the startup of the form. When I change the
 value in A the list of C become empty. I have to change the value of
 B to fill C.
 http://www.corriere.it/index.shtml?refresh_ce
 How can I manage this?

 A


 -
 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



 -
 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 302 redirect loop

2011-11-17 Thread Igor Vaynberg
so what do we need to do to fix it on our end?

-igor

On Thu, Nov 17, 2011 at 11:34 AM, thomas willomitzer wi...@test.at wrote:
 No I'm afraid ... just tried

 On Thu, Nov 17, 2011 at 8:19 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote:

 would adding a bogus query param help there? so the url will look like
 this: localhost/?1bogus=1

 -igor

 On Thu, Nov 17, 2011 at 10:21 AM, thomas willomitzer wi...@test.at
 wrote:
  Fair enough ...
 
  Looking at org.apache.catalina.connector.Response a url of e.g.
  http://localhost/?1 results in a path of length 0 which doesn't append
 the
  jsessionid.
 
  if( sb.length()  0 ) { // jsessionid can't be first.
 
  It's obviously a tomcat issue ... but given the fact that tomcat is
 widely
  used ... can't we do something about that?
  Well I did by using ONE_PASS_RENDER ;)
 
  Thanks
  Willo
 
     /**
      * Return the specified URL with the specified session identifier
      * suitably encoded.
      *
      * @param url URL to be encoded with the session id
      * @param sessionId Session id to be included in the encoded URL
      */
     protected String toEncoded(String url, String sessionId) {
 
         if ((url == null) || (sessionId == null))
             return (url);
 
         String path = url;
         String query = ;
         String anchor = ;
         int question = url.indexOf('?');
         if (question = 0) {
             path = url.substring(0, question);
             query = url.substring(question);
         }
         int pound = path.indexOf('#');
         if (pound = 0) {
             anchor = path.substring(pound);
             path = path.substring(0, pound);
         }
         StringBuilder sb = new StringBuilder(path);
         if( sb.length()  0 ) { // jsessionid can't be first.
             sb.append(;);
 
  sb.append(ApplicationSessionCookieConfig.getSessionUriParamName(
                     request.getContext()));
             sb.append(=);
             sb.append(sessionId);
         }
         sb.append(anchor);
         sb.append(query);
         return (sb.toString());
 
     }
 
 
  On Thu, Nov 17, 2011 at 6:52 PM, Igor Vaynberg igor.vaynb...@gmail.com
 wrote:
 
  as long as we are passing the /?1 url through
  servletresponse#encoderedirecturl() tomcat is responsible for
  appending the JSESSIONID if its not yet available in a cookie...
 
  -igor
 
  On Thu, Nov 17, 2011 at 2:16 AM, thomas willomitzer wi...@test.at
 wrote:
   Hi,
  
   Thanks for the advice! I follwed and traced the problem. Think it's a
   combination of Wicket and Tomcat...
  
   When i send the request for http://localhost/, wicket get's the
 session
   from tomcat, renders the page and buffers the response (since
   ONE_PASS_RENDER isn't default).
   Wicket (1.5.3) also appends the ?1 and sends a 302 redirect to
   http://localhost/?1 (in the 302 response header the cookie get's
  correctly
   set - but not appended to the redirect URL).
   Tomcat (7.0.22) doesn't append jsessionid to an url like
  http://localhost/?1.
   Looks like it's still the empty path and tomcat problem that
 prohibits
   the appending of jsessionid.
  
   Now when I don't use cookies and follow the request to
   http://localhost/?1how should wicket know which session we're talking
   about?
  
   Please note that this problem doesn't exist when sending a request to
  e.g.
   http://localhost/login. I get a correct redirect to
   http://localhost/login;jsessionid=xx.
  
   I could think of the following workaround:
   1.) For the homepage use ONE_PASS_RENDER
  
   Is this a tomcat/wicket combination problem or am I doing something
  wrong?
  
   Many thanks
   Willo
  
   On Wed, Nov 16, 2011 at 7:57 PM, Bertrand Guay-Paquet 
   ber...@step.polymtl.ca wrote:
  
   I don't know of any other specific causes unfortunately...
  
   Try setting a breakpoint in RequestCycle#onBeginRequest() and see
 what
   happens. Try your page constructor too since it might be closer to
 the
   source of the problem.
  
   Good luck!
   Bertrand
  
  
   On 16/11/2011 12:21 PM, thomas willomitzer wrote:
  
   Hi,
  
   Thanks I checked but no getPageParameters() override ;)
  
   Regards
   Thomas
  
   On Wed, Nov 16, 2011 at 6:04 PM, Bertrand Guay-Paquet
   ber...@step.polymtl.ca  wrote:
  
    Hi,
  
   I had a redirect loop once because I added an override to
   Page#getPageParameters() by mistake. I wanted to use my method to
   generate
   a new PageParameters instance for a page but overriding the Page
  method
   gave your result.
  
   It's worth a shot!
  
   Regards,
   Bertrand
  
  
   On 16/11/2011 11:40 AM, thomas willomitzer wrote:
  
    Dear All,
  
   I've managed to get the jsessionid appended correctly when
  requesting a
   page without cookies enabled (wicket 1.5.3, tomcat 7.0.22).
  
   I get
   curl -v --insecure https://localhost/ -   Location:
   https://localhost/?1
   curl -v --insecure https://localhost/?1 -   Location:
  
  

Re: Apache Wicket is a Flawed Framework

2011-11-17 Thread geraldkw
This is not an april fool's day, it is just an opinion of an inexperienced
developer. 

This illustrates one of the traditional logical fallacies. If you can't
effectively attack the argument, attack the speaker.

My biggest problem with Wicket is that I haven't found any documentation on
the web that really lets me get a solid grasp on the key concepts. I read a
lot of poorly written documentation, weak examples and forum posts dealing
with something that is only vaguely related to my goals, maybe learn a
fragment of useful info, and then suffer while trying to apply it.

I haven't looked a Wicket in Action or other Wicket Books, but I have not
heard good things. Also, this is the Internet Age and this is web
programming. I have no problem finding documentation on other web
programming languages/frameworks like I do with Wicket. 

If I am wrong, point me to some solid learning materials, and you stand a
chance of changing my mind.

geraldkw


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Apache-Wicket-is-a-Flawed-Framework-tp4080411p4081206.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: Apache Wicket is a Flawed Framework

2011-11-17 Thread Richard W. Adams
IMHO, your post looks at the wrong question (i.e., is Wicket perfect?). Of 
course it's not. No framework is.

A better question is: How does it compare to OTHER frameworks? This is 
subjective of course, but in my personal opinion it is far better than any 
other framework I've tried (Struts, JSP, ColdFusion, etc.).  Yes, it has a 
learning curve, but so does any framework.

Where I DO agree with you is that the documentation can be improved. But 
from what I've seen, it's improving as it matures.

RAM /abr./: Rarely Adequate Memory. 



From:   geraldkw geral...@gmail.com
To: users@wicket.apache.org
Date:   11/17/2011 02:54 PM
Subject:Re: Apache Wicket is a Flawed Framework



This is not an april fool's day, it is just an opinion of an 
inexperienced
developer. 

This illustrates one of the traditional logical fallacies. If you can't
effectively attack the argument, attack the speaker.

My biggest problem with Wicket is that I haven't found any documentation 
on
the web that really lets me get a solid grasp on the key concepts. I read 
a
lot of poorly written documentation, weak examples and forum posts 
dealing
with something that is only vaguely related to my goals, maybe learn a
fragment of useful info, and then suffer while trying to apply it.

I haven't looked a Wicket in Action or other Wicket Books, but I have not
heard good things. Also, this is the Internet Age and this is web
programming. I have no problem finding documentation on other web
programming languages/frameworks like I do with Wicket. 

If I am wrong, point me to some solid learning materials, and you stand a
chance of changing my mind.

geraldkw


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Apache-Wicket-is-a-Flawed-Framework-tp4080411p4081206.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




**

This email and any attachments may contain information that is confidential 
and/or privileged for the sole use of the intended recipient.  Any use, review, 
disclosure, copying, distribution or reliance by others, and any forwarding of 
this email or its contents, without the express permission of the sender is 
strictly prohibited by law.  If you are not the intended recipient, please 
contact the sender immediately, delete the e-mail and destroy all copies.
**


Re: Apache Wicket is a Flawed Framework

2011-11-17 Thread anant . asty
First ofc all I do not see any need to convince you you can take it or leave 
it. 1 there is an awesome set of examples if you search for wicket examples, 
also there are a lot of other extensions or plug ins in wicket extensions , 
wicket stuff, wi query j query that support all ajax functionality. This forum 
as you noticed is great to get place to get answers. As far as not having as 
extensive of documentation wicket is relatively newer so obviously it will take 
a bit.
--Original Message--
From: geraldkw
To: users@wicket.apache.org
ReplyTo: users@wicket.apache.org
Subject: Re: Apache Wicket is a Flawed Framework
Sent: Nov 17, 2011 12:05 PM

This is not an april fool's day, it is just an opinion of an inexperienced
developer. 

This illustrates one of the traditional logical fallacies. If you can't
effectively attack the argument, attack the speaker.

My biggest problem with Wicket is that I haven't found any documentation on
the web that really lets me get a solid grasp on the key concepts. I read a
lot of poorly written documentation, weak examples and forum posts dealing
with something that is only vaguely related to my goals, maybe learn a
fragment of useful info, and then suffer while trying to apply it.

I haven't looked a Wicket in Action or other Wicket Books, but I have not
heard good things. Also, this is the Internet Age and this is web
programming. I have no problem finding documentation on other web
programming languages/frameworks like I do with Wicket. 

If I am wrong, point me to some solid learning materials, and you stand a
chance of changing my mind.

geraldkw


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Apache-Wicket-is-a-Flawed-Framework-tp4080411p4081206.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: Exception Handling in 1.5

2011-11-17 Thread Nelson Segura
Hey, any idea how can I get the page/page class of the page that was
being rendered when the exception happened?
I was depending on that in 1.4 to determine the type of page I needed
to return, for example if I am in the context of a modal window, I was
showing a message in the window, and a close button. If I was in a
normal page, I was showing the full error page with errors et all.
I tried

Class pageClass =
((IPageClassRequestHandler)cycle.getActiveRequestHandler()).getPageClass();

But that throws an NPE

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



Re: Exception Handling in 1.5

2011-11-17 Thread Igor Vaynberg
hrm. you cant yet. but you can check if you are in an ajax request or
not by using webrequest.isajax() so you can implement that particular
usecase without the page.

-igor

On Thu, Nov 17, 2011 at 1:19 PM, Nelson Segura nsegu...@gmail.com wrote:
 Hey, any idea how can I get the page/page class of the page that was
 being rendered when the exception happened?
 I was depending on that in 1.4 to determine the type of page I needed
 to return, for example if I am in the context of a modal window, I was
 showing a message in the window, and a close button. If I was in a
 normal page, I was showing the full error page with errors et all.
 I tried

 Class pageClass =
 ((IPageClassRequestHandler)cycle.getActiveRequestHandler()).getPageClass();

 But that throws an NPE

 -
 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: Can't Reset Form After DropDownChoice OnChange Handled

2011-11-17 Thread Igor Vaynberg
what does your reset code look like?

-igor

On Thu, Nov 17, 2011 at 9:00 AM, aksarben rwada...@up.com wrote:
 I have a drop down choice component, and when the selection changes, I udpate
 various form fields by Ajax, in the form as follows:

 *public HistoryDropDown(final String id, final MapK, ? map, final
 Component dateField, final
        TrackDetailModel model, final TrackAttribute attribute) {

        super(id, map);
        final String originalValue = model.getOriginalValue(attribute);
        add(new AjaxFormComponentUpdatingBehavior(onchange) {
                private static final long serialVersionUID = -1;
                @Override
                protected void onUpdate(final AjaxRequestTarget target) {      
          // When
 selection changes

                        final String newValue = 
 model.getAttributeValue(attribute);     // What the
 new choice?
                        if (newValue.equals(originalValue)) {                  
                          // If back to original value
                                dateField.setEnabled(false);                   
                                  // Disable date field
                                model.restoreOriginalDateAndUser(attribute);   
                  // Restore original data
                        } else {                                               
                                                          // If changing to 
 new value
                                dateField.setEnabled(true);                    
                                          // Enable date field
                                model.setDefaultDateAndUser(attribute);        
                          // Effective date = today
                        }                                                      
                                                                  // User = 
 current user
                        target.addComponent(dateField.getParent());            
                          // Re-render fields
        }
    });
 }
 *
 The updates work fine (the screen re-renders properly), but if I then click
 the form's Reset button, nothing happens. I saw some other posts that said I
 have to do a form.modelchanged(), but that didn't any effect.

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Can-t-Reset-Form-After-DropDownChoice-OnChange-Handled-tp4080685p4080685.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: Update Component on TextField Entry

2011-11-17 Thread Igor Vaynberg
use the TextField component and add OnChangeAjaxBehavior to it, then
from inside onEvent() you can repaint the list.

-igor

On Thu, Nov 17, 2011 at 9:49 AM, Gregor Kaczor gkac...@gmx.de wrote:
 Hi!

 I need a hint how to solve the following problem.

 I have a RepeaterView displaying a list of static links. Below there is a
 text field. As soon as  something is entered in that textfield (not
 whitespace) I would like to replace those links with a list of completely
 different links containing a parameter with content from the text field.

 Both link lists have the same number of items.

 I was thinking to use AutoCompleteTextField to do that, but how do I replace
 those links from  protected IteratorT getChoices(String input) ?

 Kind Regards

 Gregor

 --
 How to find files on the Internet? FindFiles.net http://findfiles.net!


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



Debugging a NPE from a ModelPropertyResolver

2011-11-17 Thread Jablow, Eric R
I am trying to use Igor's wicket-validation-bean project, and I've managed to 
make a mistake where I'm getting a NullPointerException from when 
ValidationForm attempts to add property validators. Unfortunately, I can't tell 
what property it's trying to attach validators for here, as the exception 
message does not say. Is there any way I can get a more useful message?  The 
stack trace of the cause is

(The resulting stack trace has proprietary information)

Caused by: java.lang.NullPointerException
at 
net.ftlines.wicket.validation.bean.ReflectableProperty.init(ReflectableProperty.java:46)
at 
net.ftlines.wicket.validation.bean.ReflectableProperty.init(ReflectableProperty.java:98)
at 
net.ftlines.wicket.validation.bean.ModelPropertyResolver.resolve(ModelPropertyResolver.java:35)
at 
net.ftlines.wicket.validation.bean.ValidationContext.resolveProperty(ValidationContext.java:80)
at 
net.ftlines.wicket.validation.bean.ValidationForm$1.component(ValidationForm.java:170)
at 
net.ftlines.wicket.validation.bean.ValidationForm$1.component(ValidationForm.java:163)
at 
org.apache.wicket.util.visit.Visits.visitChildren(Visits.java:143)
at 
org.apache.wicket.util.visit.Visits.visitChildren(Visits.java:122)
at 
org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:908)
at 
net.ftlines.wicket.validation.bean.ValidationForm.addPropertyValidators(ValidationForm.java:162)
at 
net.ftlines.wicket.validation.bean.ValidationForm.onBeforeRender(ValidationForm.java:155)
at 
org.apache.wicket.Component.internalBeforeRender(Component.java:981)
at org.apache.wicket.Component.beforeRender(Component.java:1015)
at 
org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1785)
... 56 more

Respectfully,
Eric Jablow

This communication, along with any attachments, is covered by federal and state 
law governing electronic communications and may contain company proprietary and 
legally privileged information.  If the reader of this message is not the 
intended recipient, you are hereby notified that any dissemination, 
distribution, use or copying of this message is strictly prohibited.  If you 
have received this in error, please reply immediately to the sender and delete 
this message.  Thank you.


Re: Apache Wicket is a Flawed Framework

2011-11-17 Thread Peter Ertl
Nice post, Eric!

Wicket people are a humorous folk and always appreciate good entertainment :-)

Am 17.11.2011 um 22:02 schrieb anant.a...@gmail.com:

 First ofc all I do not see any need to convince you you can take it or leave 
 it. 1 there is an awesome set of examples if you search for wicket examples, 
 also there are a lot of other extensions or plug ins in wicket extensions , 
 wicket stuff, wi query j query that support all ajax functionality. This 
 forum as you noticed is great to get place to get answers. As far as not 
 having as extensive of documentation wicket is relatively newer so obviously 
 it will take a bit.
 --Original Message--
 From: geraldkw
 To: users@wicket.apache.org
 ReplyTo: users@wicket.apache.org
 Subject: Re: Apache Wicket is a Flawed Framework
 Sent: Nov 17, 2011 12:05 PM
 
 This is not an april fool's day, it is just an opinion of an inexperienced
 developer. 
 
 This illustrates one of the traditional logical fallacies. If you can't
 effectively attack the argument, attack the speaker.
 
 My biggest problem with Wicket is that I haven't found any documentation on
 the web that really lets me get a solid grasp on the key concepts. I read a
 lot of poorly written documentation, weak examples and forum posts dealing
 with something that is only vaguely related to my goals, maybe learn a
 fragment of useful info, and then suffer while trying to apply it.
 
 I haven't looked a Wicket in Action or other Wicket Books, but I have not
 heard good things. Also, this is the Internet Age and this is web
 programming. I have no problem finding documentation on other web
 programming languages/frameworks like I do with Wicket. 
 
 If I am wrong, point me to some solid learning materials, and you stand a
 chance of changing my mind.
 
 geraldkw
 
 
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Apache-Wicket-is-a-Flawed-Framework-tp4080411p4081206.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: Apache Wicket is a Flawed Framework

2011-11-17 Thread Gaetan Zoritchak
I must admit that I agree with you. While I think Wicket is a
great framework, the documentation is not up to par. This tool seems a
little too elitist. If you're strong enough you will find
a great framework. It's a shame because even if the mailing list is very
effective it slows down the adoption of wicket.

2011/11/17 geraldkw geral...@gmail.com

 This is not an april fool's day, it is just an opinion of an inexperienced
 developer. 

 This illustrates one of the traditional logical fallacies. If you can't
 effectively attack the argument, attack the speaker.

 My biggest problem with Wicket is that I haven't found any documentation on
 the web that really lets me get a solid grasp on the key concepts. I read a
 lot of poorly written documentation, weak examples and forum posts
 dealing
 with something that is only vaguely related to my goals, maybe learn a
 fragment of useful info, and then suffer while trying to apply it.

 I haven't looked a Wicket in Action or other Wicket Books, but I have not
 heard good things. Also, this is the Internet Age and this is web
 programming. I have no problem finding documentation on other web
 programming languages/frameworks like I do with Wicket.

 If I am wrong, point me to some solid learning materials, and you stand a
 chance of changing my mind.

 geraldkw


 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Apache-Wicket-is-a-Flawed-Framework-tp4080411p4081206.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: Apache Wicket is a Flawed Framework

2011-11-17 Thread Nelson Segura
You might/might not be right about documentation. This is usually true
of most frameworks when you move from the Hello World program to a
real life app.

The original message said little to nothing about documentations. It
is basically comparing Wicket to JSPs, and saying JSP are better. It
might be true for some people. For me, that have been working in JSPs
for a long while, it is very humorous :D

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



ValidationForm.addPropertyValidators sometimes looks for child properties in parent's model

2011-11-17 Thread Jablow, Eric R
I have some model classes with JSR 303 validation annotations, and I have some 
FormComponentPanels for each. Some of these will be nested. To test that the 
Wicket validation is correct, I'm creating a ValidationForm, which contains one 
of my panels, which contains another of my panels, and I am tying my form to a 
local minimal test object without the other fields I will be using later. I am 
using a CompoundPropertyModel. When I have the WicketTester initialize the 
ValidationForm, it looks for the 'parent' field in the minimal test object, 
which does exist.  Then, I get at line 302 of AbstractPropertyModel,

  return PropertyResolver.getPropertyGetter(expression, target);

I get a call with expression being child, and target being the local test 
object.  Were expression parent.child, this would succeed, as it would call 
getParent().getChild(). However, I'm not sure whether this is my bug or the 
wicket-validation-bean library's.

Incidentally, I'm getting an interesting misfeature from the validation; the 
order in which the validations are performed seems to be nondeterministic. This 
means that the test below fails sometimes.

tester.assertFeedback(path:to:panel, new String[] {messageA, 
messageB});

Often, when I reverse the order of messageA and messageB, the next test fails 
too! Perhaps Wicket 1.5.3 can have WicketTester.assertFeedback(String path, 
SetString messages).

Finally, I might need to avoid FormComponentPanels in the future, as some of 
the inner ones will be swapped in and out of the page depending on the user's 
choices.  I realize that the only panels that will be instrumented are the ones 
in the Form when it is originally configured.

Thanks in advance.

Respectfully,
Eric Jablow

This communication, along with any attachments, is covered by federal and state 
law governing electronic communications and may contain company proprietary and 
legally privileged information.  If the reader of this message is not the 
intended recipient, you are hereby notified that any dissemination, 
distribution, use or copying of this message is strictly prohibited.  If you 
have received this in error, please reply immediately to the sender and delete 
this message.  Thank you.


Re: Apache Wicket is a Flawed Framework

2011-11-17 Thread Igor Vaynberg
* there are three books written about wicket: two for beginners and
one for intermediate-advanced users.
* there is a searchable mailing list archive that spans years upon
years of users asking questions and getting answers.
* there is a wiki that lists examples and has some good articles.
* there is stack overflow questions and answers.

is there an answer to every single possible question out there? of
course not. no framework has that. look at projects like spring and
hibernate. do those have great documentation? i bet you would say
yes. are their mailing lists any less busy than our own? no. so what
does that say?

if i had to make up a number i would say that armed with the resources
i listed you would be able to answer about 80% of your own questions.
and i think that is a pretty good number. there is a very active user
list to help you answer questions you cant answer yourself, usually
faster then a commercial support contract. for free.

not too shabby.

-igor

On Thu, Nov 17, 2011 at 3:30 PM, Gaetan Zoritchak
g.zoritc...@moncoachfinance.com wrote:
 I must admit that I agree with you. While I think Wicket is a
 great framework, the documentation is not up to par. This tool seems a
 little too elitist. If you're strong enough you will find
 a great framework. It's a shame because even if the mailing list is very
 effective it slows down the adoption of wicket.

 2011/11/17 geraldkw geral...@gmail.com

 This is not an april fool's day, it is just an opinion of an inexperienced
 developer. 

 This illustrates one of the traditional logical fallacies. If you can't
 effectively attack the argument, attack the speaker.

 My biggest problem with Wicket is that I haven't found any documentation on
 the web that really lets me get a solid grasp on the key concepts. I read a
 lot of poorly written documentation, weak examples and forum posts
 dealing
 with something that is only vaguely related to my goals, maybe learn a
 fragment of useful info, and then suffer while trying to apply it.

 I haven't looked a Wicket in Action or other Wicket Books, but I have not
 heard good things. Also, this is the Internet Age and this is web
 programming. I have no problem finding documentation on other web
 programming languages/frameworks like I do with Wicket.

 If I am wrong, point me to some solid learning materials, and you stand a
 chance of changing my mind.

 geraldkw


 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Apache-Wicket-is-a-Flawed-Framework-tp4080411p4081206.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: Debugging a NPE from a ModelPropertyResolver

2011-11-17 Thread Igor Vaynberg
it seems like there is a buggy implementation of
IPropertyReflectionAwareModel somewhere. did you implement your own
model that implements that interface? seems like there is a model
somewhere that is a IPropertyReflectionAwareModel but it returns null
for all getSetter/Getter/Field() methods...

i will add an exception so it will be easier to flag where this is
happenning, maybe you can try with a snapshot

-igor

On Thu, Nov 17, 2011 at 2:17 PM, Jablow, Eric R eric.jab...@mantech.com wrote:
 I am trying to use Igor's wicket-validation-bean project, and I've managed to 
 make a mistake where I'm getting a NullPointerException from when 
 ValidationForm attempts to add property validators. Unfortunately, I can't 
 tell what property it's trying to attach validators for here, as the 
 exception message does not say. Is there any way I can get a more useful 
 message?  The stack trace of the cause is

 (The resulting stack trace has proprietary information)

 Caused by: java.lang.NullPointerException
                at 
 net.ftlines.wicket.validation.bean.ReflectableProperty.init(ReflectableProperty.java:46)
                at 
 net.ftlines.wicket.validation.bean.ReflectableProperty.init(ReflectableProperty.java:98)
                at 
 net.ftlines.wicket.validation.bean.ModelPropertyResolver.resolve(ModelPropertyResolver.java:35)
                at 
 net.ftlines.wicket.validation.bean.ValidationContext.resolveProperty(ValidationContext.java:80)
                at 
 net.ftlines.wicket.validation.bean.ValidationForm$1.component(ValidationForm.java:170)
                at 
 net.ftlines.wicket.validation.bean.ValidationForm$1.component(ValidationForm.java:163)
                at 
 org.apache.wicket.util.visit.Visits.visitChildren(Visits.java:143)
                at 
 org.apache.wicket.util.visit.Visits.visitChildren(Visits.java:122)
                at 
 org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:908)
                at 
 net.ftlines.wicket.validation.bean.ValidationForm.addPropertyValidators(ValidationForm.java:162)
                at 
 net.ftlines.wicket.validation.bean.ValidationForm.onBeforeRender(ValidationForm.java:155)
                at 
 org.apache.wicket.Component.internalBeforeRender(Component.java:981)
                at 
 org.apache.wicket.Component.beforeRender(Component.java:1015)
                at 
 org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1785)
                ... 56 more

 Respectfully,
 Eric Jablow

 This communication, along with any attachments, is covered by federal and 
 state law governing electronic communications and may contain company 
 proprietary and legally privileged information.  If the reader of this 
 message is not the intended recipient, you are hereby notified that any 
 dissemination, distribution, use or copying of this message is strictly 
 prohibited.  If you have received this in error, please reply immediately to 
 the sender and delete this message.  Thank you.


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



Re: ValidationForm.addPropertyValidators sometimes looks for child properties in parent's model

2011-11-17 Thread Igor Vaynberg
inline,

On Thu, Nov 17, 2011 at 4:05 PM, Jablow, Eric R eric.jab...@mantech.com wrote:
 I have some model classes with JSR 303 validation annotations, and I have 
 some FormComponentPanels for each. Some of these will be nested. To test that 
 the Wicket validation is correct, I'm creating a ValidationForm, which 
 contains one of my panels, which contains another of my panels, and I am 
 tying my form to a local minimal test object without the other fields I will 
 be using later. I am using a CompoundPropertyModel. When I have the 
 WicketTester initialize the ValidationForm, it looks for the 'parent' field 
 in the minimal test object, which does exist.  Then, I get at line 302 of 
 AbstractPropertyModel,

      return PropertyResolver.getPropertyGetter(expression, target);

 I get a call with expression being child, and target being the local test 
 object.  Were expression parent.child, this would succeed, as it would call 
 getParent().getChild(). However, I'm not sure whether this is my bug or the 
 wicket-validation-bean library's.

this is probably a misuse of the compound property model, which is
evil anyways. you have to create your components with ids that match
the path from the root object, so if you want to access person.address
property you cant put a text field with id address into a
webmarkupcontainer of id person, you have to add a text field with
component id person.address


 Incidentally, I'm getting an interesting misfeature from the validation; the 
 order in which the validations are  performed seems to be nondeterministic.

i dont think the spec defines order


 This means that the test below fails sometimes.

                tester.assertFeedback(path:to:panel, new String[] {messageA, 
 messageB});

 Often, when I reverse the order of messageA and messageB, the next test fails 
 too! Perhaps Wicket 1.5.3 can have WicketTester.assertFeedback(String path, 
 SetString messages).

maybe you can attach a patch to our jira

 Finally, I might need to avoid FormComponentPanels in the future, as some of 
 the inner ones will be swapped in and out of the page depending on the user's 
 choices.  I realize that the only panels that will be instrumented are the 
 ones in the Form when it is originally configured.

thats not the case. components under the validationform are
instrumented before every render so its safe to swap things in and
out.

-igor



 Thanks in advance.

 Respectfully,
 Eric Jablow

 This communication, along with any attachments, is covered by federal and 
 state law governing electronic communications and may contain company 
 proprietary and legally privileged information.  If the reader of this 
 message is not the intended recipient, you are hereby notified that any 
 dissemination, distribution, use or copying of this message is strictly 
 prohibited.  If you have received this in error, please reply immediately to 
 the sender and delete this message.  Thank you.


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



RE: Debugging a NPE from a ModelPropertyResolver

2011-11-17 Thread Jablow, Eric R
No, we are using only the stock models, I think. In any case, the particular 
test class uses CompoundPropertyModel.

From: Igor Vaynberg [igor.vaynb...@gmail.com]
Sent: Thursday, November 17, 2011 7:24 PM
To: users@wicket.apache.org
Subject: Re: Debugging a NPE from a ModelPropertyResolver

it seems like there is a buggy implementation of
IPropertyReflectionAwareModel somewhere. did you implement your own
model that implements that interface? seems like there is a model
somewhere that is a IPropertyReflectionAwareModel but it returns null
for all getSetter/Getter/Field() methods...

i will add an exception so it will be easier to flag where this is
happenning, maybe you can try with a snapshot

-igor
This communication, along with any attachments, is covered by federal and state 
law governing electronic communications and may contain company proprietary and 
legally privileged information.  If the reader of this message is not the 
intended recipient, you are hereby notified that any dissemination, 
distribution, use or copying of this message is strictly prohibited.  If you 
have received this in error, please reply immediately to the sender and delete 
this message.  Thank you.


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



Re: Debugging a NPE from a ModelPropertyResolver

2011-11-17 Thread Igor Vaynberg
if you create a testcase and attach it as a pull request i can take a
look. or a quickstart attached elsewhere would also work.

-igor


On Thu, Nov 17, 2011 at 4:35 PM, Jablow, Eric R eric.jab...@mantech.com wrote:
 No, we are using only the stock models, I think. In any case, the particular 
 test class uses CompoundPropertyModel.
 
 From: Igor Vaynberg [igor.vaynb...@gmail.com]
 Sent: Thursday, November 17, 2011 7:24 PM
 To: users@wicket.apache.org
 Subject: Re: Debugging a NPE from a ModelPropertyResolver

 it seems like there is a buggy implementation of
 IPropertyReflectionAwareModel somewhere. did you implement your own
 model that implements that interface? seems like there is a model
 somewhere that is a IPropertyReflectionAwareModel but it returns null
 for all getSetter/Getter/Field() methods...

 i will add an exception so it will be easier to flag where this is
 happenning, maybe you can try with a snapshot

 -igor
 This communication, along with any attachments, is covered by federal and 
 state law governing electronic communications and may contain company 
 proprietary and legally privileged information.  If the reader of this 
 message is not the intended recipient, you are hereby notified that any 
 dissemination, distribution, use or copying of this message is strictly 
 prohibited.  If you have received this in error, please reply immediately to 
 the sender and delete this message.  Thank you.


 -
 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: Apache Wicket is a Flawed Framework

2011-11-17 Thread robert.mcguinness
i'm baffled when people say the documentation is poor, the javadocs are
excellent and like igor said there are some great books (blogs too!).  books
and blogs get outdated fast since technlogy is rapidly advancing, so *use
the source luke!*.  Not only will you learn Wicket, but I guarantee your
Java skills will improve.  


awesome examples:



https://github.com/apache/wicket https://github.com/apache/wicket  (scan
over the unit test, best way to learn any framework not just wicket)

https://github.com/55minutes/fiftyfive-wicket
https://github.com/55minutes/fiftyfive-wicket  (fantastic)

https://github.com/42Lines https://github.com/42Lines 

https://github.com/wicketstuff/core https://github.com/wicketstuff/core  (a
gem, tons of examples on how to pretty much do anything)

http://code.google.com/p/wiquery/source/checkout
http://code.google.com/p/wiquery/source/checkout 

https://github.com/jolira/wicket-stateless
https://github.com/jolira/wicket-stateless  (wicket stateless is excellent,
even easier with wicket 1.5)

https://github.com/reaktor/oegyscroll https://github.com/reaktor/oegyscroll 
(endless pagination)

http://code.google.com/p/wiquery/source/browse/core
http://code.google.com/p/wiquery/source/browse/core  (jquery)

http://code.google.com/p/jqwicket/source/browse/
http://code.google.com/p/jqwicket/source/browse/  (jquery, learn from the
code and roll your own if it doesn't fit your needs, super easy

https://github.com/rjnichols/visural-wicket
https://github.com/rjnichols/visural-wicket  (great ui tools)

https://xaloon.googlecode.com/svn/ https://xaloon.googlecode.com/svn/ 
(excellent!)



rob

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Apache-Wicket-is-a-Flawed-Framework-tp4080411p4082034.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: Apache Wicket is a Flawed Framework

2011-11-17 Thread sthomps
As gerald mentioned address the content - not the speaker, much more
effective.  

i'll address a few of your points and bring up a few of my own.  I'm sure
the others can be addressed with thoughtful/intelligent responses.

*Violates DRY*:  There is a reason that HTML is separated from your
corresponding Java component (not every html snippet has to have a component
btw).  Behavior is not allowed in your HTML and that makes me happy.  I can
have a Human Factors/Web designer do what they do best.  Design a beautiful,
high fidelity prototype that has taken actual user need in mind with plain
ol HTML/JS/CSS.  

I've seen data driven UI's done by backend programmers - not so nice. I know
because I've done them myself.

Not having behavior embedded in your view like a JSP/Facelet means that when
something goes wrong with a page, I have one place to look - in the
corresponding Java component.  No hidden loops tucked away in that page, no
calls to a Java API embedded within a mess of HTML code - clean separation.

*Breaks POJOS*:  The data being stored in your model doesn't have to
implement an interface.  See this response
http://apache-wicket.1842946.n4.nabble.com/confusion-about-Wicket-models-and-serialization-td1933714.html

A couple of things I think Wicket could improve upon is when you *don't*
want back button support and having to worry about PageMaps being stored in
the users session  disk.  As this is a corner case for the most part in the
web app world, I can live with what I have.

In that same vein, having to deal with PageExpiration exceptions when back
button support is not needed and I don't want my users to encounter this
when an Ajax action takes place.  Again this is not the norm and there's a
workaround but it's hacky.

As mentioned no UI framework is perfect.  All have their strengths and
weaknesses and usually those depend on your point of view, coding style,
time of day...

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Apache-Wicket-is-a-Flawed-Framework-tp4080411p4082041.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



AjaxEditableLabel inside of AjaxEditableLabel

2011-11-17 Thread Alec Swan
Hello,

I have two AjaxEditableLabel components. I use jQuery to place one
component inside of another when the user views the page. The problem
is that when the user clicks inside of the inner AjaxEditableLabel it
goes into edit mode but right after that the outer AjaxEditableLabel
goes into edit mode.

How can I prevent the outer AjaxEditableLabel from going into edit mode?

Thanks,

Alec

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



Re: Apache Wicket is a Flawed Framework

2011-11-17 Thread Attila Király
Currently a link to this mail is the most popular on dzone:
http://www.dzone.com/links/apache_wicket_is_a_flawed_framework.html

Attila


Re: Apache Wicket is a Flawed Framework

2011-11-17 Thread Jeroen Steenbeeke
I really liked the comment by javakata on that post. Counters every
argument with a counter-example and doesn't attack the speaker once.

2011/11/18 Attila Király kiralyattila...@gmail.com:
 Currently a link to this mail is the most popular on dzone:
 http://www.dzone.com/links/apache_wicket_is_a_flawed_framework.html

 Attila




-- 
Jeroen Steenbeeke
www.fortuityframework.com

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



Re: Apache Wicket is a Flawed Framework

2011-11-17 Thread nino martinez wael
Sensational news are always a hit, even when not true.

Any tool can be misused. With great power comes great responsibility.

-Nino

2011/11/18 Attila Király kiralyattila...@gmail.com

 Currently a link to this mail is the most popular on dzone:
 http://www.dzone.com/links/apache_wicket_is_a_flawed_framework.html

 Attila



Re: Wicket 1.5.2, stalls on one tomcat

2011-11-17 Thread nino martinez wael
So I digged into this and discovered something strange.

On the server that was working it had jre 6u24 and on the one not working
it had jre 6u29. I could'nt restart the server, but after installing jdk
6u25 it actually worked..


This is not good. It could prove hard to replicate with other framework
stacks, Im using a combo of mybatis, guice 3, wicket 1.5.3.. Anybody else
using this on jre 6u29 on tomcat 7?

regards Nino

2011/11/17 nino martinez wael nino.martinez.w...@gmail.com

 THANKS!


 2011/11/17 Andrea Del Bene adelb...@ciseonweb.it

 Profile the stalled server with Visual VM? It should detect existing
 deadlocks...

 Hi

 I have a very strange problem. At a customers site we have 2 servers
 with 1
 Tomcat 7 installed each. One day on one of the servers our application
 just
 stalled after loading the sign in page, when you click the login button.
 Im
 not sure this is a wicket problem. Heres what I've tried so far:


- Restart Tomcat
- Point the working application at the non working servers sql
 database,
it still works.
- Purge Tomcats session storage and temporary files
- Restart the server
- Redeploy the application, with the war from the working server (just

to be sure)

 I've even tried setting up SQL Profiler and sniffing on the database
 connections, nothing strange goes on here. Just seems like the
 application
 stalls when you try to login. Keep in mind that this works without
 problems
 from the other server.



 regards Nino



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





Re: AjaxEditableLabel inside of AjaxEditableLabel

2011-11-17 Thread Martin Grigorov
Hi,

You'll need to stop the propagation of the event.
To do that you'll have to override
org.apache.wicket.extensions.ajax.markup.html.AjaxEditableLabel.EditorAjaxBehavior.onComponentTag(ComponentTag)

On Fri, Nov 18, 2011 at 7:48 AM, Alec Swan alecs...@gmail.com wrote:
 Hello,

 I have two AjaxEditableLabel components. I use jQuery to place one
 component inside of another when the user views the page. The problem
 is that when the user clicks inside of the inner AjaxEditableLabel it
 goes into edit mode but right after that the outer AjaxEditableLabel
 goes into edit mode.

 How can I prevent the outer AjaxEditableLabel from going into edit mode?

 Thanks,

 Alec

 -
 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