Re: [Wicket-user] Pro Wicket and RestartResponseAtInterceptPage question

2007-02-02 Thread karthik Guru

It has to do with this problem -

http://www.nabble.com/a-problem-with-continueToOriginalDestination-tf1427448.html#a3849601


Wicket doesn't remember the actual post url in this case.

I added a bug and rfe. These are the bug/rfe tracking numbers

1468034
1480327

I thought it would be fixed by the time book went to the printer but
unfortunately that didn't happen. Sorry about that. But then we all know how
prompt Wicket developers are when it comes to adding/fixing/addressing
issues - I'm sure there were others with higher priorities.

regards,
Karthik



On 2/1/07, Robert ... <[EMAIL PROTECTED]> wrote:


Hi,

I have read the "Pro Wicket" book and I am trying to make some examples
from the book. However I get an error when trying to use a
RestartResponseAtInterceptPageException in the bookstore example from page
114. It happens after the Login page calls continueToOriginalDestination.

wicket.util.convert.ConversionException: Can't convert null value to a 
primitive class: int for setting it on [EMAIL PROTECTED]


In the authorization strategy/listener onUnauthorizedInstantiation method
I see that the component is the ConfirmationPage as I expected. However the
expection page I get shows the CheckoutPage as the page class. I'm not sure
if it means anything, but it seems to go back to the CheckoutPage instead of
continuing to the ConfirmationPage.

What am I doing wrong?

Robert.


-
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=lnk&kid=120709&bid=263057&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user





--
-- karthik --
-
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=lnk&kid=120709&bid=263057&dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] [Upload] Upload and Ajax

2007-02-02 Thread Paolo Di Tommaso

I have implemented an ajax upload using wicket, but you still have to use
the common trick to submit to an hidden . For example:






Submitting to an hidden frame you will need to prevent wicket to send a
response using the following code in the Form#onSubmit()

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


Sorry if the first time I gave an incomplete response to the problem.

Paolo



On 2/1/07, Henning Bredel <[EMAIL PROTECTED]> wrote:


Johan Compagner schrieb:
> i have no idea about a workaround. I just know that everytime that
> question picks up
> everytime the answer is no doesn't work
>
> And i don't think it is a w3c standard.. Those guys don't really make
> the standards nowadays i think.
>
> johan
>
>
> On 2/1/07, *Henning Bredel* <[EMAIL PROTECTED]
> > wrote:
>
> Johan Compagner schrieb:
> >
> > Henning Bredel schrieb:
> > > Hi,
> > >
> > > is there a way, to handle an upload with ajax?
> >
> >
> > not  as far as i know.
> >
> > johan
> >
> >
> >
>

> >
> >
>
-
> > 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=lnk&kid=120709&bid=263057&dat=121642
> <
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642>
> >
>

> >
> > ___
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> 
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> 
> >
> Thx, for answering -- but, perhaps this was not the last question:
is
> there a workaround
> or is it simply unusual or not w3c conform to handle it that way?
>
> regards
>
>
-
>
> 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=lnk&kid=120709&bid=263057&dat=121642
> <
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=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=lnk&kid=120709&bid=263057&dat=121642
> 
>
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
Okay -- thx for your effort

-
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=lnk&kid=120709&bid=263057&dat=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=lnk&kid=120709&bid=263057&dat=121642___
Wicket-user m

Re: [Wicket-user] setResizable(false) for ModalWindow doesn't work

2007-02-02 Thread Matej Knopp
Hi

you are calling setResizable too late. When MyModalPage constructor is 
called, the window is already shown. You have to call setResizable (as 
well as the other methods) _before_ calling modalWindow.show().

-Matej

beboris wrote:
> We have the following code that attempts to create a modal window of certain
> size and make it non-resizable:
> 
> public class MyModalPage extends WebPage {
>   public MyModalPage( final WebPage parentPage, ModalWindow modalWindow) {
>   modalWindow.setVersioned(false);
>   modalWindow.setInitialWidth(400);
>   modalWindow.setInitialHeight(280);
>   modalWindow.setMinimalWidth(400);
>   modalWindow.setMinimalHeight(280);
>   modalWindow.setResizable(false);
>   ...
>   }
> }
> 
> public class ParentPage extends WebPage {
> ...
> private void addModalDialog() {
> final ModalWindow modal;
> add(modal = new ModalWindow("MyModalWindow"));
> modal.setVersioned(false);
> modal.setPageCreator(new ModalWindow.PageCreator() {
>   public Page createPage() {
>   Page result = new MyModalPage(ParentPage.this,modal);
>   return result;
>   }
> }
> ...
> }
> ...
> }
> 
> The modal window can be brought up upon a button click in the parent page.
> Unfortunately, when the modal window is displayed for the first time, it can
> be resized, despite modalWindow.setResizable(false) call. For subsequent
> button clicks it becomes non-resizable. Is there any way to make it
> non-resizable from the "get go" or is it a bug in the ModalWindow code?
> 
> Bob.
> 


-
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=lnk&kid=120709&bid=263057&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] ui framework choice

2007-02-02 Thread Timo Rantalaiho
On Thu, 01 Feb 2007, Scott Swank wrote:
> And we just got WicketTester up & running.  Very nice
> stuff.  Its

I checked yesterday and our .ui package had a line coverage
of 96 % or something such, slightly more than the overall
for the whole software :) 

> capabilities are already impressing folk.  Are there any
> known things to be aware of with respect to Ajax-ified
> apps & WicketTester?

I was able to test some ajax functionality by firing events
with WicketTester, but something related to forms not. The
problematic form thing I just tested with Wicket Bench then.

If anyone is interested I can cook up a quickstart
representing the WicketTester-with-ajaxified-form problem.

-- 
Timo Rantalaiho
Reaktor Innovations Oyhttp://www.ri.fi/ >

-
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=lnk&kid=120709&bid=263057&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] [Upload] Upload and Ajax

2007-02-02 Thread Johan Compagner

ahh yes not really ajax but that would work.

johan

On 2/2/07, Paolo Di Tommaso <[EMAIL PROTECTED]> wrote:


I have implemented an ajax upload using wicket, but you still have to use
the common trick to submit to an hidden . For example:






Submitting to an hidden frame you will need to prevent wicket to send a
response using the following code in the Form#onSubmit()

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


Sorry if the first time I gave an incomplete response to the problem.

Paolo



On 2/1/07, Henning Bredel <[EMAIL PROTECTED]> wrote:
>
> Johan Compagner schrieb:
> > i have no idea about a workaround. I just know that everytime that
> > question picks up
> > everytime the answer is no doesn't work
> >
> > And i don't think it is a w3c standard.. Those guys don't really make
> > the standards nowadays i think.
> >
> > johan
> >
> >
> > On 2/1/07, *Henning Bredel* <[EMAIL PROTECTED]
> > > wrote:
> >
> > Johan Compagner schrieb:
> > >
> > > Henning Bredel schrieb:
> > > > Hi,
> > > >
> > > > is there a way, to handle an upload with ajax?
> > >
> > >
> > > not  as far as i know.
> > >
> > > johan
> > >
> > >
> > >
> >
> 
> > >
> > >
> >
> -
> > > 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=lnk&kid=120709&bid=263057&dat=121642
> > 
 >
> > >
> >
> 
> > >
> > > ___
> > > Wicket-user mailing list
> > > Wicket-user@lists.sourceforge.net
> > 
> > > https://lists.sourceforge.net/lists/listinfo/wicket-user
> > < https://lists.sourceforge.net/lists/listinfo/wicket-user>
> > >
> > Thx, for answering -- but, perhaps this was not the last question:
> is
> > there a workaround
> > or is it simply unusual or not w3c conform to handle it that way?
> >
> > regards
> >
> >
> -
> >
> > 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=lnk&kid=120709&bid=263057&dat=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=lnk&kid=120709&bid=263057&dat=121642
>
> >
> 
> >
> > ___
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
> Okay -- thx for your effort
>
> -
>
> 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=lnk&kid=120709&bid=263057&dat=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-integrate

[Wicket-user] How can I add some javascript to make sure the main page will occupy whole browser?

2007-02-02 Thread Carfield Yim
We have a small version of login windows which exist within an iframe.
After the user login we need to make the main page occupy the whole
browser windows.

How can I add that javascript to onload event of that main page?

-
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=lnk&kid=120709&bid=263057&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Pro Wicket and RestartResponseAtInterceptPage question

2007-02-02 Thread Robert ...

Okay that makes it clear. Then I will just ignore this problem and hope it
will be fixed by the time I really need it :)
Perhaps a note could be added to the errata about it?

I tried opening the tracking number, but I get a page with
"Artifact: Only Group Members Can View Private ArtifactTypes" error.


On 2/2/07, karthik Guru <[EMAIL PROTECTED]> wrote:


It has to do with this problem -

http://www.nabble.com/a-problem-with-continueToOriginalDestination-tf1427448.html#a3849601


Wicket doesn't remember the actual post url in this case.

I added a bug and rfe. These are the bug/rfe tracking numbers

1468034
1480327


-
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=lnk&kid=120709&bid=263057&dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Problem of adding confirm javascript to link

2007-02-02 Thread Carfield Yim
For some delete link, I've add a confirm() javascript for
Link.getOnClickScript() . However I found that even I click cancel at
the javascript popup wicket will still execute the link. (delete the
record in my case)

How can I press the cancel message to wicket?

-
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=lnk&kid=120709&bid=263057&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] ui framework choice

2007-02-02 Thread Johan Compagner


I was able to test some ajax functionality by firing events
with WicketTester, but something related to forms not. The
problematic form thing I just tested with Wicket Bench then.

If anyone is interested I can cook up a quickstart
representing the WicketTester-with-ajaxified-form problem.



please do make a issue for this in jira

johan
-
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=lnk&kid=120709&bid=263057&dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Pro Wicket and RestartResponseAtInterceptPage question

2007-02-02 Thread Johan Compagner

yes thats on my todo list

johan

On 2/2/07, karthik Guru <[EMAIL PROTECTED]> wrote:


It has to do with this problem -

http://www.nabble.com/a-problem-with-continueToOriginalDestination-tf1427448.html#a3849601


Wicket doesn't remember the actual post url in this case.

I added a bug and rfe. These are the bug/rfe tracking numbers

1468034
1480327

I thought it would be fixed by the time book went to the printer but
unfortunately that didn't happen. Sorry about that. But then we all know how
prompt Wicket developers are when it comes to adding/fixing/addressing
issues - I'm sure there were others with higher priorities.

regards,
Karthik



On 2/1/07, Robert ... < [EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I have read the "Pro Wicket" book and I am trying to make some examples
> from the book. However I get an error when trying to use a
> RestartResponseAtInterceptPageException in the bookstore example from page
> 114. It happens after the Login page calls continueToOriginalDestination.
>
> wicket.util.convert.ConversionException: Can't convert null value to a 
primitive class: int for setting it on [EMAIL PROTECTED]
>
>
> In the authorization strategy/listener onUnauthorizedInstantiation
> method I see that the component is the ConfirmationPage as I expected.
> However the expection page I get shows the CheckoutPage as the page class.
> I'm not sure if it means anything, but it seems to go back to the
> CheckoutPage instead of continuing to the ConfirmationPage.
>
> What am I doing wrong?
>
> Robert.
>
>
>
> -
> 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=lnk&kid=120709&bid=263057&dat=121642
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>


--
-- karthik --
-
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=lnk&kid=120709&bid=263057&dat=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=lnk&kid=120709&bid=263057&dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] How can I add some javascript to make sure the mainpage will occupy whole browser?

2007-02-02 Thread Nino Wael
You could write parent.location, and redirect to the page you want to fill the 
whole page. But im not sure if it's a dirty hack. 

As Web developer tool bar reports it as access denied in FF.

Looking forward to hear about some other ideas..


-Nino

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Carfield Yim
Sent: 2. februar 2007 10:15
To: wicket-user@lists.sourceforge.net
Subject: [Wicket-user] How can I add some javascript to make sure the mainpage 
will occupy whole browser?

We have a small version of login windows which exist within an iframe.
After the user login we need to make the main page occupy the whole
browser windows.

How can I add that javascript to onload event of that main page?

-
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=lnk&kid=120709&bid=263057&dat=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=lnk&kid=120709&bid=263057&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Problem of adding confirm javascript to link

2007-02-02 Thread Igor Vaynberg

package wicket.misc;

import wicket.Component;
import wicket.ajax.ClientEvent;
import wicket.behavior.AbstractBehavior;
import wicket.markup.ComponentTag;
import wicket.model.IModel;

public class JavascriptConfirm extends AbstractBehavior {

   private final ClientEvent event;

   private final IModel message;

   public JavascriptConfirm(final ClientEvent event, final IModel
message) {
   super();
   this.event = event;
   this.message = message;
   }

   public void onComponentTag(Component component, ComponentTag tag) {
   StringBuilder handler = new StringBuilder(128);
   handler.append("if (!confirm('");
   handler.append(message.getObject());
   handler.append("')) {return false;} ");

   String script = tag.getAttributes().getString(event.getEvent());
   if (script != null) {
   handler.append(script);
   }

   tag.put(event.getEvent(), handler.toString());
   }

   @Override
   public void detach(Component component) {
   super.detach(component);
   message.detach();
   }
}

-igor


On 2/2/07, Carfield Yim <[EMAIL PROTECTED]> wrote:


For some delete link, I've add a confirm() javascript for
Link.getOnClickScript() . However I found that even I click cancel at
the javascript popup wicket will still execute the link. (delete the
record in my case)

How can I press the cancel message to wicket?

-
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=lnk&kid=120709&bid=263057&dat=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=lnk&kid=120709&bid=263057&dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Pro Wicket - Form.process()

2007-02-02 Thread Robert ...

Hi,

Page 96 of the Pro Wicket book describes how discouraging it is that you
lose your initial selection, because Wicket does not update form component
models during Form submission.
A getForm().process() is needed in the DropDownChoice.onSelectionChanged()

However when testing it (with wicket 1.2.4) I noticed that everything
already works fine without it.
Has this behaviour been changed since the book has been made and I can
assume that the form component models will be updated from now on?

Robert
-
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=lnk&kid=120709&bid=263057&dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Pro Wicket - Form.process()

2007-02-02 Thread Igor Vaynberg

you could just download the source and take a look yourself

   /**
* Called when a selection changes.
*/
   public final void onSelectionChanged()
   {
   convert();
   updateModel();
   onSelectionChanged(getModelObject());
   }

from the above i would say yes, the behavior has changed

-igor


On 2/2/07, Robert ... <[EMAIL PROTECTED]> wrote:


Hi,

Page 96 of the Pro Wicket book describes how discouraging it is that you
lose your initial selection, because Wicket does not update form component
models during Form submission.
A getForm().process() is needed in the DropDownChoice.onSelectionChanged()

However when testing it (with wicket 1.2.4) I noticed that everything
already works fine without it.
Has this behaviour been changed since the book has been made and I can
assume that the form component models will be updated from now on?

Robert


-
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=lnk&kid=120709&bid=263057&dat=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=lnk&kid=120709&bid=263057&dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] How can I add some javascript to make sure the mainpage will occupy whole browser?

2007-02-02 Thread Carfield Yim
I guess I know how to write the javascript. The probably is how can I
trigger the onload event at wicket

On 2/2/07, Nino Wael <[EMAIL PROTECTED]> wrote:
> You could write parent.location, and redirect to the page you want to fill 
> the whole page. But im not sure if it's a dirty hack.
>
> As Web developer tool bar reports it as access denied in FF.
>
> Looking forward to hear about some other ideas..
>
>
> -Nino
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Carfield Yim
> Sent: 2. februar 2007 10:15
> To: wicket-user@lists.sourceforge.net
> Subject: [Wicket-user] How can I add some javascript to make sure the 
> mainpage will occupy whole browser?
>
> We have a small version of login windows which exist within an iframe.
> After the user login we need to make the main page occupy the whole
> browser windows.
>
> How can I add that javascript to onload event of that main page?
>
> -
> 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=lnk&kid=120709&bid=263057&dat=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=lnk&kid=120709&bid=263057&dat=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=lnk&kid=120709&bid=263057&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Problem of adding confirm javascript to link

2007-02-02 Thread Carfield Yim
Thanks a lot! however I don't have wicket.ajax.ClientEvent at wicket
1.2.4 and wicket extension 1.2.4 . May be it locate at other projects?

By the way, I haven't use ajax for that link. Am I have to use ajax to
make it work?

On 2/2/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> package wicket.misc;
>
> import wicket.Component;
> import wicket.ajax.ClientEvent;
> import wicket.behavior.AbstractBehavior;
> import wicket.markup.ComponentTag;
> import wicket.model.IModel;
>
> public class JavascriptConfirm extends AbstractBehavior {
>
> private final ClientEvent event;
>
> private final IModel message;
>
> public JavascriptConfirm(final ClientEvent event, final IModel
> message) {
> super();
>  this.event = event;
> this.message = message;
> }
>
> public void onComponentTag(Component component, ComponentTag tag) {
> StringBuilder handler = new StringBuilder(128);
> handler.append("if (!confirm('");
> handler.append(message.getObject());
> handler.append("')) {return false;} ");
>
> String script = tag.getAttributes().getString( event.getEvent());
> if (script != null) {
> handler.append(script);
> }
>
> tag.put(event.getEvent(), handler.toString());
> }
>
> @Override
> public void detach(Component component) {
> super.detach(component);
> message.detach();
> }
> }
>
> -igor
>
>
>
> On 2/2/07, Carfield Yim < [EMAIL PROTECTED]> wrote:
> >
> > For some delete link, I've add a confirm() javascript for
> > Link.getOnClickScript() . However I found that even I click cancel at
> > the javascript popup wicket will still execute the link. (delete the
> > record in my case)
> >
> > How can I press the cancel message to wicket?
> >
> >
> -
> > 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=lnk&kid=120709&bid=263057&dat=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=lnk&kid=120709&bid=263057&dat=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=lnk&kid=120709&bid=263057&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Wicket gear like logo's

2007-02-02 Thread Martijn Dashorst
Something like this?

http://www.alibaba.com/catalog/11037305/Punched_Hole_Bag_With_Wicket.html

I think you can only order in quantities of 1,000,000 so you'd better
get popular!

If you look for a logo, then get:

http://wicketframework.org/style/logo.png

Martijn

On 2/2/07, nilo.de.roock <[EMAIL PROTECTED]> wrote:
>
> I wanted to decorate my site a bit with Wicket gear but I couldn't find any.
> Please help.
> Thanks,
> -nilo
> --
> View this message in context: 
> http://www.nabble.com/-Wicket-user-Wicket-gear-like-logo%27s-tf3160302.html#a8765258
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> 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=lnk&kid=120709&bid=263057&dat=121642
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>


-- 
Vote for Wicket at the http://www.thebeststuffintheworld.com/vote_for/wicket
Wicket 1.2.4 is as easy as 1-2-4. Download Wicket now!
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=lnk&kid=120709&bid=263057&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Wicket gear like logo's

2007-02-02 Thread nilo.de.roock

I wanted to decorate my site a bit with Wicket gear but I couldn't find any.
Please help.
Thanks,
-nilo
-- 
View this message in context: 
http://www.nabble.com/-Wicket-user-Wicket-gear-like-logo%27s-tf3160302.html#a8765258
Sent from the Wicket - User mailing list archive at Nabble.com.


-
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=lnk&kid=120709&bid=263057&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Composite Behavior....

2007-02-02 Thread Erik Brakkee

Hi,


I have encountered a situation where I would like to add more than one
behavior to a component. One example is that of a tooltip where I need a
header contributor to load some javascript and an attibute to contain the
tooltip text.

In wicket you can do this by adding two behaviors to a component. To support
this more generically I have developed a CompositeBehavior that allows one
to combine several behaviors in one.

I have attached an example for a tooltip. The solution consists of the
following classes:

  - CompositeBehavior: The basic composite behavior class
  - LocalizedCompositeBehavior: The composite behavior class that
  supports lazy addition of behaviors. this is useful in case localization is
  used which requires the parent component to be known. At construction of the
  behavior this might not be known so this component allows subclasses to
  create localized behaviors by implementing the createLocalizedBehaviors()
  method. This methods is called as soon as the composite behavior is bound to
  a component.
  - TooltipBehavior: Behavior that adds tooltips. This behavior requires
  attribute modifiers as well as header contributions.

Would something like this be useful to add to the wicket core?

Cheers
 Erik


behavior.jar
Description: application/jar
-
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=lnk&kid=120709&bid=263057&dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Composite Behavior....

2007-02-02 Thread Frank Bille

Hi Erik

I think the ToolTip behaviour would be a good addition to extentions.
However I can see that there is some legal problems since the javascript you
use is under CC which is still much unclear in ASF land. CC ShareAlike is
questionable[1] so I would like os to not use it for now if possible. If you
don't have a chance to change the js into something you wrote yourself or
something that ASL friendly you might create a wiki page for it. It's pretty
straight forward what to do.

In regards to the composite behaviours I'm -0.9 on adding them to core, +0
on adding them to extensions and +1 on adding them to the wiki as an
example. There is not much in it and everyone can create the classes and
have then in there own project.

Frank



[1]:
http://mail-archives.apache.org/mod_mbox/www-legal-discuss/200610.mbox/[EMAIL 
PROTECTED]

On 2/2/07, Erik Brakkee <[EMAIL PROTECTED]> wrote:


Hi,


I have encountered a situation where I would like to add more than one
behavior to a component. One example is that of a tooltip where I need a
header contributor to load some javascript and an attibute to contain the
tooltip text.

In wicket you can do this by adding two behaviors to a component. To
support this more generically I have developed a CompositeBehavior that
allows one to combine several behaviors in one.

I have attached an example for a tooltip. The solution consists of the
following classes:

   - CompositeBehavior: The basic composite behavior class
   - LocalizedCompositeBehavior: The composite behavior class that
   supports lazy addition of behaviors. this is useful in case localization is
   used which requires the parent component to be known. At construction of the
   behavior this might not be known so this component allows subclasses to
   create localized behaviors by implementing the createLocalizedBehaviors()
   method. This methods is called as soon as the composite behavior is bound to
   a component.
   - TooltipBehavior: Behavior that adds tooltips. This behavior
   requires attribute modifiers as well as header contributions.

Would something like this be useful to add to the wicket core?

Cheers
  Erik


-
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=lnk&kid=120709&bid=263057&dat=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=lnk&kid=120709&bid=263057&dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Problem of adding confirm javascript to link

2007-02-02 Thread Justin Lee
-BEGIN PGP SIGNED MESSAGE-
Hash: RIPEMD160

More simply, you could do this:

add(new AttributeModifier("onClick", true,
   new Model("javascript:return confirm('Are you sure you want to delete
this?');")));

Igor Vaynberg wrote:
> package wicket.misc;
> 
> import wicket.Component;
> import wicket.ajax.ClientEvent;
> import wicket.behavior.AbstractBehavior;
> import wicket.markup.ComponentTag;
> import wicket.model.IModel;
> 
> public class JavascriptConfirm extends AbstractBehavior {
> 
> private final ClientEvent event;
> 
> private final IModel message;
> 
> public JavascriptConfirm(final ClientEvent event, final
> IModel message) {
> super();
> this.event = event;
> this.message = message;
> }
> 
> public void onComponentTag(Component component, ComponentTag tag) {
> StringBuilder handler = new StringBuilder(128);
> handler.append("if (!confirm('");
> handler.append(message.getObject());
> handler.append("')) {return false;} ");
> 
> String script = tag.getAttributes().getString( event.getEvent());
> if (script != null) {
> handler.append(script);
> }
> 
> tag.put(event.getEvent(), handler.toString());
> }
> 
> @Override
> public void detach(Component component) {
> super.detach(component);
> message.detach();
> }
> }
> 
> -igor
> 
> 
> On 2/2/07, *Carfield Yim* < [EMAIL PROTECTED]
> > wrote:
> 
> For some delete link, I've add a confirm() javascript for
> Link.getOnClickScript() . However I found that even I click cancel at
> the javascript popup wicket will still execute the link. (delete the
> record in my case)
> 
> How can I press the cancel message to wicket?
> 
> -
> 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=lnk&kid=120709&bid=263057&dat=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=lnk&kid=120709&bid=263057&dat=121642
> 
> 
> 
> 
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user

- --
Justin Lee
http://www.antwerkz.com
AIM : evan chooly
Skype : evanchooly
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2.1 (Cygwin)

iD8DBQFFw1DxJnQfEGuJ90MRA354AJ4/9yW2G9jqCsBoA49/TceCy5/0oACbBiyz
wutmcOpbx+Q/sD5Kx0wSK2E=
=hDch
-END PGP SIGNATURE-

-
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=lnk&kid=120709&bid=263057&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Composite Behavior....

2007-02-02 Thread Erik Brakkee

Hi Frank,


On 2/2/07, Frank Bille <[EMAIL PROTECTED]> wrote:


Hi Erik

I think the ToolTip behaviour would be a good addition to extentions.
However I can see that there is some legal problems since the javascript you
use is under CC which is still much unclear in ASF land. CC ShareAlike is
questionable[1] so I would like os to not use it for now if possible. If you
don't have a chance to change the js into something you wrote yourself or
something that ASL friendly you might create a wiki page for it. It's pretty
straight forward what to do.



The tooltip behavior is just an example of how to use the composite
behavior. As far as I am concerned everyone can create his own tooltip based
on whatever libraries he prefers.

In regards to the composite behaviours I'm -0.9 on adding them to core, +0

on adding them to extensions and +1 on adding them to the wiki as an
example. There is not much in it and everyone can create the classes and
have then in there own project.



I think it would be useful to have this in wicket core since I think it is
very common to run into a situation where you need to package multiple
behaviors together.

The fact that the code is so small just shows the beauty of wicket and is
not an argument against including it, I think. It's rather the opposite, you
definitely don't want to have big 1000 line classes in the core. A decision
if and where to include it should be based on how common the scenario is
where you need functionality like this.

So where do we put it and how do we decide where to put it? Wicket-core,
wicket-extensions, wiki, or /dev/null?

Frank




[1]: 
http://mail-archives.apache.org/mod_mbox/www-legal-discuss/200610.mbox/[EMAIL 
PROTECTED]


On 2/2/07, Erik Brakkee <[EMAIL PROTECTED]> wrote:

> Hi,
>
>
> I have encountered a situation where I would like to add more than one
> behavior to a component. One example is that of a tooltip where I need a
> header contributor to load some javascript and an attibute to contain the
> tooltip text.
>
> In wicket you can do this by adding two behaviors to a component. To
> support this more generically I have developed a CompositeBehavior that
> allows one to combine several behaviors in one.
>
> I have attached an example for a tooltip. The solution consists of the
> following classes:
>
>- CompositeBehavior: The basic composite behavior class
>- LocalizedCompositeBehavior: The composite behavior class that
>supports lazy addition of behaviors. this is useful in case localization is
>used which requires the parent component to be known. At construction of 
the
>behavior this might not be known so this component allows subclasses to
>create localized behaviors by implementing the createLocalizedBehaviors()
>method. This methods is called as soon as the composite behavior is bound 
to
>a component.
>- TooltipBehavior: Behavior that adds tooltips. This behavior
>requires attribute modifiers as well as header contributions.
>
> Would something like this be useful to add to the wicket core?
>
> Cheers
>   Erik
>
>
>
> -
> 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=lnk&kid=120709&bid=263057&dat=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=lnk&kid=120709&bid=263057&dat=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=lnk&kid=120709&bid=263057&dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Strategy for many to one component relationships in 1.2.x

2007-02-02 Thread Ryan
Looks like that is what I am going to have to do. Yet another reason
wicket 2.0 is going to be nice. =)

Ryan

On 2/1/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> On 2/1/07, Ryan <[EMAIL PROTECTED]> wrote:
> > You don't get off that easy. =)
> >
> > What if login link parent is not the same parent as the login panel...
> > for instance like 5 levels deep where passing it through all the
> > constructors is highly undesirable.
>
>
>
> you have to pass a reference somehow. if you do not want to pass it down the
> constructor chain then you cannot use it inside component constructor - so
> you have to delay it until render time.
>
> interface ILoginPanelContainer { LoginPanel getLoginPanel() }
>
> class mypage extends webpage implements iloginpanelcontainer {
>   private final LoginPanel panel;
>
>   public mypage() { panel=new }
>
>   LoginPanel getLoginPanel() { return panel; }
> }
>
> class loginlink extends link {
>
>LoginPanel findLoginPanel() {
>
>   iloginpanelprovider provider=null;
>   Component ancestor=getParent();
>   while (ancestor!=null) { if (ancestor isntanceof
> iloginpanelprovider) { provider=ancestor; break; } }
>   return provider.getloginpanel();
>}
>
>onclick() {
>  panel=findloginpanel();
> //fooo
>}
> }
>
> -igor
>
>
> >
> > Ryan
> >
> > On 2/1/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> > > class mypage extends webpage {
> > >public mypage() {
> > >   final Panel loginpanel=loginpanel=new LoginPanel(...);
> > >   add(loginpanel);
> > >
> > >   add(new LoginLink(..., loginpanel));
> > >   add(new LoginLink(..., loginpanel));
> > >}
> > > }
> > >
> > > -igor
> > >
> > >
> > >
> > >
> > >
> > > On 2/1/07, Ryan <[EMAIL PROTECTED]> wrote:
> > > >
> > > > I am working on creating an "inline login link" that when clicked uses
> > > > javascript to present a previously hidden login form (if javascript is
> > > > disabled it will go to a login page). There will be several login
> > > > links on a single page so I would like to render the login form once
> > > > and have each link refer to the same form by id.
> > > >
> > > > What is a good strategy for only rendering the login form panel once
> > > > but allow links that live at many places in the render hierarchy to
> > > > refer to it? It seems like the main issue to solve is that at
> > > > construction time the hierarchy is not known so the link components
> > > > can not refer to its page and obtain a reference to the login panel.
> > > > Is there a clean way to design this?
> > > >
> > > > Thanks!
> > > >
> > > > Ryan
> > > >
> > > >
> > >
> -
> > > > 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=lnk&kid=120709&bid=263057&dat=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=lnk&kid=120709&bid=263057&dat=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=lnk&kid=120709&bid=263057&dat=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=lnk&kid=120709&bid=263057&dat=121642
>
> ___
> Wicket-user mailing lis

Re: [Wicket-user] Problem of adding confirm javascript to link

2007-02-02 Thread Igor Vaynberg

yes, but that will eat any other javascript in the event.

-igor


On 2/2/07, Justin Lee <[EMAIL PROTECTED]> wrote:


-BEGIN PGP SIGNED MESSAGE-
Hash: RIPEMD160

More simply, you could do this:

add(new AttributeModifier("onClick", true,
   new Model("javascript:return confirm('Are you sure you want to delete
this?');")));

Igor Vaynberg wrote:
> package wicket.misc;
>
> import wicket.Component;
> import wicket.ajax.ClientEvent;
> import wicket.behavior.AbstractBehavior;
> import wicket.markup.ComponentTag;
> import wicket.model.IModel;
>
> public class JavascriptConfirm extends AbstractBehavior {
>
> private final ClientEvent event;
>
> private final IModel message;
>
> public JavascriptConfirm(final ClientEvent event, final
> IModel message) {
> super();
> this.event = event;
> this.message = message;
> }
>
> public void onComponentTag(Component component, ComponentTag tag) {
> StringBuilder handler = new StringBuilder(128);
> handler.append("if (!confirm('");
> handler.append(message.getObject());
> handler.append("')) {return false;} ");
>
> String script = tag.getAttributes().getString( event.getEvent
());
> if (script != null) {
> handler.append(script);
> }
>
> tag.put(event.getEvent(), handler.toString());
> }
>
> @Override
> public void detach(Component component) {
> super.detach(component);
> message.detach();
> }
> }
>
> -igor
>
>
> On 2/2/07, *Carfield Yim* < [EMAIL PROTECTED]
> > wrote:
>
> For some delete link, I've add a confirm() javascript for
> Link.getOnClickScript() . However I found that even I click cancel
at
> the javascript popup wicket will still execute the link. (delete the
> record in my case)
>
> How can I press the cancel message to wicket?
>
>
-
> 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=lnk&kid=120709&bid=263057&dat=121642
> <
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=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=lnk&kid=120709&bid=263057&dat=121642
>
>
> 
>
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user

- --
Justin Lee
http://www.antwerkz.com
AIM : evan chooly
Skype : evanchooly
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2.1 (Cygwin)

iD8DBQFFw1DxJnQfEGuJ90MRA354AJ4/9yW2G9jqCsBoA49/TceCy5/0oACbBiyz
wutmcOpbx+Q/sD5Kx0wSK2E=
=hDch
-END PGP SIGNATURE-

-
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=lnk&kid=120709&bid=263057&dat=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=lnk&kid=120709&bid=263057&dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Problem of adding confirm javascript to link

2007-02-02 Thread Igor Vaynberg

replace ClientEvent with a string then and pass in "onclick" or something.

-igor

On 2/2/07, Carfield Yim <[EMAIL PROTECTED]> wrote:


Thanks a lot! however I don't have wicket.ajax.ClientEvent at wicket
1.2.4 and wicket extension 1.2.4 . May be it locate at other projects?

By the way, I haven't use ajax for that link. Am I have to use ajax to
make it work?

On 2/2/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> package wicket.misc;
>
> import wicket.Component;
> import wicket.ajax.ClientEvent;
> import wicket.behavior.AbstractBehavior;
> import wicket.markup.ComponentTag;
> import wicket.model.IModel;
>
> public class JavascriptConfirm extends AbstractBehavior {
>
> private final ClientEvent event;
>
> private final IModel message;
>
> public JavascriptConfirm(final ClientEvent event, final
IModel
> message) {
> super();
>  this.event = event;
> this.message = message;
> }
>
> public void onComponentTag(Component component, ComponentTag tag) {
> StringBuilder handler = new StringBuilder(128);
> handler.append("if (!confirm('");
> handler.append(message.getObject());
> handler.append("')) {return false;} ");
>
> String script = tag.getAttributes().getString( event.getEvent
());
> if (script != null) {
> handler.append(script);
> }
>
> tag.put(event.getEvent(), handler.toString());
> }
>
> @Override
> public void detach(Component component) {
> super.detach(component);
> message.detach();
> }
> }
>
> -igor
>
>
>
> On 2/2/07, Carfield Yim < [EMAIL PROTECTED]> wrote:
> >
> > For some delete link, I've add a confirm() javascript for
> > Link.getOnClickScript() . However I found that even I click cancel at
> > the javascript popup wicket will still execute the link. (delete the
> > record in my case)
> >
> > How can I press the cancel message to wicket?
> >
> >
>
-
> > 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=lnk&kid=120709&bid=263057&dat=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=lnk&kid=120709&bid=263057&dat=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=lnk&kid=120709&bid=263057&dat=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=lnk&kid=120709&bid=263057&dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Strategy for many to one component relationships in 1.2.x

2007-02-02 Thread Igor Vaynberg

the approach isnt much different in 2.0

just that you can find the loginpanel in the constructor

-igor


On 2/2/07, Ryan <[EMAIL PROTECTED]> wrote:


Looks like that is what I am going to have to do. Yet another reason
wicket 2.0 is going to be nice. =)

Ryan

On 2/1/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> On 2/1/07, Ryan <[EMAIL PROTECTED]> wrote:
> > You don't get off that easy. =)
> >
> > What if login link parent is not the same parent as the login panel...
> > for instance like 5 levels deep where passing it through all the
> > constructors is highly undesirable.
>
>
>
> you have to pass a reference somehow. if you do not want to pass it down
the
> constructor chain then you cannot use it inside component constructor -
so
> you have to delay it until render time.
>
> interface ILoginPanelContainer { LoginPanel getLoginPanel() }
>
> class mypage extends webpage implements iloginpanelcontainer {
>   private final LoginPanel panel;
>
>   public mypage() { panel=new }
>
>   LoginPanel getLoginPanel() { return panel; }
> }
>
> class loginlink extends link {
>
>LoginPanel findLoginPanel() {
>
>   iloginpanelprovider provider=null;
>   Component ancestor=getParent();
>   while (ancestor!=null) { if (ancestor isntanceof
> iloginpanelprovider) { provider=ancestor; break; } }
>   return provider.getloginpanel();
>}
>
>onclick() {
>  panel=findloginpanel();
> //fooo
>}
> }
>
> -igor
>
>
> >
> > Ryan
> >
> > On 2/1/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> > > class mypage extends webpage {
> > >public mypage() {
> > >   final Panel loginpanel=loginpanel=new LoginPanel(...);
> > >   add(loginpanel);
> > >
> > >   add(new LoginLink(..., loginpanel));
> > >   add(new LoginLink(..., loginpanel));
> > >}
> > > }
> > >
> > > -igor
> > >
> > >
> > >
> > >
> > >
> > > On 2/1/07, Ryan <[EMAIL PROTECTED]> wrote:
> > > >
> > > > I am working on creating an "inline login link" that when clicked
uses
> > > > javascript to present a previously hidden login form (if
javascript is
> > > > disabled it will go to a login page). There will be several login
> > > > links on a single page so I would like to render the login form
once
> > > > and have each link refer to the same form by id.
> > > >
> > > > What is a good strategy for only rendering the login form panel
once
> > > > but allow links that live at many places in the render hierarchy
to
> > > > refer to it? It seems like the main issue to solve is that at
> > > > construction time the hierarchy is not known so the link
components
> > > > can not refer to its page and obtain a reference to the login
panel.
> > > > Is there a clean way to design this?
> > > >
> > > > Thanks!
> > > >
> > > > Ryan
> > > >
> > > >
> > >
>
-
> > > > 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=lnk&kid=120709&bid=263057&dat=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=lnk&kid=120709&bid=263057&dat=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=lnk&kid=120709&bid=263057&dat=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

Re: [Wicket-user] Problem of adding confirm javascript to link

2007-02-02 Thread Carfield Yim
Sorry, look like Link.getOnClickScript() is actually work, just I only
call 'confirm xxx' but not ' return confrm xxx'

On 2/2/07, Justin Lee <[EMAIL PROTECTED]> wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: RIPEMD160
>
> More simply, you could do this:
>
> add(new AttributeModifier("onClick", true,
>new Model("javascript:return confirm('Are you sure you want to delete
> this?');")));
>
> Igor Vaynberg wrote:
> > package wicket.misc;
> >
> > import wicket.Component;
> > import wicket.ajax.ClientEvent;
> > import wicket.behavior.AbstractBehavior;
> > import wicket.markup.ComponentTag;
> > import wicket.model.IModel;
> >
> > public class JavascriptConfirm extends AbstractBehavior {
> >
> > private final ClientEvent event;
> >
> > private final IModel message;
> >
> > public JavascriptConfirm(final ClientEvent event, final
> > IModel message) {
> > super();
> > this.event = event;
> > this.message = message;
> > }
> >
> > public void onComponentTag(Component component, ComponentTag tag) {
> > StringBuilder handler = new StringBuilder(128);
> > handler.append("if (!confirm('");
> > handler.append(message.getObject());
> > handler.append("')) {return false;} ");
> >
> > String script = tag.getAttributes().getString( event.getEvent());
> > if (script != null) {
> > handler.append(script);
> > }
> >
> > tag.put(event.getEvent(), handler.toString());
> > }
> >
> > @Override
> > public void detach(Component component) {
> > super.detach(component);
> > message.detach();
> > }
> > }
> >
> > -igor
> >
> >
> > On 2/2/07, *Carfield Yim* < [EMAIL PROTECTED]
> > > wrote:
> >
> > For some delete link, I've add a confirm() javascript for
> > Link.getOnClickScript() . However I found that even I click cancel at
> > the javascript popup wicket will still execute the link. (delete the
> > record in my case)
> >
> > How can I press the cancel message to wicket?
> >
> > 
> > -
> > 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=lnk&kid=120709&bid=263057&dat=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=lnk&kid=120709&bid=263057&dat=121642
> >
> >
> > 
> >
> > ___
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
>
> - --
> Justin Lee
> http://www.antwerkz.com
> AIM : evan chooly
> Skype : evanchooly
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.2.1 (Cygwin)
>
> iD8DBQFFw1DxJnQfEGuJ90MRA354AJ4/9yW2G9jqCsBoA49/TceCy5/0oACbBiyz
> wutmcOpbx+Q/sD5Kx0wSK2E=
> =hDch
> -END PGP SIGNATURE-
>
> -
> 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=lnk&kid=120709&bid=263057&dat=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=lnk&kid=120709&bid=263057&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/lis

Re: [Wicket-user] Is there easy way to make AjaxFallbackDefaultDataTable non-sortable?

2007-02-02 Thread Carfield Yim
This work very nice, thx

On 2/1/07, Martijn Dashorst <[EMAIL PROTECTED]> wrote:
> Use other Column constructors (one parameter less).
>
> Martijn
>
> On 2/1/07, Carfield Yim <[EMAIL PROTECTED]> wrote:
> > There is some table we don't want user to sort, can I make
> > AjaxFallbackDefaultDataTable not able to sort or I have to create my
> > DataView?
> >
> > -
> > 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=lnk&kid=120709&bid=263057&dat=121642
> > ___
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
>
>
> --
> Vote for Wicket at the http://www.thebeststuffintheworld.com/vote_for/wicket
> Wicket 1.2.4 is as easy as 1-2-4. Download Wicket now!
> 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=lnk&kid=120709&bid=263057&dat=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=lnk&kid=120709&bid=263057&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Not sure how to use DatePicker component

2007-02-02 Thread Eelco Hillenius
The date picker component already tries to sync with the text field
you provide as the target. Did you try this?

Eelco


On 2/1/07, Scott Swank <[EMAIL PROTECTED]> wrote:
> I just (a bit too optimistically) tried to get the converter from my
> TextField and use it to set the DateConverter for the corresponding
> DatePicker.  I definitely want to retain the i18n (mm/dd/ for ENGLISH
> and dd/mm/ for FRENCH).  Is there a straightforward way to synch up the
> DateConverters for a TextField and DatePicker while retaining
> internationalization?
>
> RequiredTextField checkIn = new RequiredTextField("checkIn", new
> PropertyModel(roomRequest,
> "checkIn"), Date.class);
> checkIn.setOutputMarkupId(true);
> checkIn.add(DateValidator.minimum(getToday()));
> add(checkIn);
>
> DatePicker dp = new
> CylleniusCalendar("checkInPicker", checkIn);
> dp.setOutputMarkupId(true);
> dp.setDateConverter ((DateConverter) checkIn.getConverter());
> add(dp);
>
>  java.lang.ClassCastException: wicket.util.convert.Converter
> at
> com.vegas.cart.wicket.components.RoomRequestForm.(RoomRequestForm.java
> :69)
>
> Thank you,
> Scott
> -
> 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=lnk&kid=120709&bid=263057&dat=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=lnk&kid=120709&bid=263057&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Not sure how to use DatePicker component

2007-02-02 Thread Scott Swank

The text field has yy, while the date picker puts  into the date --
whether it's MM/dd/ or dd/MM/ (due to i18n).  Then we get an
annoying npe rendering the feedback panel -- which I still haven't tracked
down.

popup contains panel
panel contains form
form contains fields with validation
form contains date pickers that are tied to two of the fields
form also has form-level validation
form also contains feedback panel with form component feedback borders
around date fields
form applies AjaxFormValidatingBehavior.addToAllFormComponents("onblur")

When the date picker pushes an invalid date (check-in date before today or
check-out date on/before check-in date) null pointers just roll in rendering
the feedback panel.  I'm working to isolate this to a simpler case...

Scott


On 2/2/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote:


The date picker component already tries to sync with the text field
you provide as the target. Did you try this?

Eelco


On 2/1/07, Scott Swank <[EMAIL PROTECTED]> wrote:
> I just (a bit too optimistically) tried to get the converter from my
> TextField and use it to set the DateConverter for the corresponding
> DatePicker.  I definitely want to retain the i18n (mm/dd/ for
ENGLISH
> and dd/mm/ for FRENCH).  Is there a straightforward way to synch up
the
> DateConverters for a TextField and DatePicker while retaining
> internationalization?
>
> RequiredTextField checkIn = new RequiredTextField("checkIn", new
> PropertyModel(roomRequest,
> "checkIn"), Date.class);
> checkIn.setOutputMarkupId(true);
> checkIn.add(DateValidator.minimum(getToday()));
> add(checkIn);
>
> DatePicker dp = new
> CylleniusCalendar("checkInPicker", checkIn);
> dp.setOutputMarkupId(true);
> dp.setDateConverter ((DateConverter) checkIn.getConverter());
> add(dp);
>
>  java.lang.ClassCastException: wicket.util.convert.Converter
> at
> com.vegas.cart.wicket.components.RoomRequestForm.(
RoomRequestForm.java
> :69)
>
> Thank you,
> Scott
>
-
> 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=lnk&kid=120709&bid=263057&dat=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=lnk&kid=120709&bid=263057&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user





--
Scott Swank
reformed mathematician
-
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=lnk&kid=120709&bid=263057&dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Not sure how to use DatePicker component

2007-02-02 Thread Eelco Hillenius
Give us a stacktrace if you have it.

Eelco

On 2/2/07, Scott Swank <[EMAIL PROTECTED]> wrote:
> The text field has yy, while the date picker puts  into the date --
> whether it's MM/dd/ or dd/MM/ (due to i18n).  Then we get an
> annoying npe rendering the feedback panel -- which I still haven't tracked
> down.
>
> popup contains panel
> panel contains form
> form contains fields with validation
> form contains date pickers that are tied to two of the fields
> form also has form-level validation
> form also contains feedback panel with form component feedback borders
> around date fields
> form applies
> AjaxFormValidatingBehavior.addToAllFormComponents("onblur")
>
> When the date picker pushes an invalid date (check-in date before today or
> check-out date on/before check-in date) null pointers just roll in rendering
> the feedback panel.  I'm working to isolate this to a simpler case...
>
> Scott
>
>
>
> On 2/2/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
> > The date picker component already tries to sync with the text field
> > you provide as the target. Did you try this?
> >
> > Eelco
> >
> >
> > On 2/1/07, Scott Swank <[EMAIL PROTECTED] > wrote:
> > > I just (a bit too optimistically) tried to get the converter from my
> > > TextField and use it to set the DateConverter for the corresponding
> > > DatePicker.  I definitely want to retain the i18n (mm/dd/ for
> ENGLISH
> > > and dd/mm/ for FRENCH).  Is there a straightforward way to synch up
> the
> > > DateConverters for a TextField and DatePicker while retaining
> > > internationalization?
> > >
> > > RequiredTextField checkIn = new RequiredTextField("checkIn", new
> > > PropertyModel(roomRequest,
> > > "checkIn"), Date.class);
> > > checkIn.setOutputMarkupId(true);
> > > checkIn.add(DateValidator.minimum(getToday()));
> > > add(checkIn);
> > >
> > > DatePicker dp = new
> > > CylleniusCalendar("checkInPicker", checkIn);
> > > dp.setOutputMarkupId(true);
> > > dp.setDateConverter ((DateConverter) checkIn.getConverter ());
> > > add(dp);
> > >
> > >  java.lang.ClassCastException: wicket.util.convert.Converter
> > > at
> > >
> com.vegas.cart.wicket.components.RoomRequestForm.(RoomRequestForm.java
> > > :69)
> > >
> > > Thank you,
> > > Scott
> > >
> -
> > > 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=lnk&kid=120709&bid=263057&dat=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=lnk&kid=120709&bid=263057&dat=121642
> > ___
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
>
>
>
> --
>  Scott Swank
> reformed mathematician
> -
> 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=lnk&kid=120709&bid=263057&dat=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=lnk&kid=120709&bid=263057&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Not sure how to use DatePicker component

2007-02-02 Thread Scott Swank

It's clearly the AjaxFormValidatingBehavior.addToAllFormComponents(this,
"onblur", wicket.util.time.Duration.seconds(2)).  Without that everything
works as expected.  We'll just comment that out for out demo.  Here's the
code & the stack trace.


   public RoomRequestForm(String id, IModel model,
HotelAvailabilityResultsPanel rPanel)
   {
   super(id, model);
   setRoomRequest((RoomRequest) getModelObject());
   setOutputMarkupId(true);
   resultsPanel = rPanel;

   FeedbackPanel feedback = new FeedbackPanel("feedback");
   add(feedback);
   feedback.setOutputMarkupId(true);

   DateTextField checkIn = new DateTextField("checkIn", new
PropertyModel(roomRequest, "checkIn"));
   checkIn.setOutputMarkupId(true);
checkIn.setRequired(true);
   // checkIn.add(DateValidator.minimum(getToday()));
   add(checkIn);

   DatePicker dp = new CylleniusCalendar("checkInPicker", checkIn);
   add(dp);

   final FormComponentFeedbackBorder checkInBorder =
addWithBorder(checkIn, "checkInBorder");
   add(checkInBorder);
   addAjaxBehaviorToComponent(checkIn, checkInBorder, feedback);

   DateTextField checkOut = new DateTextField("checkOut", new
PropertyModel(roomRequest,
   "checkOut"));
   checkOut.setOutputMarkupId(true);
   // checkIn.setRequired(true);
   add(checkOut);

   DatePicker dp2 = new CylleniusCalendar("checkOutPicker", checkOut);
   add(dp2);

   final FormComponentFeedbackBorder checkOutBorder =
addWithBorder(checkOut, "checkOutBorder");
   add(checkOutBorder);
   addAjaxBehaviorToComponent(checkOut, checkOutBorder, feedback);

// DatesComparatorValidator validator = new
// DatesComparatorValidator(checkIn, checkOut);
// add(validator);

   addRoomChoice();
   addAdultChildrenChoice();
   AjaxFormValidatingBehavior.addToAllFormComponents(this, "onblur",
wicket.util.time.Duration.sec
   .seconds(2));
   }



2/02 10:02:58 INFO | Server.doStart(475): JBoss (MX MicroKernel)
[4.0.3SP1(build: CVSTag=JBoss_4_0_3_SP1 date=200510231054)] Started in
32s:378ms
2/02 10:03:53 INFO |
PropertiesFactory.loadPropertiesFileAndWatchForChanges(299):
Loading properties files from
file:/C:/dev/uiproto/wicketapp/content/com/vegas/cart/wicket/components/ProductPanel.properties
2/02 10:03:58 INFO |
PropertiesFactory.loadPropertiesFileAndWatchForChanges(299):
Loading properties files from
file:/C:/dev/jboss/server/concierge/deploy/wicketapp.war/WEB-INF/classes/com/vegas/cart/wicket/CartApplication.properties
2/02 10:03:58 INFO |
PropertiesFactory.loadPropertiesFileAndWatchForChanges(299):
Loading properties files from
jar:file:/C:/dev/jboss/server/concierge/deploy/wicketapp.war/WEB-INF/lib/wicket-
1.2.4.jar!/wicket/Application.properties
2/02 10:04:50 ERROR| AjaxRequestTarget.respond(379): Error while responding
to an AJAX request: [EMAIL PROTECTED] markupIdToComponent
[{scrollPopup_content_productReservation_roomRequestPopup_content_roomRequestForm_checkOutBorder=[MarkupContainer
[Component id = checkOutBorder, page = com.vegas.cart.wicket.pages.Index,
path =
0:scrollPopup:content:productReservation:roomRequestPopup:content:roomRequestForm:
checkOutBorder.FormComponentFeedbackBorder, isVisible = true, isVersioned =
false]],
scrollPopup_content_productReservation_roomRequestPopup_content_roomRequestForm_feedback=[MarkupContainer
[Component id = feedback, page = com.vegas.cart.wicket.pages.Index, path =
0:scrollPopup:content:productReservation:roomRequestPopup:content:roomRequestForm:
feedback.FeedbackPanel, isVisible = true, isVersioned = false]],
tabsPopup_content_productReservation_inlineRoomRequest_feedback=[MarkupContainer
[Component id = feedback, page = com.vegas.cart.wicket.pages.Index, path =
0:tabsPopup:content:productReservation:inlineRoomRequest:
feedback.FeedbackPanel, isVisible = true, isVersioned = false]],
tabsPopup_content_productReservation_inlineRoomRequest_checkOutBorder=[MarkupContainer
[Component id = checkOutBorder, page = com.vegas.cart.wicket.pages.Index,
path = 0:tabsPopup:content:productReservation:inlineRoomRequest:
checkOutBorder.FormComponentFeedbackBorder, isVisible = true, isVersioned =
false]],
tabsPopup_content_productReservation_inlineRoomRequest_checkInBorder=[MarkupContainer
[Component id = checkInBorder, page = com.vegas.cart.wicket.pages.Index,
path = 0:tabsPopup:content:productReservation:inlineRoomRequest:
checkInBorder.FormComponentFeedbackBorder, isVisible = true, isVersioned =
false]],
scrollPopup_content_productReservation_roomRequestPopup_content_roomRequestForm_checkInBorder=[MarkupContainer
[Component id = checkInBorder, page = com.vegas.cart.wicket.pages.Index,
path =
0:scrollPopup:content:productReservation:roomRequestPopup:content:roomRequestForm:
checkInBorder.FormComponentFeedbackBorder, isVisible = true, isVersioned =
false]]}], prependJavascript [[]], appendJavascript [[]]
wicket.WicketRuntimeException: Exception i

Re: [Wicket-user] Not sure how to use DatePicker component

2007-02-02 Thread Eelco Hillenius
The date converter is being phased out because it is messy in many
ways (and the java.util.Date API is partly to blame for that!). I
think you would do best just copying the whole component to your own
project and then tweaking it in getInitiScript and by depending on
your own date converter for getting the proper patterns.

Btw, if you are working with different locales, the client's time zone
is something you might want to consider as well. Here is something
that does that and which depends on JodaTime


import java.util.Date;
import java.util.TimeZone;

import org.joda.time.DateTime;
import org.joda.time.DateTimeZone;
import org.joda.time.MutableDateTime;
import org.joda.time.format.DateTimeFormat;
import org.joda.time.format.DateTimeFormatter;

import wicket.Session;
import wicket.protocol.http.request.WebClientInfo;
import wicket.request.ClientInfo;
import wicket.util.convert.SimpleConverterAdapter;

/**
 * Date converter that can be smart about differences in time zone between
 * clients and server. NOT thread safe.
 *
 * @author eelcohillenius
 */
public class DateConverter extends SimpleConverterAdapter {

/**
 * Whether to apply the time zone difference when interpreting dates.
 *
 * 
 * When true, the current time is applied on the parsed date, and the 
date
 * will be corrected for the time zone difference between the server 
and the
 * client. For instance, if I'm in Seattle and the server I'm working 
on is
 * in Amsterdam, the server is 9 hours ahead. So, if I'm inputting say 
12/24
 * at a couple of hours before midnight, at the server it is already 
12/25.
 * If this boolean is true, it will be transformed to 12/25, while the
 * client sees 12/24.
 * 
 * 
 * True by default
 * 
 */
private boolean applyTimeZoneDifference = true;

/** optional pattern to use. */
private String datePattern;

/**
 * Construct.
 */
public DateConverter() {
}

/**
 * Gets whether to apply the time zone difference when interpreting 
dates.
 *
 * 
 * When true, the current time is applied on the parsed date, and the 
date
 * will be corrected for the time zone difference between the server 
and the
 * client. For instance, if I'm in Seattle and the server I'm working 
on is
 * in Amsterdam, the server is 9 hours ahead. So, if I'm inputting say 
12/24
 * at a couple of hours before midnight, at the server it is already 
12/25.
 * If this boolean is true, it will be transformed to 12/25, while the
 * client sees 12/24.
 * 
 *
 * @return whether to apply the difference in time zones between client 
and
 * server
 */
public final boolean getApplyTimeZoneDifference() {
return applyTimeZoneDifference;
}

/**
 * Gets the optional date pattern.
 *
 * @return datePattern
 */
public String getDatePattern() {
return datePattern;
}

/**
 * Sets whether to apply the time zone difference when interpreting 
dates.
 *
 * 
 * When true, the current time is applied on the parsed date, and the 
date
 * will be corrected for the time zone difference between the server 
and the
 * client. For instance, if I'm in Seattle and the server I'm working 
on is
 * in Amsterdam, the server is 9 hours ahead. So, if I'm inputting say 
12/24
 * at a couple of hours before midnight, at the server it is already 
12/25.
 * If this boolean is true, it will be transformed to 12/25, while the
 * client sees 12/24.
 * 
 *
 * @param applyTimeZoneDifference
 *whether to apply the difference in time zones between 
client
 *and server
 */
public final void setApplyTimeZoneDifference(boolean 
applyTimeZoneDifference) {
this.applyTimeZoneDifference = applyTimeZoneDifference;
}

/**
 * Sets the optional date pattern.
 *
 * @param datePattern
 *datePattern
 */
public void setDatePattern(String datePattern) {
this.datePattern = datePattern;
}

@Override
public Object toObject(String value) {

DateTimeFormatter format = getFormat();

if (applyTimeZoneDifference) {
TimeZone zone = getClientTimeZone();
// instantiate now/ current time
MutableDateTime dt = new MutableDateTime();
if (zone != null) {
// set time zone for client
format = 
format.withZone(DateTime

Re: [Wicket-user] Not sure how to use DatePicker component

2007-02-02 Thread Eelco Hillenius
I just asked on the developer list
http://www.nabble.com/replacement-for-date-picker-tf3162478.html

Eelco


On 2/2/07, Scott Swank <[EMAIL PROTECTED]> wrote:
> Nice, thank you.  Where does the process to replace DatePicker stand?
>
>
> On 2/2/07, Eelco Hillenius <[EMAIL PROTECTED] > wrote:
> > The date converter is being phased out because it is messy in many
> > ways (and the java.util.Date API is partly to blame for that!). I
> > think you would do best just copying the whole component to your own
> > project and then tweaking it in getInitiScript and by depending on
> > your own date converter for getting the proper patterns.
> >
> > Btw, if you are working with different locales, the client's time zone
> > is something you might want to consider as well. Here is something
> > that does that and which depends on JodaTime
> >
> >
> > import java.util.Date ;
> > import java.util.TimeZone;
> >
> > import org.joda.time.DateTime;
> > import org.joda.time.DateTimeZone;
> > import org.joda.time.MutableDateTime;
> > import org.joda.time.format.DateTimeFormat;
> > import org.joda.time.format.DateTimeFormatter ;
> >
> > import wicket.Session;
> > import wicket.protocol.http.request.WebClientInfo;
> > import wicket.request.ClientInfo;
> > import wicket.util.convert.SimpleConverterAdapter;
> >
> > /**
> > * Date converter that can be smart about differences in time zone between
> > * clients and server. NOT thread safe.
> > *
> > * @author eelcohillenius
> > */
> > public class DateConverter extends SimpleConverterAdapter {
> >
> > /**
> >  * Whether to apply the time zone difference when interpreting
> dates.
> >  *
> >  * 
> >  * When true, the current time is applied on the parsed date, and
> the date
> >  * will be corrected for the time zone difference between the
> server and the
> >  * client. For instance, if I'm in Seattle and the server I'm
> working on is
> >  * in Amsterdam, the server is 9 hours ahead. So, if I'm inputting
> say 12/24
> >  * at a couple of hours before midnight, at the server it is
> already 12/25.
> >  * If this boolean is true, it will be transformed to 12/25, while
> the
> >  * client sees 12/24.
> >  * 
> >  * 
> >  * True by default
> >  * 
> >  */
> > private boolean applyTimeZoneDifference = true;
> >
> > /** optional pattern to use. */
> > private String datePattern;
> >
> > /**
> >  * Construct.
> >  */
> > public DateConverter() {
> > }
> >
> > /**
> >  * Gets whether to apply the time zone difference when
> interpreting dates.
> >  *
> >  * 
> >  * When true, the current time is applied on the parsed date, and
> the date
> >  * will be corrected for the time zone difference between the
> server and the
> >  * client. For instance, if I'm in Seattle and the server I'm
> working on is
> >  * in Amsterdam, the server is 9 hours ahead. So, if I'm inputting
> say 12/24
> >  * at a couple of hours before midnight, at the server it is
> already 12/25.
> >  * If this boolean is true, it will be transformed to 12/25, while
> the
> >  * client sees 12/24.
> >  * 
> >  *
> >  * @return whether to apply the difference in time zones between
> client and
> >  * server
> >  */
> > public final boolean getApplyTimeZoneDifference() {
> > return applyTimeZoneDifference;
> > }
> >
> > /**
> >  * Gets the optional date pattern.
> >  *
> >  * @return datePattern
> >  */
> > public String getDatePattern() {
> > return datePattern;
> > }
> >
> > /**
> >  * Sets whether to apply the time zone difference when
> interpreting dates.
> >  *
> >  * 
> >  * When true, the current time is applied on the parsed date, and
> the date
> >  * will be corrected for the time zone difference between the
> server and the
> >  * client. For instance, if I'm in Seattle and the server I'm
> working on is
> >  * in Amsterdam, the server is 9 hours ahead. So, if I'm inputting
> say 12/24
> >  * at a couple of hours before midnight, at the server it is
> already 12/25.
> >  * If this boolean is true, it will be transformed to 12/25, while
> the
> >  * client sees 12/24.
> >  * 
> >  *
> >  * @param applyTimeZoneDifference
> >  *whether to apply the difference in time zones
> between client
> >  *and server
> >  */
> > public final void
> setApplyTimeZoneDifference(boolean applyTimeZoneDifference)
> {
> > this.applyTimeZoneDifference = applyTimeZoneDifference;
> > }
> >
> > /**
> >  * Sets th

Re: [Wicket-user] Wicket 2.0 bookmarkable page issue?

2007-02-02 Thread Aaron Hiniker
My web.xml:


  Archetype Created Web Application

  
  EDI
  wicket.protocol.http.WicketFilter
  
applicationClassName

  com.edicorp.erp.web.Application

  
  

 

  EDI
  /*

 


Aaron


Igor Vaynberg wrote:
> what does your web.xml look like where you define the filter and mapping?
>
> -igor
>
>
> On 1/31/07, *Aaron Hiniker* < [EMAIL PROTECTED]
> > wrote:
>
> I have a webapp that is bound to root "/" context, and I am
> mounting a bookmarkable page to "/script/execute" via:
>
> mountBookmarkablePage( "/script/execute",
> ScriptExecutor.class );
>
> That page displays a textarea and a submit button within the
> form.  The code is as follows:
>
>
> public class ScriptExecutor extends WebPage
> {
> private static final Log log =
> LogFactory.getLog(ScriptExecutor.class);
>
> String script;
>
> public ScriptExecutor()
> {
> Form form = new Form( this, "form" ) {
>
> final TextArea textarea = new TextArea( this,
> "textarea", new PropertyModel( ScriptExecutor.this, "script" ) );
>
> protected void onSubmit()
> {
> super.onSubmit();
>
> System.out.println("TextArea: " + getScript() );
> }
> };  
> }
>
>
> public String getScript()
> {
> return script;
> }
>
> public void setScript(String script)
> {
> this.script = script;
> }
> }
>
> When I first load the page via the bookmarkable url and hit
> submit, I get a 404 because wicket is submitting to:
>
>
> 
> http://localhost:8080/script/?wicket:interface=:5:form::IFormSubmitListener
>
>
> when it should be submitting to:
>
>
> http://localhost:8080/?wicket:interface=:5:form::IFormSubmitListener
>
> This all seems to be due to the fact wicket isn't prepending a "/"
> to the form's action URL, causing the browser to use the current
> directory from the url, "/script/":
>
> 
>action="?wicket:interface=:5:form::IFormSubmitListener" 
> method="post" wicket:id="form">
> type="hidden" name="form0:hf:fs" id="form0:hf:fs"/>
>="hidden" name="wicketState" id="form0:hf:ws"/>
>="width: 500px; height: 500px" wicket:id="textarea" 
> name="textarea">
>   
>
>   
>   
> 
>
>
> Is this a user error on my part or an issue with how wicket is
> generating the url?
>
> Aaron
>
>
> -
> 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=lnk&kid=120709&bid=263057&dat=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=lnk&kid=120709&bid=263057&dat=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=lnk&kid=120709&bid=263057&dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Wicket 2.0 bookmarkable page issue?

2007-02-02 Thread Igor Vaynberg

you should probably specify the filterpath param as well, even if it is
empty or a /

-igor


On 2/2/07, Aaron Hiniker <[EMAIL PROTECTED]> wrote:


 My web.xml:


  Archetype Created Web Application

  
  EDI
  wicket.protocol.http.WicketFilter
  
applicationClassName

  com.edicorp.erp.web.Application

  




  EDI
  /*




Aaron


Igor Vaynberg wrote:

what does your web.xml look like where you define the filter and mapping?

-igor


On 1/31/07, Aaron Hiniker < [EMAIL PROTECTED]> wrote:
>
> I have a webapp that is bound to root "/" context, and I am mounting a
> bookmarkable page to "/script/execute" via:
>
> mountBookmarkablePage( "/script/execute", ScriptExecutor.class);
>
> That page displays a textarea and a submit button within the form.  The
> code is as follows:
>
>
> public class ScriptExecutor extends WebPage
> {
> private static final Log log = LogFactory.getLog(
> ScriptExecutor.class);
>
> String script;
>
> public ScriptExecutor()
> {
> Form form = new Form( this, "form" ) {
>
> final TextArea textarea = new TextArea( this, "textarea",
> new PropertyModel( ScriptExecutor.this, "script" ) );
>
> protected void onSubmit()
> {
> super.onSubmit();
>
> System.out.println("TextArea: " + getScript() );
> }
> };
> }
>
>
> public String getScript()
> {
> return script;
> }
>
> public void setScript(String script)
> {
> this.script = script;
> }
> }
>
> When I first load the page via the bookmarkable url and hit submit, I
> get a 404 because wicket is submitting to:
>
> 
http://localhost:8080/script/?wicket:interface=:5:form::IFormSubmitListener
>
>
> when it should be submitting to:
>
> http://localhost:8080/?wicket:interface=:5:form::IFormSubmitListener
>
>
> This all seems to be due to the fact wicket isn't prepending a "/" to
> the form's action URL, causing the browser to use the current directory from
> the url, "/script/":
>
> 
> method="post" wicket:id="form">
>
> ="hidden" name="wicketState" id="form0:hf:ws"/>
> ="width: 500px; height: 500px" wicket:id="textarea" 
name="textarea">
>
>
>
>
> 
>
>
> Is this a user error on my part or an issue with how wicket is
> generating the url?
>
> Aaron
>
>
>
> -
> 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=lnk&kid=120709&bid=263057&dat=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=lnk&kid=120709&bid=263057&dat=121642

--

___
Wicket-user mailing list
[EMAIL PROTECTED]://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=lnk&kid=120709&bid=263057&dat=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=lnk&kid=120709&bid=263057&dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Fighting "Too many open files" problem related to wicket resource files

2007-02-02 Thread beboris

Thanks for the hints. Between those and what we've already known, we should
be fine...

Bob.


Johan Compagner wrote:
> 
> Tomcat can do that:
> 
> http://tomcat.apache.org/tomcat-5.5-doc/config/context.html
> 
> see anti resource and anti jar locking.
> 
> I think the end result will be that tomcat extracts everything.
> (dont know which one it really is)
> 
> But as igor said, a high load of users shouldn't affect the number of open
> files to the wicket jar
> if you are in deployment mode. If you are in development mode then
> 1.2.4still have the problem
> that the modification watcher does a check every second or so. And that
> will
> increase open file
> handles a lot.
> 
> johan
> 
> 
> On 2/2/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
>>
>> the os should be able to handle at least a few thousand open file
>> handles.
>> furthermore you can configure it to have more if you need to. only one
>> handle should be open per resource (no way to avoid that) in a jar, so a
>> spike of user activity shouldnt affect this at all as resources cache
>> globally.
>>
>> but yes, unpacking should eliminate these problems. i wish there was an
>> option in tomcat to unpack the jars on deployment, it can already do this
>> for the war.
>>
>> -igor
>>
>> On 2/1/07, beboris <[EMAIL PROTECTED]> wrote:
>> >
>> >
>> > It's hard for me to say, what the right way to fix this situation is.
>> > The
>> > number of open files (that look to the OS as wicket .jar files) will go
>> > up
>> > significantly and then go down (down - probably due to the garbage
>> > collection). It is during those spikes caused by many users hitting
>> > wicket
>> > pages around the same time that we got "too many open files" error. It
>> > almost looks like the only way to really eliminate those unnecessary
>> > open
>> > files to numerous Wicket resources (and to guarantee "too many open
>> > files"
>> > will never hit us) is to unpack those resources from the wicket .jar-s
>> > and
>> > put them into WEB-INF/classes directory instead. Once we did it, we
>> > didn't
>> > see all those dozens (and even hundreds) open files ever again...
>> >
>> > Bob.
>> >
>> >
>> > Eelco Hillenius wrote:
>> > >
>> > > Too bad,
>> > >
>> > > Eelco
>> > >
>> > >
>> > > On 2/1/07, Johan Compagner < [EMAIL PROTECTED]> wrote:
>> > >> why would you cache? and which one? the url connection to an entry
>> in
>> > a
>> > >> jar
>> > >> file (thats the JarUrlConnection)
>> > >> or (i guess) the FileUrlConnection (to the jar file itself)
>> > >>
>> > >> both don't make much sense to cache
>> > >>  the first one we don't need to cache we only need to use it once by
>> > >> really
>> > >> loading the resource
>> > >> and i guess when it is finalized it is cleaned up.
>> > >> We already don't use it anymore for the last modified. Because there
>> > we
>> > >> use
>> > >> only the second one
>> > >> So the fileUrlConnection to the jarFile itself thats is inside the
>> > >> JarUrlConnection object.
>> > >> on that one we call last modified everytime, But that will not cause
>> > the
>> > >> file to open. (because it doesn't have to read the file itself)
>> > >>
>> > >> And we can't construct JarUrlConnections (for reading the jar
>> > entries)
>> > >> with
>> > >> the same file url connection because there is
>> > >> no way to initialize the jar url connection directly with the file
>> > url
>> > >> connection so they all would use the same.
>> > >>
>> > >> johan
>> > >>
>> > >>
>> > >>
>> > >> On 2/2/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
>> > >> >
>> > >> > Would it be possible and useful to cache the URL connection? Does
>> > it
>> > >> > have a time out and/ or does it use an exclusive lock?
>> > >> >
>> > >> > Eelco
>> > >> >
>> > >> > On 2/1/07, Johan Compagner <[EMAIL PROTECTED] > wrote:
>> > >> > > that is what you would think... But why generates a modification
>> > >> check
>> > >> one
>> > >> > > file handle for every check in the file?
>> > >> > >
>> > >> > > because UrlConnection.connect() has again a JarUrlConnection
>> > >> internally
>> > >> that
>> > >> > > makes a new connection to that jar file
>> > >> > > and UrlConnection does have a connect() but not a disconnect()
>> so
>> > you
>> > >> can't
>> > >> > > clear it.
>> > >> > >
>> > >> > > johan
>> > >> > >
>> > >> > >
>> > >> > >
>> > >> > > On 2/2/07, Eelco Hillenius < [EMAIL PROTECTED]> wrote:
>> > >> > > > Yeah, but that would be always one fd for a jar, no matter how
>> > many
>> > >> > > > files in it that have to be read, right?
>> > >> > > >
>> > >> > > > Eelco
>> > >> > > >
>> > >> > > >
>> > >> > > > On 2/1/07, Johan Compagner <[EMAIL PROTECTED] > wrote:
>> > >> > > > > yes the modification checker.
>> > >> > > > > But we do need to really load the resource out of the jar
>> > file
>> > >> once.
>> > >> So
>> > >> > > that
>> > >> > > > > file handle will be used.
>> > >> > > > >
>> > >> > > > > johan
>> > >> > > > >
>> > >> > > > >
>> > >> > > > >
>> > >> > > > > On 2/1/07, Eelco Hillenius 

Re: [Wicket-user] [wicket 1.2.4] JIRA issue? Ampersand char problem in "wicket.markup.html.link.ExternalLink.java"

2007-02-02 Thread Eelco Hillenius
Fixed, see http://issues.apache.org/jira/browse/WICKET-251

Eelco

On 1/23/07, Kadir Sener GUMUS <[EMAIL PROTECTED]> wrote:
> Hi all,
> i experienced a problem with "href" attribute of rendered ExternalLink.
> In our application, i needed to parse rendered html in a SaxParser
> implementation. But i couldnt!  When i looked in source codes of
> ExternalLink and Link, i saw the problematic line is that, in ExternalLink
> there is no escaping for & signs.
>
> line 159:
>  tag.put("href", url);
> should be as below
>  tag.put("href" , Strings.replaceAll(url, "&", "&"));   (which
> was already in the Link.java file)
>
>
> Regards
> Kadir
> -
> 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.php&p=sourceforge&CID=DEVDEV
>
> ___
> 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=lnk&kid=120709&bid=263057&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] setResizable(false) for ModalWindow doesn't work

2007-02-02 Thread beboris

Thank you, Matej.
It did the trick...

Bob.


Matej Knopp wrote:
> 
> Hi
> 
> you are calling setResizable too late. When MyModalPage constructor is 
> called, the window is already shown. You have to call setResizable (as 
> well as the other methods) _before_ calling modalWindow.show().
> 
> -Matej
> 
> beboris wrote:
>> We have the following code that attempts to create a modal window of
>> certain
>> size and make it non-resizable:
>> 
>> public class MyModalPage extends WebPage {
>>  public MyModalPage( final WebPage parentPage, ModalWindow modalWindow) {
>>  modalWindow.setVersioned(false);
>>  modalWindow.setInitialWidth(400);
>>  modalWindow.setInitialHeight(280);
>>  modalWindow.setMinimalWidth(400);
>>  modalWindow.setMinimalHeight(280);
>>  modalWindow.setResizable(false);
>>  ...
>>  }
>> }
>> 
>> public class ParentPage extends WebPage {
>> ...
>> private void addModalDialog() {
>> final ModalWindow modal;
>> add(modal = new ModalWindow("MyModalWindow"));
>> modal.setVersioned(false);
>> modal.setPageCreator(new ModalWindow.PageCreator() {
>>   public Page createPage() {
>>   Page result = new MyModalPage(ParentPage.this,modal);
>>   return result;
>>   }
>> }
>> ...
>> }
>> ...
>> }
>> 
>> The modal window can be brought up upon a button click in the parent
>> page.
>> Unfortunately, when the modal window is displayed for the first time, it
>> can
>> be resized, despite modalWindow.setResizable(false) call. For subsequent
>> button clicks it becomes non-resizable. Is there any way to make it
>> non-resizable from the "get go" or is it a bug in the ModalWindow code?
>> 
>> Bob.
>> 
> 
> 
> -
> 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=lnk&kid=120709&bid=263057&dat=121642
> ___
> 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/setResizable%28false%29-for-ModalWindow-doesn%27t-work-tf3158740.html#a8777053
Sent from the Wicket - User mailing list archive at Nabble.com.


-
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=lnk&kid=120709&bid=263057&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Ajax DropDownChoice - retain selected value when choices are refreshed

2007-02-02 Thread Peter Thomas

Hi,

I have these two DropDownChoices (A and B) and I am refreshing the choices
in B through Ajax when the selection in A changes.
AjaxFormComponentUpdatingBehavior works fine, no problems here.

In my case many of the choices in B are common for all the possible
selections in A.  Consider the case that the user has already made a
selection in B, changes his mind and flips A.

What is happening now is of course, B is completely reset.  What I would
like is that if the earlier selected value of B is still available in the
new, refreshed list of choices, I would like that "pre-selected".

I'm guessing that in the Ajax request to the server I need to be able to
send the information about what is currently selected in B.  How can I do
this?

Hope this makes sense!

Thanks,

Peter.
-
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=lnk&kid=120709&bid=263057&dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user