[Wicket-user] NullPointerException when clicking on an expired wizard button

2007-08-06 Thread David Leangen

Hi!

I was running some random tests to try to see what kind of trouble a
typical user of my app could cause.

After completing a wizard, clicking the browser's back button, then
clicking the previous button of the wizard, I get the error below.

Is there a more graceful way to handle this rather than outputting an
error like this?

Why would this cause an internal error, rather than a session expired,
and how can I avoid this?


Thank you!
David




Unexpected RuntimeException
Root cause:

java.lang.NullPointerException
 at 
wicket.request.compound.DefaultRequestTargetResolverStrategy.resolveListenerInterfaceTarget(DefaultRequestTargetResolverStrategy.java:295)
 at 
wicket.request.compound.DefaultRequestTargetResolverStrategy.resolveRenderedPage(DefaultRequestTargetResolverStrategy.java:228)
 at 
wicket.request.compound.DefaultRequestTargetResolverStrategy.resolve(DefaultRequestTargetResolverStrategy.java:153)
 at 
wicket.request.compound.AbstractCompoundRequestCycleProcessor.resolve(AbstractCompoundRequestCycleProcessor.java:48)
 at wicket.RequestCycle.step(RequestCycle.java:992)
 at wicket.RequestCycle.steps(RequestCycle.java:1084)
 at wicket.RequestCycle.request(RequestCycle.java:454)
 at wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:219)
 at wicket.protocol.http.WicketServlet.doPost(WicketServlet.java:262)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:616)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
 at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:358)
 at 
org.mortbay.jetty.servlet.OsgiServletHandler.dispatch(OsgiServletHandler.java:108)
 at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567)
 at org.mortbay.http.HttpContext.handle(HttpContext.java:1807)
 at org.mortbay.http.HttpContext.handle(HttpContext.java:1757)
 at org.mortbay.http.HttpServer.service(HttpServer.java:879)
 at org.mortbay.http.HttpConnection.service(HttpConnection.java:790)
 at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:961)
 at org.mortbay.http.HttpConnection.handle(HttpConnection.java:807)
 at 
org.mortbay.http.SocketListener.handleConnection(SocketListener.java:218)
 at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:300)
 at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:511)



-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
IMPORTANT NOTICE:

This mailing list is shutting down. Please subscribe to the Apache Wicket user 
list. Send a message to: users-subscribe at wicket.apache.org and follow the 
instructions.
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] To Form or not to Form

2007-07-26 Thread David Leangen

I have a Panel that I'd like to be able to either render as a
FormComponent in the context of a known Form (by passing the parent Form
in this component's constructor) or, if the parent Form is null, to
itself render as a complete Form.

At first, I thought this would work:

  WebMarkupContainer formHeader = 
  new WebMarkupContainer( FORM_HEADER_ID );
  add( formHeader );
  formHeader.setVisible( form == null );

but then I realised that this won't work, since only the form header (or
footer) is not valid markup (i.e. the form tag is not properly opened
and closed).

I can think of a few hacks to make this work, but can somebody suggest a
more elegant solution to this?


Thanks!
David




-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
IMPORTANT NOTICE:

This mailing list is shutting down. Please subscribe to the Apache Wicket user 
list. Send a message to: users-subscribe at wicket.apache.org and follow the 
instructions.
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] To Form or not to Form

2007-07-26 Thread David Leangen

Great! Very simple!

Thanks, Igor!



On Thu, 2007-07-26 at 22:31 -0700, Igor Vaynberg wrote:
 always add a form around it, wicket supports nested forms.
 
 -igor
 
 
 On 7/26/07, David Leangen [EMAIL PROTECTED] wrote:
 
 I have a Panel that I'd like to be able to either render as a
 FormComponent in the context of a known Form (by passing the
 parent Form
 in this component's constructor) or, if the parent Form is
 null, to
 itself render as a complete Form.
 
 At first, I thought this would work: 
 
   WebMarkupContainer formHeader =
   new WebMarkupContainer( FORM_HEADER_ID );
   add( formHeader );
   formHeader.setVisible( form == null );
 
 but then I realised that this won't work, since only the form
 header (or 
 footer) is not valid markup (i.e. the form tag is not
 properly opened
 and closed).
 
 I can think of a few hacks to make this work, but can somebody
 suggest a
 more elegant solution to this?
 
 
 Thanks!
 David
 
 
 
 
 
 -
 This SF.net email is sponsored by: Splunk Inc.
 Still grepping through log files to find problems?  Stop.
 Now Search log events and configuration files using AJAX and a
 browser.
 Download your FREE copy of Splunk now
   http://get.splunk.com/
 ___ 
 IMPORTANT NOTICE:
 
 This mailing list is shutting down. Please subscribe to the
 Apache Wicket user list. Send a message to: users-subscribe
 at wicket.apache.org and follow the instructions. 
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
IMPORTANT NOTICE:

This mailing list is shutting down. Please subscribe to the Apache Wicket user 
list. Send a message to: users-subscribe at wicket.apache.org and follow the 
instructions.
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] AuthorizeAction and !Role

2007-07-25 Thread David Leangen

I would like to submit a patch for this, but I can't see where I need to
do this...

I can see that the issue tracker is now Jira set up on the Apache
infrastructure, but there is currently no component for
wicket-auth-roles.

Assuming that this is where I need to send in my patch, could somebody
with permissions please create this component?

Or... could somebody tell me where I could send in my patch?


Thanks!
Dave




On Wed, 2007-07-11 at 00:29 -0700, Eelco Hillenius wrote:
  Is there an elegant way to do the opposite of what the AuthorizeAction
  annotation was intended for?
 
  I have an unregister function that any user _except_ the admin user
  should be able to use. If the admin unregisters, I'm f*.
 
  Essentially, I'd really like to be able to do something like this:
 
@AuthorizeAction(
  action = Action.RENDER, roles = { !Roles.ADMIN, Roles.USER })
 
 
  Any ideas?
 
 The best thing you can do is to create your own extension/
 authorization strategy implementation for this. Maybe something like
 (action = Action.RENDER, roles = { Roles.USER }, deny = { Roles.ADMIN })
 
 Patch is welcome if it fits in elegantly.
 
 Eelco
 
 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] AuthorizeAction and !Role

2007-07-25 Thread David Leangen

  I would like to submit a patch for this...

 The component should be in there though. It currently doesn't have any
 issues assigned, so it doesn't show up on the front page, but if you
 create a new issue, you should be able to select it.


Ok, you're right Eelco. I'm honoured to be the first to submit an
issue. ;-)

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


I can't say that the patch is elegant, but it is consistent with the
current code and does the job. It won't break anybody's code, either.

So, I'd be grateful if a committer could apply it to the code base. :-)


Cheers,
Dave




-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Overriding button display for specific Wizard steps

2007-07-20 Thread David Leangen

I'm trying to figure out how to override the button displays for only
specific steps during the Wizard.

Essentially, I have a kind of license that a user needs to agree to, so
rather than Next , I'd like to override with I agree.


No problem for overriding for all steps, but that doesn't work for me.

When I try to receive the parent of the WizardStep to do this
dynamically, I only get null, so that approach is not working...


Any suggestions?

Thanks!



-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Overriding button display for specific Wizard steps

2007-07-20 Thread David Leangen

Wow! That was fast.

Ok, thanks! I'll give one of those a try.


Cheers,
Dave



On Thu, 2007-07-19 at 23:49 -0700, Eelco Hillenius wrote:
 On 7/19/07, David Leangen [EMAIL PROTECTED] wrote:
 
  I'm trying to figure out how to override the button displays for only
  specific steps during the Wizard.
 
  Essentially, I have a kind of license that a user needs to agree to, so
  rather than Next , I'd like to override with I agree.
 
 
  No problem for overriding for all steps, but that doesn't work for me.
 
  When I try to receive the parent of the WizardStep to do this
  dynamically, I only get null, so that approach is not working...
 
 
  Any suggestions?
 
 Provide a custom button bar by overriding Wizard#newButtonBar. Pass in
 the wizard to the steps as well (like the default do) and let the
 steps work with either the wizard's model object or the current wizard
 step (getActiveStep) and see what you need to do. You could even try
 doing something like
 
 interface IMyWizardStep extends IWizardStep {
   getNextButtonLabel();
 }
 
 and let your button call that.
 
 Eelco
 
 -
 This SF.net email is sponsored by: Microsoft
 Defy all challenges. Microsoft(R) Visual Studio 2005.
 http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] [OT] Getting proper URL from a proxied server

2007-07-15 Thread David Leangen

Thanks again.

Google didn't seem to say anything useful, at least on the first 5 pages or so 
before I gave up.

I will look into this. Just thought I'd ask in case you knew.



Cheers,
Dave



  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Frank Bille
  Sent: 15 July 2007 16:49
  To: wicket-user@lists.sourceforge.net
  Subject: Re: [Wicket-user] [OT] Getting proper URL from a proxied server


  On 7/14/07, David Leangen [EMAIL PROTECTED] wrote:
Did you have a problem with your link showing up with port number -1? So, 
the link returned by the server becomes:

  http://www.mycompany.com:-1/app/page?param1=asdf 


  I have never had that problem. And actually never heard about it either. What 
does Google say?

  Frank
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] [OT] Getting proper URL from a proxied server

2007-07-14 Thread David Leangen

Thank you!

That was exactly what I needed. :-)


Did you have a problem with your link showing up with port number -1? So, the 
link returned by the server becomes:

  http://www.mycompany.com:-1/app/page?param1=asdf

?


Just thought I'd ask...


Thanks again!!



  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Frank Bille
  Sent: 14 July 2007 15:27
  To: [EMAIL PROTECTED]; wicket-user@lists.sourceforge.net
  Subject: Re: [Wicket-user] Getting proper URL from a proxied server


  On 7/13/07, David Leangen [EMAIL PROTECTED] wrote:
Unfortunately, though, my server is behind a proxy, so the URL is
getting rendered as:

  http://192.168.10.1:8080/app/page?param1=asdf


  I have done the same for the application I'm working on. Are you using Apache 
mod_proxy? If so have you remembered to put this in:

  ProxyPreserveHost On

  Frank
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Getting proper URL from a proxied server

2007-07-13 Thread David Leangen

I'm not sure that this is related to Wicket, but maybe people here are
able to answer my question.

I have a service that needs to send out emails based on the request URL.
If I do this using a direct connection to the server, no problem. The
URL in the email is rendered properly, something like (if accessed via
the URL www.company.com):

  http://www.company.com/app/page?param1=asdf

Unfortunately, though, my server is behind a proxy, so the URL is
getting rendered as:

  http://192.168.10.1:8080/app/page?param1=asdf

Any clever ideas as to how I can properly get this resolved? It does not
work for me to hard code the URL...


Thanks!



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Page getting redirected when accessing from mail reply

2007-07-11 Thread David Leangen

  I really must try to fix my setup so I can step through the wicket code
  during debugging... :-(
 
 mvn eclipse:eclipse -DdownloadSources=true
 
 or
 
 mvn idea:idea -DdownloadSources=true
 
 And start your application in the debugger.

Thanks for the tip, Martijn, I wish it were that simple.

I'm using Wicket inside an OSGi container as an OSGi service, and my
bundle is in Eclipse as part of the target platform.

It works like a charm and I'm very pleased. I would strongly recommend
using Wicket in OSGi, it's truly great.

The only drawback with my particular setup is that I need to actually
create a bundle for the source and place it also in the target platform.
That's too much work for a lazy person like me. ;-)


Cheers,
Dave




-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Page getting redirected when accessing from mail reply

2007-07-11 Thread David Leangen
 I bet you could have done that in the time you wrote these replies!
 *cracks the whip* :)

He he... you're probably right. And all the time I've spent asking other
stupid questions, too. ;-)


Eelco, how have your experiments with OSGi been coming along?

Will that be included in your book?




-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Pages vs. Panels

2007-07-10 Thread David Leangen

I'm currently working on a project that requires all (or almost all)
pages to be bookmarkable.

My solution is to have different views for each page depending on the
input parameters. This is actually working out well, since the page is
really a kind of container with an associated URL space, and takes care
of parsing all parameters and such that are used by the views.

The result is: fewer pages, easier navigational structure, and as Eelco
pointed out, more flexibility and re-use.


Cheers,
Dave



On Tue, 2007-07-10 at 17:59 -0700, Eelco Hillenius wrote:
  However, I discovered a navigation issue and am considering adding the
  Breadcrumb feature to this site.  Unfortunately, it looks like the
  breadcrumb control uses Panels instead of pages.  So it looks like I
  need to switch everything from being page-based to panel-based.  Of
  course, doing that will take some time, but it isn't the end of the
  world.
 
 The bread crumbs component should be generic enough to be usable for a
 more page based approach. At least, that's the idea. What we need
 though is people - like you for instance - who need this in such a
 context and build support for it and validate it by using it in a real
 application (aka eating your own dogfood) :)
 
 Also, it might very well turn out that it is easier to roll your own
 component that does exactly what you want. That said, it is something
 that a lot of people want to do, so anyone interested in it, please
 pick it up and improve it (or write a new, better one) so that we have
 a good solution for both page based and panel based approaches.
 
  So, I guess I'm just wondering, what do the rest of you end up doing?
  Do you find that most of your web pages are actually Panels in a
  single Page?  Or are your sites built using many Pages?  Or is it
  somewhere in between?  I'm just curious if there is a majority one way
  or the other and if there are any strong reasons for one approach over
  the other.
 
 The project that I'm working on is primarily panel based. We only have
 a couple of pages, but most works using panel replacements.
 
 Not sure what is best as both have pros and cons. What I like about
 panel replacements is that it promotes reuse. It's also very flexible.
 The app I'm working on is pretty generic, with 'business components'
 that plug in the system and provide their own interface (and e.g.
 contributions to the bread crumbs model). The downside of this aproach
 is that things can get complex; when you have errors it is sometimes
 hard to track down exactly what/ where/ how, and getting an overview
 of what your page will look like in the end is either a lot of work
 maintaining preview sections, or just a lot of guessing :)
 
 With a page based aproach it is easier to keep the overview, and it
 will be easier to track down issues. And - like you said -
 bookmarkability (and working with stateless pages) is way easier. The
 downside is that it is not as flexible, and you'll have to watch out
 for code duplication. Also, when you don't care much about
 bookmarkability, I find it a slightly bloated programming model, as
 you'lll have to write plumbing code just to stay on pages.
 
 Imho, a mixed aproach is always an option, but if you need/ want to
 choose between the two, probably the most important questions are
 whether you need many areas to be bookmarkable (yes - page based),
 you work with separate designers (yes - both are ok, but page based
 probably easier) and whether working page based provides you with
 enough flexibility (in other words: do you know all the functionality
 upfront and can you code it simply by providing a couple of pages for
 it).
 
 It would be interesting to read what the experience of other's is in
 this respect.
 
 Cheers,
 
 Eelco
 
 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Page getting redirected when accessing from mail reply

2007-07-10 Thread David Leangen

Excellent! Thank you, this did indeed solve the problem and seems like a
reasonable temporary workaround.

I really must try to fix my setup so I can step through the wicket code
during debugging... :-(


Thanks again!



On Mon, 2007-07-09 at 15:58 +0200, Arnout Engelen wrote:
 David Leangen schreef:
http://localhost:8080/app//page?wicket:pageMapName=wicket-0ct=%
  5BLjava.lang.String%3B%401e26e52

 I looked into this a bit, and this is due to some confusion about 
 whether the RequestParameters parameters should be a MapString, String 
 or a MapString, String[].
 
 Not sure how to properly fix this, but but the attached workaround seems 
 to do fine in my case.
 
 
 Arnout
 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___ Wicket-user mailing list 
 Wicket-user@lists.sourceforge.net 
 https://lists.sourceforge.net/lists/listinfo/wicket-user


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Page getting redirected when accessing from mail reply

2007-07-09 Thread David Leangen

I am trying to implement some features that require feedback from a mail
message. The mail message contains an MD5 hashed key that provides the
authentication so to speak for that page view.

For instance, during my tests, the url generated and included in the
mail is this:

  http://localhost:8080/app//page?ct=35fa3b27724496d448075cdff5c8856

When I copy that address and paste it into my web browser, the page
works as I expect it to.

However, if I actually click on that link from my mail message, a
browser is opened with that link, but the page is instantly (i.e.
within less than a second) redirected to the following link:

  http://localhost:8080/app//page?wicket:pageMapName=wicket-0ct=%
5BLjava.lang.String%3B%401e26e52

This messes up what I am trying to do...


Can anybody tell me why my request is getting redirected in this
circumstance?

I should mention that I mounted this page with the
QueryStringUrlCodingStrategy.


BTW, I tried invalidating the session, thinking that it may be due to a
cookie, but invalidating the session didn't solve the problem.

Also... if I move to a different machine and click on the mail, I'm not
getting the problem. However, I need to solve this, since in most cases
the user will be doing all this from the same host.

(As an aside, if anybody can tell my why I get double slashes in my URL,
that would be cool, too. :-)


Thanks!
David




-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Extra / when using nice URLs

2007-07-09 Thread David Leangen

  Is there a reason why I am getting an extra / when using nice URLs?
  
  For example, when I mount a page as (/search, SearchPage.class), if I
  use that as my Home page, no problems.
  
  However, any time I navigate to that page via a Wicket link, the URL
  gets rendered as:
  
http://www.blah.com/app//search
  
  I'm wondering if this is somehow my doing, or a feature of Wicket...
 
 Which version of Wicket are you using?


1.2.6

Cheers,
David




-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Page getting redirected when accessing from mail reply

2007-07-09 Thread David Leangen

Cool, thank you!

I'll try that out tomorrow.

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] Behalf Of 
 Arnout Engelen
 Sent: 9 July 2007 22:59
 To: [EMAIL PROTECTED]; wicket-user@lists.sourceforge.net
 Subject: Re: [Wicket-user] Page getting redirected when accessing 
 from mail reply
 
 
 David Leangen schreef:
http://localhost:8080/app//page?wicket:pageMapName=wicket-0ct=%
  5BLjava.lang.String%3B%401e26e52

 I looked into this a bit, and this is due to some confusion about 
 whether the RequestParameters parameters should be a MapString, String 
 or a MapString, String[].
 
 Not sure how to properly fix this, but but the attached workaround seems 
 to do fine in my case.
 
 
 Arnout
 

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Extra / when using nice URLs

2007-07-09 Thread David Leangen

I guess this would just be a problem with the encoder. I'll try and take a
closer look tomorrow. It's just that unfortunately in my setup, I don't have
an easy way of stepping through the wicket code.



 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Behalf Of
 David Leangen
 Sent: 10 July 2007 07:05
 To: wicket-user@lists.sourceforge.net
 Subject: Re: [Wicket-user] Extra / when using nice URLs



   Is there a reason why I am getting an extra / when using nice URLs?
  
   For example, when I mount a page as (/search,
 SearchPage.class), if I
   use that as my Home page, no problems.
  
   However, any time I navigate to that page via a Wicket link, the URL
   gets rendered as:
  
 http://www.blah.com/app//search
  
   I'm wondering if this is somehow my doing, or a feature of Wicket...
 
  Which version of Wicket are you using?


 1.2.6

 Cheers,
 David




 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] CSS Issues: One Reason I cant Upgrade from 1.2.4 to 1.2.6

2007-07-08 Thread David Leangen

Is this somehow related to my post about a double slash // appearing
in my URLs?



On Sat, 2007-07-07 at 15:03 -0700, Igor Vaynberg wrote:
 On 7/7/07, Ayodeji Aladejebi [EMAIL PROTECTED] wrote:
 Maybe there is some best practice that I violated but
 sincerely simply upgrading to 1.2.6 wicket.jar just scatters
 my CSS and I dont even know what to do about it.
 
 A Style heading as simple as what is below did fine with 1.2.4
 but my site just scattered when i swapped jar files:
 The style_1.css is in the root folder and it has been working
 fine
 my context root is /app/* and not /app (which dint solve the
 problem either)
 
 it doesnt work because we have fixed a bug that did not always
 properly add the trailing slash
 
 for example,  older version of wicket sometimes generated urls like
 
 (1) /context/app?wicket... 
 
 or
 
 (2) /context/app/?wicket
 
 in case of (1) your code would work because your href would resolve
 to /context/style_1.css, in case of (2) it would not because it would
 resolve to /context/app/style_1.css 
 
 1.2.6 makes sure urls always look like (2).
 
 so if you want to fix it change the href to href=../style_1.css
 
 however notice that in both 1.2.4 and 1.2.6 these kinds of hrefs will
 break if you access the page through a mount. that is why wicket has a
 feature that prepends relative urls and makes them context-absolute. 
 
 so really even though you have 
 
 
 link href=style_1.css rel=stylesheet type=text/css /
 
 your output should be something like this:
 
 link href=/context/style_1.css rel=stylesheet type=text/css / 
 
 maybe we do not rewrite href of a link tag, something to check. if not
 please add a rfe into jira.
 
 -igor
 
 
  link href=style_1.css rel=stylesheet type=text/css /
 style type=text/css
 #tabs7 a {
 float:left;
 background:url( tableft7.gif) no-repeat left
 top;
 margin:0;
 padding:0 0 0 4px;
 text-decoration:none;
 }
 /style
 
 
 any tips
 
 
 
 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and
 take
 control of your XML. No limits. Just data. Click to get it
 now. 
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list 
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___ Wicket-user mailing list 
 Wicket-user@lists.sourceforge.net 
 https://lists.sourceforge.net/lists/listinfo/wicket-user


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Can I get a 'Nice URL' when form validation fails?

2007-07-06 Thread David Leangen

In 1.2.6, how can a stateless form be simulated?


On Thu, 2007-07-05 at 17:05 -0700, Igor Vaynberg wrote:
 
 On 7/5/07, Philip Wilkinson [EMAIL PROTECTED] wrote:
 It would be nice if I could configure wicket to use cookies
 (like the
 servlet container) when enabled on the client to store the
 information it
 currently encodes in url (?wicket:interface=:0:::)
 
 i dont think you fully understand the impact of this change. a servlet
 container only needs to set a cookie once per session - and its value
 doesnt change. wicket would have to do this every request and set it
 to different values. that means you can never have a regular link in
 your html - it would _always_ have to be a link with a javascript
 handler that sets the cookie. that is a big ugly drain. 
 
 if you are really set on having that behavior, then like i said, use
 stateless pages and forms. if that doesnt work then of course you can
 plugin your own url coding strategy - but for what you want i would
 not imagine it would be a trivial thing to write. 
 
 -igor
 
 
 
 
  
 
 Anyway thanks again for everyones input.
 Philip Wilkinson. 
 
 
 igor.vaynberg wrote:
 
  On 7/4/07, Philip Wilkinson [EMAIL PROTECTED]
 wrote:
 
 
  Thanks for that Dave. 
  It does make sense.
  But I know the values are stored in the session pagemap, so
 I'd like to
  be
  able to get them from there. I was hoping that a
 combination of a
  bookmarked 
  url, and maybe cookie or hidden field, managed by wicket,
 would be enough
  for wicket not to stray from my 'nice' bookmarked url, and
 not to expose
  wickets inner workings via a url. 
 
 
  the cookie idea mightve worked, but it would mean that we
 would have to
  rewrite every link to set the cookie, so essentially wicket
 will not work
  without javascript. :|
 
  -igor
 
 
 
 
  Cheers.
 
 
  David Leangen-8 wrote:
  
  
   Philip,
  
   You need to also include all your form values in the
 PageParamters, and 
   parse those values in your page, filling each of the
 fields with those
   values.
  
   Does that make sense?
  
  
   So, your url would be something like: 
  
 /myPage?field1=blahcheckbox1=true...
  
  
   Cheers,
   Dave
  
  
  
   On Tue, 2007-07-03 at 13:48 -0700, Philip Wilkinson
 wrote: 
   Hi,
  
   When my form validation fails, the page is redisplayed
 with the
  default
   url
   with all its wicket:interface stuff. 
   I'd rather this didn't happen as I've bookmarked the
 page, and would
   prefer
   to have the bookmarked url redisplayed. (the bookmarked
 url was
  initially 
   displayed for the page)
  
   I've tried overriding Form.onError() { setResponsePage(
  WelcomePage.class,
   new PageParameters()); } 
   and that got me my nice bookmarked url, but lost all my
 form field
   values.
   Obviously creating a new page instance.
  
   I've also tried Form.onError()
 { setResponsePage(WelcomePage.this); }
  
   Is it possible with wicket to only have the bookmarkable
 urls visible,
   without exposing the wicket internals in the url? 
  
   Thanks in advance
   Philip Wilkinson.
  
  
  
  
 
 
 - 
   This SF.net email is sponsored by DB2 Express
   Download DB2 Express C - the FREE version of DB2 express
 and take
   control of your XML. No limits. Just data. Click to get
 it now. 
   http://sourceforge.net/powerbar/db2/
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/wicket-user
  
  
 
  --
  View this message in context:
  http://www.nabble.com/Can-I-get-a-%27Nice-URL%
 27-when-form-validation-fails--tf4020865.html#a11429922
  Sent from the Wicket - User mailing list archive at
 Nabble.com.
  
 
 
 
 -
  This SF.net email is sponsored by DB2 Express
  Download DB2

[Wicket-user] Extra / when using nice URLs

2007-07-05 Thread David Leangen

Is there a reason why I am getting an extra / when using nice URLs?

For example, when I mount a page as (/search, SearchPage.class), if I
use that as my Home page, no problems.

However, any time I navigate to that page via a Wicket link, the URL
gets rendered as:

  http://www.blah.com/app//search

I'm wondering if this is somehow my doing, or a feature of Wicket...


Cheers,
Dave




-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] AuthorizeAction and !Role

2007-07-04 Thread David Leangen

Is there an elegant way to do the opposite of what the AuthorizeAction
annotation was intended for?

I have an unregister function that any user _except_ the admin user
should be able to use. If the admin unregisters, I'm f*.

Essentially, I'd really like to be able to do something like this:

  @AuthorizeAction(
action = Action.RENDER, roles = { !Roles.ADMIN, Roles.USER })


Any ideas?

Thanks!




-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Can I get a 'Nice URL' when form validation fails?

2007-07-04 Thread David Leangen

Philip,

 But I know the values are stored in the session pagemap, so I'd like
 to be able to get them from there. I was hoping that a combination
 of a bookmarked url, and maybe cookie or hidden field, managed
 by wicket, would be enough for wicket not to stray from my 'nice'
 bookmarked url, and not to expose wickets inner workings via a
 url.

You got me really curious with this. I can't really help you, but now I
really want to know more about this.

I checked out the request lifecycle and found this page when googling:

  http://www.wicket-wiki.org.uk/wiki/index.php/Lifecycle

What I'm trying to figure out is where Form.onSubmit() fits in, since this
is where you determine the page that you redirect to, and logically (to me)
this is where the URL of the next page gets set up.

What I can't figure out here is this: when the form's submit button gets
pressed on the current page, obvious a new HttpServletRequest gets sent to
the server, and the onSubmit() method gets invoked.

 1. What URL is sent to the server?
 2. Since the response can differ according to the input
 of the form, this means that the URL could change
 according to the input... but the URL is already
 decided on in step 1

Obviously, there's something I'm not getting here.

(Eu, experienced Wicket people: feel free to step in any time ;-)

In any case, once we can understand this lifecycle issue, we'll be able to
figure out whether or not you can achieve what you're trying to do.


Regards,
David



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Can I get a 'Nice URL' when form validation fails?

2007-07-04 Thread David Leangen


On Wed, 2007-07-04 at 12:14 -0700, Philip Wilkinson wrote:
 I've thought of a way of making my question clearer.
 
 I have a web page with a form which is accessed thru a bookmarked url so the
 address looks like
 http://localhost:8080/MyApp/myform
  
 I submit the form and the validation fails, the url in the address bar now
 looks like this
 http://localhost:8080/MyApp/myform?wicket:interface=:0:::
 
 I'd prefer not to see the ?wicket:interface=:0::: in the url. It's a
 implementation detail that nobody needs to see. Its not book-markable
 anymore, and it gives any malicious hacker out there too much info.
 
 Is theres any way I can get wicket just to show the bookmarked url when it
 redisplays the page?

Oh... If that's all you need...

Why not just use nice urls?

Note that if you don't include any page parameters (or some other way of
retrieving the data), your user will have to fill in all the form
details from scratch... not sure that's what you want.


Cheers,
Dave



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Can I get a 'Nice URL' when form validation fails?

2007-07-04 Thread David Leangen

Thanks, Igor, that makes sense.

But still one more question before I really understand onSubmit():

I could have this in my onSubmit:

if( isValidated )
  setResponsePage( PageOne.class );
else
  setResponsePage( PageTwo.class );


So, what gets sent back in the HttpServletResponse is different
according to the validation of the form (data being sent via POST and
handled in the background by Wicket).

Are you saying that in either case, the URL would be the same (i.e. the
one generated by Wicket magic and seen in the html of the form), but the
content of reply would be different depending on whether it's PageOne or
PageTwo?


If so... it all makes sense to me now... :-)

Very smart, too!



On Wed, 2007-07-04 at 07:34 -0700, Igor Vaynberg wrote:
 On 7/4/07, David Leangen [EMAIL PROTECTED] wrote:
 
  
 
 What I can't figure out here is this: when the form's submit
 button gets
 pressed on the current page, obvious a new HttpServletRequest
 gets sent to
 the server, and the onSubmit() method gets invoked.
 
 1. What URL is sent to the server?
 
 the url that is defined in form.action attribute in html. it tells
 wicket that the form has been submitted, pointing out which one. 
 
 2. Since the response can differ according to the input
  of the form, this means that the URL could change
  according to the input... but the URL is already
  decided on in step 1
 
 the url is the same but the post values are different. 
 
 
 -igor
 
 
 
 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___ Wicket-user mailing list 
 Wicket-user@lists.sourceforge.net 
 https://lists.sourceforge.net/lists/listinfo/wicket-user


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Can I get a 'Nice URL' when form validation fails?

2007-07-04 Thread David Leangen

Igor,

 hope this helps some

Yep. Helps me to understand how this works. Very clever. Thanks!

Hopefully it will also help Philip, who was asking the questions about
this.


Cheers,
Dave




On Wed, 2007-07-04 at 20:31 -0700, Igor Vaynberg wrote:
 On 7/4/07, David Leangen [EMAIL PROTECTED] wrote:
 
 Thanks, Igor, that makes sense.
 
 But still one more question before I really understand
 onSubmit():
 
 I could have this in my onSubmit:
 
 if( isValidated )
   setResponsePage( PageOne.class );
 else 
   setResponsePage( PageTwo.class );
 
 
 So, what gets sent back in the HttpServletResponse is
 different
 according to the validation of the form (data being sent via
 POST and
 handled in the background by Wicket). 
 
 Are you saying that in either case, the URL would be the same
 (i.e. the
 one generated by Wicket magic and seen in the html of the
 form), but the
 content of reply would be different depending on whether it's
 PageOne or 
 PageTwo?
 
 this is what happens in a nutshell
 
 you pull up a page that has a form, wicket has already generated an
 action url for that form that points back to that page. this url
 cannot be pretty because it points to a specific instance of a page
 wicket holds in session. 
 
 you submit the form, the url in action is invoked and hits the page,
 along with page parameters in post.
 
 lets say validation fails - that means your form.onsubmit() is never
 called. what wicket does is redirect to a url that will render the
 current page again back to the user (it doesnt have to redirect, but
 it does by default - see redirect-after-post pattern for details).
 this url also cannot be pretty because it points to a specific
 instance of a page in session - this is the url you will see when
 validation fails. 
 
 now if validation succeeds and your onsubmit() is called which does
 setresponsepage(MyPage.class) then you will be redirected to a
 pretty url given that MyPage is mounted.
 
 now if you want to maintain pretty url throughout then you might want
 to try using a statelesspage and a stateless form. however, notice
 that you would only be allowed to have stateless components on that
 page (components that do not generate a callback back to themselves -
 images, regular Links, etc) 
 
 
 hope this helps some
 


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] onSubmit() called twice

2007-07-03 Thread David Leangen

Hi, Eelco,

I guess I found why this was happening, but somehow this doesn't seem
right to me.

I had been experimenting with adding this

  add( new AjaxFormValidatingBehavior( this, onchange ) );

to my RequiredTextField. It never did work for me, but I thought I'd get
back to it later.

[When I say it doesn't work, I mean that there is no Javascript
validation (which IIUC is what's supposed to happen).]

Anyway, when I add this behaviour, onSubmit() is getting called twice
for some reason, which at least for me is definitely not the desired
behaviour of my form.


Is this the expected behaviour, or is something wrong?


Cheers,
Dave





On Mon, 2007-07-02 at 21:51 -0700, Eelco Hillenius wrote:
  onSubmit(), and consequently the code I have in that overridden method,
  is being called twice.
 
  I'm wondering if it's my misunderstanding of how Wicket works, and this
  behaviour is intended, or if I somehow introduced a bug in my code.
 
  If this is caused by my error, does anybody have any hints as to where I
  can look to find the source of this method's being called twice?
 
 That should definitively not happen. Can you tell us again what Wicket
 version you are using, and can you set a break point in your onSubmit
 method and tell us the trace?
 
 Eelco


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Can I get a 'Nice URL' when form validation fails?

2007-07-03 Thread David Leangen

Philip,

You need to also include all your form values in the PageParamters, and
parse those values in your page, filling each of the fields with those
values.

Does that make sense?


So, your url would be something like:

  /myPage?field1=blahcheckbox1=true...


Cheers,
Dave



On Tue, 2007-07-03 at 13:48 -0700, Philip Wilkinson wrote:
 Hi,
 
 When my form validation fails, the page is redisplayed with the default url
 with all its wicket:interface stuff.
 I'd rather this didn't happen as I've bookmarked the page, and would prefer
 to have the bookmarked url redisplayed. (the bookmarked url was initially
 displayed for the page)
 
 I've tried overriding Form.onError() { setResponsePage(WelcomePage.class,
 new PageParameters()); }
 and that got me my nice bookmarked url, but lost all my form field values.
 Obviously creating a new page instance.
 
 I've also tried Form.onError() { setResponsePage(WelcomePage.this); }
 
 Is it possible with wicket to only have the bookmarkable urls visible,
 without exposing the wicket internals in the url?
 
 Thanks in advance
 Philip Wilkinson.
 


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Wicket mailing list rules with regards to jobs

2007-07-03 Thread David Leangen

In that case...

Is anybody on this list, living in the Kansai area in Japan, available
for purely Wicket development?

We're looking for somebody who can work on-site if possible.

Japanese language skills would be a great asset.

:-)


On Tue, 2007-07-03 at 21:06 +0200, Martijn Dashorst wrote:
 On 7/3/07, Matej Knopp [EMAIL PROTECTED] wrote:
  Hi Matt, as far as I know there are no strict rules.
 
  Basically, if the position involves Wicket, nobody objects against such 
  posts.
 
 Specifically targets Wicket developers to be more exact. No general
 catch all 'Wicket, Tapestry, JSF, Struts, WebWork, Stripes' job ads
 please.
 
 Martijn
 
 


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] onSubmit() called twice

2007-07-03 Thread David Leangen

Ok, thanks for this info!

I'll have to look into Ajax behaviours in more detail at some point. It
all looks really well done and very useful, but I think there's more to
it than I originally thought.


Cheers,
Dave



On Tue, 2007-07-03 at 19:40 +0200, Johan Compagner wrote:
 you can use onchange but then you don't have to have a submit button
 because after every change your form is submitted.
 
 On 7/3/07, Igor Vaynberg  [EMAIL PROTECTED] wrote:
 
 On 7/3/07, Johan Compagner [EMAIL PROTECTED] wrote:
 first AjaxFormValidationBehavior doesn't do client
 side (javascript) validation.
 it calls the server and does this by submitting the
 form.
 
 so if you change the field where you have this
 validation on.
 And then you directly click a submit button yes it
 will be done twice. 
 first the fields onchange is triggered (or the button
 i dont know what the browser sees first)
 then the button click.
 
 so yes you get 2 form submits 
 
 But i don't know where you add that form on and what
 onchange you trigger 
 
 because this:
  add( new AjaxFormValidatingBehavior( this,
 onchange ) );
 
 seems to me that you add this to a forms onchange?
 (because this needs to be a form)
 but i guess you mean 
 
 textfield.add ( new AjaxFormValidatingBehavior( this,
 onchange ) );
 
 the problem here is that onchange is fired when the focus is
 lost from the field. so if you are on that field and you click
 the submit button this will result in two form-submittals that
 are very very close to each other. thus the double submit that
 you see. you should add validatingbehavior to onkeyup, and
 make sure to set a throttle so it doesnt flood your server. 
 
 -igor
 
 
 
  
 
 johan
 
 
 
 
 
 On 7/3/07, David Leangen [EMAIL PROTECTED] wrote:
 
 Hi, Eelco,
 
 I guess I found why this was happening, but
 somehow this doesn't seem 
 right to me.
 
 I had been experimenting with adding this
 
   add( new AjaxFormValidatingBehavior( this,
 onchange ) );
 
 to my RequiredTextField. It never did work for
 me, but I thought I'd get 
 back to it later.
 
 [When I say it doesn't work, I mean that
 there is no Javascript
 validation (which IIUC is what's supposed to
 happen).]
 
 Anyway, when I add this behaviour, onSubmit()
 is getting called twice 
 for some reason, which at least for me is
 definitely not the desired
 behaviour of my form.
 
 
 Is this the expected behaviour, or is
 something wrong?
 
 
 Cheers,
 Dave
 
 
 
 
 
 On Mon, 2007-07-02 at 21:51 -0700, Eelco
 Hillenius wrote: 
   onSubmit(), and consequently the code I
 have in that overridden method,
   is being called twice.
  
   I'm wondering if it's my misunderstanding
 of how Wicket works, and this 
   behaviour is intended, or if I somehow
 introduced a bug in my code.
  
   If this is caused by my error, does
 anybody have any hints as to where I
   can look to find the source of this
 method's being called twice? 
 
  That should definitively not happen. Can you

Re: [Wicket-user] Trying to retrieve the absolute URL

2007-07-02 Thread David Leangen

 There's already an issue for Wicket 1.3 (trunk):
   - http://issues.apache.org/jira/browse/WICKET-609
 
 I'm going to get around to that some time this week, I hope.


That's great!

Thank you very much. :-)




-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] onSubmit() called twice

2007-07-02 Thread David Leangen

Hello!

onSubmit(), and consequently the code I have in that overridden method,
is being called twice.

I'm wondering if it's my misunderstanding of how Wicket works, and this
behaviour is intended, or if I somehow introduced a bug in my code.

If this is caused by my error, does anybody have any hints as to where I
can look to find the source of this method's being called twice?


Thank you!
David




-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Trying to retrieve the absolute URL

2007-07-01 Thread David Leangen

Thank you!


Wow! I can't believe how fast development is... I just updated to 1.2.6,
but looking at Jira, it seems that 1.3.0 is about to be closed...

Should I still file an issue? If so, for which version? (Unfortunately,
I'm not in a position to verify with how things are working in trunk...)


Thanks,
David



On Fri, 2007-06-29 at 14:16 -0700, Igor Vaynberg wrote:
 On 6/29/07, David Leangen [EMAIL PROTECTED] wrote:
 
 Hello!
 
 I'm wondering if something has changed in 1.2.6 and the API
 docs are out
 of date, or if I just misunderstood the API docs...
 
 I am trying to get the URL of the request (the complete URL in
 the form 
 http://my.company.com/blah/hello?a=bc=d).
 
 This is how:
 
 WebRequest request = getWebRequestCycle().getWebRequest();
 String baseUrl = request.getURL ();
 
 
 The API docs say:
 
 getURL
 public abstract java.lang.String getURL()
 Retrieves the absolute URL of this request for local
 use.
 
 Returns:
 The absolute request URL for local use 
 
 
 
 However, I am getting something that looks like
 
 
 /hello///?wicket:interface=2:form.requestPassword::IFormSubmitListener
 
 I don't mind anything after the ?, but I do need the
 _absolute_ URL, 
 meaning everything in the form I wrote above.
 
 you have access to httpservletrequest from which you can reconstruct
 the full url by concatenating all the pieces.
 
 ((webrequest)getrequest()).gethttpservletrequest() 
  
 
 Did I misunderstand the API docs?
 
 please add a jira issue to have this fixed 
 
 -igor
  
 
 
 Thanks!
 Dave
 
 
 
 
 
 - 
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and
 take
 control of your XML. No limits. Just data. Click to get it
 now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] changing default wicket:link rendering

2007-07-01 Thread David Leangen

You can just change the CSS.

IIRC, wicket only writes to output a CSS class that you can modify as
you please.

Otherwise, you can probably just override the default functionality.
Wicket is really easy to customize by overriding the behaviours of the
parent classes.


Cheers,
Dave



On Sun, 2007-07-01 at 21:01 -0700, jonaqua wrote:
 Hi all,
 
 I'm fairly new to wicket - today's the first day I really dove into it.  I
 have a very basic question.
 
 The wicket:link tag automatically makes the current page in italics - like
 in the navomatic example.  How can I customize this functionality?  i.e.
 make the current page bold instead of in italics.  Amazingly, after a day of
 messing with wicket, that's the only question I have.  I'm sure I'll have
 more though...
 
 Thanks
 


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Trying to retrieve the absolute URL

2007-06-29 Thread David Leangen

Hello!

I'm wondering if something has changed in 1.2.6 and the API docs are out
of date, or if I just misunderstood the API docs...

I am trying to get the URL of the request (the complete URL in the form
http://my.company.com/blah/hello?a=bc=d).

This is how:

WebRequest request = getWebRequestCycle().getWebRequest();
String baseUrl = request.getURL();


The API docs say:

getURL
public abstract java.lang.String getURL()
Retrieves the absolute URL of this request for local use. 

Returns:
The absolute request URL for local use



However, I am getting something that looks like

/hello///?wicket:interface=2:form.requestPassword::IFormSubmitListener

I don't mind anything after the ?, but I do need the _absolute_ URL,
meaning everything in the form I wrote above.

Did I misunderstand the API docs?


Thanks!
Dave




-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Wicket Real World Performance!

2007-06-22 Thread David Leangen

That's right. I've been afflicted, too. Look at some of the questions I
was asking today. Sigh.



On Thu, 2007-06-21 at 23:24 -0700, Ballist1c wrote:
 cure??? there is no cure... i promise you   :D 
 
 
 
 igor.vaynberg wrote:
  
  believe me, i know that. but hopefully the way i repsonded has cured at
  least one person, no hard feelings :)
  
  -igor
  
  
  On 6/21/07, Ballist1c [EMAIL PROTECTED] wrote:
 
 
  cool your jets mate... your never going to get rid of stupidity...
 
 
  igor.vaynberg wrote:
  
   maybe if you wouldve bothered searching this list for performance info
  you
   wouldve seen this topic is a beaten horse. it is very tiring answering
  the
   same questions from every new user who do not bother searching for
   previous
   knowledge. especailly when they are not backed by something concrete.
  
   -igor
  
  
   On 6/21/07, Ballist1c [EMAIL PROTECTED] wrote:
  
  
   whoa, okay guys, slow down a second... we need to get something clear
   here...
  
   I am not smearing wicket, this is an impression I got when 5/5 wicket
   websites i visited were slow there is nothing wrong with that and
  It
   was
   a perfectly natural judgement to draw.
  
   I apologise if it looked like I was attacking the project.
  
   I came here looking for advice from the veterans... and I definately
  got
   it... in a crude form.. but never the less ... i got it...
  
   Thanks guys !
  
  
  
  
  
   igor.vaynberg wrote:
   
and somehow you magically know that it is wicket that is slow and
  not
   the
database of those webapplications? damn, i wish i had your tools :)
   
-igor
   
On 6/21/07, Ballist1c [EMAIL PROTECTED] wrote:
   
   
Hey guys,
   
i have been checking out a few sites using wicket at the moment on
  the
Wicket Wiki...
   
And they all seem extremely slow... I was wondering if anyone knew
  of
   any
other fancy websites that are pretty advanced into wicket
  development
that
I
could check out, cause so far the real world performance i have
  seen
   from
wicket has been dissapointing thus far :(
--
View this message in context:
   
  
  http://www.nabble.com/Wicket-Real-World-Performance%21-tf3962027.html#a11243897
Sent from the Wicket - User mailing list archive at Nabble.com.
   
   
   
  
  -
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
   
   
   
  
  -
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
   
   
  
   --
   View this message in context:
  
  http://www.nabble.com/Wicket-Real-World-Performance%21-tf3962027.html#a11244194
   Sent from the Wicket - User mailing list archive at Nabble.com.
  
  
  
  -
   This SF.net email is sponsored by DB2 Express
   Download DB2 Express C - the FREE version of DB2 express and take
   control of your XML. No limits. Just data. Click to get it now.
   http://sourceforge.net/powerbar/db2/
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/wicket-user
  
  
  
  -
   This SF.net email is sponsored by DB2 Express
   Download DB2 Express C - the FREE version of DB2 express and take
   control of your XML. No limits. Just data. Click to get it now.
   http://sourceforge.net/powerbar/db2/
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/wicket-user
  
  
 
  --
  View this message in context:
  http://www.nabble.com/Wicket-Real-World-Performance%21-tf3962027.html#a11246381
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
  -
  This SF.net email is sponsored by DB2 Express
  Download DB2 Express C - the FREE version of DB2 express and take
  control of your XML. No limits. Just data. Click to get it now.
  http://sourceforge.net/powerbar/db2/
  

Re: [Wicket-user] Binding the Enter key with a button

2007-06-22 Thread David Leangen

I am indeed talking about the Go button in my form. It is providing
the correct behaviour.

Now, what I'm looking for is to allow the user to submit the form by
just hitting enter rather than having to click the Go button.

I thought that I would need to bind the enter key to the go button...
are you suggesting that there is a way of capturing the enter key and
binding it somehow to the form submission?


If there is, then that would be fine, too.

So I guess there's two ways of going about this:

 1. Bind enter to a button

 2. Capture enter and bind to form submission


Either way, I don't know how to do this. Can anybody provide any hints?


Thanks!
Dave





On Fri, 2007-06-22 at 10:05 +0530, Swaroop Belur wrote:
 Hi
 
 One solution but not the ideal one would be (assuming go is a submit
 button),
 to override the onSubmit of the form  and to perform the action which
 you would do in your Go.So when u hit enter form would be submitted 
 and action for go would be invoked.
 
 But may not what u r actally looking for
 
 
 
 On 6/22/07, David Leangen [EMAIL PROTECTED] wrote:
 
 I hope this isn't an obvious question again... I did try
 searching. ;-) 
 
 Could somebody kindly point me to some doc that explains how
 to bind a
 key to a form component?
 
 In this case, I want to bind the Enter key with my Go
 button.
 
 
 Thanks!
 
 
 
 
 
 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and
 take
 control of your XML. No limits. Just data. Click to get it
 now. 
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___ Wicket-user mailing list 
 Wicket-user@lists.sourceforge.net 
 https://lists.sourceforge.net/lists/listinfo/wicket-user


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Binding the Enter key with a button

2007-06-22 Thread David Leangen

Ok, thanks everybody!

So, am I to assume that the only way to do this is through the use of
Javascript?


If that's so, then I'll do as suggested in the previous posts.

I'll post back with the results of what I find, though if it's more
complicated than I thought, I may have to put it aside for now.


Thanks again!




On Fri, 2007-06-22 at 08:53 +0200, Erik van Oosten wrote:
 Hi David,
 
 There are some Javascript tricks lying around on the Internet.
 Seach on google with submitting form with enter, you'll find plenty of 
 answers :)
 
 Erik.
 
 
 David Leangen wrote:
  I hope this isn't an obvious question again... I did try searching. ;-)
 
  Could somebody kindly point me to some doc that explains how to bind a
  key to a form component?
 
  In this case, I want to bind the Enter key with my Go button.
 
 
  Thanks!
 
 

 


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Bookmarkable pages and URLs

2007-06-21 Thread David Leangen

Duh...

Looks like BookmarkablePageLink is what I need...

Sorry that I missed that. Guess it was just too obvious! :-(



On Fri, 2007-06-22 at 09:41 +0900, David Leangen wrote:
 Hello!
 
 Apologies if this is a basic question. I'm just beginning to investigate
 page-related issues...
 
 
 I want my pages to be fully bookmarkable in the sense that each (or
 some) of the page parameters should appear in the URL GET-style.
 
 For instance, I have a typical search page search with a search bar.
 When the user clicks the go button, the page is refreshed and the
 search term is used as a parameter.
 
 What I would like is to have the term show up in the URL. So, the first
 time the user visits the page, the URL would be /search, while each
 subsequent visit, assuming a search term was used, would be something
 like /search?t=term.
 
 Until now, I've just let Wicket take care of all the parameters in the
 background for me. In other words, IIRC, Wicket uses POST for this.
 
 To achieve the above, do I need to append this to the URL myself and use
 an external GET-style link? In other words, can I just ask Wicket to use
 GET? Or is there some other nifty way of using a link (back to the same
 page in my case) while at the same time having this show up as part of
 the bookmarkable URL GET-style?
 
 
 Thanks!
 Dave
 
 
 
 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Bookmarkable pages and URLs

2007-06-21 Thread David Leangen

Yes, for sure! :-)


Actually, I have not solved my problem. BookmarkablePageLink is for
rendering a link, which is not useful for me.

I still need to know what to do for my Go button, which is the way the
page gets refreshed with the search term...

Until now, I just used:

 setResponsePage( Class cls, PageParameters parameters )

Which leads me back to my question below...


Any ideas?

Thanks!




On Thu, 2007-06-21 at 19:19 -0700, Eelco Hillenius wrote:
 And combine that with URL mounting and you're king :)
 
 Eelco
 
 On 6/21/07, David Leangen [EMAIL PROTECTED] wrote:
 
  Duh...
 
  Looks like BookmarkablePageLink is what I need...
 
  Sorry that I missed that. Guess it was just too obvious! :-(
 
 
 
  On Fri, 2007-06-22 at 09:41 +0900, David Leangen wrote:
   Hello!
  
   Apologies if this is a basic question. I'm just beginning to investigate
   page-related issues...
  
  
   I want my pages to be fully bookmarkable in the sense that each (or
   some) of the page parameters should appear in the URL GET-style.
  
   For instance, I have a typical search page search with a search bar.
   When the user clicks the go button, the page is refreshed and the
   search term is used as a parameter.
  
   What I would like is to have the term show up in the URL. So, the first
   time the user visits the page, the URL would be /search, while each
   subsequent visit, assuming a search term was used, would be something
   like /search?t=term.
  
   Until now, I've just let Wicket take care of all the parameters in the
   background for me. In other words, IIRC, Wicket uses POST for this.
  
   To achieve the above, do I need to append this to the URL myself and use
   an external GET-style link? In other words, can I just ask Wicket to use
   GET? Or is there some other nifty way of using a link (back to the same
   page in my case) while at the same time having this show up as part of
   the bookmarkable URL GET-style?
  
  
   Thanks!
   Dave
  
  
  
   -
   This SF.net email is sponsored by DB2 Express
   Download DB2 Express C - the FREE version of DB2 express and take
   control of your XML. No limits. Just data. Click to get it now.
   http://sourceforge.net/powerbar/db2/
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
  -
  This SF.net email is sponsored by DB2 Express
  Download DB2 Express C - the FREE version of DB2 express and take
  control of your XML. No limits. Just data. Click to get it now.
  http://sourceforge.net/powerbar/db2/
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Bookmarkable pages and URLs

2007-06-21 Thread David Leangen

H

I'm embarrassed.

You guys shouldn't make Wicket so easy to use. It makes old farts like
me look dumb.


;-)




On Fri, 2007-06-22 at 11:29 +0900, David Leangen wrote:
 Yes, for sure! :-)
 
 
 Actually, I have not solved my problem. BookmarkablePageLink is for
 rendering a link, which is not useful for me.
 
 I still need to know what to do for my Go button, which is the way the
 page gets refreshed with the search term...
 
 Until now, I just used:
 
  setResponsePage( Class cls, PageParameters parameters )
 
 Which leads me back to my question below...
 
 
 Any ideas?
 
 Thanks!
 
 
 
 
 On Thu, 2007-06-21 at 19:19 -0700, Eelco Hillenius wrote:
  And combine that with URL mounting and you're king :)
  
  Eelco
  
  On 6/21/07, David Leangen [EMAIL PROTECTED] wrote:
  
   Duh...
  
   Looks like BookmarkablePageLink is what I need...
  
   Sorry that I missed that. Guess it was just too obvious! :-(
  
  
  
   On Fri, 2007-06-22 at 09:41 +0900, David Leangen wrote:
Hello!
   
Apologies if this is a basic question. I'm just beginning to investigate
page-related issues...
   
   
I want my pages to be fully bookmarkable in the sense that each (or
some) of the page parameters should appear in the URL GET-style.
   
For instance, I have a typical search page search with a search bar.
When the user clicks the go button, the page is refreshed and the
search term is used as a parameter.
   
What I would like is to have the term show up in the URL. So, the first
time the user visits the page, the URL would be /search, while each
subsequent visit, assuming a search term was used, would be something
like /search?t=term.
   
Until now, I've just let Wicket take care of all the parameters in the
background for me. In other words, IIRC, Wicket uses POST for this.
   
To achieve the above, do I need to append this to the URL myself and use
an external GET-style link? In other words, can I just ask Wicket to use
GET? Or is there some other nifty way of using a link (back to the same
page in my case) while at the same time having this show up as part of
the bookmarkable URL GET-style?
   
   
Thanks!
Dave
   
   
   
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
  
  
   -
   This SF.net email is sponsored by DB2 Express
   Download DB2 Express C - the FREE version of DB2 express and take
   control of your XML. No limits. Just data. Click to get it now.
   http://sourceforge.net/powerbar/db2/
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/wicket-user
  
 
 
 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Binding the Enter key with a button

2007-06-21 Thread David Leangen

I hope this isn't an obvious question again... I did try searching. ;-)

Could somebody kindly point me to some doc that explains how to bind a
key to a form component?

In this case, I want to bind the Enter key with my Go button.


Thanks!




-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Wicket YUI

2007-06-05 Thread David Leangen

 A few months ago, a number of people expressed interest in
 contributing, so if any of you are reading this, I would love to have
 some help. In particular, i think it would be great if someone could
 bring drag and drop back to life. I think it could use some pretty
 heavy refactoring as well. Actually, there have been a lot of changes
 in wicket since wcy was last worked on, so much of the project could
 use modernization. If you don't know where to start, respond to this
 email and I can provide a few ideas.
 

Yep, that's still the case for me. I've just had other stuff come up.

I plan to get back to this in a few weeks. At that time, if for some
reason you still need a server for the demos, you could use mine.


Cheers,
Dave




-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Formatting non-html templates

2007-04-27 Thread David Leangen
On Fri, 2007-04-27 at 07:59 +0200, Juergen Donnerstag wrote:
 You know that you can remove all tag from output, do you? To remove
 wicket:xx is simply a matter of settings and all other tags (e.g.
 span wicket:id=..) can be removed by subclassing onComponentTag
 and not output anything.

Sure, I guess that would work for embedding panels into the text-only
page.

However, the body of the text must not have any tags and the mime-type
header must be text/plain.

So, subclassing WebPage would not work, and even if it did, it seems to
be that it would be a bad hack that breaks the wicket model.

I am therefore subclassing Page with a PlainTextPage class, which seems
to be more appropriate.

Trying what you suggest above gives me:

  java.text.ParseException: Malformed tag

My .plain file is of the form:

**
tag wicket:id=testtest/tag
plain text goes here
**

If I try to insert a component, I get the above error. I tried with this
in my java file:

  add( new ExternalLink( test, test.html ) );


Cheers,
Dave





-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Contributing to wicket-contrib-yui

2007-04-27 Thread David Leangen
On Fri, 2007-04-27 at 14:13 +0800, Joshua Lim wrote:
 I also hope that it could be a wicket package. I don't want to be
 dependent on the hosting.

What about having the option to do either one?




-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Formatting non-html templates

2007-04-27 Thread David Leangen

Ok, my bad. The error had nothing to do with what you suggested.

I'm playing around with all this now.

Thanks for the tips!




On Fri, 2007-04-27 at 15:09 +0900, David Leangen wrote:
 On Fri, 2007-04-27 at 07:59 +0200, Juergen Donnerstag wrote:
  You know that you can remove all tag from output, do you? To remove
  wicket:xx is simply a matter of settings and all other tags (e.g.
  span wicket:id=..) can be removed by subclassing onComponentTag
  and not output anything.
 
 Sure, I guess that would work for embedding panels into the text-only
 page.
 
 However, the body of the text must not have any tags and the mime-type
 header must be text/plain.
 
 So, subclassing WebPage would not work, and even if it did, it seems to
 be that it would be a bad hack that breaks the wicket model.
 
 I am therefore subclassing Page with a PlainTextPage class, which seems
 to be more appropriate.
 
 Trying what you suggest above gives me:
 
   java.text.ParseException: Malformed tag
 
 My .plain file is of the form:
 
 **
 tag wicket:id=testtest/tag
 plain text goes here
 **
 
 If I try to insert a component, I get the above error. I tried with this
 in my java file:
 
   add( new ExternalLink( test, test.html ) );
 
 
 Cheers,
 Dave
 
 
 
 
 
 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Formatting non-html templates

2007-04-27 Thread David Leangen
  On Fri, 2007-04-27 at 07:59 +0200, Juergen Donnerstag wrote:
   You know that you can remove all tag from output, do you? To remove
   wicket:xx is simply a matter of settings and all other tags (e.g.
   span wicket:id=..) can be removed by subclassing onComponentTag
   and not output anything.

This approach does not work, since wicket must output some kind of tag.

Even when setting 

  getMarkupSettings().setStripWicketTags( true );

and when @Overiding on ComponentTag so it doesn't output anything,
wicket still needs to output SOMETHING.

For example, with the above settings, if I try to add a label using this
template:

tag wicket:id=test-labeltest/tag

wicket will output this:

tagtest/tag


It looks like Eelco's suggesting of using TextTemplate is the way to go.
I just need to figure out how to serve it the way I want.


Cheers,
Dave





-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Formatting non-html templates

2007-04-27 Thread David Leangen
  tag wicket:id=test-labeltest/tag
 
  wicket will output this:
 
  tagtest/tag
 
 
 and now component.setRenderBodyOnly(true)

Ah! Eureka!

Thank you for this. :-)

Looks like this approach does exactly what I want after all. :-D





-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Contributing to wicket-contrib-yui

2007-04-26 Thread David Leangen

Is this the right place to post for contrib-related stuff??


I noticed that the yui code used in wicket-contrib-yui is very old.
Current version is 2.2.2, while wicket seems to be using 0.11.4.

I'm still in the investigation stage, but I was thinking about having
the yahoo code served by yahoo instead, so hosting the code as a
wicket package would not be required.

Another advantage: unless there are drastic changes, normally it should
be sufficient to simply change the version number, since the remote code
is referenced by a URL such as:

  http://yui.yahooapis.com/2.2.2/build/container/assets/container.cs


Should I add this feature to the wicket-contrib? Or would this just
get in the way, so I should just go it on my own?


Cheers,
Dave




-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Formatting non-html templates

2007-04-26 Thread David Leangen

Hello!

I have overridden Page with PlainTextPage that outputs text/plain.

I'm wondering: what's the best way to be able to add the plain-text
equivalent of panels to my template?

wicket-contrib-velocity seems to be no good, since it appears to be for
html templates.


Should I implement my own velocity stuff, or is there a better way?

Maybe something like this already exists, but I just haven't seen it?


Thanks!
Dave




-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Contributing to wicket-contrib-yui

2007-04-26 Thread David Leangen
 David, if you send us your sourceforge id, (not the literal id, but
 the name, like mine is eelco12), we can give you commit rights, and
 you can decide for yourself whether and when you play with it.

My id = dleangen


Thanks, Eelco!
Dave




-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Formatting non-html templates

2007-04-26 Thread David Leangen

Just to be sure we're talking about the same thing here... ;-)

  I have overridden Page with PlainTextPage that outputs text/plain.
 
 Hmmm. Does that work? Wicket still needs tags to operate...

Since there's so much nice stuff already available through Wicket and
my Wicket framework is already all set up, I was thinking of using
Wicket to provide access to text-only resources (and eventually others,
too).

For example, I want to read in some page parameters and, based on those
parameters, directly return a page of mime-type text/plain with some
strictly text-only output (i.e. no tags).

In other words, this is accessed directly from the outside as a url,
preferably mounted as a nice/pretty url.


  I'm wondering: what's the best way to be able to add the plain-text
  equivalent of panels to my template?
 
 Resources. See for instance TextTemplate and friend.

I took a quick look... but aren't resources used internally by wicket
for embedding into an html page? If so, it doesn't sound like this would
work for what I'm intending...

Or maybe I just don't see how to access the resource via a url to
accomplish what I'm after.


Cheers,
Dave




-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Which toolkit to use?

2007-04-24 Thread David Leangen

Peter,

Thank you for sharing your experience with me. I'm beginning to come to
the same conclusions, so it's nice to hear the experiences of others.

I've looked a little bit into mootools, yui, scriptaculous, and dojo.

mootools: unless I'm blind, I can't find any docs. Since I'm not a js
guru, I need docs or else I'm pretty useless.

scriptaculous: seems to be not so bad.

dojo: seems ok to develop with, but the demos don't perform very well.

yui: by far the most documentation of all of these, including
interactive demos. I think I'm going to give this a shot.


Cheers,
David



On Tue, 2007-04-24 at 11:18 +0530, Peter Thomas wrote:
 Hi,
 
 I had recently tried to decide upon a toolkit to use, and chose Yahoo
 UI.  It is very touch to choose nowadays and I did not do a thorough
 evaluation but what leaned me towards Yahoo UI is that it appears to
 have the best documentation.  It is modular as well - so the footprint
 is reasonable.  So far my experience has been good.  I am already
 using the calendar (my own instead of using wicket-datetime - Wicket
 makes rolling your own really easy :), and a non-modal resizable
 dialog which looks nice.  I also plan to use the menu component soon. 
 
 By the way the wicket-stuff minis project (which is what I think Eelco
 means by the misc components project) does not allow anonymous
 browsing, is this intentional?  I have submitted a draft of the dialog
 component in there, you may take a look at that. 
 
 http://www.wicketstuff.org/jira/browse/WSMINIS
 
 Thanks,
 
 Peter.
 
 On 4/24/07, Eelco Hillenius [EMAIL PROTECTED] wrote:
 How about that misc components project Igor just started?
 
 Eelco
 
 On 4/23/07, David Leangen [EMAIL PROTECTED] wrote:
 
  Awesome! Thank you for this superbly detailed reply! 
 
  Mind if I pick your brain some more?
 
 
   For choosing a library it is a matter of taste and
 priorities. If you
   want an actively maintained wicket project, then dojo
 should be your 
   cup of tea, if you want stability, probably prototype +
 some other
   library would be a better choice. If you want small
 footprint, then
   consider adopting mootools. If you want a huge company
 backing, YUI 
   would be a good library, with extjs as a nice extra.
 
  I think that given the project requirements, a small
 footprint needs to
  be a priority. I'm only going to need a small number of
 widgets anyway. 
 
  To that end, your suggestion of mootools sounds enticing.
 However, I
  noticed that it does not seem to be supported in
 wicket-stuff...
 
  Is it difficult to add support for the widgets I need? 
 
  Is there any doc about how to do this somewhere? (I wasn't
 able to find
  any...)
 
  Would it be useful to start a new mootols wicket-stuff
 project?
 
 
  Thanks! 
  David
 
 
 
 
 
 
 -
  This SF.net email is sponsored by DB2 Express
  Download DB2 Express C - the FREE version of DB2 express and
 take 
  control of your XML. No limits. Just data. Click to get it
 now.
  http://sourceforge.net/powerbar/db2/
  ___ 
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 
 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and
 take
 control of your XML. No limits. Just data. Click to get it
 now. 
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list 
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___ Wicket-user mailing list 
 Wicket-user@lists.sourceforge.net 
 https://lists.sourceforge.net/lists/listinfo/wicket-user


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML

Re: [Wicket-user] Which toolkit to use?

2007-04-23 Thread David Leangen

Awesome! Thank you for this superbly detailed reply!

Mind if I pick your brain some more?


 For choosing a library it is a matter of taste and priorities. If you
 want an actively maintained wicket project, then dojo should be your
 cup of tea, if you want stability, probably prototype + some other
 library would be a better choice. If you want small footprint, then
 consider adopting mootools. If you want a huge company backing, YUI
 would be a good library, with extjs as a nice extra.

I think that given the project requirements, a small footprint needs to
be a priority. I'm only going to need a small number of widgets anyway.

To that end, your suggestion of mootools sounds enticing. However, I
noticed that it does not seem to be supported in wicket-stuff...

Is it difficult to add support for the widgets I need?

Is there any doc about how to do this somewhere? (I wasn't able to find
any...)

Would it be useful to start a new mootols wicket-stuff project?


Thanks!
David




-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] question on localization

2007-04-23 Thread David Leangen
 i tried to use Label() with PropertyModel(pageTitle) but didn't work for 
 me.  it rendered Home string all the time, no matter what the locale was.
 any ideas how to do this?

You can do something like this:

new Label( componentId, new StringResourceModel( pageTitle, this, new
Model() ) );

In your properties file:
pageTitle=Home

In your html:
span wicket:id=componentIdDummy text/span


Look for StringResourceModel in ProWicket or in the API docs.


HTH
Dave




-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Wicket and embeddable Ajax components

2007-04-20 Thread David Leangen

Ok, that's interesting.

So, you guys are suggesting that a reasonable approach to the problem
would be to find a lib that I like (such as scriptaculous), set them up
on a widget server, then access them either as standalone javascript
widgets or in wicket via ComponentAsWidgetContainer?

The only unfortunate thing about this approach is that we'd have to redo
all our existing wicket stuff... But hey, who said life was perfect? ;-)


Cheers,
Dave



On Thu, 2007-04-19 at 23:59 -0700, Igor Vaynberg wrote:
 just to add
 
 an important point is
 
 this is completely transparent to the widget panel. it is just a
 panel. it doesnt know it is being inlined via javascript into another
 page - this is the job of ComponentAsWidgetContainerPage 
 
 one thing to consider is that you would need to rewrite urls so they
 point back to the widget server.
 
 -igor
 
 
 On 4/19/07, Igor Vaynberg [EMAIL PROTECTED] wrote:
 afaict there is no servlet. 
 
 what he does is have a bookmarkable page which he mounts. all
 this page does is read some parameter off url and based on
 that parameter add the right panel to itself. it then renders
 this panel, and wraps the output in document.write() call.
 
 well this is almost accurate. i think what he does is create a
 different page for different widget and mount each onto a
 different url.
 
 so
 
 MyWidgetAPage extends ComponentAsWidgetContainerPage { 
protected Panel getContent(String id) { return new
 MyWidgetAPanel(id); }
 }
 
 MyWidgetBPage extends ComponentAsWidgetContainerPage {
protected Panel getContent(String id) { return new
 MyWidgetBPanel(id); }
 }
 mountPage(/widgeta, MyWidgetAPage.class);
 mountPage(/widgetb, MyWidgetBPage.class);
 
 -igor
 
 
 -igor
 
 
 
 On 4/19/07, David Leangen [EMAIL PROTECTED] wrote:
 
 Hi, Barrett,
 
 Thank you for this. Very interesting.
 
 So, allow me to rephrase to make sure I'm
 understanding you on this.
 
 The requirement is:
 
 - Continue to use Wicket as web framework
 - Be able to reuse javascript widgets outside of
 wicket
 - Reuse same javascript code for both usage patterns
 
 IIUC, what you do below accomplishes that by using all
 javascript as
 scripted widgets, even from Wicket. In other words,
 the javascript is 
 no longer served by Wicket, but by a servlet.
 
 
 Is that correct?
 
 
 If so, don't you find that a bit cumbersome to have to
 change the way
 you write all your wicket apps? Or has it been
 relatively painless for 
 you?
 
 
 Cheers,
 Dave
 
 
 
 
 On Thu, 2007-04-19 at 11:33 -0700, barrett wrote:
  Forgot to mention, to use this just create a page
 class that extends
  ComponentAsWidgetContainerPage and then implement
 the getComponent(id) 
  method. This method should return the
 component(usually a panel) that you
  wish to make into a widget, with the id set to the
 id passed in to the
  getComponent call.
 
  You then have a script tag whose src points at this
 page as seen in the 
  javadoc comments.
 
  -Barrett
 
 
  barrett wrote:
  
   David,
   We recently had a requirement where we wanted to
 include a panel from our
   new Wicket app on one of our non-wicket legacy
 applications. To do this I 
   created a behavior and container page which will
 spit out any component
   between a javascript document.write method. Then
 on your non-wicket page
   you include a script tag whose src attribute is
 the address of the 
   container page. Below are the 3 files that make up
 the solution. If the
   files don't show up properly let me know and I can
 find another way to
   post

Re: [Wicket-user] Wicket and embeddable Ajax components

2007-04-20 Thread David Leangen

Ok, thanks for all this!

I'm new to Ajax, so I'll have to play around with this so I can better
appreciate the solution proposed below.


Cheers,
Dave



On Fri, 2007-04-20 at 00:26 -0700, Igor Vaynberg wrote:
 i dont really get what scriptaculous, etc has to do with it. and i
 dont get why you would have to redo anything? the solution is
 transparent.
 
 so if you have existing widgets that are panels, most likely they are,
 thats how you develop widgets in wicket, you just drop them into that
 container page and you are done 
 
 -igor
 
 
 On 4/20/07, David Leangen [EMAIL PROTECTED] wrote:
 
 Ok, that's interesting.
 
 So, you guys are suggesting that a reasonable approach to the
 problem
 would be to find a lib that I like (such as scriptaculous),
 set them up
 on a widget server, then access them either as standalone
 javascript 
 widgets or in wicket via ComponentAsWidgetContainer?
 
 The only unfortunate thing about this approach is that we'd
 have to redo
 all our existing wicket stuff... But hey, who said life was
 perfect? ;-)
 
 
 Cheers,
 Dave
 
 
 
 On Thu, 2007-04-19 at 23:59 -0700, Igor Vaynberg wrote:
  just to add
 
  an important point is
 
  this is completely transparent to the widget panel. it is
 just a 
  panel. it doesnt know it is being inlined via javascript
 into another
  page - this is the job of ComponentAsWidgetContainerPage
 
  one thing to consider is that you would need to rewrite urls
 so they 
  point back to the widget server.
 
  -igor
 
 
  On 4/19/07, Igor Vaynberg [EMAIL PROTECTED] wrote:
  afaict there is no servlet. 
 
  what he does is have a bookmarkable page which he
 mounts. all
  this page does is read some parameter off url and
 based on
  that parameter add the right panel to itself. it
 then renders 
  this panel, and wraps the output in document.write()
 call.
 
  well this is almost accurate. i think what he does
 is create a
  different page for different widget and mount each
 onto a 
  different url.
 
  so
 
  MyWidgetAPage extends ComponentAsWidgetContainerPage
 {
 protected Panel getContent(String id) { return
 new
  MyWidgetAPanel(id); } 
  }
 
  MyWidgetBPage extends ComponentAsWidgetContainerPage
 {
 protected Panel getContent(String id) { return
 new
  MyWidgetBPanel(id); }
  } 
  mountPage(/widgeta, MyWidgetAPage.class);
  mountPage(/widgetb, MyWidgetBPage.class);
 
  -igor
 
 
  -igor
 
  
 
  On 4/19/07, David Leangen [EMAIL PROTECTED]
 wrote:
 
  Hi, Barrett,
 
  Thank you for this. Very interesting. 
 
  So, allow me to rephrase to make sure I'm
  understanding you on this.
 
  The requirement is:
 
  - Continue to use Wicket as web framework 
  - Be able to reuse javascript widgets
 outside of
  wicket
  - Reuse same javascript code for both usage
 patterns
 
  IIUC, what you do below accomplishes that by
 using all 
  javascript as
  scripted widgets, even from Wicket. In
 other words,
  the javascript is
  no longer served by Wicket, but by a
 servlet. 
 
 
  Is that correct?
 
 
  If so, don't you find that a bit cumbersome
 to have to
  change the way
  you write all your wicket apps? Or has it
 been 
  relatively painless for
  you?
 
 
  Cheers,
  Dave
 
 
 
 
  On Thu, 2007-04-19 at 11:33 -0700, barrett
 wrote: 
   Forgot to mention, to use this just create
 a page
  class that extends

[Wicket-user] Wicket and embeddable Ajax components

2007-04-18 Thread David Leangen

Hello!

We are currently happily using Wicket to develop our web applications.
Wicket rules!


However, now we are required to make embeddable Ajax components, you
know, like Google Maps that anybody can embed in their own html.


Can anybody suggest an approach that would allow us to keep as much
overlap/reusability/cohabitation between our existing Wicket apps and
these Ajax components that we now need to make?


For instance, would a reasonable approach be to use only Sciptaclous
components in Wicket so we can use the exact same lib for our embeddable
components?

I guess ideally I'd like to be able to serve the XHRs from these
components directly from Wicket (ultimate reusability/cohabitation), but
this doesn't look like it would be an easy task...


Any comments would be most welcome. I'm new to this. :-)


Cheers,
Dave




-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] AutoCompleteTextField bug?

2007-03-26 Thread David Leangen

Well... that would almost explain the Japanese problem I'm having... but
why only one browser on 1 platform?

Weird...



On Mon, 2007-03-26 at 18:09 -0700, Igor Vaynberg wrote:
 hmm, you might be right. i dont think we url encode the input. please
 add an rfe.
 
 -igor
 
 
 On 3/26/07, Michael Day [EMAIL PROTECTED] wrote:
 Hi,
 
 I think I found a bug in AutoCompleteTextField.  When I enter 
 anything with a % symbol, I get a null string passed to
 getChoices
 (String).  I assume this has something to do with URL encoding
 (or
 lack thereof), but I haven't looked any deeper.
 
 I'm using Wicket 1.2.5.
 
 Michael
 
 
 -
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance
 to share your 
 opinions on IT  business topics through brief surveys-and
 earn cash
 
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 -
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share your
 opinions on IT  business topics through brief surveys-and earn cash
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___ Wicket-user mailing list 
 Wicket-user@lists.sourceforge.net 
 https://lists.sourceforge.net/lists/listinfo/wicket-user


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Japanese does not work in Autocomplete (Firefox/Windows)

2007-03-26 Thread David Leangen

Just an update...

The problem does not occur on English Windows.

It occurred on 3 different machines running Japanese Windows XP.


I'm stumped...




On Tue, 2007-03-27 at 09:45 +0900, David Leangen wrote:
 Hello!
 
 For some reason, in Firefox under Windows only, Japanese autocomplete
 does not not work.
 
 It works in Firefox on Mac and Linux, and it works on IE in Windows.
 It's just the Firefox/Windows that causes the problem, and only in
 Japanese.
 
 By does not work, I mean that nothing shows up.
 
 
 Any ideas where we could look?
 
 (I don't have a dev environment in Windows set up, so I haven't been
 able to step through the code in debug mode.)
 
 
 Cheers,
 David
 
 
 
 
 -
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share your
 opinions on IT  business topics through brief surveys-and earn cash
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Matching default locale to browser's preferred locale

2007-03-20 Thread David Leangen

I can't seem to find any info on this, and I can't recall either how
this is supposed to work.

I want the locale of my app to match the client browser's default locale
(unless changed explicitly, of course).


What do I need to do to achieve this?


Thanks!




-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Matching default locale to browser's preferred locale

2007-03-20 Thread David Leangen

Thanks for your help! You helped us locate the source of the problem,
though it's totally unrelated to wicket.

We misunderstood how locales work.

We were testing for:

  locale == Locale.JAPANESE

When we should have been testing for:

  locale.getLanguage().equals( ja )


Cheers,
Dave




On Tue, 2007-03-20 at 12:56 +0100, Johan Compagner wrote:
 i don't see a getDefaultLocale on ApplicationSettings (which version
 do you use of wicket?)
 
 But setting a (default) locale  like getSession().setLocale() then you
 will override the user locale
 with something that the server specifies.
 
 But the question is what doesn't work?
 What do you do with getSession().getLocale() (which should be what the
 browser tells us)
 
 johan
 
 On 3/20/07, David Leangen [EMAIL PROTECTED] wrote:
 
 
 Yes, you're right. Our problem occurs when we try to do some
 locale-related stuff, i.e.:
 
 Locale defaultLocale =
 Application.get().getApplicationSettings().getDefaultLocale();
 getSession().setLocale(); 
 
 
 We are not getting the correct result.
 
 So, either this is not the right way to get the locale, or
 there's some
 kind of timing issue, here...
 
 We've tried getSession().getLocale(), too, but that didn't
 work, either. 
 
 
 Cheers,
 Dave
 
 
 
 
 On Tue, 2007-03-20 at 09:26 +0100, Johan Compagner wrote:
  that should happen automatically already.
 
  johan
 
 
  On 3/20/07, David Leangen  [EMAIL PROTECTED] wrote:
 
  I can't seem to find any info on this, and I can't
 recall
  either how
  this is supposed to work. 
 
  I want the locale of my app to match the client
 browser's
  default locale
  (unless changed explicitly, of course).
 
 
  What do I need to do to achieve this? 
 
 
  Thanks!
 
 
 
 
 
 
 -
  Take Surveys. Earn Cash. Influence the Future of IT 
  Join SourceForge.net's Techsay panel and you'll get
 the chance
  to share your
  opinions on IT  business topics through brief
 surveys-and
  earn cash 
 
 
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
  ___ 
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
 
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Design questions: Use of controllers and wicket models

2007-03-16 Thread David Leangen

That's not a bad idea at all. Thanks!



On Fri, 2007-03-16 at 08:55 +, Gwyn Evans wrote:
 Hi,
   (If Igor says anything different, just ignore this! :-))
 
   The change that I'd consider would the standard one of if it'd be
 worth passing in a custom IMyBean interface derived from IModel, to
 cover the case where I might want to use something like-but-not-a
 MyBean, but I can't see anything wrong with passing it directly if
 that's not the case.
 
 /Gwyn
 
 On 16/03/07, David Leangen [EMAIL PROTECTED] wrote:
 
  Ok, thanks for the info.
 
  Sorry for not letting this thread die... but one more question (and
  hopefully last):
 
  Right now, the page I refactored looks like this:
 
  MyPage page = new MyPage( MyBean bean )
  {
 SomeComponent component = new Component( id, new MyModel( bean ) );
 bla bla
 Hi, Mom
  }
 
 
  So, I'm injecting my bean, as is, into the constructor of the page. The
  bean is created somewhere else. In the MyModel above, I'm actually using
  a field of a field of the model, so I get:
 
  class MyModel implements IModel
  {
private MyThing thing;
 
public MyModel( MyBean bean )
{
this.thing = bean.getField().getThing();
}
 
More bla bla
  }
 
 
  So:
 
  Is it ok to pass in the raw bean into the page contructor, or should I
  be passing in a model instead?
 
  Is there an even better way to go about all this that I haven't noticed?
 
 
  In any case, what I do really like about IModel is that it gives a
  direct translation between the controls and my bean. So cool!
 
 
  Cheers,
  David
 
 
 
  On Thu, 2007-03-15 at 07:27 -0800, Igor Vaynberg wrote:
   it is mostly internal and will be removed in the coming model refactor
  
   -igor
  
  
   On 3/14/07, David Leangen [EMAIL PROTECTED] wrote:
  
  
   Ok, thanks for your help, guys. I finally figured out what you
   meant by
   your last comments, and implemented one way to go about this.
   Not sure
   if it's the best way, but it's certainly much cleaner than
   before.
  
   Thanks!!
  
   Just one question remaining.
  
   What's the deal with getNestedModel( )?
  
   It sounds useful, but that never gets invoked.
  
  
   What is it for, and how would I use it?
  
  
   Cheers,
   Dave
  
  
  
  
  
  
   On Tue, 2007-03-13 at 16:07 +0900, David Leangen wrote:
:-)
   
 if you disable a formcomponent then neither a set or get
   will be
 called
   
   
Yes. But it's not disabled, and get is being called. Just
   not set.
   
I must be doing something wrong or missing something in the
   impl here...
but I don't see what it is. :-(
   
   
Cheers,
Dave
   
   
   
   
   
 Sorry for pulling you guys back to my mail
   issue. ;-)

 Since setObject() is not being called, I don't see
   how to
 apply my
 complex model to its children. I thought I could
   pull this off
 with
 setModel()... but it just ain't being called.


 Ok, let's stick with the person object. The
   person has
 attributes, and
 one of these attributes may itself have
   attributes.

 For example:

   Person:
 isSingle?

 if( isSingle )

   [ ] does dishes?
   [ ] makes bed?

 else

   [ ] has kids?
   [ ] walks dog?

 Whatever.

 Point is, if the isSingle attribute is true, I
   want to
 enable certain
 checkboxes and bind those values DIRECTLY to the
   model. Same
 goes if
 isSingle is false.

 Right now, I collect a boolean for each value and
   set them
 back
 manually into my model, which seems really
   messy.

 Same thing for enabling/disabling my checkboxes
   above: I do
 that
 manually depending on the current value in the
   model.


 What I'd really like to do is somehow bind all
   those controls
 directly
 to my

Re: [Wicket-user] Design questions: Use of controllers and wicket models

2007-03-15 Thread David Leangen


Ok, thanks for your help, guys. I finally figured out what you meant by
your last comments, and implemented one way to go about this. Not sure
if it's the best way, but it's certainly much cleaner than before.

Thanks!!

Just one question remaining.

What's the deal with getNestedModel( )?

It sounds useful, but that never gets invoked.


What is it for, and how would I use it?


Cheers,
Dave






On Tue, 2007-03-13 at 16:07 +0900, David Leangen wrote:
 :-)
 
  if you disable a formcomponent then neither a set or get will be
  called
  
 
 Yes. But it's not disabled, and get is being called. Just not set.
 
 I must be doing something wrong or missing something in the impl here...
 but I don't see what it is. :-(
 
 
 Cheers,
 Dave
 
 
 
 
 
  Sorry for pulling you guys back to my mail issue. ;-) 
  
  Since setObject() is not being called, I don't see how to
  apply my
  complex model to its children. I thought I could pull this off
  with
  setModel()... but it just ain't being called.
  
  
  Ok, let's stick with the person object. The person has
  attributes, and 
  one of these attributes may itself have attributes.
  
  For example:
  
Person:
  isSingle?
  
  if( isSingle )
  
[ ] does dishes?
[ ] makes bed?
  
  else 
  
[ ] has kids?
[ ] walks dog?
  
  Whatever.
  
  Point is, if the isSingle attribute is true, I want to
  enable certain
  checkboxes and bind those values DIRECTLY to the model. Same
  goes if 
  isSingle is false.
  
  Right now, I collect a boolean for each value and set them
  back
  manually into my model, which seems really messy.
  
  Same thing for enabling/disabling my checkboxes above: I do
  that 
  manually depending on the current value in the model.
  
  
  What I'd really like to do is somehow bind all those controls
  directly
  to my model so I'm not duplicating parts of the model for each
  control. 
  
  
  Any hints that would enlighten me on how to do this?
  
  
  Thanks so much!!
  
  
  
  On Mon, 2007-03-12 at 22:58 -0700, Eelco Hillenius wrote:
   Maybe it is good to gather a couple of use cases and pros
  and cons and 
   start a separate thread?
  
   Eelco
  
   On 3/12/07, Igor Vaynberg [EMAIL PROTECTED] wrote:
ah, but if you modify a collection that is a model object
  are you infact 
changing the object? you are not changing the reference
  itself but you are
doing something that has sideffects.
   
eg lets say you have a dropdown choice, but what you want
  is a collection of 
ids not the objects. the easiest way is to have a model in
  between that
translates a collection of objects to ids and back again.
  but how to do that
if setobject() is never called?
   
-igor
   
   
   
On 3/12/07, Eelco Hillenius [EMAIL PROTECTED]
  wrote:

 If you are not changing the object that is the subject
  of the model, I 
 see no reason why setObject should be called.

 Eelco

 On 3/12/07, Igor Vaynberg [EMAIL PROTECTED] 
  wrote:
  actually we are inconsistent in some places and i have
  been trying to
fix
  it. what we mostly do is whenever we work with a
  collection we clear it 
and
  repopulate it. but we never call setobject() on the
  model which imho is
  wrong. sometimes i have a model in between that
  depends on setobject()
  called whenever a property is updated because it does
  some translation 
and
  its a lot easier to proxy a model then it is to proxy
  a collection. just
my
  2c.
 
  -igor
  
 
 
  On 3/12/07, Eelco Hillenius
  [EMAIL PROTECTED] wrote:
  
  now all you have to do is 
 
  LoadableDetachableModel person=new
  LoadalbeDetachableModel(id);
  new CheckBox(this, cb, new
  PersonCheckBoxModel(person)); 
 
  and everything magically works, hope it gives
  you some ideas

Re: [Wicket-user] Design questions: Use of controllers and wicket models

2007-03-13 Thread David Leangen

:-)

 if you disable a formcomponent then neither a set or get will be
 called
 

Yes. But it's not disabled, and get is being called. Just not set.

I must be doing something wrong or missing something in the impl here...
but I don't see what it is. :-(


Cheers,
Dave





 Sorry for pulling you guys back to my mail issue. ;-) 
 
 Since setObject() is not being called, I don't see how to
 apply my
 complex model to its children. I thought I could pull this off
 with
 setModel()... but it just ain't being called.
 
 
 Ok, let's stick with the person object. The person has
 attributes, and 
 one of these attributes may itself have attributes.
 
 For example:
 
   Person:
 isSingle?
 
 if( isSingle )
 
   [ ] does dishes?
   [ ] makes bed?
 
 else 
 
   [ ] has kids?
   [ ] walks dog?
 
 Whatever.
 
 Point is, if the isSingle attribute is true, I want to
 enable certain
 checkboxes and bind those values DIRECTLY to the model. Same
 goes if 
 isSingle is false.
 
 Right now, I collect a boolean for each value and set them
 back
 manually into my model, which seems really messy.
 
 Same thing for enabling/disabling my checkboxes above: I do
 that 
 manually depending on the current value in the model.
 
 
 What I'd really like to do is somehow bind all those controls
 directly
 to my model so I'm not duplicating parts of the model for each
 control. 
 
 
 Any hints that would enlighten me on how to do this?
 
 
 Thanks so much!!
 
 
 
 On Mon, 2007-03-12 at 22:58 -0700, Eelco Hillenius wrote:
  Maybe it is good to gather a couple of use cases and pros
 and cons and 
  start a separate thread?
 
  Eelco
 
  On 3/12/07, Igor Vaynberg [EMAIL PROTECTED] wrote:
   ah, but if you modify a collection that is a model object
 are you infact 
   changing the object? you are not changing the reference
 itself but you are
   doing something that has sideffects.
  
   eg lets say you have a dropdown choice, but what you want
 is a collection of 
   ids not the objects. the easiest way is to have a model in
 between that
   translates a collection of objects to ids and back again.
 but how to do that
   if setobject() is never called?
  
   -igor
  
  
  
   On 3/12/07, Eelco Hillenius [EMAIL PROTECTED]
 wrote:
   
If you are not changing the object that is the subject
 of the model, I 
see no reason why setObject should be called.
   
Eelco
   
On 3/12/07, Igor Vaynberg [EMAIL PROTECTED] 
 wrote:
 actually we are inconsistent in some places and i have
 been trying to
   fix
 it. what we mostly do is whenever we work with a
 collection we clear it 
   and
 repopulate it. but we never call setobject() on the
 model which imho is
 wrong. sometimes i have a model in between that
 depends on setobject()
 called whenever a property is updated because it does
 some translation 
   and
 its a lot easier to proxy a model then it is to proxy
 a collection. just
   my
 2c.

 -igor
 


 On 3/12/07, Eelco Hillenius
 [EMAIL PROTECTED] wrote:
 
 now all you have to do is 

 LoadableDetachableModel person=new
 LoadalbeDetachableModel(id);
 new CheckBox(this, cb, new
 PersonCheckBoxModel(person)); 

 and everything magically works, hope it gives
 you some ideas.
  
   Yes, it does indeed give me many ideas. Right now,
 I'm trying to 
   figure
   out the implementation details.
  
   While stepping through the code, I noticed that
 the setObject()
   method 
   of my IModel never gets called.
  
   When is this _supposed_ to be set, and why would
 it not be called in
   my
   case? 
 
  There's not always a need for setObject to be
 called. I haven't read
  the 

Re: [Wicket-user] Design questions: Use of controllers and wicket models

2007-03-12 Thread David Leangen

Still playing around with this, and I have a question.

When does the IModel's setObject() method get called?

I'm stepping through the code, but this method is never being called...


Cheers,
Dave




On Fri, 2007-03-09 at 16:47 -0600, Thomas R. Corbin wrote:
 On Friday, 09 March 2007 11:57 am, Igor Vaynberg escreveu:
  yes, but then you are married to the output it genereates.
 
  [] label
  [] label
 
  whats below you can use just for the checkbox, so you are free to generate
  your own label/panel/whatever. eg selecting rows in a table.
 
   Ooooh - thanks!
 
 
  -igor
 
  On 3/9/07, Thomas R. Corbin [EMAIL PROTECTED] wrote:
   On Thursday, 08 March 2007 07:58 pm, Igor Vaynberg escreveu:
see above. take a simple example where you have a list of checkboxes
and you want all selected objects to end up in a collection. how do you
do
  
   it?
  
sounds like a complex mapping? the most elegant way is to write a
custom model.
  
   Can you use a CheckBoxMultipleChoice for this?
  
class mypage extends page {
private SetPerson selected=new HashSet();
   
private class PersonCheckboxModel implements IModelBoolean {
private final IModelPerson person;
public final PersonCheckBoxModel(IModelPerson person) {
this.person=person; }
   
public Boolean getObject() {
return selected.contains(person.getObject());
}
   
public void setObject(Boolean b) {
if (Boolean.TRUE.equals(b)) {
selected.put(person.getObject());
} else {
selected.remove(person.getObject());
}
}
   
public void detach() { person.detach(); }
}
   
}
   
now all you have to do is
   
LoadableDetachableModel person=new LoadalbeDetachableModel(id);
new CheckBox(this, cb, new PersonCheckBoxModel(person));
   
and everything magically works, hope it gives you some ideas.
  
   -
   Take Surveys. Earn Cash. Influence the Future of IT
   Join SourceForge.net's Techsay panel and you'll get the chance to share
   your
   opinions on IT  business topics through brief surveys-and earn cash
   http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 -
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share your
 opinions on IT  business topics through brief surveys-and earn cash
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Design questions: Use of controllers and wicket models

2007-03-12 Thread David Leangen

Igor,

Regarding your suggestions below:

  class mypage extends page {
  private SetPerson selected=new HashSet();
 
  private class PersonCheckboxModel implements IModelBoolean {
  private final IModelPerson person;
  public final PersonCheckBoxModel(IModelPerson person) {
  this.person=person; }
 
  public Boolean getObject() {
  return selected.contains(person.getObject());
  }
 
  public void setObject(Boolean b) {
  if (Boolean.TRUE.equals(b)) {
  selected.put(person.getObject());
  } else {
  selected.remove(person.getObject());
  }
  }
 
  public void detach() { person.detach(); }
  }
 
  }
 
  now all you have to do is
 
  LoadableDetachableModel person=new LoadalbeDetachableModel(id);
  new CheckBox(this, cb, new PersonCheckBoxModel(person));
 
  and everything magically works, hope it gives you some ideas.

Yes, it does indeed give me many ideas. Right now, I'm trying to figure
out the implementation details.

While stepping through the code, I noticed that the setObject() method
of my IModel never gets called.


When is this _supposed_ to be set, and why would it not be called in my
case?


Cheers,
David





-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Design questions: Use of controllers and wicket models

2007-03-12 Thread David Leangen

Sorry for pulling you guys back to my mail issue. ;-)

Since setObject() is not being called, I don't see how to apply my
complex model to its children. I thought I could pull this off with
setModel()... but it just ain't being called.


Ok, let's stick with the person object. The person has attributes, and
one of these attributes may itself have attributes.

For example:

  Person:
isSingle?

if( isSingle )

  [ ] does dishes?
  [ ] makes bed?

else

  [ ] has kids?
  [ ] walks dog?

Whatever.

Point is, if the isSingle attribute is true, I want to enable certain
checkboxes and bind those values DIRECTLY to the model. Same goes if
isSingle is false.

Right now, I collect a boolean for each value and set them back
manually into my model, which seems really messy.

Same thing for enabling/disabling my checkboxes above: I do that
manually depending on the current value in the model.


What I'd really like to do is somehow bind all those controls directly
to my model so I'm not duplicating parts of the model for each control.


Any hints that would enlighten me on how to do this?


Thanks so much!!



On Mon, 2007-03-12 at 22:58 -0700, Eelco Hillenius wrote:
 Maybe it is good to gather a couple of use cases and pros and cons and
 start a separate thread?
 
 Eelco
 
 On 3/12/07, Igor Vaynberg [EMAIL PROTECTED] wrote:
  ah, but if you modify a collection that is a model object are you infact
  changing the object? you are not changing the reference itself but you are
  doing something that has sideffects.
 
  eg lets say you have a dropdown choice, but what you want is a collection of
  ids not the objects. the easiest way is to have a model in between that
  translates a collection of objects to ids and back again. but how to do that
  if setobject() is never called?
 
  -igor
 
 
 
  On 3/12/07, Eelco Hillenius [EMAIL PROTECTED] wrote:
  
   If you are not changing the object that is the subject of the model, I
   see no reason why setObject should be called.
  
   Eelco
  
   On 3/12/07, Igor Vaynberg [EMAIL PROTECTED]  wrote:
actually we are inconsistent in some places and i have been trying to
  fix
it. what we mostly do is whenever we work with a collection we clear it
  and
repopulate it. but we never call setobject() on the model which imho is
wrong. sometimes i have a model in between that depends on setobject()
called whenever a property is updated because it does some translation
  and
its a lot easier to proxy a model then it is to proxy a collection. just
  my
2c.
   
-igor
   
   
   
On 3/12/07, Eelco Hillenius [EMAIL PROTECTED] wrote:

now all you have to do is
   
LoadableDetachableModel person=new LoadalbeDetachableModel(id);
new CheckBox(this, cb, new PersonCheckBoxModel(person));
   
and everything magically works, hope it gives you some ideas.
 
  Yes, it does indeed give me many ideas. Right now, I'm trying to
  figure
  out the implementation details.
 
  While stepping through the code, I noticed that the setObject()
  method
  of my IModel never gets called.
 
  When is this _supposed_ to be set, and why would it not be called in
  my
  case?

 There's not always a need for setObject to be called. I haven't read
 the whole thread, but in the above example, you work on a property
 ('cb') of the person, so all you have to do (probably) is do something
 with this updated object (like saving it). You would only do setObject
 when you would provide a new person, and when the getObject
 implementation wouldn't take care of that.

 Personally, I rarely use/ depend on setObject as working with
 properties of objects is a very typical thing to do.

 Hope this makes sense,

 Eelco


   
  -
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to
  share
your
 opinions on IT  business topics through brief surveys-and earn cash

   
  http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net

  https://lists.sourceforge.net/lists/listinfo/wicket-user

   
   
   
  -
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
  your
opinions on IT  business topics through brief surveys-and earn cash
   
  http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
   
  

[Wicket-user] Design questions: Use of controllers and wicket models

2007-03-08 Thread David Leangen

Hi!

Two design questions for experienced wicket users... Mail is a bit long.
I apologise for this, but I wanted to explain the situation well.

We have been using wicket now for a while, and I think it's time to try
to finally clean up our code a little. With that in mind, I have two
questions for more experienced users. First is about where to put logic,
second is about use of compound wicket models.


Background
--

Let me begin by describing our model briefly.

We have a search engine that allows certain controlled queries, and we
have a model/controller to accompany the wicket component(s) for this. 

Our idea is:

 - extract the state only into a very simple, serializable bean
 - use a controller to validate and control what state the
   bean can be in
 - write the state of the bean (query) in various formats
   through the use of a QueryWriter object
 - obviously use wicket component to allow user to set state


Our reasoning is:

1. Having a very simple and serializable bean will make it easy 
   to save the state either in a wicket session or in the backend. 
   The object should therefore be very lightweight.

2. Ideally NO logic should be in the wicket component. This is because:

   a. Logic should not be in the view
   b. Encapsulated logic can be reused (for example if we implement 
  in Swing)

3. Having a separate writer is a nice way to decouple the rendering
   of the state of the bean and seems to work very well.


Our model ends up being a complex bean that looks something like this:


public class QueryObject
implements Serializable
{
private ChildQueryObject m_colors;
private ChildQueryObject m_dates;
...

// Getters and setters here
// No logic! Very simple
}

And each child query object above can look something like this:

public class ColorQueryObject
implements Serializable
{
private boolean m_isBlueSelected;
private boolean m_isRedSelected;
...

public void setBlueSelected( boolean isSelected)
{
m_isBlueSelected = isSelected;
}

...
}

... you get the idea.


As stated above, the idea is that these beans hold only the state, and
nothing more. The query is printed by the user of a QueryWriter, which
I won't get into here.


This all looks fine at first glance, but when we get into the details,
we are scratching our heads about a few issues, wondering which would be
the best way to move forward.



First Question: Controller Logic


The idea of the controller is to control which states are valid, and
which are not. The original idea is that the wicket ui components can
only put the beans into a given state by using this controller. The
reason is that I don't like having too much logic in the ui classes.

If we do this, it looks like it means a lot of duplication of code,
since wicket will simply be delegating to the controller. For example:

In the wicket page, we'd have something like:

  controller.setBlueChecked( isBlueChecked );

And in the controller:

  public void setBlueChecked( boolean isChecked )
  {
  // validate if blue can be checked in this state
  // set the value, and adjust state of other
  //   properties if necessary

  // If it can't, what do we do? Throw an exception?
  }  


The idea sounds good, but I'm wondering if this is even necessary. It
was suggested to me that cleanly separating stuff into a controller is
not worth the effort, since we'd be duplicating so much code for no
good reason.



What do most people do to achieve clean code in this type of situation?

Also, say if we wanted to make the component compatible with
bookmarkability, would it be a good idea to have a setter or
constructor in the controller that accepts something similar to
PageParameters, so wicket can just pass through that object to the
controller?



Second Question: Mapping Above Model to Wicket Models
-

Since the model above is already established, I presume that we should
just be able to do something like:

  IModel model = new Model( bean );

So now, the above bean is wicketized.

However, two things I do not understand about this are:

1. How do we connect the wicket model with our controller 
   above when validating the state and delegating to the 
   state-holder bean?

2. How do we associate parts of the state-holder bean
   with the wicket controls? For example, the blue 
   above needs a checkbox, so how do we associate the
   value of blue in our bean above to the blue checkbox?


Hope my ramblings make some sense.



Cheers,
Dave





-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV

Re: [Wicket-user] Design questions: Use of controllers and wicket models

2007-03-08 Thread David Leangen

Great! Thanks for this. Very helpful!

This does give a lot of ideas, indeed. If my understanding is correct,
this would indeed provide a very elegant solution to what we're trying
to do.

One precision:


 you have to decide what is clearly business logic vs ui logic. the
 business logic should go into a separate
 service/controller/whatchamaggicit. the ui logic is best embedded in
 wicket components because each component is a full implementation of
 MVC already. 

This is actually something I'm kinda struggling with.

In our model, the biz logic is the query. So, for instance, if I have
two radios and a group of checkboxes:

( ) Any colour
( ) Choose colours
  [ ] Blue
  [ ] Red
  ...

If Any colour is chosen, then this produces one kind of query (where
choosing colours is irrelevant). In that case, the checkboxes must be
disabled. However, if Choose colours is chosen, colours become
relevant, so the checkboxes are activated.

So, is this biz or ui logic?

Or, worded differently, does this go into the controller or directly
into the wicket component?


 it would be a good idea if you can initialize some state off the
 pageparameters, be that business state or ui state or both. that way
 you can retain bookmarkability. 

Just to confirm:

We would not be _required_ to use PageParameters. Having a lightweight
bean would allow us to save the state of the bean in the model, and
therefore to the PageMap, right?

But, using PageParameters would give us the option of making pages
bookmarkable, right?


In either case, this approach is still valid, so it seems.


Another question:

Say we do want to keep our pages bookmarkable, but we don't want to have
to encode everything in the URL. Say also we don't want to use a db on
the backend. Would it be appropriate to save the beans to the wicket
session?

If so:

  1. What is an elegant way of doing this? Just a Map(id, object)
 that is accessed by the controller?

  2. Is there anything to watch out for? (Such as the map growing to
 an incredible size, for example)



 
 i think a lot of users underestimate the power of IModel when you
 implement it directly.

snip


 now all you have to do is
 
 LoadableDetachableModel person=new LoadalbeDetachableModel(id);
 new CheckBox(this, cb, new PersonCheckBoxModel(person)); 
 
 and everything magically works, hope it gives you some ideas.

Very interesting!

I'll have to give this a try.


Thanks again!
Dave





-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Using wicket as a back end only

2006-11-29 Thread David Leangen

Hello!

Just wondering something.

I need to be able to provide an autocomplete component that users can
simply paste into their own html, and the backend is handled by me.

Is possible (or even worthwhile) to think about using Wicket for this?

How would one go about this? We took a look, but got into trouble with
the wicket ids.


Thanks!



-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Woogle is down

2006-09-06 Thread David Leangen


Checked the stats.

I don't think we need a big machine for this, and I don't think we need
a dedicated machine, as you say. This will make it easier for me to free
up resources. If the number of hits grows, we can upgrade as we go
along.

I'll see what I can dig up and get back to you asap.


Cheers,
Dave



On Wed, 2006-09-06 at 08:30 +0200, Frank Bille wrote:
 Wauw, that's really nice of you. I don't think it would require an
 entire dedicated machine, and the setup now is that nothing is run as
 root. It's entirely run as non root (except apache for proxying
 stuff :) So a normal user login an a existing server would be enough. 
 
 You can see stats for it here:
 
 http://billen.dk/cgi-bin/awstats.pl?config=woogle.billen.dk
 
 Frank
 
 On 9/6/06, David Leangen [EMAIL PROTECTED] wrote:
 
 Hi, Frank,
 
 That all sounds possible. I could also see if we could even
 get a
 dedicated machine, depending on funding is these days. In that
 case, you
 could have root access yourself.
 
 This could be my (small) contribution to Wicket. 
 
 
 About how many hits do you get per day?
 
 
 Cheers,
 David
 
 
 
 On Tue, 2006-09-05 at 10:32 +0200, Frank Bille wrote:
  Very interesting. Do you have a possibility to setup a cron
 job? 
  (that's how the index is updated) It's a little bit of a
 special setup
  I have:
 
* Woogle app runs off a jetty
* Every night I update the index using a
 shellscript/Nutch. 
* After the index is updated I restart jetty.
  That's how I could manage to get the index-db updated in the
 Woogle
  app..
 
  Frank
 
 
  On 9/5/06, David Leangen  [EMAIL PROTECTED] wrote:
 
  Ok, thanks!
 
  If you need a place to host, you could use my
 server.
 
 
  Cheers, 
  Dave
 
 
 
  On Tue, 2006-09-05 at 10:03 +0200, Frank Bille
 wrote:
   Sorry about that. Woogle runs off my home server,
 which has
  a mirrored 
   raid of SATA discs. All should be fine, but for
 some reason
  one of the
   discs keeps falling out of the raid (HW) and the
 raid stops
  working..
   grr... 
  
   But it's up again.
  
   Frank
  
  
   On 9/5/06, David Leangen [EMAIL PROTECTED]
 wrote:
  
   Just thought I'd point out (sorry if this
 is not the
  right
   place):
  
   Tried using Woogle today and got a bad
 gateway 
  error:
  
   Bad Gateway
   The proxy server received an invalid
 response from
  an upstream
   server. 
  
  
  
  
  
 
 
 -
   Using Tomcat but need to do more? Need to
 support 
  web
   services, security?
   Get stuff done quickly with pre-integrated
  technology to make
   your job easier 
   Download IBM WebSphere Application Server
 v.1.0.1
  based on
   Apache Geronimo
  
 
 
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
  
 ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
  
 
 https://lists.sourceforge.net/lists/listinfo/wicket-user
  
  
 
 
 -
   Using Tomcat but need to do more? Need to support
 web
  services, security? 
   Get stuff done quickly with pre-integrated
 technology to
  make your job easier
   Download IBM WebSphere Application Server v.1.0.1
 based on
  Apache Geronimo 
  
 
 
 http://sel.as-us.falkag.net/sel?cmd=lnkkid

Re: [Wicket-user] Woogle is down

2006-09-06 Thread David Leangen

No prob.

Good luck!!



On Wed, 2006-09-06 at 09:57 +0200, Frank Bille wrote:
 Hey Dave
 
 As some of the other wicket devs has mentioned, Wicket has a dedicated
 machine and I also think it's best to keep it there. Also for future
 maintainance. But I would like to stress that I really appreciate your
 offer. And perhaps in near future it's not enough for Wicket with one
 dedicated server ;) Who knows? 
 
 So thank you for your offer, but I have to turn it down this time. 
 
 Regards
 
 Frank
 
 
 On 9/6/06, Martijn Dashorst [EMAIL PROTECTED] wrote:
 +1 for wicket server. We should have a discussion on what we
 are going 
 to do with our current site.
 
 Martijn
 
 On 9/6/06, Janne Hietamäki [EMAIL PROTECTED] wrote:
 
  Offering a server is really nice, but as mentioned before we
 (wicket) 
  have our own dedicated server, and I would like to see all
 this
  wicket stuff collected to there, opposed to the current
 situation
  where everything is distributed into half dozen different
 servers.. 
 
  Janne
 
  On 6.9.2006, at 9.37, David Leangen wrote:
 
  
  
   Checked the stats.
  
   I don't think we need a big machine for this, and I don't
 think we 
   need
   a dedicated machine, as you say. This will make it easier
 for me to
   free
   up resources. If the number of hits grows, we can upgrade
 as we go
   along.
  
   I'll see what I can dig up and get back to you asap.
  
  
   Cheers,
   Dave
  
  
  
   On Wed, 2006-09-06 at 08:30 +0200, Frank Bille wrote: 
   Wauw, that's really nice of you. I don't think it would
 require an
   entire dedicated machine, and the setup now is that
 nothing is run as
   root. It's entirely run as non root (except apache for
 proxying 
   stuff :) So a normal user login an a existing server
 would be enough.
  
   You can see stats for it here:
  
  
 http://billen.dk/cgi-bin/awstats.pl?config=woogle.billen.dk
  
   Frank
  
   On 9/6/06, David Leangen [EMAIL PROTECTED] wrote:
  
   Hi, Frank,
  
   That all sounds possible. I could also see if we
 could even
   get a
   dedicated machine, depending on funding is these
 days. In 
   that
   case, you
   could have root access yourself.
  
   This could be my (small) contribution to Wicket.
   
  
   About how many hits do you get per day?
  
  
   Cheers,
   David
  
  
   
   On Tue, 2006-09-05 at 10:32 +0200, Frank Bille
 wrote:
   Very interesting. Do you have a possibility to setup a
 cron
   job?
   (that's how the index is updated) It's a little bit of
 a 
   special setup
   I have:
  
 * Woogle app runs off a jetty
 * Every night I update the index using a
   shellscript/Nutch. 
 * After the index is updated I restart jetty.
   That's how I could manage to get the index-db updated in
 the
   Woogle
   app..
   
   Frank
  
  
   On 9/5/06, David Leangen  [EMAIL PROTECTED] wrote:
  
   Ok, thanks! 
  
   If you need a place to host, you could use my
   server.
  
  
   Cheers,
   Dave 
  
  
  
   On Tue, 2006-09-05 at 10:03 +0200, Frank Bille
   wrote:
   Sorry about that. Woogle runs off my home server, 
   which has
   a mirrored
   raid of SATA discs. All should be fine, but for
   some reason
   one of the 
   discs keeps falling out of the raid (HW) and the
   raid stops
   working..
   grr...
  
   But it's up again. 
  
   Frank
  
  
   On 9/5/06, David Leangen [EMAIL PROTECTED] 
   wrote:
  
   Just thought I'd point out (sorry if this
   is not the
   right
   place): 
  
   Tried using Woogle today and got a bad
   gateway

Re: [Wicket-user] Changing tag attributes

2006-09-05 Thread David Leangen

You're absolutely right! That worked. Thanks!

I guess I still don't understand when models need to be used and when
simple values are ok.


Can somebody explain this to me, or point out some docs?


Thank you!




On Tue, 2006-09-05 at 12:13 +0530, karthik Guru wrote:
 I think having a PropertyModel to access 'isSuccessful' seems complicated.
 May be something like this ?
 
 public class TestLabel extends Label {
 
boolean isSuccessful;
 
public TestLabel( final String id, final String label,boolean 
 isSuccessful){
  super( id, label);
  this.isSuccessful= isSuccessful;
}
 
@Override
protected void onComponentTag( final ComponentTag tag ){
  super.onComponentTag( tag );
  final ValueMap map = tag.getAttributes();
  map.put( class, getLabelTagClass( isSuccessful ) );
}
 }
 
 On 9/5/06, David Leangen [EMAIL PROTECTED] wrote:
 
  This is exactly what I need. Thanks!
 
  Now, to make the code a bit cleaner in my repeater, I'd like to subclass
  Label, overriding the onComponentTag(ComponentTag) method. I'm a big
  confused again regarding models...
 
  This is the mess I created, which does not work. The part that confuses
  me the most is the use of the property model in the subclasses Label.
 
 
public class TestLabel
  extends Label
{
  private static final long serialVersionUID = 1L;
  private PropertyModel m_isSuccessfulPropertyModel;
 
  public TestLabel( final String id, final String label, final
  PropertyModel propModel )
  {
super( id, label );
m_isSuccessfulPropertyModel = propModel;
  }
 
  @Override
  protected void onComponentTag( final ComponentTag tag )
  {
super.onComponentTag( tag );
final ValueMap map = tag.getAttributes();
final boolean isSuccessful =
  (Boolean)m_isSuccessfulPropertyModel.getObject( this );
map.put( class, getLabelTagClass( isSuccessful ) );
  }
}
 
 
  And I populate my item in the repeater like this.
 
add(
  new DataView( testResults, new
  TestResultDataProvider( testResults ) )
  {
private static final long serialVersionUID = 1L;
private boolean m_isSuccessful = true;
 
public void populateItem( final Item item )
{
  final TestResult testResult = (TestResult)item.getModelObject();
  final boolean isSuccessful = testResult.isSuccessful();
  setSuccessful( isSuccessful );
  final PropertyModel isSuccessfulPropertyModel = new
  PropertyModel( this, isSuccessful );
  final Date lastTimeExecuted = new
  Date( testResult.getLastTimeExecuted() );
  final Long testDuration = testResult.getExecutionTime();
  item.add( new TestLabel( test.name, testResult.getName(),
  isSuccessfulPropertyModel ) );
}
 
public void setSuccessful( final boolean isSuccessful )
{
  m_isSuccessful = isSuccessful;
}
 
public boolean isSuccessful()
{
  return m_isSuccessful;
}
  }
);
 
 
  What am I missing here?
 
 
 
 
  On Mon, 2006-09-04 at 19:17 -0700, Igor Vaynberg wrote:
   you can either override oncomponenttag(ComponentTag tag)
   { tag.getAttributes().get/put } or add a behavior to the component -
   namely an (Simple)AttributeModifier.
  
   -Igor
  
  
   On 9/4/06, David Leangen [EMAIL PROTECTED] wrote:
  
   Could somebody please point me to an example or reference on
   how to
   dynamically change tag attributes? I don't recall offhand.
  
   I'm trying to do something like this:
  
   If no error:
   span class=noerrRighto!/span
  
   Or if error:
   span class=errSorry, try again!/span
  
  
   Thanks!
  
  
  
   
   -
   Using Tomcat but need to do more? Need to support web
   services, security?
   Get stuff done quickly with pre-integrated technology to make
   your job easier
   Download IBM WebSphere Application Server v.1.0.1 based on
   Apache Geronimo
   
   http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/wicket-user
  
   -
   Using Tomcat but need to do more? Need to support web services, security?
   Get stuff done quickly with pre-integrated technology to make your job 
   easier
   Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
   http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
   ___ Wicket-user mailing list 
   Wicket-user@lists.sourceforge.net 
   https

Re: [Wicket-user] Woogle is down

2006-09-05 Thread David Leangen

Ok, thanks!

If you need a place to host, you could use my server.


Cheers,
Dave



On Tue, 2006-09-05 at 10:03 +0200, Frank Bille wrote:
 Sorry about that. Woogle runs off my home server, which has a mirrored
 raid of SATA discs. All should be fine, but for some reason one of the
 discs keeps falling out of the raid (HW) and the raid stops working..
 grr...
 
 But it's up again.
 
 Frank
 
 
 On 9/5/06, David Leangen [EMAIL PROTECTED] wrote:
 
 Just thought I'd point out (sorry if this is not the right
 place):
 
 Tried using Woogle today and got a bad gateway error:
 
 Bad Gateway
 The proxy server received an invalid response from an upstream
 server. 
 
 
 
 
 
 -
 Using Tomcat but need to do more? Need to support web
 services, security?
 Get stuff done quickly with pre-integrated technology to make
 your job easier 
 Download IBM WebSphere Application Server v.1.0.1 based on
 Apache Geronimo
 
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 -
 Using Tomcat but need to do more? Need to support web services, security?
 Get stuff done quickly with pre-integrated technology to make your job easier
 Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
 ___ Wicket-user mailing list 
 Wicket-user@lists.sourceforge.net 
 https://lists.sourceforge.net/lists/listinfo/wicket-user


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Woogle is down

2006-09-05 Thread David Leangen

Hi, Frank,

That all sounds possible. I could also see if we could even get a
dedicated machine, depending on funding is these days. In that case, you
could have root access yourself.

This could be my (small) contribution to Wicket.


About how many hits do you get per day?


Cheers,
David



On Tue, 2006-09-05 at 10:32 +0200, Frank Bille wrote:
 Very interesting. Do you have a possibility to setup a cron job?
 (that's how the index is updated) It's a little bit of a special setup
 I have:
 
   * Woogle app runs off a jetty
   * Every night I update the index using a shellscript/Nutch.
   * After the index is updated I restart jetty.
 That's how I could manage to get the index-db updated in the Woogle
 app..
 
 Frank
 
 
 On 9/5/06, David Leangen [EMAIL PROTECTED] wrote:
 
 Ok, thanks!
 
 If you need a place to host, you could use my server.
 
 
 Cheers,
 Dave
 
 
 
 On Tue, 2006-09-05 at 10:03 +0200, Frank Bille wrote:
  Sorry about that. Woogle runs off my home server, which has
 a mirrored 
  raid of SATA discs. All should be fine, but for some reason
 one of the
  discs keeps falling out of the raid (HW) and the raid stops
 working..
  grr...
 
  But it's up again.
 
  Frank 
 
 
  On 9/5/06, David Leangen [EMAIL PROTECTED] wrote:
 
  Just thought I'd point out (sorry if this is not the
 right
  place): 
 
  Tried using Woogle today and got a bad gateway
 error:
 
  Bad Gateway
  The proxy server received an invalid response from
 an upstream
  server. 
 
 
 
 
 
 
 -
  Using Tomcat but need to do more? Need to support
 web
  services, security? 
  Get stuff done quickly with pre-integrated
 technology to make
  your job easier
  Download IBM WebSphere Application Server v.1.0.1
 based on
  Apache Geronimo
 
 
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
  ___ 
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
 
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 
 -
  Using Tomcat but need to do more? Need to support web
 services, security? 
  Get stuff done quickly with pre-integrated technology to
 make your job easier
  Download IBM WebSphere Application Server v.1.0.1 based on
 Apache Geronimo
 
 
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
  ___ Wicket-user
 mailing list Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 
 - 
 Using Tomcat but need to do more? Need to support web
 services, security?
 Get stuff done quickly with pre-integrated technology to make
 your job easier
 Download IBM WebSphere Application Server v.1.0.1 based on
 Apache Geronimo 
 
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
 ___ 
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 -
 Using Tomcat but need to do more? Need to support web services, security?
 Get stuff done quickly with pre-integrated technology to make your job easier
 Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
 ___ Wicket-user mailing list 
 Wicket-user@lists.sourceforge.net 
 https://lists.sourceforge.net/lists/listinfo/wicket-user


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user

[Wicket-user] source-repository.html not updated

2006-09-04 Thread David Leangen

Hello!

I noticed that the source-repository.html page on the website has not
yet been updated.

If somebody can tell me where the source is, I could send in a patch.


Cheer,
David




-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] source-repository.html not updated

2006-09-04 Thread David Leangen

Do you mean that it's already been fixed, and just needs to be
redeployed?

In any case, I wasn't able to find the source file. Is it not in
wicket-parent?


Cheers,
Dave



On Mon, 2006-09-04 at 10:29 +0200, Martijn Dashorst wrote:
 It is generated by maven, so with a new deploy of the site (and
 modified pom.xml) it will be fixed.
 
 Martijn
 
 On 9/4/06, David Leangen [EMAIL PROTECTED] wrote:
 
  Hello!
 
  I noticed that the source-repository.html page on the website has not
  yet been updated.
 
  If somebody can tell me where the source is, I could send in a patch.
 
 
  Cheer,
  David
 
 
 
 
  -
  Using Tomcat but need to do more? Need to support web services, security?
  Get stuff done quickly with pre-integrated technology to make your job 
  easier
  Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
  http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Woogle is down

2006-09-04 Thread David Leangen

Just thought I'd point out (sorry if this is not the right place):

Tried using Woogle today and got a bad gateway error:

Bad Gateway
The proxy server received an invalid response from an upstream server.




-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] source-repository.html not updated

2006-09-04 Thread David Leangen

Thanks, Martijn!!



On Mon, 2006-09-04 at 10:57 +0200, Martijn Dashorst wrote:
 Deploying as we speak...
 
 Martijn
 
 On 9/4/06, Martijn Dashorst [EMAIL PROTECTED] wrote:
  On 9/4/06, David Leangen [EMAIL PROTECTED] wrote:
   Do you mean that it's already been fixed, and just needs to be
   redeployed?
   In any case, I wasn't able to find the source file. Is it not in
   wicket-parent?
 
  Yes and pom.xml in
  branches/wicket-1.x/wicket-parent/pom.xml
 
  Cheers,
 
  Martijn
 
  
  Download Wicket 1.2.2 now! New Ajax components: Tree, TreeTable and 
  ModalWindow
  -- http://wicketframework.org
 
 
 


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Changing tag attributes

2006-09-04 Thread David Leangen

Could somebody please point me to an example or reference on how to
dynamically change tag attributes? I don't recall offhand.

I'm trying to do something like this:

If no error:
span class=noerrRighto!/span

Or if error:
span class=errSorry, try again!/span


Thanks!



-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Changing tag attributes

2006-09-04 Thread David Leangen

This is exactly what I need. Thanks!

Now, to make the code a bit cleaner in my repeater, I'd like to subclass
Label, overriding the onComponentTag(ComponentTag) method. I'm a big
confused again regarding models...

This is the mess I created, which does not work. The part that confuses
me the most is the use of the property model in the subclasses Label.


  public class TestLabel
extends Label
  {
private static final long serialVersionUID = 1L;
private PropertyModel m_isSuccessfulPropertyModel;

public TestLabel( final String id, final String label, final
PropertyModel propModel )
{
  super( id, label );
  m_isSuccessfulPropertyModel = propModel;
}

@Override
protected void onComponentTag( final ComponentTag tag )
{
  super.onComponentTag( tag );
  final ValueMap map = tag.getAttributes();
  final boolean isSuccessful =
(Boolean)m_isSuccessfulPropertyModel.getObject( this );
  map.put( class, getLabelTagClass( isSuccessful ) );
}
  }


And I populate my item in the repeater like this.

  add(
new DataView( testResults, new
TestResultDataProvider( testResults ) )
{
  private static final long serialVersionUID = 1L;
  private boolean m_isSuccessful = true;

  public void populateItem( final Item item )
  {
final TestResult testResult = (TestResult)item.getModelObject();
final boolean isSuccessful = testResult.isSuccessful();
setSuccessful( isSuccessful );
final PropertyModel isSuccessfulPropertyModel = new
PropertyModel( this, isSuccessful );
final Date lastTimeExecuted = new
Date( testResult.getLastTimeExecuted() );
final Long testDuration = testResult.getExecutionTime();
item.add( new TestLabel( test.name, testResult.getName(),
isSuccessfulPropertyModel ) );
  }

  public void setSuccessful( final boolean isSuccessful )
  {
m_isSuccessful = isSuccessful;
  }

  public boolean isSuccessful()
  {
return m_isSuccessful;
  }
}
  );


What am I missing here?




On Mon, 2006-09-04 at 19:17 -0700, Igor Vaynberg wrote:
 you can either override oncomponenttag(ComponentTag tag)
 { tag.getAttributes().get/put } or add a behavior to the component -
 namely an (Simple)AttributeModifier.
 
 -Igor
 
 
 On 9/4/06, David Leangen [EMAIL PROTECTED] wrote:
 
 Could somebody please point me to an example or reference on
 how to
 dynamically change tag attributes? I don't recall offhand.
 
 I'm trying to do something like this:
 
 If no error:
 span class=noerrRighto!/span 
 
 Or if error:
 span class=errSorry, try again!/span
 
 
 Thanks!
 
 
 
 
 -
 Using Tomcat but need to do more? Need to support web
 services, security? 
 Get stuff done quickly with pre-integrated technology to make
 your job easier
 Download IBM WebSphere Application Server v.1.0.1 based on
 Apache Geronimo
 
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 -
 Using Tomcat but need to do more? Need to support web services, security?
 Get stuff done quickly with pre-integrated technology to make your job easier
 Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
 ___ Wicket-user mailing list 
 Wicket-user@lists.sourceforge.net 
 https://lists.sourceforge.net/lists/listinfo/wicket-user


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Tree

2006-07-28 Thread David Leangen

You just need to override:

protected PackageResourceReference getCss()
{
return CSS;
}


Cheers,
Dave



On Thu, 2006-07-27 at 11:22 +0200, Henk Laracker wrote:
 Hello,
 
 I use the wicket tree component, is it possible to disable the style
 sheet?
 
 Because we want to use our own.
 
 Thank you,
 
 Henk Laracker
 Lead Architect
 Development
 
 
 Planon B.V.
 Wijchenseweg 8
 6537 TL Nijmegen
 P.O. Box 38074
 6503 AB Nijmegen
 The Netherlands
 T:  +31 (0) 24 641 3135
 F:  +31 (0) 24 642 2942
 E:  [EMAIL PROTECTED]
 W: www.planon-fm.com
 
 
 Deze email en alle bijlagen zijn slechts voor gebruik door de beoogde
 ontvanger. De email kan intellectueel eigendom en/of vertrouwelijke
 informatie bevatten. Het mag niet worden gekopieerd, openbaar gemaakt,
 bewaard of gebruikt worden door anderen dan waarvoor deze bestemd is.
 Bent u niet de beoogde ontvanger,verwijdert u dan deze email met alle
 bijlagen en kopieën onmiddellijk en informeer de afzender.
 
 This e-mail and any attachment is for authorised use by the intended
 recipient(s) only. It may contain proprietary material, confidential
 information and/or be subject to legal privilege. It should not be
 copied, disclosed to, retained or used by, any other party. If you are
 not an intended recipient then please promptly delete this e-mail and
 any attachment and all copies and inform the sender.
 
 -
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share your
 opinions on IT  business topics through brief surveys -- and earn cash
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___ Wicket-user mailing list 
 Wicket-user@lists.sourceforge.net 
 https://lists.sourceforge.net/lists/listinfo/wicket-user


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] wicket.markup.html.tree.Tree is not suitable for very big tree

2006-07-23 Thread David Leangen

   Could you give me more detailed information on what methods in Tree
 I should override?
 

There may be other/better ways, but what I did was this:

class MyTree extends Tree
{
  private TreeModelProvider m_provider;

  ...

  @Override
  protected void junctionLinkClicked( DefaultMutableTreeNode node )
  {
  // Keep the functionality of the super class, it is what we want
  super.junctionLinkClicked( node );

  if( isExpanding( node ) )
  {
TreeModel newModel = m_provider.expandNode( node );
if( null != newModel )
setTreeModel( newModel );
expandNode( node );
  }
  else
  {
TreeModel newModel = m_provider.collapseNode( node );
if( null != newModel )
setTreeModel( newModel );
expandNodes((DefaultMutableTreeNode)node.getParent());
  }
  }

  ...
}

The TreeModelProvider class provides the model for my tree. In this
class, I decide what data I need to load to properly display the tree,
without loading any unnecessary data.

And of course, when adding this tree to my Wicket page, I use:

  Tree tree = new MyTree( tree, provider )
  {
  private static final long serialVersionUID = 1L;

  protected String getNodeLabel( DefaultMutableTreeNode node )
  {
  final MyTreeNode treeNode = (MyTreeNode)node.getUserObject();
  return treeNode.getLabel();
  }
  };

  add( tree );


Good luck!


On Fri, 2006-07-21 at 16:20 +0800, Rice Yeh wrote:



-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] wicket.markup.html.tree.Tree is not suitable for very big tree

2006-07-21 Thread David Leangen

I also have a very big tree, and it works just fine.

The secret is to load only the data that is displayed. You need to
override the Tree class (it is made for this) and implement it so that
only the required data is loaded.


Good luck!




On Fri, 2006-07-21 at 13:46 +0800, Rice Yeh wrote:
 Hi,
   I find that the implementation of Wicket.markup.html.tree.Tree is
 not suitable for big tree. It seems because it depends on
 javax.swing.tree.DefaultMutableTreeNode too much, which asks for
 populating the whole tree before rendering
 Wicket.markup.html.tree.Tree. For my case, the tree is very big but
 users just click on some tree paths, so I hope I can just populate the
 tree step by step. However, this seems impossible because
 Wicket.markup.html.tree.Tree renders the tree based on the 'children'
 field in javax.swing.tree.DefaultMutableTreeNode, which I populate in
 the TreeModel's method getChildCount(Object parent). But this way does
 not work. Any suggestion? 
 
 Regards,
 Rice
 -
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share your
 opinions on IT  business topics through brief surveys -- and earn cash
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___ Wicket-user mailing list 
 Wicket-user@lists.sourceforge.net 
 https://lists.sourceforge.net/lists/listinfo/wicket-user


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] wicket.markup.html.tree.Tree is not suitable for very big tree

2006-07-21 Thread David Leangen

As an additional note:

Actually, I needed to load the data one level lower than what was
displayed, otherwise the junction images (with the + signs) were not
displayed correctly.


Cheers,
Dave



On Fri, 2006-07-21 at 15:50 +0900, David Leangen wrote:
 I also have a very big tree, and it works just fine.
 
 The secret is to load only the data that is displayed. You need to
 override the Tree class (it is made for this) and implement it so that
 only the required data is loaded.
 
 
 Good luck!
 
 
 
 
 On Fri, 2006-07-21 at 13:46 +0800, Rice Yeh wrote:
  Hi,
I find that the implementation of Wicket.markup.html.tree.Tree is
  not suitable for big tree. It seems because it depends on
  javax.swing.tree.DefaultMutableTreeNode too much, which asks for
  populating the whole tree before rendering
  Wicket.markup.html.tree.Tree. For my case, the tree is very big but
  users just click on some tree paths, so I hope I can just populate the
  tree step by step. However, this seems impossible because
  Wicket.markup.html.tree.Tree renders the tree based on the 'children'
  field in javax.swing.tree.DefaultMutableTreeNode, which I populate in
  the TreeModel's method getChildCount(Object parent). But this way does
  not work. Any suggestion? 
  
  Regards,
  Rice
  -
  Take Surveys. Earn Cash. Influence the Future of IT
  Join SourceForge.net's Techsay panel and you'll get the chance to share your
  opinions on IT  business topics through brief surveys -- and earn cash
  http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
  ___ Wicket-user mailing list 
  Wicket-user@lists.sourceforge.net 
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 -
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share your
 opinions on IT  business topics through brief surveys -- and earn cash
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Retaining values from one page view to the next

2006-07-20 Thread David Leangen

Apologies for another basic Wicket question...

I understand (mostly) how the Wicket model approach works with respect
to components and such. However, how do I retain values from one page
view to the next?

I know that I could use PageParameters, but the object I want to retain
in a complex object and I don't want the trouble.

I tried using PropertyModel( this, path), and tried
PropertyModel.setObject( this, object ) to update the value, but that
didn't work.


I'm sure this is simple, but any hints would be greatly appreciated!



Thank you!
David


PS - I tried searching on the archive, but the SourceForge archive is
hopeless for searching...





-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Retaining values from one page view to the next

2006-07-20 Thread David Leangen

Of course it would have to be that simple...


Thanks!!
Dave



On Thu, 2006-07-20 at 19:33 -0700, Igor Vaynberg wrote:
 all you have to do is pass the reference of the old page to the new
 page
 
 class ListUsersPage extends Webpage {
 .
 add(new Link(edit) {
 onclick() {
setResponsePage(new EditUserPage( ListUsersPage.this,
 (User)getModelObject()));
 }
 }
 
 
 class EditUserPage extends WebPage {
 public EditUserPage(final WebPage backPage, User user) {
 Form form;
 
 add(form=new Form(form, )); 
 form.add(new Button(save) {
 onsubmit() {
  //save user
  setResponsePage(backPage); === navigates to
 the list users page in its previous state 
  });}}
 
 hope this helps
 -Igor
 
 
 On 7/20/06, David Leangen [EMAIL PROTECTED]  wrote:
 
 Apologies for another basic Wicket question...
 
 I understand (mostly) how the Wicket model approach works with
 respect 
 to components and such. However, how do I retain values from
 one page
 view to the next?
 
 I know that I could use PageParameters, but the object I want
 to retain
 in a complex object and I don't want the trouble. 
 
 I tried using PropertyModel( this, path), and tried
 PropertyModel.setObject( this, object ) to update the value,
 but that
 didn't work.
 
 
 I'm sure this is simple, but any hints would be greatly
 appreciated! 
 
 
 
 Thank you!
 David
 
 
 PS - I tried searching on the archive, but the SourceForge
 archive is
 hopeless for searching...
 
 
 
 
 
 
 - 
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance
 to share your
 opinions on IT  business topics through brief surveys -- and
 earn cash
 
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Mounting the tree component

2006-07-14 Thread David Leangen

Hello!

 so what you want is instead of url doing this:
 
 /mytree
 click 
 /app?wicket:interface=
 
 to do this
 /mytree
 click
 /mytree?wicket:interface=
 
 is this correct? and if so...

Yes, that's exactly correct!

 i proposed this awhile back, and i think we decided not to proceed
 because it made url decoding harder. maybe we should reconsider. 
 
 what are your reasons for wanting this type of behavior?

I want my tree to be stateless: I don't want to have to use sessions. At
the same time, I want nice, bookmarkable URLs (including the parameters,
if possible, but I haven't got that far yet).

So, the default state of the tree (all nodes collapsed) should simply
link to
  /mytree
while the tree in any other state should link to
  /mytree?wicket:interface...


I just noticed the same problem with another mounted page. If I try to
used the bookmarkable url, it don't work. :-(


Please let me know what you decide to do. My vote is definitely to allow
parameters with bookmarkable urls.


Thank you!
Dave





-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Mounting the tree component

2006-07-14 Thread David Leangen
 But this is something different. Bookmarkable urls doesn't mean that 
 there is no session. You have to store the state of tree somewhere.

What I mean is that the state of the tree is determined by the URL
parameter. I don't need to store the state anywhere else.

I'd like to do away with sessions and also have bookmarkable URLs. I'll
look into the session thing. (I thought that by using bookmarkable URLs,
it did away with the session, thanks for pointing that out!)





-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Mounting the tree component

2006-07-14 Thread David Leangen

 Anyway, It's not possible with wicket to store state of tree in url, and 
 I doubt it ever will be. URL length is limited so it wouldn't work for 
 bigger trees. And wicket is managing state for whole pages, so it makes 
 no sense to ad-hoc store state of tree in URL either.

In my case, the tree is read only, so to speak. The tree never
changes. The only state I need to store is which is the open branch,
which requires only one parameter. For instance:

  /mytree?activeNode=abcde


Only one branch can be open at a time. Therefore, the parameter above is
enough to allow me to render the tree correctly.


Cheers,
Dave





-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Header contributions

2006-07-13 Thread David Leangen

Ok, thank you!

Do you think I should submit a patch to add this explanation to the
javadoc? 



On Thu, 2006-07-13 at 08:29 +0200, Eelco Hillenius wrote:
 Hello,
 
 It is not necessary in from 1.2 on to pre-register shared resources.
 The big reason to loose that requirement - besides convenience - is
 the constant classloader headache pre-registering gave us.
 Unfortunately, there is no rock-solid mechanism to get all the
 contents of a package in Java, just the hacks we had in place (and
 they turned out to be not proof to all situations).
 
 Contributing multiple resources used the same package listing
 algorithm, and thus was a potential source of problems. I considered
 whether it was worth having it, but thought that, even though it is
 handy sometimes to contribute all .css or .js or whatever resources in
 package, it should be usually fine to do this one-by-one too. I expect
 not many users wanting to contribute more than just a few resources.
 
 The newly preferred way is thus to call
 
 add(HeaderContributor.forCss(MyComp.class, foo.css));
 add(HeaderContributor.forCss(MyComp.class, bar.css));
 
 instead of
 
 add(HeaderContributor.forCss(MyComp.class));
 
 
 Eelco
 
 
 
 
 On 7/13/06, David Leangen [EMAIL PROTECTED] wrote:
 
  Hello!
 
  The javadoc for HeaderContributor.forCss() says:
 
Will be removed in 2.0; contribute resources
one by one instead.
 
 
  What is meant by this? What, then, is the newly preferred way of
  contributing to a header? Or is this the only way until 2.0, and the
  message is just an advanced warning to that effect?
 
 
 
 
 
 
  -
  Using Tomcat but need to do more? Need to support web services, security?
  Get stuff done quickly with pre-integrated technology to make your job 
  easier
  Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
  http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 



-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Where is wicket:wicket-parent:pom:1.2-SNAPSHOT?

2006-07-13 Thread David Leangen

Thank you all.

As pointed out, I was only missing the pom.xml file in the immediate
parent directory.




On Thu, 2006-07-13 at 00:03 -0700, Aaron Hiniker wrote:
 I had the same problem... I eventually checked out the entire wicket
 svn instead of just the wicket core.. ie do a checkout on
 
 https://svn.sourceforge.net/svnroot/wicket/branches/WICKET_1_2/
 
 vs
 
 https://svn.sourceforge.net/svnroot/wicket/branches/WICKET_1_2/wicket
 
 Then mvn install on the WICKET_1_2 root directory.. then proceed
 with mvn install on the wicket subdirectory (wicket core)
 
 Aaron
 
 
 
 On Thu, 2006-07-13 at 13:08 +0900, David Leangen wrote: 
  Hello!
  
  After several weeks of not using Wicket, I am now trying to build from
  updated svn.
  
  I get the following error:
  
  [INFO] Failed to resolve artifact.
  
  GroupId: wicket
  ArtifactId: wicket-parent
  Version: 1.2-SNAPSHOT
  
  Reason: Unable to download the artifact from any repository
  
wicket:wicket-parent:pom:1.2-SNAPSHOT
  
  
  
  Where can I find this artifact?
  
  
  Thanks!
  Dave
  
  
  
  
  
  -
  Using Tomcat but need to do more? Need to support web services, security?
  Get stuff done quickly with pre-integrated technology to make your job 
  easier
  Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
  http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user



-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Mounting the tree component

2006-07-13 Thread David Leangen

How would I go about getting the Tree component to listen to my mount
point? I mounted the page and would like to do away with the use of
sessions, but when I click on a node, I lose the mount point on the
page.

This is how the link is created:

  protected Link createNodeLink(final DefaultMutableTreeNode node)
  {
  final Link nodeLink = new Link(nodeLink)
  {
  private static final long serialVersionUID = 1L;

  public void onClick()
  {
  nodeLinkClicked(node);
  }
  };
  nodeLink.add(getNodeImage(node));
  nodeLink.add(new Label(label, getNodeLabel(node)));
  return nodeLink;
  }


Any simple pointers, before I begin to spend too much time on this?


Thanks!
Dave





-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Mounting the tree component

2006-07-13 Thread David Leangen

I did some digging, and this is about as far as I got for now:

When determining how to render the link for each node in the tree,
eventually WebRequestCodingStrategy.encode(RequestCycle, IRequestTarget)
is called.

Tracing a little further the following call is made:

  WebRequestCodingStrategy.pathForTarget(IRequestTarget);

Here, if the encoder (IRequestTargetUrlCodingStrategy) returns null,
then the default encoding is used. Since the page is mounted, this
should not be returning null.


There culprit is here, in class
BookmarkablePageRequestTargetUrlCodingStrategy. The matches method
looks like this:

  public boolean matches(IRequestTarget requestTarget)
  {
  if (requestTarget instanceof IBookmarkablePageRequestTarget)
  {
  IBookmarkablePageRequestTarget target =
(IBookmarkablePageRequestTarget)requestTarget;
  if (bookmarkablePageClass.equals(target.getPageClass()))
  {
  if (this.pageMapName == null)
  {
  return true;
  }
  else
  {
  return
this.pageMapName.equals(target.getPageMapName());
  }
  }
  }
  return false;
  }


In the case of my tree, requestTarget is of type
wicket.request.target.resource.SharedResourceRequestTarget. This causes
the method to return null and, consequently, for mounting of the page to
abort.



Why is this and what should I do?


Thank you!
Dave





On Thu, 2006-07-13 at 16:45 +0900, David Leangen wrote:
 How would I go about getting the Tree component to listen to my mount
 point? I mounted the page and would like to do away with the use of
 sessions, but when I click on a node, I lose the mount point on the
 page.
 
 This is how the link is created:
 
   protected Link createNodeLink(final DefaultMutableTreeNode node)
   {
   final Link nodeLink = new Link(nodeLink)
   {
   private static final long serialVersionUID = 1L;
 
   public void onClick()
   {
   nodeLinkClicked(node);
   }
   };
   nodeLink.add(getNodeImage(node));
   nodeLink.add(new Label(label, getNodeLabel(node)));
   return nodeLink;
   }
 
 
 Any simple pointers, before I begin to spend too much time on this?
 
 
 Thanks!
 Dave
 
 
 
 
 
 -
 Using Tomcat but need to do more? Need to support web services, security?
 Get stuff done quickly with pre-integrated technology to make your job easier
 Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Where is wicket:wicket-parent:pom:1.2-SNAPSHOT?

2006-07-12 Thread David Leangen

Hello!

After several weeks of not using Wicket, I am now trying to build from
updated svn.

I get the following error:

[INFO] Failed to resolve artifact.

GroupId: wicket
ArtifactId: wicket-parent
Version: 1.2-SNAPSHOT

Reason: Unable to download the artifact from any repository

  wicket:wicket-parent:pom:1.2-SNAPSHOT



Where can I find this artifact?


Thanks!
Dave





-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Header contributions

2006-07-12 Thread David Leangen

Hello!

The javadoc for HeaderContributor.forCss() says:

  Will be removed in 2.0; contribute resources 
  one by one instead.


What is meant by this? What, then, is the newly preferred way of
contributing to a header? Or is this the only way until 2.0, and the
message is just an advanced warning to that effect?






-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Wicket and OSGi... WicketRuntimeException: Unable to load class with name: wicket.initializer

2006-06-13 Thread David Leangen

You should write to the ops4j list.

Register here: http://lists.ops4j.org/mailman/listinfo/general




On Tue, 2006-06-13 at 09:29 +0200, Saioa Arrizabalaga wrote:
 Hi,
 I have downloaded the source code from:
 https://scm.ops4j.org/repos/ops4j/projects/pax/wicket/org.ops4j.pax.wicket/
 https://scm.ops4j.org/repos/ops4j/projects/pax/wicket/org.ops4j.pax.wicket.test/
  and after compiled and created the corresponding bundles, I get the
 next error when I start the test bundle.
 
 wicket.WicketRuntimeException: Unable to load class with name:
 wicket.Initializer
 at 
 org.ops4j.pax.wicket.Ops4jWicketClassLoader.resolveClass(Ops4jWicketClassLoader.java:24)
 at wicket.Application.initialize(Application.java:788)
 at wicket.Application.initializeComponents(Application.java:812)
 at wicket.Application.initializeComponents(Application.java:639)
 at wicket.protocol.http.WicketServlet.init(WicketServlet.java:298)
 at javax.servlet.GenericServlet.init(GenericServlet.java:256)
 at 
 org.mortbay.jetty.servlet.OsgiServletHolder.start(OsgiServletHolder.java:102)
 at 
 org.mortbay.jetty.servlet.ServletHandler.addServletHolder(ServletHandler.java:343)
 at 
 org.mortbay.jetty.servlet.OsgiServletHandler.addOsgiServletHolder(OsgiServletHandler.java:68)
 at 
 org.ungoverned.osgi.bundle.http.HttpServiceImpl$ServletContextGroup.addServlet(HttpServiceImpl.java:367)
 at 
 org.ungoverned.osgi.bundle.http.HttpServiceImpl$ServletContextGroup.access$100(HttpServiceImpl.java:312)
 at 
 org.ungoverned.osgi.bundle.http.HttpServiceImpl.registerServlet(HttpServiceImpl.java:153)
 at org.ops4j.pax.wicket.HttpTracker.registerAll(HttpTracker.java:88)
 at org.ops4j.pax.wicket.HttpTracker.addingService(HttpTracker.java:44)
 at 
 org.osgi.util.tracker.ServiceTracker$Tracked.trackAdding(ServiceTracker.java:1011)
 at 
 org.osgi.util.tracker.ServiceTracker$Tracked.trackInitialServices(ServiceTracker.java:875)
 at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:282)
 at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:221)
 at org.ops4j.pax.wicket.test.Activator.start(Activator.java:33)
 at org.knopflerfish.framework.BundleImpl.start0(BundleImpl.java:373)
 at 
 org.knopflerfish.framework.PermissionOps.callStart0(PermissionOps.java:198)
 at org.knopflerfish.framework.BundleImpl.start(BundleImpl.java:320)
 at 
 org.knopflerfish.bundle.frameworkcommands.FrameworkCommandGroup.cmdStart(FrameworkCommandGroup.java:1187)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at 
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:585)
 at 
 org.knopflerfish.service.console.CommandGroupAdapter.execute(CommandGroupAdapter.java:244)
 at org.knopflerfish.bundle.console.Command$2.run(Command.java:233)
 at java.security.AccessController.doPrivileged(Native Method)
 at org.knopflerfish.bundle.console.Command.run(Command.java:220)
 at java.lang.Thread.run(Thread.java:595)
 
 
 Any idea would be welcome.
 
 Thank you,
 
 Saioa Arrizabalaga
 
 
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Dependency Injection vs Service Locator

2006-06-08 Thread David Leangen

Ben,

Check out the Pax project at OPS4J.

  http://www.ops4j.org


Cheers,
David



 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Behalf Of Ben Fortuna
 Sent: 6 June 2006 22:56
 To: wicket-user@lists.sourceforge.net
 Subject: [Wicket-user] Dependency Injection vs Service Locator


 Hi all,

 I've been investigating the possibilities of integrating Wicket and
 OSGi with favourable results. However, one major hurdle, which I think
 a couple of others have also pointed out here, is that there is as yet
 no solution providing true dependency injection for Wicket.

 I've looked at the wicket-spring examples, and to me this seems to be
 using the Service Locator pattern rather than Dependency Injection.
 That is fine as a solution, but consider the following example: I want
 to be able to register my Wicket pages as services (concept should be
 similar regardless of IoC container) and have other
 services/components that are (optionally!) able to inject additional
 components into these pages.

 With my basic knowledge of Wicket, this example would seem impossible
 as there must be a placeholder in the page's HTML that will
 correspond to each of the components in the page's component tree. So
 ultimately it seems the page component count cannot be altered at
 runtime.

 Is there something I am missing here? I'm hoping there is some way to
 be able to alter the component count at runtime, or perhaps even
 specify optional components in the page HTML that may or may not be
 present in the component tree (still not real dependency injection,
 but a compromise I'd be willing to make).

 TIA.

 regards,
 ben

 --
 http://blogs.modularity.net.au/thenextbigthing


 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user




___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Using TreeComponent() - how to collapse by default

2006-06-05 Thread David Leangen

Great! Thanks a lot!



On Fri, 2006-06-02 at 18:11 -0700, Eelco Hillenius wrote:
 Ah, I already applied the fix this morning for 1.2 and 2.0. I think
 you should typically get an email about this (I thought you
 automatically got to be a watcher when you enter an issue), and
 there's an option for anyone afaik to watch issues and thus get
 informed on changes.
 
 Cheers,
 
 Eelco
 
 
 On 6/2/06, David Leangen [EMAIL PROTECTED] wrote:
 
   Sorry for the late reply, but like stated in the other thread,
   attachements with issue reports are the way to go.
 
  No prob. You're busy enough. I'm very, VERY pleased will all the great
  support you guys are giving.
 
  Wicket even kicks ass over commercial products with so-called premuim
  support.
 
 
   The main difficulty for me with the tree component is that I hardly
   use it myself, and those times that I did use it, the tree sufficed.
   So, if you have more needs: keep those patches comming and we'll be
   happy to apply them (if the quality is decent of course ;))
 
  Sure. I already sent in one patch. How does that work. Will the system
  inform me when the patch has been applied (or if it was rejected)?
 
 
  Thanks again!
 
 
 
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


  1   2   3   >