Re: [Wicket-user] noob question about wicket

2007-06-13 Thread verbal evasion

the code i'm writing basically just resulted from my playing with the
examples giving in the Pro Wicket book i got. then i wanted to write a basic
site to play with things i can do. this is not anything that i've
"designed". just seeing what wicket is capable of.

also, am i missing something? i do not see isTemporary or bind methods in
Session or WebSession.

thanks,

verbal

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


> the default behavior is for a session to be temporary? that doesnt make
> sense.

It is Wicket trying to be as efficient as possible. I understand the
confusion, but think of it: you would typically only want a persistent
session when you actually do something with it (like setting the
user).

An easy solutation in your case would be to call #bind in your custom
session's constructor. Can you try that and let us know whether that
helped?

> this maybe another reason. i have my login code (basically everything
you've
> seen) in an abstract BasePage class. I then call Index which extends
> BasePage. would that have anything to do with anything?

I don't know. Why did you decide to put that loging code in that base
class? Did you take a look at the wicket-auth-roles project (an
example of how you can do authorization in a nicer way than e.g. the
library example does it)?

Eelco

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

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


Re: [Wicket-user] How to create Dynamic Label?

2007-06-13 Thread Edi

Hello Carl-Eric,

It's working now. Thank you so much for your kind reply.

Not working code is :

Label msgLabel = new Label("msg", messageModel);
add(msgLabel);


Working Code is:

Label msgLabel = new Label("msg", messageModel);  
msgLabel.setEscapeModelStrings(false); // Newly added Line  
add(msgLabel);

Regards,
Edi


Carl-Eric Menzel-4 wrote:
> 
> I think (didn't test it) that should work when you call
> setEscapeModelStrings(false) on the label.
> 
> 
> 
> From: [EMAIL PROTECTED] on behalf of Edi
> Sent: Wed 6/13/2007 14:43
> To: wicket-user@lists.sourceforge.net
> Subject: Re: [Wicket-user] How to create Dynamic Label?
> 
> 
> 
> 
> Initially I have assigned one text in textbox like 
> But I have checked in view page source html, it looks like 
> 
> 
> I need to display .
> 
> Please explain.
> 
> 
> Carl-Eric Menzel-4 wrote:
>>
>> Simply give them both the same Model instance. To have it updated while
>> typing, give the textfield an ajax updating behavior and repaint the
>> label.
>> 
>> Carl-Eric
>>
>> 
>>
>> From: [EMAIL PROTECTED] on behalf of Edi
>> Sent: Wed 6/13/2007 09:05
>> To: wicket-user@lists.sourceforge.net
>> Subject: [Wicket-user] How to create Dynamic Label?
>>
>>
>>
>>
>> Hello Experts,
>>
>> I have one Label, and Text Box. If I enter any text in textbox, then it
>> should be displayed in Label. How?
>>
>> Please explain. (I am newbie.)
>>
>> Thanking You.
>>
>>
>>
>> -
>> This SF.net email is sponsored by DB2 Express
>> Download DB2 Express C - the FREE version of DB2 express and take
>> control of your XML. No limits. Just data. Click to get it now.
>> http://sourceforge.net/powerbar/db2/
>> ___
>> Wicket-user mailing list
>> Wicket-user@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/wicket-user
>>
>>
> 
> --
> View this message in context:
> http://www.nabble.com/How-to-create-Dynamic-Label--tf3912921.html#a11098554
> Sent from the Wicket - User mailing list archive at Nabble.com.
> 
> 
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> 
> 
> 
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-create-Dynamic-Label--tf3912921.html#a4100
Sent from the Wicket - User mailing list archive at Nabble.com.


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


Re: [Wicket-user] AjaxFormComponentUpdatingBehavior for DropDownChoice not working in IE

2007-06-13 Thread Javed


Thanks for Reply.
Sorry, I didnt understand term "Ajax debug"
What I did or rather saw is, In FireFox when I make selection in drop down
the image changes. if I see the properties of this image then it shows
correct name of that image.
But in case of IE, I am not getting image name.
I found one more thing, When I select any item from drop down in IE
"onUpdate" method doesnt call. 
Javascript code written on "onchange" for both browser is same.
Hope, this will help u to figure out the exact problem.




Johan Compagner wrote:
> 
> what do you see in the ajax debug when you get the results?  are you
> really seeing a different url in the src?
> 
> On 6/12/07, Javed <[EMAIL PROTECTED]> wrote:
>>
>> Follwing code snippet adds dropdown.
>>
>> private DropDownChoice getDropDown1(final Label image){
>> DropDownChoice dropDown1 = new DropDownChoice("selectUser",new
>> PropertyModel(model,"user1"),Arrays.asList(options),choiceRenderer);
>>
>> favsDropDown.add(new
>> AjaxFormComponentUpdatingBehavior("onchange"){
>>
>> /**
>>  * When Specified event took place this method gets called
>>  * @param target
>>  */
>> @Override
>> protected void onUpdate(AjaxRequestTarget target) {
>> String imageUrl = null;
>> String user = model.getUser1(); // selected user object
>> from
>> drop down
>> imageUrl = getImage(user);
>> imageUrl = imageUrl == null? "" : imageUrl;
>> model.setImageUrl(imageUrl); // sets new image model
>> image.add(new AttributeModifier("src",new
>> PropertyModel(model,"imageUrl"))); // sets image src
>> target.addComponent(image);
>> }
>>
>> });
>>
>> return dropDown1;
>> }
>>
>> When dropdown selection changes I need to modify image related to it.
>>
>>
>>
>> Frank Bille wrote:
>> >
>> > Hi
>> >
>> > I haven't got experience with that error. Can you please post the code
>> > that
>> > is not working?
>> >
>> > Frank
>> >
>> >
>> > On 6/11/07, Javed <[EMAIL PROTECTED]> wrote:
>> >>
>> >>
>> >> I need to change image according the selection made in dropdown.
>> >> It is working fine Firefox but not in IE
>> >>
>> >> I tried it with "onchange" and "onclick". It worked in Firefox but
>> some
>> >> how
>> >> it is not working IE.
>> >>
>> >> Is there anything I am missing?
>> >> Is there any other approach to achieve the same functionality with
>> Ajax
>> >> effect?
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/AjaxFormComponentUpdatingBehavior-for-DropDownChoice-not-working-in-IE-tf3901202.html#a11059387
>> >> Sent from the Wicket - User mailing list archive at Nabble.com.
>> >>
>> >>
>> >>
>> -
>> >> This SF.net email is sponsored by DB2 Express
>> >> Download DB2 Express C - the FREE version of DB2 express and take
>> >> control of your XML. No limits. Just data. Click to get it now.
>> >> http://sourceforge.net/powerbar/db2/
>> >> ___
>> >> Wicket-user mailing list
>> >> Wicket-user@lists.sourceforge.net
>> >> https://lists.sourceforge.net/lists/listinfo/wicket-user
>> >>
>> >
>> >
>> -
>> > This SF.net email is sponsored by DB2 Express
>> > Download DB2 Express C - the FREE version of DB2 express and take
>> > control of your XML. No limits. Just data. Click to get it now.
>> > http://sourceforge.net/powerbar/db2/
>> > ___
>> > Wicket-user mailing list
>> > Wicket-user@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/wicket-user
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/AjaxFormComponentUpdatingBehavior-for-DropDownChoice-not-working-in-IE-tf3901202.html#a11075468
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>> This SF.net email is sponsored by DB2 Express
>> Download DB2 Express C - the FREE version of DB2 express and take
>> control of your XML. No limits. Just data. Click to get it now.
>> http://sourceforge.net/powerbar/db2/
>> ___
>> Wicket-user mailing list
>> Wicket-user@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/wicket-user
>>
> 
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> 
>

Re: [Wicket-user] noob question about wicket

2007-06-13 Thread Eelco Hillenius
> the default behavior is for a session to be temporary? that doesnt make
> sense.

It is Wicket trying to be as efficient as possible. I understand the
confusion, but think of it: you would typically only want a persistent
session when you actually do something with it (like setting the
user).

An easy solutation in your case would be to call #bind in your custom
session's constructor. Can you try that and let us know whether that
helped?

> this maybe another reason. i have my login code (basically everything you've
> seen) in an abstract BasePage class. I then call Index which extends
> BasePage. would that have anything to do with anything?

I don't know. Why did you decide to put that loging code in that base
class? Did you take a look at the wicket-auth-roles project (an
example of how you can do authorization in a nicer way than e.g. the
library example does it)?

Eelco

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


Re: [Wicket-user] noob question about wicket

2007-06-13 Thread Eelco Hillenius
> 20:06:14,806 INFO  [STDOUT] loggedOut - isVisible? true
> 20:06:14,806 INFO  [STDOUT] loggedIn - isVisible? false
> 20:06:14,810 INFO  [STDOUT] loggedOut - isVisible? true
> 20:06:14,810 INFO  [STDOUT] loggedOut - isVisible? true
> 20:06:14,811 INFO  [STDOUT] loggedOut - isVisible? true
> 20:06:14,811 INFO  [STDOUT] loggedIn - isVisible? false
> 20:06:14,813 INFO  [STDOUT] loggedIn - isVisible? false
> 20:06:14,814 INFO  [STDOUT] loggedOut - isVisible? true
> 20:06:14,814 INFO  [STDOUT] loggedOut - isVisible? true
> 20:06:14,815 INFO  [STDOUT] loggedOut - isVisible? true
> 20:06:14,815 INFO  [STDOUT] loggedOut - isVisible? true
> 20:06:14,816 INFO  [STDOUT] loggedIn - isVisible? false

It is typically way more efficient to use a debugger if you want to
find out how/ when/ where/ why things happen. Here, rather than
putting in those log statements, you could just set a break point on
your isVisible implementation - and don't forget to start up in
debugging mode ;) And while you're at it, be sure to attach the Wicket
sources to your project dependencies, so that you can step into the
Wicket code as well. This may be a bit intimidating at the start, but
it's a great way to learn about the framework and I hope coding in
general :)

Cheers,

Eelco

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


Re: [Wicket-user] noob question about wicket

2007-06-13 Thread verbal evasion

the default behavior is for a session to be temporary? that doesnt make
sense.

this maybe another reason. i have my login code (basically everything you've
seen) in an abstract BasePage class. I then call Index which extends
BasePage. would that have anything to do with anything?

thanks,

verbal

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


> Speaking of logging, I want to use log4j, but i cant because it doesnt
> implement serializable.

Either make the log instance it a static variable (statics don't get
serialized) or get it on the fly (every time you need it but don't
keep a reference).

> secondly,  session.get().info("message"); doesnt
> seem to print anything. i have to resort to System.out's. I made the
logger
> transient so that "solved" that problem, but it doesnt print anything to
the
> screen.

Session#info and Component#info (and #error etc) are for a different
purpose. We call those things feedback messages, and they are intended
for communicating with end-users, for instance reporting validation
errors on a form submit. If you put a FeedbackPanel in your page, you
will see those messages.

> i have turned on debugging for wicket.Session in log4j, but all it
prints is
> information about pages being dirty or not.
>
> any other debugging i can use or turn on?

Not anything that will help you. Component#isVisible can indeed be
called more than once in a request; not only when it renders, but also
for instance when behaviors query it. I guess the documentation can
use some improvement (I added a warning).

It is possible that your page is stateless and your session is
temporary (meaning that it isn't bound to e.g. the HttpSession yet,
and that you'll get a new volatile instance every request). You can
query that by calling session#isTemporary. If it is, and you want to
explicitly make the session persistent, you can call session#bind. See
the JavaDocs for details.

Maybe we shouldn't automagically mark pages as stateless... but I'll
post about that in another thread.

Eelco

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

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


Re: [Wicket-user] noob question about wicket

2007-06-13 Thread Timo Rantalaiho
On Wed, 13 Jun 2007, verbal evasion wrote:
> i have turned on debugging for wicket.Session in log4j, but all it prints is
> information about pages being dirty or not.
> 
> any other debugging i can use or turn on?

Be sure to turn on debugging also for your own code to get
log messages from there.

I also like using the debugger of the IDE sometimes, like
that you can easily see whether some method gets called and
what's the state of the components and variables run-time. 
It works best if you are running just a little code at a
time, e.g. a WicketTester test.

- Timo

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

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


Re: [Wicket-user] noob question about wicket

2007-06-13 Thread Eelco Hillenius
> Speaking of logging, I want to use log4j, but i cant because it doesnt
> implement serializable.

Either make the log instance it a static variable (statics don't get
serialized) or get it on the fly (every time you need it but don't
keep a reference).

> secondly,  session.get().info("message"); doesnt
> seem to print anything. i have to resort to System.out's. I made the logger
> transient so that "solved" that problem, but it doesnt print anything to the
> screen.

Session#info and Component#info (and #error etc) are for a different
purpose. We call those things feedback messages, and they are intended
for communicating with end-users, for instance reporting validation
errors on a form submit. If you put a FeedbackPanel in your page, you
will see those messages.

> i have turned on debugging for wicket.Session in log4j, but all it prints is
> information about pages being dirty or not.
>
> any other debugging i can use or turn on?

Not anything that will help you. Component#isVisible can indeed be
called more than once in a request; not only when it renders, but also
for instance when behaviors query it. I guess the documentation can
use some improvement (I added a warning).

It is possible that your page is stateless and your session is
temporary (meaning that it isn't bound to e.g. the HttpSession yet,
and that you'll get a new volatile instance every request). You can
query that by calling session#isTemporary. If it is, and you want to
explicitly make the session persistent, you can call session#bind. See
the JavaDocs for details.

Maybe we shouldn't automagically mark pages as stateless... but I'll
post about that in another thread.

Eelco

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


Re: [Wicket-user] noob question about wicket

2007-06-13 Thread verbal evasion

Timo,

Speaking of logging, I want to use log4j, but i cant because it doesnt
implement serializable. secondly,  session.get().info("message"); doesnt
seem to print anything. i have to resort to System.out's. I made the logger
transient so that "solved" that problem, but it doesnt print anything to the
screen.

i have turned on debugging for wicket.Session in log4j, but all it prints is
information about pages being dirty or not.

any other debugging i can use or turn on?

thanks,

verbal

On 6/13/07, Timo Rantalaiho <[EMAIL PROTECTED]> wrote:


On Wed, 13 Jun 2007, verbal evasion wrote:
> yeah i got it to work. it wasnt the code, it was some maven weirdness
that
> was going on. i have a few more questions. currently, when i login, my
> authentication mechanism tells me that i have successfully logged in,
but it
> seems like the session information is not stored?? i have a print in my
> isVisible checks and it always says that the user variable is null. i
may be
> returning the incorrect ResponsePage?

Login should output some logging information, which wasn't
shown in the output you posted. Are you sure it's being run?

Also you could log setting and getting the user in your
Session.

> this is for *one* successful login attempt. why is the constructor run
so
> many times?  also, the output is wrong. what should i be returning as
the
> setResponsePage from the onSubmit?

It's not any constructor, they are the isVisible methods of
your loggedin / loggedout components. I too have noticed
that isVisible() gets called several times per request, but
I suppose it has its reasons.

- Timo

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

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

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


Re: [Wicket-user] noob question about wicket

2007-06-13 Thread Timo Rantalaiho
On Wed, 13 Jun 2007, verbal evasion wrote:
> yeah i got it to work. it wasnt the code, it was some maven weirdness that
> was going on. i have a few more questions. currently, when i login, my
> authentication mechanism tells me that i have successfully logged in, but it
> seems like the session information is not stored?? i have a print in my
> isVisible checks and it always says that the user variable is null. i may be
> returning the incorrect ResponsePage?

Login should output some logging information, which wasn't 
shown in the output you posted. Are you sure it's being run?

Also you could log setting and getting the user in your 
Session.

> this is for *one* successful login attempt. why is the constructor run so
> many times?  also, the output is wrong. what should i be returning as the
> setResponsePage from the onSubmit?

It's not any constructor, they are the isVisible methods of
your loggedin / loggedout components. I too have noticed 
that isVisible() gets called several times per request, but
I suppose it has its reasons.

- Timo

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

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


Re: [Wicket-user] Problems Updating a ListView with Ajax

2007-06-13 Thread Timo Rantalaiho
On Wed, 13 Jun 2007, Matthew R Hanlon wrote:
> The problem I am having is that the first item that is added works fine,
> and the item is added to the list.  However, any subsequent adds fail
> with the following AJAX debug information:

You might want to
- log or debug what's happening on your ajax event handlers 
  on the successful and failed attempts
- show your java code as well

Also, which Wicket version are you using?

- Timo

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

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


Re: [Wicket-user] noob question about wicket

2007-06-13 Thread verbal evasion

yeah i got it to work. it wasnt the code, it was some maven weirdness that
was going on. i have a few more questions. currently, when i login, my
authentication mechanism tells me that i have successfully logged in, but it
seems like the session information is not stored?? i have a print in my
isVisible checks and it always says that the user variable is null. i may be
returning the incorrect ResponsePage?

// in constructor
WebMarkupContainer loggedOut = new WebMarkupContainer("loggedOut") {
   public boolean isVisible() {
   boolean rv;
   rv = ((CSSession) getSession()).getUser() == null;
   System.out.println("loggedOut - isVisible? " + rv);
   return rv;
   }
   };
...
   WebMarkupContainer loggedIn = new WebMarkupContainer("loggedIn") {
   public boolean isVisible() {
   boolean rv;
   rv = ((CSSession) getSession()).getUser() != null;
   System.out.println("loggedIn - isVisible? " + rv);

   return rv;
   }
   };
// In submit form
   public void onSubmit() {
   String userId = getUserId();
   String password = getPassword();

   User loggedInUser = null;

   try {
   loggedInUser = UserImpl.authenticate(userId, password);
   // Components can access the Session through getSession()
   CSSession session = (CSSession) getSession();

   session.setUser(loggedInUser);
   System.out.println("Logged in as " + userId);
   logger.debug("Logged in as " + userId);
   //session.get().info("Logged in as " + userId);

   //Index indexPage = new Index(userId, BasePage.this);
   //setResponsePage(indexPage);
   setResponsePage(new Index());
   } catch (AuthenticationException ae) {
   String errMsg = getLocalizer().getString(
   "login.errors.invalidCredentials", this);
   // Register this message with the form component.
   error(errMsg);
   }
   }

when i keep logging in, it'll say the following:

20:06:14,806 INFO  [STDOUT] loggedOut - isVisible? true
20:06:14,806 INFO  [STDOUT] loggedIn - isVisible? false
20:06:14,810 INFO  [STDOUT] loggedOut - isVisible? true
20:06:14,810 INFO  [STDOUT] loggedOut - isVisible? true
20:06:14,811 INFO  [STDOUT] loggedOut - isVisible? true
20:06:14,811 INFO  [STDOUT] loggedIn - isVisible? false
20:06:14,813 INFO  [STDOUT] loggedIn - isVisible? false
20:06:14,814 INFO  [STDOUT] loggedOut - isVisible? true
20:06:14,814 INFO  [STDOUT] loggedOut - isVisible? true
20:06:14,815 INFO  [STDOUT] loggedOut - isVisible? true
20:06:14,815 INFO  [STDOUT] loggedOut - isVisible? true
20:06:14,816 INFO  [STDOUT] loggedIn - isVisible? false

this is for *one* successful login attempt. why is the constructor run so
many times?  also, the output is wrong. what should i be returning as the
setResponsePage from the onSubmit?

thanks,

verbal




On 6/13/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:


the form is added to loggedout container, also notice that the form tag is
inside a div wicket:id="loggedout" so it matches the java hierarchy.

-igor


On 6/13/07, verbal evasion <[EMAIL PROTECTED]> wrote:
>
> i tried implementing what you had put and i am stuck because "loggedin"
> and "form" are both in the highest scope of the websitem but in the java
> code, you have the "form" added to the "loggedin" WeMarkupContainer. that
> doesnt seem to fly with wicket unless i'm doing something wrong. i tried to
> take out the html for the login form, but that just doesnt make sense
> because there will be no corresponding html to describe what should be in
> the webcontainer.
>
> this is my code snippet. thanks in advance.
>
> /*
>  * loggedOut - username and password
>  */
> WebMarkupContainer loggedOut = new
> WebMarkupContainer("loggedOut") {
> public boolean isVisible() {
> return ((CSSession) getSession()).getUser() == null;
> }
> };
> TextField userIdField = new TextField("userId",
> new PropertyModel(this, "userId"));
> PasswordTextField passField = new PasswordTextField("password",
> new PropertyModel(this, "password"));
> Form form = new LoginForm("loginForm");
>
> add(loggedOut);
> loggedOut.add(form);
> form.add(userIdField);
> form.add(passField);
>
> /*
>  * loggedIn - username
>  */
> WebMarkupContainer loggedIn = new WebMarkupContainer("loggedIn")
> {
> public boolean isVisible() {
> return ((CSSession) getSession()).getUser() != null;
> }
> };
> Label userLabel = new Label("userLabel",
> new PropertyModel(this, "userId"));
>
> add(loggedIn);
> loggedIn.add(userLabel

Re: [Wicket-user] noob question about wicket

2007-06-13 Thread Igor Vaynberg

the form is added to loggedout container, also notice that the form tag is
inside a div wicket:id="loggedout" so it matches the java hierarchy.

-igor


On 6/13/07, verbal evasion <[EMAIL PROTECTED]> wrote:


i tried implementing what you had put and i am stuck because "loggedin"
and "form" are both in the highest scope of the websitem but in the java
code, you have the "form" added to the "loggedin" WeMarkupContainer. that
doesnt seem to fly with wicket unless i'm doing something wrong. i tried to
take out the html for the login form, but that just doesnt make sense
because there will be no corresponding html to describe what should be in
the webcontainer.

this is my code snippet. thanks in advance.

/*
 * loggedOut - username and password
 */
WebMarkupContainer loggedOut = new WebMarkupContainer("loggedOut")
{
public boolean isVisible() {
return ((CSSession) getSession()).getUser() == null;
}
};
TextField userIdField = new TextField("userId",
new PropertyModel(this, "userId"));
PasswordTextField passField = new PasswordTextField("password",
new PropertyModel(this, "password"));
Form form = new LoginForm("loginForm");

add(loggedOut);
loggedOut.add(form);
form.add(userIdField);
form.add(passField);

/*
 * loggedIn - username
 */
WebMarkupContainer loggedIn = new WebMarkupContainer("loggedIn") {
public boolean isVisible() {
return ((CSSession) getSession()).getUser() != null;
}
};
Label userLabel = new Label("userLabel",
new PropertyModel(this, "userId"));

add(loggedIn);
loggedIn.add(userLabel);

...






User Name
Password 




On 6/12/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
>
> > 
> > 
> > 
> >  > wicket:id="form">...
> > ...
> >
> > MyPage() {
> >   add(new WebMarkupContainer("loggedin", new
> > PropertyModel(this,"session.user.username")) {
> >public boolean isvisible() { return
> > ((MySession)getSession()).getUser()!=null; }
> >}
> >
> >   WebMarkupContainer loggedout=new WebMarkupContainer("loggedout") {
> >public boolean isvisible() { return
> > ((MySession)getSession()).getUser()==null; }
> > }
> >  add(loggedout);
> >  loggedout.add(new Form("form")
>
>
> That's the first option. The advantage is that it is generally easier
> to see what you have on your page. The other option - like shown in
> the templates example - is a bit cheaper memory wise, as you only add
> what you need.
>
> Eelco
>
>
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>


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


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


[Wicket-user] Help: modalwindow question

2007-06-13 Thread Crag
An open modalwindow, when the form had been submmitted, I want to refresh 
parent window , and close current window, how to do ?

the simple code:


 
 
  
   

 
  
 


 
  
 

   
  
 



public class EditModal extends WebPage {
 private static final long serialVersionUID = 1L;

 public Tree0EditModal(final ModalWindowPage modalWindowPage, IModel model) 
{

  final NodeForm form = new NodeForm("nodeForm", model);

  Button btnEdit = new Button("edit") {
   protected void onSubmit( ) {
System.out.println("submit...");
// now I want to refresh parent window(modalWindowPage), and close 
current window(EditModal), how to do ?
//ModalWindow.close(target);
   }
  };

  form.add(btnEdit);
  TextField name = new TextField("name");

  form.add(name);

  add(form);
 }

 class NodeForm extends Form {
  private static final long serialVersionUID = 1L;

  public NodeForm(String id, IModel model) {
   super(id, model);
  }
 }
} 




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


Re: [Wicket-user] AjaxLink not updating Image

2007-06-13 Thread Jeremy Levy

Yes, thats seems to be the case, if I call getModel().toString() right after
it prints out the updated value but the Debug output still has the old/wrong
value.

Jeremy

On 6/13/07, Johan Compagner <[EMAIL PROTECTED]> wrote:


so the problem is that in the ajax request you still send the initial
image? so it seems that set model on the nci has no effect at all?

On 6/13/07, Jeremy Levy <[EMAIL PROTECTED]> wrote:
> I have an AjaxLink link that I am trying to use to update an image, in
the
> onClick method I am replacing the Model of the image to the new path,
> however it's not working.  I've tried it with Image and NonCachingImage,
and
> also turned off Caching in FireFox.  I'm not sure but the XML being sent
> doesn't look correct. I'm using 1.2.5.  Here are the relevant code
snipits:
>
>
> ...
> final NonCachingImage warningImage = new
> NonCachingImage("warningImage", new Model("images/alert_orange.png"));
> warningImage.setOutputMarkupId(true);
> add(warningImage);
> ...
>
>   final AjaxLink link = new AjaxLink("theLink") {
> public void onClick(AjaxRequestTarget ajaxRequestTarget) {
> log.debug("Link Clicked...");
>
> warningImage.setModel(new
Model("images/alert_green.png"));
> ajaxRequestTarget.addComponent(warningImage);
>}
> };
> add(link);
>
> >From the AJAX Console:
>
> INFO:
> INFO: Initiating Ajax GET request on
>
/1/meetmoi?x=YuQ6ay6aKBGDiO5OfiMmT7sqTYDzw7kvj2TxXBaK1HxBbP9XAjorn1Zpm4EovOnWCZVHg*4WCL-uPukV*-Oz2CeAsvJdoPkh&wicket:behaviorId=0&random=
0.337860019529019
> INFO: Invoking pre-call handler(s)...
> INFO: Received ajax response (388 characters)
> INFO:
>  id="notYetActive_repeatingAlerts_1_aAlert_warningImage" >
> INFO: Response parsed. Now invoking steps...
> INFO: Response processed successfully.
> INFO: Invoking post-call handler(s)...
>
>
> Thanks.
>

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

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


Re: [Wicket-user] noob question about wicket

2007-06-13 Thread verbal evasion

i tried implementing what you had put and i am stuck because "loggedin" and
"form" are both in the highest scope of the websitem but in the java code,
you have the "form" added to the "loggedin" WeMarkupContainer. that doesnt
seem to fly with wicket unless i'm doing something wrong. i tried to take
out the html for the login form, but that just doesnt make sense because
there will be no corresponding html to describe what should be in the
webcontainer.

this is my code snippet. thanks in advance.

   /*
* loggedOut - username and password
*/
   WebMarkupContainer loggedOut = new WebMarkupContainer("loggedOut") {
   public boolean isVisible() {
   return ((CSSession) getSession()).getUser() == null;
   }
   };
   TextField userIdField = new TextField("userId",
   new PropertyModel(this, "userId"));
   PasswordTextField passField = new PasswordTextField("password",
   new PropertyModel(this, "password"));
   Form form = new LoginForm("loginForm");

   add(loggedOut);
   loggedOut.add(form);
   form.add(userIdField);
   form.add(passField);

   /*
* loggedIn - username
*/
   WebMarkupContainer loggedIn = new WebMarkupContainer("loggedIn") {
   public boolean isVisible() {
   return ((CSSession) getSession()).getUser() != null;
   }
   };
   Label userLabel = new Label("userLabel",
   new PropertyModel(this, "userId"));

   add(loggedIn);
   loggedIn.add(userLabel);

...

   
   
   
   
   
   User Name
   Password 
   
   
   

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


> 
> 
> 
>  wicket:id="form">...
> ...
>
> MyPage() {
>   add(new WebMarkupContainer("loggedin", new
> PropertyModel(this,"session.user.username")) {
>public boolean isvisible() { return
> ((MySession)getSession()).getUser()!=null; }
>}
>
>   WebMarkupContainer loggedout=new WebMarkupContainer("loggedout") {
>public boolean isvisible() { return
> ((MySession)getSession()).getUser()==null; }
> }
>  add(loggedout);
>  loggedout.add(new Form("form")


That's the first option. The advantage is that it is generally easier
to see what you have on your page. The other option - like shown in
the templates example - is a bit cheaper memory wise, as you only add
what you need.

Eelco

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

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


Re: [Wicket-user] noob question about wicket

2007-06-13 Thread Eelco Hillenius
It's the org.apache.wicket.examples.template package in Wicket
examples. You can best just look at the code, but a live example is at
http://wicketstuff.org/wicket13/template/.

Eelco

On 6/13/07, verbal evasion <[EMAIL PROTECTED]> wrote:
> eelco,
>
> are these templates on the wicket page? or the wiki? i cant seem to locate
> them.
>
> thanks,
>
> verbal
>
> On 6/12/07, Eelco Hillenius < [EMAIL PROTECTED]> wrote:
> >
> > > 
> > > 
> > > 
> > >  > > wicket:id="form">...
> > > ...
> > >
> > > MyPage() {
> > >   add(new WebMarkupContainer("loggedin", new
> > > PropertyModel(this,"session.user.username")) {
> > >public boolean isvisible() { return
> > > ((MySession)getSession()).getUser()!=null; }
> > >}
> > >
> > >   WebMarkupContainer loggedout=new WebMarkupContainer("loggedout") {
> > >public boolean isvisible() { return
> > > ((MySession)getSession()).getUser()==null; }
> > > }
> > >  add(loggedout);
> > >  loggedout.add(new Form("form")
> >
> >
> > That's the first option. The advantage is that it is generally easier
> > to see what you have on your page. The other option - like shown in
> > the templates example - is a bit cheaper memory wise, as you only add
> > what you need.
> >
> > Eelco
> >
> >
> -
> > This SF.net email is sponsored by DB2 Express
> > Download DB2 Express C - the FREE version of DB2 express and take
> > control of your XML. No limits. Just data. Click to get it now.
> > http://sourceforge.net/powerbar/db2/
> > ___
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
>
>
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>

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


Re: [Wicket-user] noob question about wicket

2007-06-13 Thread verbal evasion

eelco,

are these templates on the wicket page? or the wiki? i cant seem to locate
them.

thanks,

verbal

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


> 
> 
> 
>  wicket:id="form">...
> ...
>
> MyPage() {
>   add(new WebMarkupContainer("loggedin", new
> PropertyModel(this,"session.user.username")) {
>public boolean isvisible() { return
> ((MySession)getSession()).getUser()!=null; }
>}
>
>   WebMarkupContainer loggedout=new WebMarkupContainer("loggedout") {
>public boolean isvisible() { return
> ((MySession)getSession()).getUser()==null; }
> }
>  add(loggedout);
>  loggedout.add(new Form("form")


That's the first option. The advantage is that it is generally easier
to see what you have on your page. The other option - like shown in
the templates example - is a bit cheaper memory wise, as you only add
what you need.

Eelco

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

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


[Wicket-user] Problems Updating a ListView with Ajax

2007-06-13 Thread Matthew R Hanlon
Greetings.

I am trying to update a ListView dynamically with AJAX.  I have a
WebMarkupContainer that holds the ListView.  I have another
WebMarkupContainer that holds an AjaxFallbackLink (add button) and a
WebMarkupContainer (list item form) that holds the fields for a list
item and a AjaxFallBackLink (submit button).  I have been looking at the
ToDo List example in the Wicket-Library and have roughly followed what's
going on there.  The add button toggles on the list item form and hides
itself.  Then, the submit button adds the list item to the list that is
displayed in the ListView and hides the form and redisplays the add
button.

The problem I am having is that the first item that is added works fine,
and the item is added to the list.  However, any subsequent adds fail
with the following AJAX debug information:

INFO: Initiating Ajax GET request
on 
/SIMIS/app?wicket:interface=:3:editReportForm:addParameterContainer:addParameterForm:saveParameter::IBehaviorListener&wicket:behaviorId=0&random=0.35076995256166854
 
INFO: Invoking pre-call handler(s)... 
INFO: Received ajax response (53 characters)
INFO:   
ERROR: Error while parsing response: Could not find root 
element  
INFO: Invoking post-call handler(s)...  
INFO: Invoking failure handler(s)...

If it didn't work at all it would make more sense, but that it works to
add the first item and not subsequent items is strange.  If I comment
out the line of code in the onClick method of the "saveParameter"
AjaxFallbackLink where I call target.addComponent(parameterList) which
should update the ListView, the addParameterContainer behaves correctly.

Here is the associated markup:


  

  
  

param name
description
type
data type
  


  
  


  

  
  




  

  


Thanks ahead of time for any help.
   
-- 
Matthew R Hanlon <[EMAIL PROTECTED]>
Alliance Communications Management


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


Re: [Wicket-user] Form submit and RestartResponseAtInterceptPageException

2007-06-13 Thread Andrew Berman

Actually, I did something much easier, I just created a page which all it
does is redirect to the page I wanted my form to redirect to and changed the
form responsePage to the redirect page.  Works perfectly.  For now, I'm
going to go with this since it's dirt simple and took all of 1 minute to do.

On 6/13/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:


no, you can just do what it does. look at the code, it doesnt do anything
special.

-igor


On 6/13/07, Andrew Berman < [EMAIL PROTECTED]> wrote:
>
> So are you also saying I have to write my own PageMap class for the
> continueToOriginalDestination?
>
> On 6/13/07, Igor Vaynberg < [EMAIL PROTECTED]> wrote:
> >
> > you would basically have to rewrite this functionality.
> >
> > create your own restartresponse flavor exception and throw post params
> > into session. then create your own continuetooriginaldestination()
> >
> > -igor
> >
> >
> > On 6/13/07, Andrew Berman < [EMAIL PROTECTED]> wrote:
> > >
> > > Is there some workaround I can do?  I'm not on 1.3, I'm on 1.2.6.  I
> > > gotta get this to work, I really cannot wait on a new release or fix at 
this
> > > point.
> > >
> > > On 6/13/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> > > >
> > > > its actually correct. he wants to resume form-processing because
> > > > his page _submits_ to a page that requires login. right now
> > > > restartresponseatinterceptpage remembers the url and does a get on that 
url.
> > > > it looks like we might have to remember the url/the request type/and 
post
> > > > parameters as well, and then instead of doing a get on the return url we
> > > > might have to do a post.
> > > >
> > > > dont think we have that yet, so please add an rfe.
> > > >
> > > > -igor
> > > >
> > > >
> > > > On 6/13/07, Eelco Hillenius < [EMAIL PROTECTED]> wrote:
> > > > >
> > > > > It shouldn't. Certainly not in 1.3. Are you sure you didn't
> > > > > overlook something?
> > > > >
> > > > > Eelco
> > > > >
> > > > > On 6/13/07, Andrew Berman <[EMAIL PROTECTED]> wrote:
> > > > > > I've seen posts on this before but never a solution.  I have a
> > > > > form which
> > > > > > submits to a page which requires login.  As a result, I throw
> > > > > a
> > > > > > RestartResponseAtInterceptPageException which takes the
> > > > > > user to a login screen.  Once done with the login screen it's
> > > > > supposed to go
> > > > > > to the page the form submit sent the user to.  The problem is
> > > > > that it goes
> > > > > > back to the form page instead.  Is there any solution to this
> > > > > problem?
> > > > > >
> > > > > > Thanks.
> > > > > >
> > > > > >
> > > > > 
-
> > > > > > This SF.net email is sponsored by DB2 Express
> > > > > > Download DB2 Express C - the FREE version of DB2 express and
> > > > > take
> > > > > > control of your XML. No limits. Just data. Click to get it
> > > > > now.
> > > > > > http://sourceforge.net/powerbar/db2/
> > > > > > ___
> > > > > > Wicket-user mailing list
> > > > > > Wicket-user@lists.sourceforge.net
> > > > > > https://lists.sourceforge.net/lists/listinfo/wicket-user
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > > 
-
> > > > > This SF.net email is sponsored by DB2 Express
> > > > > Download DB2 Express C - the FREE version of DB2 express and
> > > > > take
> > > > > control of your XML. No limits. Just data. Click to get it now.
> > > > > http://sourceforge.net/powerbar/db2/
> > > > > ___
> > > > > Wicket-user mailing list
> > > > > Wicket-user@lists.sourceforge.net
> > > > > https://lists.sourceforge.net/lists/listinfo/wicket-user
> > > > >
> > > >
> > > >
> > > >
> > > > 
-
> > > > This SF.net email is sponsored by DB2 Express
> > > > Download DB2 Express C - the FREE version of DB2 express and take
> > > > control of your XML. No limits. Just data. Click to get it now.
> > > > http://sourceforge.net/powerbar/db2/
> > > > ___
> > > > Wicket-user mailing list
> > > > Wicket-user@lists.sourceforge.net
> > > > https://lists.sourceforge.net/lists/listinfo/wicket-user
> > > >
> > > >
> > >
> > >
> > > -
> > > This SF.net email is sponsored by DB2 Express
> > > Download DB2 Express C - the FREE version of DB2 express and take
> > > control of your XML. No limits. Just data. Click to get it now.
> > > http://sourceforge.net/powerbar/db2/
> > > ___
> > > Wicket-user mailing list
> > > Wicket-user@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/wicket-user
> > >
> > >
> >
> >
> > -
> > This SF.net email is spo

Re: [Wicket-user] Form submit and RestartResponseAtInterceptPageException

2007-06-13 Thread Igor Vaynberg

no, you can just do what it does. look at the code, it doesnt do anything
special.

-igor


On 6/13/07, Andrew Berman <[EMAIL PROTECTED]> wrote:


So are you also saying I have to write my own PageMap class for the
continueToOriginalDestination?

On 6/13/07, Igor Vaynberg < [EMAIL PROTECTED]> wrote:
>
> you would basically have to rewrite this functionality.
>
> create your own restartresponse flavor exception and throw post params
> into session. then create your own continuetooriginaldestination()
>
> -igor
>
>
> On 6/13/07, Andrew Berman < [EMAIL PROTECTED]> wrote:
> >
> > Is there some workaround I can do?  I'm not on 1.3, I'm on 1.2.6.  I
> > gotta get this to work, I really cannot wait on a new release or fix at this
> > point.
> >
> > On 6/13/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> > >
> > > its actually correct. he wants to resume form-processing because his
> > > page _submits_ to a page that requires login. right now
> > > restartresponseatinterceptpage remembers the url and does a get on that 
url.
> > > it looks like we might have to remember the url/the request type/and post
> > > parameters as well, and then instead of doing a get on the return url we
> > > might have to do a post.
> > >
> > > dont think we have that yet, so please add an rfe.
> > >
> > > -igor
> > >
> > >
> > > On 6/13/07, Eelco Hillenius < [EMAIL PROTECTED]> wrote:
> > > >
> > > > It shouldn't. Certainly not in 1.3. Are you sure you didn't
> > > > overlook something?
> > > >
> > > > Eelco
> > > >
> > > > On 6/13/07, Andrew Berman <[EMAIL PROTECTED]> wrote:
> > > > > I've seen posts on this before but never a solution.  I have a
> > > > form which
> > > > > submits to a page which requires login.  As a result, I throw a
> > > > > RestartResponseAtInterceptPageException which takes the
> > > > > user to a login screen.  Once done with the login screen it's
> > > > supposed to go
> > > > > to the page the form submit sent the user to.  The problem is
> > > > that it goes
> > > > > back to the form page instead.  Is there any solution to this
> > > > problem?
> > > > >
> > > > > Thanks.
> > > > >
> > > > >
> > > > 
-
> > > > > This SF.net email is sponsored by DB2 Express
> > > > > Download DB2 Express C - the FREE version of DB2 express and
> > > > take
> > > > > control of your XML. No limits. Just data. Click to get it now.
> > > > > http://sourceforge.net/powerbar/db2/
> > > > > ___
> > > > > Wicket-user mailing list
> > > > > Wicket-user@lists.sourceforge.net
> > > > > https://lists.sourceforge.net/lists/listinfo/wicket-user
> > > > >
> > > > >
> > > >
> > > >
> > > > 
-
> > > > This SF.net email is sponsored by DB2 Express
> > > > Download DB2 Express C - the FREE version of DB2 express and take
> > > > control of your XML. No limits. Just data. Click to get it now.
> > > > http://sourceforge.net/powerbar/db2/
> > > > ___
> > > > Wicket-user mailing list
> > > > Wicket-user@lists.sourceforge.net
> > > > https://lists.sourceforge.net/lists/listinfo/wicket-user
> > > >
> > >
> > >
> > >
> > > -
> > > This SF.net email is sponsored by DB2 Express
> > > Download DB2 Express C - the FREE version of DB2 express and take
> > > control of your XML. No limits. Just data. Click to get it now.
> > > http://sourceforge.net/powerbar/db2/
> > > ___
> > > Wicket-user mailing list
> > > Wicket-user@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/wicket-user
> > >
> > >
> >
> >
> > -
> > This SF.net email is sponsored by DB2 Express
> > Download DB2 Express C - the FREE version of DB2 express and take
> > control of your XML. No limits. Just data. Click to get it now.
> > http://sourceforge.net/powerbar/db2/
> > ___
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
> >
>
>
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to

Re: [Wicket-user] Form submit and RestartResponseAtInterceptPageException

2007-06-13 Thread Andrew Berman

So are you also saying I have to write my own PageMap class for the
continueToOriginalDestination?

On 6/13/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:


you would basically have to rewrite this functionality.

create your own restartresponse flavor exception and throw post params
into session. then create your own continuetooriginaldestination()

-igor


On 6/13/07, Andrew Berman <[EMAIL PROTECTED]> wrote:
>
> Is there some workaround I can do?  I'm not on 1.3, I'm on 1.2.6.  I
> gotta get this to work, I really cannot wait on a new release or fix at this
> point.
>
> On 6/13/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> >
> > its actually correct. he wants to resume form-processing because his
> > page _submits_ to a page that requires login. right now
> > restartresponseatinterceptpage remembers the url and does a get on that url.
> > it looks like we might have to remember the url/the request type/and post
> > parameters as well, and then instead of doing a get on the return url we
> > might have to do a post.
> >
> > dont think we have that yet, so please add an rfe.
> >
> > -igor
> >
> >
> > On 6/13/07, Eelco Hillenius < [EMAIL PROTECTED]> wrote:
> > >
> > > It shouldn't. Certainly not in 1.3. Are you sure you didn't overlook
> > > something?
> > >
> > > Eelco
> > >
> > > On 6/13/07, Andrew Berman <[EMAIL PROTECTED]> wrote:
> > > > I've seen posts on this before but never a solution.  I have a
> > > form which
> > > > submits to a page which requires login.  As a result, I throw a
> > > > RestartResponseAtInterceptPageException which takes the
> > > > user to a login screen.  Once done with the login screen it's
> > > supposed to go
> > > > to the page the form submit sent the user to.  The problem is that
> > > it goes
> > > > back to the form page instead.  Is there any solution to this
> > > problem?
> > > >
> > > > Thanks.
> > > >
> > > >
> > > -
> > > > This SF.net email is sponsored by DB2 Express
> > > > Download DB2 Express C - the FREE version of DB2 express and take
> > > > control of your XML. No limits. Just data. Click to get it now.
> > > > http://sourceforge.net/powerbar/db2/
> > > > ___
> > > > Wicket-user mailing list
> > > > Wicket-user@lists.sourceforge.net
> > > > https://lists.sourceforge.net/lists/listinfo/wicket-user
> > > >
> > > >
> > >
> > >
> > > -
> > > This SF.net email is sponsored by DB2 Express
> > > Download DB2 Express C - the FREE version of DB2 express and take
> > > control of your XML. No limits. Just data. Click to get it now.
> > > http://sourceforge.net/powerbar/db2/
> > > ___
> > > Wicket-user mailing list
> > > Wicket-user@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/wicket-user
> > >
> >
> >
> >
> > -
> > This SF.net email is sponsored by DB2 Express
> > Download DB2 Express C - the FREE version of DB2 express and take
> > control of your XML. No limits. Just data. Click to get it now.
> > http://sourceforge.net/powerbar/db2/
> > ___
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
> >
>
>
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>

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


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


Re: [Wicket-user] [Question] render(final MarkupStream markupStream)

2007-06-13 Thread Timo Rantalaiho
On Wed, 13 Jun 2007, Alex Objelean wrote:
> I found a workaround for this issue, so instead of overriding isVisible() of
> the bulkContainer WebMarkupContainer, I add an AttributeModifier which makes
> the container display:none.. 

I'm not sure if I got it correctly, but you're not trying to
repaint an invisible container via ajax, right? To make that
work you need to update the parent of the conditionally-
visible component.

Another thing that we have noticed is that sometimes calling
setVisible() in onBeforeRender() works better than overriding
isVisble() directly. Make sure you call super.onBeforeRender()
in the overriding implementation.

- Timo

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

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


Re: [Wicket-user] Form with ajaxsubmitbutton won't submit after error

2007-06-13 Thread Johan Compagner


Hi, it might be a book.




which book? The one eelco and martijn are writing?
Does he have that already??

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


[Wicket-user] Automatic page history discovery...need direction

2007-06-13 Thread V. Jenks

I would like to build my own breadcrumb type of navigation widget and I'm
looking for some direction as to what I might use to "discover" what page is
currently being served and how I might detect a history of pages leading up
to the current one the user is viewing?  Would I tap into the
page-versioning thing that Wicket does for maintaining the session?

I'm aware that there is a breadcrumb control out there already but I need
something a little more simplistic that won't require me creating a bunch of
panels.

Thanks!
-- 
View this message in context: 
http://www.nabble.com/Automatic-page-history-discovery...need-direction-tf3917315.html#a11107309
Sent from the Wicket - User mailing list archive at Nabble.com.


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


Re: [Wicket-user] javascript internal scrollbar ?

2007-06-13 Thread Martijn Dashorst
On 6/13/07, verbal evasion <[EMAIL PROTECTED]> wrote:
> i noticed there were a bunch of ajax classes in wicket that generates
> javascript for you. very cool. is there a wicket extension or something that
> will allow me to create an internal scrollbar from java, without having to
> handwrite javascript in the html file?

I don't know what an internal scrollbar is, and that would strike me
as the answer to your question: I doubt it is available as a wicket
component/behavior.

It is not that hard to create your own component/behavior to do this.
Look at dhtmlgoodies.com for your javascript and hook it up to your
specific wishes. If you want to see some examples, take a look at
wicketstuff-minis:

http://wicketstuff.org/confluence/display/STUFFWIKI/wicketstuff-minis

Martijn

-- 
Join the wicket community at irc.freenode.net: ##wicket
Wicket 1.2.6 contains a very important fix. Download Wicket now!
http://wicketframework.org

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


Re: [Wicket-user] Form submit and RestartResponseAtInterceptPageException

2007-06-13 Thread Igor Vaynberg

you would basically have to rewrite this functionality.

create your own restartresponse flavor exception and throw post params into
session. then create your own continuetooriginaldestination()

-igor


On 6/13/07, Andrew Berman <[EMAIL PROTECTED]> wrote:


Is there some workaround I can do?  I'm not on 1.3, I'm on 1.2.6.  I gotta
get this to work, I really cannot wait on a new release or fix at this
point.

On 6/13/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
>
> its actually correct. he wants to resume form-processing because his
> page _submits_ to a page that requires login. right now
> restartresponseatinterceptpage remembers the url and does a get on that url.
> it looks like we might have to remember the url/the request type/and post
> parameters as well, and then instead of doing a get on the return url we
> might have to do a post.
>
> dont think we have that yet, so please add an rfe.
>
> -igor
>
>
> On 6/13/07, Eelco Hillenius < [EMAIL PROTECTED]> wrote:
> >
> > It shouldn't. Certainly not in 1.3. Are you sure you didn't overlook
> > something?
> >
> > Eelco
> >
> > On 6/13/07, Andrew Berman <[EMAIL PROTECTED]> wrote:
> > > I've seen posts on this before but never a solution.  I have a form
> > which
> > > submits to a page which requires login.  As a result, I throw a
> > > RestartResponseAtInterceptPageException which takes the
> > > user to a login screen.  Once done with the login screen it's
> > supposed to go
> > > to the page the form submit sent the user to.  The problem is that
> > it goes
> > > back to the form page instead.  Is there any solution to this
> > problem?
> > >
> > > Thanks.
> > >
> > >
> > -
> > > This SF.net email is sponsored by DB2 Express
> > > Download DB2 Express C - the FREE version of DB2 express and take
> > > control of your XML. No limits. Just data. Click to get it now.
> > > http://sourceforge.net/powerbar/db2/
> > > ___
> > > Wicket-user mailing list
> > > Wicket-user@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/wicket-user
> > >
> > >
> >
> >
> > -
> > This SF.net email is sponsored by DB2 Express
> > Download DB2 Express C - the FREE version of DB2 express and take
> > control of your XML. No limits. Just data. Click to get it now.
> > http://sourceforge.net/powerbar/db2/
> > ___
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
>
>
>
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>

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


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


Re: [Wicket-user] Form submit and RestartResponseAtInterceptPageException

2007-06-13 Thread Andrew Berman

Is there some workaround I can do?  I'm not on 1.3, I'm on 1.2.6.  I gotta
get this to work, I really cannot wait on a new release or fix at this
point.

On 6/13/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:


its actually correct. he wants to resume form-processing because his page
_submits_ to a page that requires login. right now
restartresponseatinterceptpage remembers the url and does a get on that url.
it looks like we might have to remember the url/the request type/and post
parameters as well, and then instead of doing a get on the return url we
might have to do a post.

dont think we have that yet, so please add an rfe.

-igor


On 6/13/07, Eelco Hillenius < [EMAIL PROTECTED]> wrote:
>
> It shouldn't. Certainly not in 1.3. Are you sure you didn't overlook
> something?
>
> Eelco
>
> On 6/13/07, Andrew Berman <[EMAIL PROTECTED]> wrote:
> > I've seen posts on this before but never a solution.  I have a form
> which
> > submits to a page which requires login.  As a result, I throw a
> > RestartResponseAtInterceptPageException which takes the
> > user to a login screen.  Once done with the login screen it's supposed
> to go
> > to the page the form submit sent the user to.  The problem is that it
> goes
> > back to the form page instead.  Is there any solution to this problem?
> >
> > Thanks.
> >
> >
> -
> > This SF.net email is sponsored by DB2 Express
> > Download DB2 Express C - the FREE version of DB2 express and take
> > control of your XML. No limits. Just data. Click to get it now.
> > http://sourceforge.net/powerbar/db2/
> > ___
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
> >
>
>
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>


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


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


Re: [Wicket-user] Form submit and RestartResponseAtInterceptPageException

2007-06-13 Thread Igor Vaynberg

its actually correct. he wants to resume form-processing because his page
_submits_ to a page that requires login. right now
restartresponseatinterceptpage remembers the url and does a get on that url.
it looks like we might have to remember the url/the request type/and post
parameters as well, and then instead of doing a get on the return url we
might have to do a post.

dont think we have that yet, so please add an rfe.

-igor


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


It shouldn't. Certainly not in 1.3. Are you sure you didn't overlook
something?

Eelco

On 6/13/07, Andrew Berman <[EMAIL PROTECTED]> wrote:
> I've seen posts on this before but never a solution.  I have a form
which
> submits to a page which requires login.  As a result, I throw a
> RestartResponseAtInterceptPageException which takes the
> user to a login screen.  Once done with the login screen it's supposed
to go
> to the page the form submit sent the user to.  The problem is that it
goes
> back to the form page instead.  Is there any solution to this problem?
>
> Thanks.
>
>
-
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>

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

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


Re: [Wicket-user] Form submit and RestartResponseAtInterceptPageException

2007-06-13 Thread Eelco Hillenius
It shouldn't. Certainly not in 1.3. Are you sure you didn't overlook something?

Eelco

On 6/13/07, Andrew Berman <[EMAIL PROTECTED]> wrote:
> I've seen posts on this before but never a solution.  I have a form which
> submits to a page which requires login.  As a result, I throw a
> RestartResponseAtInterceptPageException which takes the
> user to a login screen.  Once done with the login screen it's supposed to go
> to the page the form submit sent the user to.  The problem is that it goes
> back to the form page instead.  Is there any solution to this problem?
>
> Thanks.
>
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>

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


Re: [Wicket-user] AjaxFormComponentUpdatingBehavior for DropDownChoice not working in IE

2007-06-13 Thread Johan Compagner
what do you see in the ajax debug when you get the results?  are you
really seeing a different url in the src?

On 6/12/07, Javed <[EMAIL PROTECTED]> wrote:
>
> Follwing code snippet adds dropdown.
>
> private DropDownChoice getDropDown1(final Label image){
> DropDownChoice dropDown1 = new DropDownChoice("selectUser",new
> PropertyModel(model,"user1"),Arrays.asList(options),choiceRenderer);
>
> favsDropDown.add(new AjaxFormComponentUpdatingBehavior("onchange"){
>
> /**
>  * When Specified event took place this method gets called
>  * @param target
>  */
> @Override
> protected void onUpdate(AjaxRequestTarget target) {
> String imageUrl = null;
> String user = model.getUser1(); // selected user object from
> drop down
> imageUrl = getImage(user);
> imageUrl = imageUrl == null? "" : imageUrl;
> model.setImageUrl(imageUrl); // sets new image model
> image.add(new AttributeModifier("src",new
> PropertyModel(model,"imageUrl"))); // sets image src
> target.addComponent(image);
> }
>
> });
>
> return dropDown1;
> }
>
> When dropdown selection changes I need to modify image related to it.
>
>
>
> Frank Bille wrote:
> >
> > Hi
> >
> > I haven't got experience with that error. Can you please post the code
> > that
> > is not working?
> >
> > Frank
> >
> >
> > On 6/11/07, Javed <[EMAIL PROTECTED]> wrote:
> >>
> >>
> >> I need to change image according the selection made in dropdown.
> >> It is working fine Firefox but not in IE
> >>
> >> I tried it with "onchange" and "onclick". It worked in Firefox but some
> >> how
> >> it is not working IE.
> >>
> >> Is there anything I am missing?
> >> Is there any other approach to achieve the same functionality with Ajax
> >> effect?
> >>
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/AjaxFormComponentUpdatingBehavior-for-DropDownChoice-not-working-in-IE-tf3901202.html#a11059387
> >> Sent from the Wicket - User mailing list archive at Nabble.com.
> >>
> >>
> >> -
> >> This SF.net email is sponsored by DB2 Express
> >> Download DB2 Express C - the FREE version of DB2 express and take
> >> control of your XML. No limits. Just data. Click to get it now.
> >> http://sourceforge.net/powerbar/db2/
> >> ___
> >> Wicket-user mailing list
> >> Wicket-user@lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/wicket-user
> >>
> >
> > -
> > This SF.net email is sponsored by DB2 Express
> > Download DB2 Express C - the FREE version of DB2 express and take
> > control of your XML. No limits. Just data. Click to get it now.
> > http://sourceforge.net/powerbar/db2/
> > ___
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/AjaxFormComponentUpdatingBehavior-for-DropDownChoice-not-working-in-IE-tf3901202.html#a11075468
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>

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


[Wicket-user] Form submit and RestartResponseAtInterceptPageException

2007-06-13 Thread Andrew Berman

I've seen posts on this before but never a solution.  I have a form which
submits to a page which requires login.  As a result, I throw a
RestartResponseAtInterceptPageException which takes the user to a login
screen.  Once done with the login screen it's supposed to go to the page the
form submit sent the user to.  The problem is that it goes back to the form
page instead.  Is there any solution to this problem?

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


Re: [Wicket-user] wicket-contrib-gmap2

2007-06-13 Thread Igor Vaynberg

/me plays theme from highlander

-igor


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


Soon to be read on The Server Side: gmap components shootout! ;)

Eelco

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

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


Re: [Wicket-user] wicket-contrib-gmap2

2007-06-13 Thread Eelco Hillenius
Soon to be read on The Server Side: gmap components shootout! ;)

Eelco

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


Re: [Wicket-user] FileUploadField in a ModalWindow

2007-06-13 Thread Johan Compagner
this will not work, you cant submit multipart with ajax as far as i know

On 6/13/07, diego <[EMAIL PROTECTED]> wrote:
> I have a form inside a ModalWindow, it has a FileUploadField. When I
> submit the form I get the exception "java.lang.IllegalStateException:
> ServletRequest does not contain multipart content"
>
> It makes sense, because the request sent is not of the type
> "multipart/..." but instead "application/x-www-form-urlencoded" since
> it's an Ajax request.
>
> Is there any way to make this work? All my other forms appear in a
> ModalWindow, so it wouldn't be nice at all to have this one form on the
> "opener" page.
>
> I wouldn't mind if the form posted to a new instance of the page, I
> mean, not using an Ajax request for posting, which I guess it's done
> using a plain Button instead of an AjaxSubmitButton. When I tried that,
> I got a pop-up warning me I was going away from the ModalWindow (wich of
> course is precisely what I want to do, so I don't want to be warned)
>

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


[Wicket-user] wicket-contrib-gmap2

2007-06-13 Thread Martin Funk
Hi,

may I draw your attention to a little project I was allowed to add to 
the wicket-stuff svn repository yesterday.

Being highly inspired by Julians and Nicos wicket-contrib-gmap I got 
exited enough to try to create a project that does the same and a little 
bit more with a little different approach. Kinda bold, since I haven't 
looked into JavaScript before. Julian and Nico I hope you don't mind 
that I tried to invent the wheel a second time, but if your project 
wouldn't have been around I probably never would have tried. So thank 
you for that.

Features:
There can be more than one GMap on a page, I think there can be many, at 
least I succeeded with two.

Components may become controls of the GMap. Any Component capable of 
firing events can become a controller. The controls are executed 
whenever the named event is fired by the Component. Currently ZooOut, 
ZoomIn, PanDirection, AddOverlay and OpenInfoWindow are implemented.

Listeners may be added to the GMap. These are called whenever the GMap 
fires the corresponding Events. So far a ClickListener and a 
MoveEndListener are implemented. This allows to dynamically update any 
Component and the GMap itself.

The events and the controls always do a round trip from the browser to 
the server and back, this way any call can be intercepted and controlled 
on the server side. The network traffic is kept down, since all needed 
JavaScript functions are defined in a js-file. So only arguments have to 
be transfered.

Status:
Is best described by, consolidating. As I said, being a JavaScript 
newbie and a Java mediocre, it was sort of bold to start this. The 
features in mind I basically cut right through any API ahead of me 
without taking care of any design principles. So if you ever find the 
time to look into the code, give feedback! And I fear this project is in 
need for a lot of feedback.

Last but not least: Installation.
There is no release currently planed. The code compiles against the 
current HEAD of wicket. So get get wicket from svn as described in 
http://incubator.apache.org/wicket/building-from-svn.html first.
This project relies on the well maintained structure of wickets pom.xml 
files. It needs to be checked out into wicket jdk-1.5 folder:

cd 
svn co 
https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicket-contrib-gmap2
svn co 
https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicket-contrib-gmap2-examples

This should do the install and get a jetty started for the examples:
mvn -f wicket-contrib-gmap2/pom.xml install
mvn -f wicket-contrib-gmap2-examples/pom.xml jetty:run

Now browse to:
http://localhost:8080/wicket-contrib-gmap2-examples/gmap/
and click around.


Have fun,

Martin


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


Re: [Wicket-user] AjaxLink not updating Image

2007-06-13 Thread Johan Compagner
so the problem is that in the ajax request you still send the initial
image? so it seems that set model on the nci has no effect at all?

On 6/13/07, Jeremy Levy <[EMAIL PROTECTED]> wrote:
> I have an AjaxLink link that I am trying to use to update an image, in the
> onClick method I am replacing the Model of the image to the new path,
> however it's not working.  I've tried it with Image and NonCachingImage, and
> also turned off Caching in FireFox.  I'm not sure but the XML being sent
> doesn't look correct. I'm using 1.2.5.  Here are the relevant code snipits:
>
>
> ...
> final NonCachingImage warningImage = new
> NonCachingImage("warningImage", new Model("images/alert_orange.png"));
> warningImage.setOutputMarkupId(true);
> add(warningImage);
> ...
>
>   final AjaxLink link = new AjaxLink("theLink") {
> public void onClick(AjaxRequestTarget ajaxRequestTarget) {
> log.debug("Link Clicked...");
>
> warningImage.setModel(new Model("images/alert_green.png"));
> ajaxRequestTarget.addComponent(warningImage);
>}
> };
> add(link);
>
> >From the AJAX Console:
>
> INFO:
> INFO: Initiating Ajax GET request on
> /1/meetmoi?x=YuQ6ay6aKBGDiO5OfiMmT7sqTYDzw7kvj2TxXBaK1HxBbP9XAjorn1Zpm4EovOnWCZVHg*4WCL-uPukV*-Oz2CeAsvJdoPkh&wicket:behaviorId=0&random=0.337860019529019
> INFO: Invoking pre-call handler(s)...
> INFO: Received ajax response (388 characters)
> INFO:
>  id="notYetActive_repeatingAlerts_1_aAlert_warningImage" >
> INFO: Response parsed. Now invoking steps...
> INFO: Response processed successfully.
> INFO: Invoking post-call handler(s)...
>
>
> Thanks.
>

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


Re: [Wicket-user] Wicket & YUI

2007-06-13 Thread Igor Vaynberg

done

-igor


On 6/13/07, James McLaughlin <[EMAIL PROTECTED]> wrote:


OK, fixed that.

Igor, if you are listening, can you create a jira project for
wicketstuff YUI so I can create an issue for this. Thanks.

best,
jim

On 6/13/07, Matthieu Casanova <[EMAIL PROTECTED]> wrote:
> 2007/6/13, James McLaughlin <[EMAIL PROTECTED]>:
> > Hi Matthieu,
> > Which version from svn are you using? Trunk is intended to work with
> > 1.3 only. So if you want to work yui and 1.2.6, you need to:
> >
> > svn checkout
https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/branches/wicket_1_2
> > wicket-stuff_1.2
> >
> > If I remember correctly, there were some things broken in that branch.
> > I will try to get some time to look at it later today.
> >
>
> Hi, I took it from here
>
https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/branches/WICKET_1_2/wicket-contrib-yui/
> (I think the page
>
http://wicketstuff.org/confluence/display/STUFFWEB/Home#Home-WheredoIdownloadstablereleases%3F
> has an error because
>
https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/branches/wicket_1_2
> doesn't seems to exists in SVN)
>
> Matthieu
>
>
-
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>

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

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


Re: [Wicket-user] Wicket & YUI

2007-06-13 Thread James McLaughlin
OK, fixed that.

Igor, if you are listening, can you create a jira project for
wicketstuff YUI so I can create an issue for this. Thanks.

best,
jim

On 6/13/07, Matthieu Casanova <[EMAIL PROTECTED]> wrote:
> 2007/6/13, James McLaughlin <[EMAIL PROTECTED]>:
> > Hi Matthieu,
> > Which version from svn are you using? Trunk is intended to work with
> > 1.3 only. So if you want to work yui and 1.2.6, you need to:
> >
> > svn checkout 
> > https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/branches/wicket_1_2
> > wicket-stuff_1.2
> >
> > If I remember correctly, there were some things broken in that branch.
> > I will try to get some time to look at it later today.
> >
>
> Hi, I took it from here
> https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/branches/WICKET_1_2/wicket-contrib-yui/
> (I think the page
> http://wicketstuff.org/confluence/display/STUFFWEB/Home#Home-WheredoIdownloadstablereleases%3F
> has an error because
> https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/branches/wicket_1_2
> doesn't seems to exists in SVN)
>
> Matthieu
>
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>

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


Re: [Wicket-user] Howto determine what objects are part of session state

2007-06-13 Thread Ryan

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

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


On 6/11/07, Ryan <[EMAIL PROTECTED]> wrote:
> I just found terracotta provides a nice dump of an object graph if it
finds
> problems in your clustering configuration. This should work for me
however
> if it does not I will definitely take a look at the code you wrote to
create
> a wicket session debug tool. Either way I will open a jira issue.

Yeah, forgot about that. Another nice reason to play with Terracotta.

There is also just the debugger btw. Set a breakpoint in
org.apache.wicket.protocol.http.HttpSessionStore#setAttribute(Request,
String, Object) and see what the incoming object holds. The default
store, SecondLevelCacheSessionStore, extends from HttpSessionStore.

Eelco

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

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


Re: [Wicket-user] How to show PDF file?

2007-06-13 Thread Ernesto Reinaldo Barreiro
Hi,

I had to deal with something similar (not exactly the same problem) and  
I think you could do the following:

1-Mount a bookmarkable page 
(mountBookmarkablePage("/mypdf",MyPdfPage.class));
2-On my MyPdfPage.hmtl have a markup




Your browser doesn't support iframes



3- MyPdfPage.java you have something similar to (this just a sketch):

import java.util.HashMap;

import org.apache.wicket.Resource;
import org.apache.wicket.ResourceReference;
import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.basic.Label;

import com.abbott.aeres.core.web.button.BaseDocumentResource;
import com.abbott.aeres.core.web.button.FinalDocumentResource;
import com.isencia.sherpa.web.resource.ResourceInlineFrame;

public class MyPdfPage extends WebPage {
   
public MyPdfPage() {
final ResourceReference reference = new 
ResourceReference("myPdfDocument.pdf");   
HashMap params = new HashMap();
   
final boolean haveAdocument = haveADocument();// check if I have 
a document
String docId = "xxx";
params.put(MyDocumentResource.ID, docId);   
final String finalId = docId;

Label message = new Label("message", "Don't have a PDF, sorry!") {
private static final long serialVersionUID = 1L;

   
@Override
public boolean isVisible() {   
return !haveAdocument;
}
};
   
new ResourceInlineFrame(this, "iframe", reference, params) {
private static final long serialVersionUID = 1L;

@Override
public boolean isVisible() {
return haveAdocument;
}
};
}
}

3-final ResourceReference reference = new 
ResourceReference("myPdfDocument.pdf");  makes reference to a dynamic 
resource reference you mount at application level as

getSharedResources().add("myPdfDocument.pdf", new MyDocumentResource());

it is important that it ends in ".pdf" otherwise IE will refuse to open 
it in an iframe (if someone knows a better way please tell me about;-).
MyDocumentResource is a class extending DynamicWebResource that 
generates the PDF based on some params (see above). Make sure you 
overide the setHeaders
method and put the response.setHeader("Content-Disposition", "inline; 
filename=\"" + name + "\""); otherwise IE will not open it in the iframe

4-The listing of ResourceInlineFrame is:

public class ResourceInlineFrame extends WebMarkupContainer
{
private static final long serialVersionUID = 1L;

private ResourceReference reference;
   
private HashMap params;
   
public ResourceInlineFrame(MarkupContainer parent, final String id, 
ResourceReference reference)
{
this(parent, id, reference, null);   
}
   
   
   
public ResourceInlineFrame(MarkupContainer parent, final String id, 
ResourceReference reference, HashMap params)
{
super(parent, id);
if(reference == null)
{
throw new IllegalArgumentException("Invalid Resource 
Reference");
}
this.reference = reference;
this.params = params;
}

protected CharSequence getURL()
{
StringBuffer url = new StringBuffer();
url.append(urlFor(reference));
if(params != null && !params.isEmpty()) {
url.append("?");
Iterator it = params.keySet().iterator();
while(it.hasNext()) {
String key = it.next();
url.append(key);
url.append("=");
url.append(params.get(key));
if(it.hasNext())
url.append("&");
}
}   
return url;
}

 
@Override
protected final void onComponentTag(final ComponentTag tag)
{
checkComponentTag(tag, "iframe");

// Set href to link to this frame's frameRequested method
CharSequence url = getURL();

// generate the src attribute
tag.put("src", Strings.replaceAll(url, "&", "&"));

super.onComponentTag(tag);
}


 
public HashMap getParams() {
return params;
}


public void setParams(HashMap params) {
this.params = params;
}
}

Hope this is of some help...

Ernesto


Tishkin, Eugene wrote:
> I have a page with links. Each link has to work like this:
>  
> When it's clicked, it opens popup window and if there is a PDF file it 
> points to -  show it in the window, otherwise show a message in the 
> same window.
>  
> Any ideas are greatly appreciated.
>  
> Thank you
> 
> Eugene Tishkin
>  
>
>
> This e-mail and any attachments may contain confidential information. Any
> distributing, copying or reliance upon the contents of this e-mail by 
> anyone other
> than the intended recipient is strictly prohibited. If you have 
> received this e-mail
> accidentally, please delete it and noti

Re: [Wicket-user] Wicket & YUI

2007-06-13 Thread Matthieu Casanova
2007/6/13, James McLaughlin <[EMAIL PROTECTED]>:
> Hi Matthieu,
> Which version from svn are you using? Trunk is intended to work with
> 1.3 only. So if you want to work yui and 1.2.6, you need to:
>
> svn checkout 
> https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/branches/wicket_1_2
> wicket-stuff_1.2
>
> If I remember correctly, there were some things broken in that branch.
> I will try to get some time to look at it later today.
>

Hi, I took it from here
https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/branches/WICKET_1_2/wicket-contrib-yui/
(I think the page
http://wicketstuff.org/confluence/display/STUFFWEB/Home#Home-WheredoIdownloadstablereleases%3F
has an error because
https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/branches/wicket_1_2
doesn't seems to exists in SVN)

Matthieu

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


Re: [Wicket-user] Wicket & YUI

2007-06-13 Thread James McLaughlin
Hi Matthieu,
Which version from svn are you using? Trunk is intended to work with
1.3 only. So if you want to work yui and 1.2.6, you need to:

svn checkout 
https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/branches/wicket_1_2
wicket-stuff_1.2

If I remember correctly, there were some things broken in that branch.
I will try to get some time to look at it later today.

best,
jim

On 6/13/07, Matthieu Casanova <[EMAIL PROTECTED]> wrote:
> Hi, I'm trying to make wicket-contrib-yui working with 1.2.6. I took the
> version from svn, but I have a lot of javascript errors. The first is
> because sometimes it uses YAHOO.js and sometimes it's yahoo.js. I fixed it
> but I still have a lot of problems.
> Is it completely broken or should it work ?
>
> Matthieu
>
> 2007/5/31, James McLaughlin <[EMAIL PROTECTED]>:
> > There is a wicket-contrib-yui project included in wicket-stuff on
> sourceforge:
> >
> http://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicket-contrib-yui
> >
> > I've been working on it a little, mostly on the menu module. The drag
> > and drop is somewhat broken, and I haven't had time to look at it.
> > This may have happened when I updated the libs to 2.2.2. But the
> > slider and animation modules work fine.
> >
> > There is very little in the way of documentation, but there is a
> > wicket-contrib-yui-examples project that demos each module.
> >
> http://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicket-contrib-yui-examples
> >
> > If you perform a mvn install on wicket-contrib-yui, then a mvn
> > jetty:run on wicket-contrib-yui-examples, you should be up and running
> > in a few minutes.
> > Once I get the menu working to my satisfaction, I will produce some
> > documentation.
> >
> > When I updated the libs, I created a YuiHeaderContributor that will
> > resolve dependencies for the module you want and include the necessary
> > files in the proper order (yui is way weaker than dojo in this
> > respect).
> >
> > A few months ago, a number of people expressed interest in
> > contributing, so if any of you are reading this, I would love to have
> > some help. In particular, i think it would be great if someone could
> > bring drag and drop back to life. I think it could use some pretty
> > heavy refactoring as well. Actually, there have been a lot of changes
> > in wicket since wcy was last worked on, so much of the project could
> > use "modernization". If you don't know where to start, respond to this
> > email and I can provide a few ideas.
> >
> > best,
> > jim
> >
> > On 5/31/07, howzat <[EMAIL PROTECTED] > wrote:
> > >
> > > Are there any examples/tutorials that re using YUI  with Wicket.
> > > I see there is also a wicket YUI project but could not find much getting
> > > started help.
> > > --
> > > View this message in context:
> http://www.nabble.com/Wicket---YUI-tf3848786.html#a10901677
> > > Sent from the Wicket - User mailing list archive at Nabble.com.
> > >
> > >
> > >
> -
> > > This SF.net email is sponsored by DB2 Express
> > > Download DB2 Express C - the FREE version of DB2 express and take
> > > control of your XML. No limits. Just data. Click to get it now.
> > > http://sourceforge.net/powerbar/db2/
> > > ___
> > > Wicket-user mailing list
> > > Wicket-user@lists.sourceforge.net
> > >
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> > >
> >
> >
> -
> > This SF.net email is sponsored by DB2 Express
> > Download DB2 Express C - the FREE version of DB2 express and take
> > control of your XML. No limits. Just data. Click to get it now.
> > http://sourceforge.net/powerbar/db2/
> > ___
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
>
>
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>

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


Re: [Wicket-user] Wicket & YUI

2007-06-13 Thread Matthieu Casanova

Hi, I'm trying to make wicket-contrib-yui working with 1.2.6. I took the
version from svn, but I have a lot of javascript errors. The first is
because sometimes it uses YAHOO.js and sometimes it's yahoo.js. I fixed it
but I still have a lot of problems.
Is it completely broken or should it work ?

Matthieu

2007/5/31, James McLaughlin <[EMAIL PROTECTED]>:


There is a wicket-contrib-yui project included in wicket-stuff on
sourceforge:

http://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicket-contrib-yui

I've been working on it a little, mostly on the menu module. The drag
and drop is somewhat broken, and I haven't had time to look at it.
This may have happened when I updated the libs to 2.2.2. But the
slider and animation modules work fine.

There is very little in the way of documentation, but there is a
wicket-contrib-yui-examples project that demos each module.

http://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicket-contrib-yui-examples

If you perform a mvn install on wicket-contrib-yui, then a mvn
jetty:run on wicket-contrib-yui-examples, you should be up and running
in a few minutes.
Once I get the menu working to my satisfaction, I will produce some
documentation.

When I updated the libs, I created a YuiHeaderContributor that will
resolve dependencies for the module you want and include the necessary
files in the proper order (yui is way weaker than dojo in this
respect).

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

best,
jim

On 5/31/07, howzat <[EMAIL PROTECTED]> wrote:
>
> Are there any examples/tutorials that re using YUI  with Wicket.
> I see there is also a wicket YUI project but could not find much getting
> started help.
> --
> View this message in context:
http://www.nabble.com/Wicket---YUI-tf3848786.html#a10901677
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
>
-
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>

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

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


Re: [Wicket-user] [Question] render(final MarkupStream markupStream)

2007-06-13 Thread Johan Compagner
we also have a. setting where we do output some markup with
display:none when it is not visible, setOutputMarkupIdX() (i
forgot the exact name)

On 6/13/07, Alex Objelean <[EMAIL PROTECTED]> wrote:
>
> I found a workaround for this issue, so instead of overriding isVisible() of
> the bulkContainer WebMarkupContainer, I add an AttributeModifier which makes
> the container display:none..
>
> private WebMarkupContainer getBulkContainer() {
> if (bulkContainer == null) {
>   bulkContainer = new WebMarkupContainer("bulkContainer");
>   bulkContainer.add(new SimpleAttributeModifier("class", "invisible") {
> public boolean isEnabled() {
>   return getMode().isEdit();
> }
>   });
>   //add to bulkContainer a form which contains a ListView.
> }
> return bulkContainer;
>   }
>
> I do not like this solution, because anyone having firebug can hack the
> application + more markup than needed is generated...
>
>
>
> Johan Compagner wrote:
> >
> > isVisibleInHierarchy doesn't make to much sense because it has to be
> > visible already because the parent is already rendering and passing
> > its render to the childs.  So the parent is already checked for
> > visiblility.
what you seem to have is more another bug that something
> > is not created or tried to rendered that is already removed by another
> > request
> >
> > On 6/13/07, Alex Objelean <[EMAIL PROTECTED]> wrote:
> >>
> >> I have a question about the render method. Why, before rendering, instead
> >> of
> >> checking isVisibleInHierarchy(),  isVisible() is called?
> >>public final void render(final MarkupStream markupStream)
> >>{
> >>setMarkupStream(markupStream);
> >>setFlag(FLAG_IS_RENDERED_ONCE, true);
> >>
> >>// Determine if component is visible using it's authorization 
> >> status
> >>// and the isVisible property.
> >>if (isRenderAllowed() && isVisible()) //why not 
> >> isVisibleInHierarchy()
> >> ??
> >>{
> >>//etc...
> >> }
> >> //more code.
> >>  }
> >>
> >> I am asking because I suspect a bug with the following StackTrace:
> >>
> >> Caused by: java.lang.NullPointerException
> >>at wicket.markup.html.list.ListView.renderItem(ListView.java:676)
> >>at wicket.markup.html.list.ListView.onRender(ListView.java:637)
> >>
> >> I happens when an AjaxTabbedPanel is updated via ajax. The tabbedPanel
> >> contains a holder Panel with a ListView child component. The visibility
> >> of
> >> the holder Panel is decided dynamicaly by overriding isVisible method.
> >>
> >> Maybe later I will try to isolate this situation and to make it more
> >> clear.
> >> Still, I would like to know if you've encountered something like this.
> >>
> >> Thank you!
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/-Question--render%28final-MarkupStream-markupStream%29-tf3914413.html#a11098575
> >> Sent from the Wicket - User mailing list archive at Nabble.com.
> >>
> >>
> >> -
> >> This SF.net email is sponsored by DB2 Express
> >> Download DB2 Express C - the FREE version of DB2 express and take
> >> control of your XML. No limits. Just data. Click to get it now.
> >> http://sourceforge.net/powerbar/db2/
> >> ___
> >> Wicket-user mailing list
> >> Wicket-user@lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/wicket-user
> >>
> > -
> > This SF.net email is sponsored by DB2 Express
> > Download DB2 Express C - the FREE version of DB2 express and take
> > control of your XML. No limits. Just data. Click to get it now.
> > http://sourceforge.net/powerbar/db2/
> > ___
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/-Question--render%28final-MarkupStream-markupStream%29-tf3914413.html#a11099854
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.

[Wicket-user] AjaxLink not updating Image

2007-06-13 Thread Jeremy Levy

I have an AjaxLink link that I am trying to use to update an image, in the
onClick method I am replacing the Model of the image to the new path,
however it's not working.  I've tried it with Image and NonCachingImage, and
also turned off Caching in FireFox.  I'm not sure but the XML being sent
doesn't look correct. I'm using 1.2.5.  Here are the relevant code snipits:


...
final NonCachingImage warningImage = new
NonCachingImage("warningImage", new Model("images/alert_orange.png"));
warningImage.setOutputMarkupId(true);
add(warningImage);
...

 final AjaxLink link = new AjaxLink("theLink") {
   public void onClick(AjaxRequestTarget ajaxRequestTarget) {
   log.debug("Link Clicked...");

   warningImage.setModel(new Model("images/alert_green.png"));
   ajaxRequestTarget.addComponent(warningImage);
  }
   };
add(link);


From the AJAX Console:


INFO:
INFO: Initiating Ajax GET request on
/1/meetmoi?x=YuQ6ay6aKBGDiO5OfiMmT7sqTYDzw7kvj2TxXBaK1HxBbP9XAjorn1Zpm4EovOnWCZVHg*4WCL-uPukV*-Oz2CeAsvJdoPkh&wicket:behaviorId=0&random=0.337860019529019
INFO: Invoking pre-call handler(s)...
INFO: Received ajax response (388 characters)
INFO:

INFO: Response parsed. Now invoking steps...
INFO: Response processed successfully.
INFO: Invoking post-call handler(s)...


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


Re: [Wicket-user] Wicket under JBoss: ClassLoader not found?

2007-06-13 Thread Jeremy Levy

Bill it looks like your application isn't really there in your EAR/WAR
etc..  Open it up and make sure it's got all the correct files in
WEB-INF/lib WEB-INF/classes

Jeremy

On 6/12/07, William J. Laubenheimer <[EMAIL PROTECTED]> wrote:


I'm using NetBeans 5.5 and Wicket 1.2.5 for a web development
project.  When
I try to load the .ear file, I get this exception when JBoss attempts to
load the Wicket .war file:
--
wicket.WicketRuntimeException: Unable to create application of class
com.cemantica.web.cdm.CDMWicketApplication
at
wicket.protocol.http.ContextParamWebApplicationFactory.createApplication
(Con
textParamWebApplicationFactory.java:68)
at wicket.protocol.http.WicketServlet.init(WicketServlet.java:275)
at javax.servlet.GenericServlet.init(GenericServlet.java:211)
[...]
Caused by: java.lang.ClassNotFoundException: No ClassLoaders found for:
com.cemantica.web.cdm.CDMWicketApplication
at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:306)

at
org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl
(RepositoryClassLoad
er.java:511)
at
org.jboss.mx.loading.RepositoryClassLoader.loadClass(
RepositoryClassLoader.j
ava:405)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at
wicket.protocol.http.ContextParamWebApplicationFactory.createApplication
(Con
textParamWebApplicationFactory.java:53)
... 94 more
--
I suspect this means I'm missing some key element in either the JBoss or
Wicket configuration.  Any idea what, or how I can find out?


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

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


Re: [Wicket-user] Form with ajaxsubmitbutton won't submit after error

2007-06-13 Thread Matej Knopp
Hi, it might be a book. Could you please create a JIRA entry and
assign it to me, so that it won't get lost? Thanks

-Matej

On 6/13/07, Marieke Vandamme <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> I'm using the Apache Wicket incubating 1.3 and updated my existing
> application.
> One of my forms wasn't working anymore. I isolated my problem in the code
> below.
> I'm using a form with an AjaxSubmitButton. On my form, one of my components
> is required.
> When user doesn't fill in field and presses the ajaxsubmitbutton, he gets an
> alert telling hem to fill in the required field.
> When user then fills in field and presses submitbutton again, the onError is
> again called instead of the onsubmit.
>
> Is this a bug (or is it already reported)?
> Thanks in advance.
>
> --
>
> public class TestPage extends WebPage {
>   public TestPage() {
> Form frm = new TestForm("form");
> frm.add(new TestSubmitButton("button", frm));
> frm.add(new RequiredTextField("name", new PropertyModel(frm, "name")));
> add(frm);
>   }
>
>   public class TestForm extends Form {
> private String name = null;
> public TestForm(String id){
>   super(id);
> }
> public void setName(String name){
>   name = name;
> }
> public String getName(){
>   return name;
> }
>   }
>
>   public class TestSubmitButton extends AjaxSubmitButton {
> public TestSubmitButton(String id, Form form) {
>   super(id, form);
> }
>
> protected void onSubmit(AjaxRequestTarget ajaxRequestTarget, Form form){
>   System.out.println("Form submitted");
> }
>
> protected void onError(final AjaxRequestTarget target, Form form) {
>   target.appendJavascript("alert('Fill in all fields.');");
> }
>   }
> }
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>

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


Re: [Wicket-user] [Question] render(final MarkupStream markupStream)

2007-06-13 Thread Matej Knopp
Sure, i can look into it, as soon as someone give me a code that can
reproduce the problem :)

-Matej

On 6/13/07, Al Maw <[EMAIL PROTECTED]> wrote:
> Hmmm,
>
> This bug looks suspiciously like another onAttach/onBeforeRender issue.
> Matej seems good at debugging those, care to comment? :-)
>
> Al
>
> Alex Objelean wrote:
> > I have a question about the render method. Why, before rendering, instead of
> > checking isVisibleInHierarchy(),  isVisible() is called?
> >   public final void render(final MarkupStream markupStream)
> >   {
> >   setMarkupStream(markupStream);
> >   setFlag(FLAG_IS_RENDERED_ONCE, true);
> >
> >   // Determine if component is visible using it's authorization 
> > status
> >   // and the isVisible property.
> >   if (isRenderAllowed() && isVisible()) //why not 
> > isVisibleInHierarchy() ??
> >   {
> >//etc...
> > }
> > //more code.
> >  }
> >
> > I am asking because I suspect a bug with the following StackTrace:
> >
> > Caused by: java.lang.NullPointerException
> >   at wicket.markup.html.list.ListView.renderItem(ListView.java:676)
> >   at wicket.markup.html.list.ListView.onRender(ListView.java:637)
> >
> > I happens when an AjaxTabbedPanel is updated via ajax. The tabbedPanel
> > contains a holder Panel with a ListView child component. The visibility of
> > the holder Panel is decided dynamicaly by overriding isVisible method.
> >
> > Maybe later I will try to isolate this situation and to make it more clear.
> > Still, I would like to know if you've encountered something like this.
> >
> > Thank you!
>
>
> --
> Alastair Maw
> Wicket-biased blog at http://herebebeasties.com
>
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>

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


[Wicket-user] How to show PDF file?

2007-06-13 Thread Tishkin, Eugene

I have a page with links. Each link has to work like this:
 
When it's clicked, it opens popup window and if there is a PDF file it points 
to -  show it in the window, otherwise show a message in the same window.
 
Any ideas are greatly appreciated.
 
Thank you

Eugene Tishkin
 




This e-mail and any attachments may contain confidential information. Any 
distributing, copying or reliance upon the contents of this e-mail by anyone 
other 
than the intended recipient is strictly prohibited. If you have received this 
e-mail 
accidentally, please delete it and notify the sender. Although this message has 
been 
screened for viruses, we cannot guarantee that our virus scanner will detect 
all 
viruses and take no responsibility for any damage or loss that may be caused by 
its 
contents.-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] [Question] render(final MarkupStream markupStream)

2007-06-13 Thread Alex Objelean

I found a workaround for this issue, so instead of overriding isVisible() of
the bulkContainer WebMarkupContainer, I add an AttributeModifier which makes
the container display:none.. 

private WebMarkupContainer getBulkContainer() {
if (bulkContainer == null) {
  bulkContainer = new WebMarkupContainer("bulkContainer");
  bulkContainer.add(new SimpleAttributeModifier("class", "invisible") {
public boolean isEnabled() {
  return getMode().isEdit();
}
  });
  //add to bulkContainer a form which contains a ListView.
}
return bulkContainer;
  }

I do not like this solution, because anyone having firebug can hack the
application + more markup than needed is generated...



Johan Compagner wrote:
> 
> isVisibleInHierarchy doesn't make to much sense because it has to be
> visible already because the parent is already rendering and passing
> its render to the childs.  So the parent is already checked for
> visiblility.
what you seem to have is more another bug that something
> is not created or tried to rendered that is already removed by another
> request
> 
> On 6/13/07, Alex Objelean <[EMAIL PROTECTED]> wrote:
>>
>> I have a question about the render method. Why, before rendering, instead
>> of
>> checking isVisibleInHierarchy(),  isVisible() is called?
>>  public final void render(final MarkupStream markupStream)
>>  {
>>  setMarkupStream(markupStream);
>>  setFlag(FLAG_IS_RENDERED_ONCE, true);
>>
>>  // Determine if component is visible using it's authorization 
>> status
>>  // and the isVisible property.
>>  if (isRenderAllowed() && isVisible()) //why not 
>> isVisibleInHierarchy()
>> ??
>>  {
>>//etc...
>> }
>> //more code.
>>  }
>>
>> I am asking because I suspect a bug with the following StackTrace:
>>
>> Caused by: java.lang.NullPointerException
>>  at wicket.markup.html.list.ListView.renderItem(ListView.java:676)
>>  at wicket.markup.html.list.ListView.onRender(ListView.java:637)
>>
>> I happens when an AjaxTabbedPanel is updated via ajax. The tabbedPanel
>> contains a holder Panel with a ListView child component. The visibility
>> of
>> the holder Panel is decided dynamicaly by overriding isVisible method.
>>
>> Maybe later I will try to isolate this situation and to make it more
>> clear.
>> Still, I would like to know if you've encountered something like this.
>>
>> Thank you!
>> --
>> View this message in context:
>> http://www.nabble.com/-Question--render%28final-MarkupStream-markupStream%29-tf3914413.html#a11098575
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>> This SF.net email is sponsored by DB2 Express
>> Download DB2 Express C - the FREE version of DB2 express and take
>> control of your XML. No limits. Just data. Click to get it now.
>> http://sourceforge.net/powerbar/db2/
>> ___
>> Wicket-user mailing list
>> Wicket-user@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/wicket-user
>>
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> 
> 

-- 
View this message in context: 
http://www.nabble.com/-Question--render%28final-MarkupStream-markupStream%29-tf3914413.html#a11099854
Sent from the Wicket - User mailing list archive at Nabble.com.


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


Re: [Wicket-user] nice url for DownloadLink

2007-06-13 Thread Jan Van Besien
Johan Compagner wrote:
> somehow there is also txt/strings written to the output, can you set a
> breakt point in the br.close() method and see what it wants to write?

Indeed! It wanted to write a html page displaying a RuntimeException 
(file not found). Now I got it working.

thnx
Jan

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


Re: [Wicket-user] How to create Dynamic Label?

2007-06-13 Thread Carl-Eric Menzel
I think (didn't test it) that should work when you call 
setEscapeModelStrings(false) on the label.



From: [EMAIL PROTECTED] on behalf of Edi
Sent: Wed 6/13/2007 14:43
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] How to create Dynamic Label?




Initially I have assigned one text in textbox like 
But I have checked in view page source html, it looks like 


I need to display .

Please explain.


Carl-Eric Menzel-4 wrote:
>
> Simply give them both the same Model instance. To have it updated while
> typing, give the textfield an ajax updating behavior and repaint the
> label.
> 
> Carl-Eric
>
> 
>
> From: [EMAIL PROTECTED] on behalf of Edi
> Sent: Wed 6/13/2007 09:05
> To: wicket-user@lists.sourceforge.net
> Subject: [Wicket-user] How to create Dynamic Label?
>
>
>
>
> Hello Experts,
>
> I have one Label, and Text Box. If I enter any text in textbox, then it
> should be displayed in Label. How?
>
> Please explain. (I am newbie.)
>
> Thanking You.
>
>
>
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>

--
View this message in context: 
http://www.nabble.com/How-to-create-Dynamic-Label--tf3912921.html#a11098554
Sent from the Wicket - User mailing list archive at Nabble.com.


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



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


[Wicket-user] Form with ajaxsubmitbutton won't submit after error

2007-06-13 Thread Marieke Vandamme
Hello, 

I'm using the Apache Wicket incubating 1.3 and updated my existing 
application. 
One of my forms wasn't working anymore. I isolated my problem in the code 
below. 
I'm using a form with an AjaxSubmitButton. On my form, one of my 
components is required. 
When user doesn't fill in field and presses the ajaxsubmitbutton, he gets 
an alert telling hem to fill in the required field.
When user then fills in field and presses submitbutton again, the onError 
is again called instead of the onsubmit. 

Is this a bug (or is it already reported)?
Thanks in advance.

--

public class TestPage extends WebPage {
  public TestPage() {
Form frm = new TestForm("form");
frm.add(new TestSubmitButton("button", frm));
frm.add(new RequiredTextField("name", new PropertyModel(frm, 
"name")));
add(frm);
  }
 
  public class TestForm extends Form {
private String name = null;
public TestForm(String id){
  super(id);
}
public void setName(String name){
  name = name;
}
public String getName(){
  return name;
}
  }
 
  public class TestSubmitButton extends AjaxSubmitButton {
public TestSubmitButton(String id, Form form) {
  super(id, form);
}

protected void onSubmit(AjaxRequestTarget ajaxRequestTarget, Form 
form){
  System.out.println("Form submitted");
}

protected void onError(final AjaxRequestTarget target, Form form) {
  target.appendJavascript("alert('Fill in all fields.');");
}
  }
}-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] [Question] render(final MarkupStream markupStream)

2007-06-13 Thread Johan Compagner
isVisibleInHierarchy doesn't make to much sense because it has to be
visible already because the parent is already rendering and passing
its render to the childs.  So the parent is already checked for
visiblility.
what you seem to have is more another bug that something
is not created or tried to rendered that is already removed by another
request

On 6/13/07, Alex Objelean <[EMAIL PROTECTED]> wrote:
>
> I have a question about the render method. Why, before rendering, instead of
> checking isVisibleInHierarchy(),  isVisible() is called?
>   public final void render(final MarkupStream markupStream)
>   {
>   setMarkupStream(markupStream);
>   setFlag(FLAG_IS_RENDERED_ONCE, true);
>
>   // Determine if component is visible using it's authorization 
> status
>   // and the isVisible property.
>   if (isRenderAllowed() && isVisible()) //why not 
> isVisibleInHierarchy() ??
>   {
>//etc...
> }
> //more code.
>  }
>
> I am asking because I suspect a bug with the following StackTrace:
>
> Caused by: java.lang.NullPointerException
>   at wicket.markup.html.list.ListView.renderItem(ListView.java:676)
>   at wicket.markup.html.list.ListView.onRender(ListView.java:637)
>
> I happens when an AjaxTabbedPanel is updated via ajax. The tabbedPanel
> contains a holder Panel with a ListView child component. The visibility of
> the holder Panel is decided dynamicaly by overriding isVisible method.
>
> Maybe later I will try to isolate this situation and to make it more clear.
> Still, I would like to know if you've encountered something like this.
>
> Thank you!
> --
> View this message in context:
> http://www.nabble.com/-Question--render%28final-MarkupStream-markupStream%29-tf3914413.html#a11098575
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] [Question] render(final MarkupStream markupStream)

2007-06-13 Thread Al Maw
Hmmm,

This bug looks suspiciously like another onAttach/onBeforeRender issue. 
Matej seems good at debugging those, care to comment? :-)

Al

Alex Objelean wrote:
> I have a question about the render method. Why, before rendering, instead of
> checking isVisibleInHierarchy(),  isVisible() is called? 
>   public final void render(final MarkupStream markupStream)
>   {
>   setMarkupStream(markupStream);
>   setFlag(FLAG_IS_RENDERED_ONCE, true);
> 
>   // Determine if component is visible using it's authorization 
> status
>   // and the isVisible property.
>   if (isRenderAllowed() && isVisible()) //why not 
> isVisibleInHierarchy() ?? 
>   {
>//etc...
> }
> //more code.
>  }
> 
> I am asking because I suspect a bug with the following StackTrace: 
> 
> Caused by: java.lang.NullPointerException
>   at wicket.markup.html.list.ListView.renderItem(ListView.java:676)
>   at wicket.markup.html.list.ListView.onRender(ListView.java:637)
> 
> I happens when an AjaxTabbedPanel is updated via ajax. The tabbedPanel
> contains a holder Panel with a ListView child component. The visibility of
> the holder Panel is decided dynamicaly by overriding isVisible method. 
> 
> Maybe later I will try to isolate this situation and to make it more clear.
> Still, I would like to know if you've encountered something like this.
> 
> Thank you!


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

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


Re: [Wicket-user] jUnit-testing and not existing images

2007-06-13 Thread Jean-Baptiste Quenot
* Sven Schliesing:
> 
> > As a quick workaround you can do this:
> > 
> > tester.startPage(WebTestPage.class);
> > 
> > Does it work?
> 
> This results in:
> 
> junit.framework.AssertionFailedError: page was null

I guess this is a side effect of:

WICKET-293 PackageRequestTargetUrlCodingStrategy should interrupts
the cycle and sends a 404 when a page/class cannot be found.
https://issues.apache.org/jira/browse/WICKET-293

Can you please create a new issue?
-- 
 Jean-Baptiste Quenot
aka  John Banana   Qwerty
http://caraldi.com/jbq/

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


Re: [Wicket-user] Link to javascript for a custom component

2007-06-13 Thread Pieter Cogghe
EDIT: it does work, there's something wrong with the order of the
links => a problem with the initialisation of my javascript

2007/6/13, Pieter Cogghe <[EMAIL PROTECTED]>:
> I made a panel MyPanel and want to link to some javascript file for
> the behaviour
>
> The directory structure looks like this:
>
> package-structure/MyPanel.java
> package-structure/scripts/my.jsp
>
> So id added this:
>
> add(HeaderContributor.forJavaScript(MyPanel.class, "scripts/my.js"));
>
> which renders like this:
>
>  src="/example/app/resources/test.components.MyPanel/scripts/my.js">
>
> That doesn't work. What did I get wrong?
>
> thanks,
>
> Pieter
>
>
>
>
>
> --
> Pieter Cogghe
> Ganzendries 186
> 9000 Gent
> 0487 10 14 21
>


-- 
Pieter Cogghe
Ganzendries 186
9000 Gent
0487 10 14 21

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


[Wicket-user] FileUploadField in a ModalWindow

2007-06-13 Thread diego
I have a form inside a ModalWindow, it has a FileUploadField. When I 
submit the form I get the exception "java.lang.IllegalStateException: 
ServletRequest does not contain multipart content"


It makes sense, because the request sent is not of the type 
"multipart/..." but instead "application/x-www-form-urlencoded" since 
it's an Ajax request.


Is there any way to make this work? All my other forms appear in a 
ModalWindow, so it wouldn't be nice at all to have this one form on the 
"opener" page.


I wouldn't mind if the form posted to a new instance of the page, I 
mean, not using an Ajax request for posting, which I guess it's done 
using a plain Button instead of an AjaxSubmitButton. When I tried that, 
I got a pop-up warning me I was going away from the ModalWindow (wich of 
course is precisely what I want to do, so I don't want to be warned)
begin:vcard
fn;quoted-printable:Diego L=C3=B3pez Le=C3=B3n
n;quoted-printable:L=C3=B3pez Le=C3=B3n;Diego
org:los-programadores.nl
adr:;;Av. Del Libertador 3624;Capital Federal;;;Argentina
email;internet:[EMAIL PROTECTED]
title:Young Padawan
tel;home:+54 11 45816610
x-mozilla-html:FALSE
url:http://www.los-programadores.nl
version:2.1
end:vcard

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


[Wicket-user] [Question] render(final MarkupStream markupStream)

2007-06-13 Thread Alex Objelean

I have a question about the render method. Why, before rendering, instead of
checking isVisibleInHierarchy(),  isVisible() is called? 
public final void render(final MarkupStream markupStream)
{
setMarkupStream(markupStream);
setFlag(FLAG_IS_RENDERED_ONCE, true);

// Determine if component is visible using it's authorization 
status
// and the isVisible property.
if (isRenderAllowed() && isVisible()) //why not 
isVisibleInHierarchy() ?? 
{
   //etc...
}
//more code.
 }

I am asking because I suspect a bug with the following StackTrace: 

Caused by: java.lang.NullPointerException
at wicket.markup.html.list.ListView.renderItem(ListView.java:676)
at wicket.markup.html.list.ListView.onRender(ListView.java:637)

I happens when an AjaxTabbedPanel is updated via ajax. The tabbedPanel
contains a holder Panel with a ListView child component. The visibility of
the holder Panel is decided dynamicaly by overriding isVisible method. 

Maybe later I will try to isolate this situation and to make it more clear.
Still, I would like to know if you've encountered something like this.

Thank you!
-- 
View this message in context: 
http://www.nabble.com/-Question--render%28final-MarkupStream-markupStream%29-tf3914413.html#a11098575
Sent from the Wicket - User mailing list archive at Nabble.com.


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


Re: [Wicket-user] How to create Dynamic Label?

2007-06-13 Thread Edi

Initially I have assigned one text in textbox like 
But I have checked in view page source html, it looks like 


I need to display .

Please explain. 


Carl-Eric Menzel-4 wrote:
> 
> Simply give them both the same Model instance. To have it updated while
> typing, give the textfield an ajax updating behavior and repaint the
> label.
>  
> Carl-Eric
> 
> 
> 
> From: [EMAIL PROTECTED] on behalf of Edi
> Sent: Wed 6/13/2007 09:05
> To: wicket-user@lists.sourceforge.net
> Subject: [Wicket-user] How to create Dynamic Label?
> 
> 
> 
> 
> Hello Experts,
> 
> I have one Label, and Text Box. If I enter any text in textbox, then it
> should be displayed in Label. How?
> 
> Please explain. (I am newbie.)
> 
> Thanking You.
> 
> 
> 
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-create-Dynamic-Label--tf3912921.html#a11098554
Sent from the Wicket - User mailing list archive at Nabble.com.


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


Re: [Wicket-user] label - input

2007-06-13 Thread Pieter Cogghe
The panel is part of the form, but only needs to access one property
of MyModel. The rest is handled by other components of the form. The
compoundPropertyModel is passed through like this:

MyForm form = new MyForm("form", );

Then within MyForm, the panel is added. I also want to reuse the panel
for multiple properties of different Models, so it shouldn't depend on
the property name ("text" in this case).

In MyForm I changed
  add(new MyPanel("textPanel", new PropertyModel(this.getModelObject(), "text"))
into
  add(new MyPanel("textPanel", new PropertyModel(this.getModel(), "text"))

which works.

thanks,

Pieter





2007/6/13, Gregory Maes <[EMAIL PROTECTED]>:
> Where do you use a CompoundPropertyModel?
>
> For your problem you have several solutions.
> Here is 2 of them :
>
>
> 1) - With the CompoundPropertyModel
>
> class MyModel {
>   private String text;
>
>   public MyModel(String text) {
> this.text = text;
>   }
>
>   public String getText(){
> return text;
>   }
>   public void setText(String text) {
> this.text = text;
>   }
> }
>
> class MyPanel extends Panel{
>
>   public MyPanel(String id, MyModel myModelObject){
> super(id, new CompoundPropertyModel(myModelObject));
> add(new TextField("text")); // the TextField id must be the name of your 
> object property
> (...)
>   }
>
> }
> MyModel myModelObject = new MyModel("hello");
> add(new MyPanel("textPanel", myModelObject);
>
>
>
> 2) - With the PropertyModel
>
>
> class MyModel {
>   private String text;
>
>   public MyModel(String text) {
> this.text = text;
>   }
>
>   public String getText(){
> return text;
>   }
>   public void setText(String text) {
> this.text = text;
>   }
> }
>
> class MyPanel extends Panel{
>
>   public MyPanel(String id, MyModel myModelObject){
> super(id);
> add(new TextField("panelField", new PropertyModel(myModelObject,"text")));
> (...)
>   }
>
> }
> MyModel myModelObject = new MyModel("hello");
> add(new MyPanel("textPanel", myModelObject);
>
>
> Enjoy :-)
>
> Greg
>
> Pieter Cogghe a écrit :
>
> > Thanks for the responses,
> >
> > I ran into trouble when using a panel. Somehow I can't get my model
> > property associated with the textfield in the panel.
> >
> > class MyModel {
> >(...)
> >   public String getText(){
> > return text;
> >   }
> >   (...)
> > }
> >
> > My panel (simplified)
> >
> > class MyPanel extends Panel{
> >
> >   public MyPanel(String id, IModel fieldModel){
> > super(id);
> > add(new TextField("panelField", fieldModel));
> > (...)
> >   }
> > }
> >
> > then I add the panel to the form (which has the MyModel as a
> > CompoundPropertyModel):
> >
> > add(new MyPanel("textPanel", new PropertyModel(this.getModelObject(), 
> > "text"))
> >
> > So the textfield within the panel should be associated with the "text"
> > property of the compoundProperty model (MyModel.getText).  Somehow I
> > feel I get something seriously wrong here.
> >
> > Thanks,
> >
> > Pieter
> >
> >
> >
> > 2007/6/13, Jean-Baptiste Quenot <[EMAIL PROTECTED]>:
> >
> >> * Pieter Cogghe:
> >>
> >>> Hi,
> >>>
> >>> (I'm new to Wicket and relatively new to Java so beware of stupid
> >>> questions and bad code)
> >>> I've got a form with a text input. I want it rendered like this:
> >>>
> >>> 
> >>> (...)
> >>> 
> >>>   Name
> >>>   
> >>> 
> >>> (...)
> >>> 
> >>>
> >>> I want to write my own component, so I only have to write this
> >>> template html-code:
> >>>
> >>> 
> >>> (...)
> >>> 
> >>>   
> >>> 
> >>> (...)
> >>> 
> >>>
> >>> The java code to add this to a page (TextFieldWithIdLabel of the
> >>> custom component)
> >>>
> >>> add(new TextFieldWithIdLabel("name").setLabel(new Model("Name")));
> >>>
> >>>
> >>> I'm not sure how to this, I started by extending TextField and
> >>> overwriting onTagComponent like this:
> >>>
> >>> protected void onComponentTag(ComponentTag tag){
> >>>   setOutputMarkupId(true);
> >>>   super.onComponentTag(tag)
> >>> }
> >>>
> >>> This works fine for the input-id, however I'm not sure how I can add
> >>> the label tag in front of it. Maybe I should write a custom panel?
> >>>
> >> A Panel would be nice, or otherwise there's a dirty hack to
> >> directly write tags into the response.
> >> --
> >>  Jean-Baptiste Quenot
> >> aka  John Banana   Qwerty
> >> http://caraldi.com/jbq/
> >>
> >> -
> >> This SF.net email is sponsored by DB2 Express
> >> Download DB2 Express C - the FREE version of DB2 express and take
> >> control of your XML. No limits. Just data. Click to get it now.
> >> http://sourceforge.net/powerbar/db2/
> >> ___
> >> Wicket-user mailing list
> >> Wicket-user@lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/wicket-user
> >>
> >>
> >
> >
> >
>
>
> -
> This SF.net email is sponsored by DB2 Express

Re: [Wicket-user] Evaluating Wicket

2007-06-13 Thread Johan Compagner
where does you page markup come from? because if you also can generate
that then you can dynamically generate the page markup an component
structure. That is what we (servoy) do

On 6/12/07, Patrick Angeles <[EMAIL PROTECTED]> wrote:
>
> We're up to the prototyping phase of a new JEE application. We are looking
> at
> EJB3 + some UI framework. There's actually two types of UI: a complex admin
> UI with around 100 concurrent users, and several public-facing, CMS-driven,
> branded web-sites with 1000s of concurrent users. Obviously, we'd prefer to
> use the same UI framework for both, but would need to take performance into
> account.
>
> I would love to use a component based framework for the admin UI. This
> leaves us with: JSF, Tapestry, Wicket, GWT... perhaps even SWT deployed via
> Java WebStart. The SWT solution is a bit risky, as we'd have to contend with
> corporate firewalls and basically come up with some HTTP tunneling solution
> (JAX-WS?). GWT is intriguing, but not an option for the CMS-driven
> front-end. Tapestry hasn't even entered into my mindshare, but I'm leery
> based on their track record of breaking backward-compatibility. This leaves
> us with Wicket and JSF. I've played with both technologies (v1.2.4 of
> Wicket), and JSF just scares me. I've used Facelets and Seam with JSF. We
> cannot take advantage of Seam because of the tiered architecture of our
> application (separate presentation and service clusters).
>
> So there's Wicket. Right now, I have the following reservations with Wicket:
> - Dates. When will 1.3 be released? How about 1.4?
> - Documentation. There's not one coherent document for 1.3... the Wiki is
> littered with bits of wisdom, but it's hard to tell what techniques work
> with or are obsoleted by version 1.3...
> - Books. When are the books coming out?
> - CMS... as I've said, the front-end is CMS driven, and because of load, I'd
> like to keep things stateless as much as possible (altho, all bets are off
> when the user logs in). I haven't yet found a good description of how 1.3
> handles session state. I'd also like to know if I can mount bookmarkable
> pages dynamically... say if someone were to create and publish a new CMS
> page from the admin app.
>
> I like what I've seen of Wicket so far, and I would love to deploy the first
> enterprise-class application running Wicket, but I need some advice to get
> rid of the butterflies in my stomach.
>
> Regards,
>
> - P
> --
> View this message in context:
> http://www.nabble.com/Evaluating-Wicket-tf3909204.html#a11084242
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>

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


Re: [Wicket-user] label - input

2007-06-13 Thread Gregory Maes
Where do you use a CompoundPropertyModel?

For your problem you have several solutions.
Here is 2 of them :


1) - With the CompoundPropertyModel

class MyModel {
  private String text;

  public MyModel(String text) {
this.text = text;
  }
 
  public String getText(){
return text;
  }
  public void setText(String text) {
this.text = text;
  }
}

class MyPanel extends Panel{

  public MyPanel(String id, MyModel myModelObject){
super(id, new CompoundPropertyModel(myModelObject));
add(new TextField("text")); // the TextField id must be the name of your 
object property
(...)
  }

}
MyModel myModelObject = new MyModel("hello");
add(new MyPanel("textPanel", myModelObject);



2) - With the PropertyModel


class MyModel {
  private String text;

  public MyModel(String text) {
this.text = text;
  }
 
  public String getText(){
return text;
  }
  public void setText(String text) {
this.text = text;
  }
}

class MyPanel extends Panel{

  public MyPanel(String id, MyModel myModelObject){
super(id);
add(new TextField("panelField", new PropertyModel(myModelObject,"text")));
(...)
  }

}
MyModel myModelObject = new MyModel("hello");
add(new MyPanel("textPanel", myModelObject);

 
Enjoy :-)

Greg

Pieter Cogghe a écrit :

> Thanks for the responses,
>
> I ran into trouble when using a panel. Somehow I can't get my model
> property associated with the textfield in the panel.
>
> class MyModel {
>(...)
>   public String getText(){
> return text;
>   }
>   (...)
> }
>
> My panel (simplified)
>
> class MyPanel extends Panel{
>
>   public MyPanel(String id, IModel fieldModel){
> super(id);
> add(new TextField("panelField", fieldModel));
> (...)
>   }
> }
>
> then I add the panel to the form (which has the MyModel as a
> CompoundPropertyModel):
>
> add(new MyPanel("textPanel", new PropertyModel(this.getModelObject(), "text"))
>
> So the textfield within the panel should be associated with the "text"
> property of the compoundProperty model (MyModel.getText).  Somehow I
> feel I get something seriously wrong here.
>
> Thanks,
>
> Pieter
>
>
>
> 2007/6/13, Jean-Baptiste Quenot <[EMAIL PROTECTED]>:
>   
>> * Pieter Cogghe:
>> 
>>> Hi,
>>>
>>> (I'm new to Wicket and relatively new to Java so beware of stupid
>>> questions and bad code)
>>> I've got a form with a text input. I want it rendered like this:
>>>
>>> 
>>> (...)
>>> 
>>>   Name
>>>   
>>> 
>>> (...)
>>> 
>>>
>>> I want to write my own component, so I only have to write this
>>> template html-code:
>>>
>>> 
>>> (...)
>>> 
>>>   
>>> 
>>> (...)
>>> 
>>>
>>> The java code to add this to a page (TextFieldWithIdLabel of the
>>> custom component)
>>>
>>> add(new TextFieldWithIdLabel("name").setLabel(new Model("Name")));
>>>
>>>
>>> I'm not sure how to this, I started by extending TextField and
>>> overwriting onTagComponent like this:
>>>
>>> protected void onComponentTag(ComponentTag tag){
>>>   setOutputMarkupId(true);
>>>   super.onComponentTag(tag)
>>> }
>>>
>>> This works fine for the input-id, however I'm not sure how I can add
>>> the label tag in front of it. Maybe I should write a custom panel?
>>>   
>> A Panel would be nice, or otherwise there's a dirty hack to
>> directly write tags into the response.
>> --
>>  Jean-Baptiste Quenot
>> aka  John Banana   Qwerty
>> http://caraldi.com/jbq/
>>
>> -
>> This SF.net email is sponsored by DB2 Express
>> Download DB2 Express C - the FREE version of DB2 express and take
>> control of your XML. No limits. Just data. Click to get it now.
>> http://sourceforge.net/powerbar/db2/
>> ___
>> Wicket-user mailing list
>> Wicket-user@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/wicket-user
>>
>> 
>
>
>   


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


Re: [Wicket-user] Wicket-user Digest, Vol 13, Issue 83

2007-06-13 Thread Joshi, Vivek
Thanks a lot, Igor! 

:)







Date: Tue, 12 Jun 2007 08:06:26 -0700
From: "Igor Vaynberg" <[EMAIL PROTECTED]>
Subject: Re: [Wicket-user] MultiFileUploadField displays two file
upload  controls on the screen
To: wicket-user@lists.sourceforge.net
Message-ID:
<[EMAIL PROTECTED]>
Content-Type: text/plain; charset="iso-8859-1"

try to change 
to just 

-igor


On 6/12/07, Joshi, Vivek <[EMAIL PROTECTED]> wrote:
>
>  Hi all,
>
> I have a question about the MultiFileUploadField class.
>
> Tried to use this class in my code to upload multiple files. The 
> problem is, on the screen it displays two upload file controls rather
than just one.
> One of these 2 controls works fine, but the other one is
non-functional.
>
> I will appreciate any help on getting rid of the non-functional upload

> file control from the screen.
>
> Please find a screenshot of the two controls as visible on the screen 
> attached with this mail for your reference.
>
> The input field in html is :
>
> 
>
> And the java code snippet is:
>
> MultiFileUploadField inpFileFld = *new* 
> MultiFileUploadField("inputFile",
> *new* PropertyModel(*this*,"inputFiles"), 10); where inputFiles is 
> defined as:
> Collection inputFiles = *null*; and later 
> form.add(inpFileFld);
>
>
> Thanks
>
> PS: I'm very new to Wicket. Please forgive if it's too naive a
question.
> thnx 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Tuesday, June 12, 2007 8:37 PM
To: wicket-user@lists.sourceforge.net
Subject: Wicket-user Digest, Vol 13, Issue 83

Send Wicket-user mailing list submissions to
wicket-user@lists.sourceforge.net

To subscribe or unsubscribe via the World Wide Web, visit
https://lists.sourceforge.net/lists/listinfo/wicket-user
or, via email, send a message with subject or body 'help' to
[EMAIL PROTECTED]

You can reach the person managing the list at
[EMAIL PROTECTED]

When replying, please edit your Subject line so it is more specific than
"Re: Contents of Wicket-user digest..."


Today's Topics:

   1. Re: nice url for DownloadLink (Igor Vaynberg)
   2. Re: AjaxSubmitButton changing Button's Name/Displayed
  Text/etc (Francisco Diaz Trepat - gmail)
   3. Re: AjaxSubmitButton changing Button's Name/Displayed
  Text/etc (Francisco Diaz Trepat - gmail)
   4. Re: Prototype scoped Spring beans (Igor Vaynberg)
   5. Re: MultiFileUploadField displays two file upload controls on
  the screen (Igor Vaynberg)


--

Message: 1
Date: Tue, 12 Jun 2007 07:52:55 -0700
From: "Igor Vaynberg" <[EMAIL PROTECTED]>
Subject: Re: [Wicket-user] nice url for DownloadLink
To: wicket-user@lists.sourceforge.net
Message-ID:
<[EMAIL PROTECTED]>
Content-Type: text/plain; charset="iso-8859-1"

you need to create a shared resource that lets you stream those files
and mount that. then create a link component that generates href with
urlfor(resourcereference)+"/report1.csv"; or something like that.

-igor


On 6/11/07, Jan Van Besien <[EMAIL PROTECTED]> wrote:
>
> Hi all
>
> I have a page with a list of DownloadLinks that allow the user to 
> download a bunch of text (csv) files. This works, but clients want to 
> access these files with a script, without having to click trough the 
> gui. This also works, but the url's that point to the files are 
> somewhat cryptic ofcourse.
>
> I know of the feature to mount bookmarkable pages etc to give them 
> nicer url's, and now I'm looking for a solution to do something 
> similar for DownloadLinks.
>
> Currently on my page the files (e.g. report1.csv, report2.csv, ...) 
> have url's like
>
>
> http://somehost/mycontextroot/?wicket:interface=:1:reports:0:fileLink:
> :ILinkListener
>
> http://somehost/mycontextroot/?wicket:interface=:1:reports:1:fileLink:
> :ILinkListener
>
> I would like this to be something like
>
> http://somehost/mycontextroot/reports/report1.csv
> http://somehost/mycontextroot/reports/report2.csv
>
> Thanks in advance
> Jan
>
> --
> --- This SF.net email is sponsored by DB2 Express Download DB2 Express

> C - the FREE version of DB2 express and take control of your XML. No 
> limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
-- next part --
An HTML attachment was scrubbed...

--

Message: 2
Date: Tue, 12 Jun 2007 11:54:09 -0300
From: "Francisco Diaz Trepat - gmail" <[EMAIL PROTECTED]>
Subject: Re: [Wicket-user] AjaxSubmitButton changing Button's
Name/Displayed  Text/etc
To: wicket-user@lists.sourceforge.net
Message-ID:
<[EMAIL PROTECTED]>
Content-Type: text/plain; charset="iso-8859-1"

Sorry

[Wicket-user] Link to javascript for a custom component

2007-06-13 Thread Pieter Cogghe
I made a panel MyPanel and want to link to some javascript file for
the behaviour

The directory structure looks like this:

package-structure/MyPanel.java
package-structure/scripts/my.jsp

So id added this:

add(HeaderContributor.forJavaScript(MyPanel.class, "scripts/my.js"));

which renders like this:



That doesn't work. What did I get wrong?

thanks,

Pieter





-- 
Pieter Cogghe
Ganzendries 186
9000 Gent
0487 10 14 21

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


Re: [Wicket-user] [GMAP contrib] IE7 Ajax target appendJavascript not working?

2007-06-13 Thread Nino Saturnino Martinez Vazquez Wael

I've created a quickstart project showing the behavior:

http://www.badongo.com/file/3410432


Please check and see if its the same error as you mentioned Matej.

Asking again:)

Do you think it would be a minor 
effort to backport the fix to 1.2.6, if it turns out that it are related??




regards Nino

Nino Saturnino Martinez Vazquez Wael wrote:
I'll build a quickstart to show this behavior and we can them determine 
if its the one you are talking about. Do you think it would be a minor 
effort to backport the fix to 1.2.6, if it turns out that it are related??


regards Nino

Nino Saturnino Martinez Vazquez Wael wrote:
  

Looking at the the post (I use paros as proxy), things are alright.

Im now suspecting that its our function that aren't merged correctly. We 
have a function called refreshGmap which we replace on ajax calls and 
then evaluate on the client, im not sure if this are updated correctly 
in IE.


The error I get are that the map wont go to the place where the user 
draged it, now when we intialize the gmap I in my example set the center 
to 0,0 and there it stays not matter what in IE. However it looks as 
everything are updated correctly. But the map keeps it center to 0,0 
which makes me belive that the refreshGmap function arent updated correctly.


So I guess it could be related to what you talked about in the first 
instance?


regards Nino

Matej Knopp wrote:
  


I dunno. Could be problem with ajax form serialization. Can you
intercept the post request to see what parameters are submitted?

-Matej

On 6/11/07, Nino Saturnino Martinez Vazquez Wael
<[EMAIL PROTECTED]> wrote:
  

  

Looking even further into the problem I can see that the values are
correct after the ajax post. So it seems that the models of our hidden
fields arent updated. Im not sure what todo about this, Matej mentioned
that it could be a problem with wicket 1.2.6 and IE7, im using IE6 are
the same problem there?

regards Nino

Nino Saturnino Martinez Vazquez Wael wrote:

  


In addition to the previous mail I would like to add, that we would like
to resolve this using wicket 1.2.6.

Now if anything are unclear or so please write and I'll try to explain
further.

Also the current version are the one available from SVN, I belive Iulian
upgraded the example so that its now using that aswell. So you can just
check out the code from wicket stuff repo if you want to see the code..


regards Nino

Nino Saturnino Martinez Vazquez Wael wrote:

  

  

Hi Matej

Currently gmap contrib are using wicket 1.2.6. And currently im testing
with IE 6 which has the problems I mentioned, the ajax calls seems to
yield no problems so far I can see we get a call when the form are
submitted and it calls back after processing. However form values arent
updated, im not sure if that has anything to do with the ajax part?

Im not sure how far we are in the process of upgrading the gmap contrib
to 1.3.


regards Nino

Matej Knopp wrote:



  


Can you please test it with latest wicket 1.3? There was a bug that
prevented IE7 from processing ajax requests properly, it might be
related.

-Matej

On 6/11/07, Nino Saturnino Martinez Vazquez Wael
<[EMAIL PROTECTED]> wrote:



  

  

Yes i'll try to explain in greater detail.

Looks like it was not the appendjavascript that wasnt working. But
something else.:)

Our hidden variables arent updated when using IE. Why they arent updated
correctly puzzles me, because just before the ajax call they seem to
have the correct values.

heres a snip of what I try to do(working everywhere but IE):

GEvent.addListener(googleMap, "dragend", function () {
var center = googleMap.getCenter();
var sW = googleMap.getBounds().getSouthWest();
var nE = googleMap.getBounds().getNorthEast();
document.getElementById("latitudeCenter").value=center.lat();
document.getElementById("longitudeCenter").value=center.lng();
document.getElementById("latitudeSW").value=sW.lat();
document.getElementById("longitudeSW").value=sW.lng();
document.getElementById("latitudeNE").value=nE.lat();
document.getElementById("longitudeNE").value=nE.lng();
document.getElementById("zoomLevel").value=googleMap.getZoom();
document.getElementById("gmap_ajaxGMapUpdatingFormSubmit").onclick();
});

So the different variables are stored in hidden fields. Just before the
last entry above, every value looks ok.

Here are some of the java server side code:
Form gMapUpdatingForm = new Form("gmapUpdatingForm");
gMapUpdatingForm.setOutputMarkupId(true);
gMapUpdatingForm.add(new HiddenField("latitudeCenter", new
PropertyModel(gMap.getCenter(),
"latitude"))
{
public IConverter getConverter()
{
return getUSConverter();
}
});
gMapUpdatingForm.add(new HiddenField("longitudeCenter", new
PropertyModel(gMap.getCenter(),
"longitude

Re: [Wicket-user] nice url for DownloadLink

2007-06-13 Thread Johan Compagner
somehow there is also txt/strings written to the output, can you set a
breakt point in the br.close() method and see what it wants to write?

On 6/13/07, Jan Van Besien <[EMAIL PROTECTED]> wrote:
> Jean-Baptiste Quenot wrote:
> > The concepts described in the static pages examples are the same
> > in 1.2.6.  You would just have to copy
> > URIRequestTargetUrlCodingStrategy in your project, it is
> > compatible with 1.2.6.
>
> Ok, that's what I did.
>
> In the WebPage class I have something like (StaticLink as in the example)
>
> StaticLink fileLink = new StaticLink("fileLink", new Model("reports/" +
> file.getAbsolutePath()));
>
> In the WebApplication class I do
>
> mount("/reports", new URIRequestTargetUrlCodingStrategy("/reports") {
>  public IRequestTarget decode(RequestParameters requestParameters) {
>  String path = getURI(requestParameters);
>  FileResourceStream fileStream = new FileResourceStream(new
> File(path));
>  return new ResourceStreamRequestTarget(fileStream);
>  }
> });
>
> Note that I use a FileResourceStream because my files are not in the
> webapp. Now when I try to browse to a certain file, I get this in a
> JBoss server
>
> 08:09:44,384 ERROR [[rtApplication]] Servlet.service() for servlet
> rtApplication threw exception
> java.lang.IllegalStateException: getOutputStream() has already been
> called for this response
>  at
> org.apache.catalina.connector.Response.getWriter(Response.java:596)
>  at
> org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:186)
>  at wicket.protocol.http.WebResponse.write(WebResponse.java:315)
>  at
> wicket.protocol.http.BufferedWebResponse.close(BufferedWebResponse.java:75)
>  at wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:229)
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
>  at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
>  at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
>  at
> org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
>  at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
>  at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
>  at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
>  at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
>  at
> org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
>  at
> org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
>  at
> org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
>  at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
>  at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
>  at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
>  at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
>  at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
>  at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
>  at
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
>  at
> org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
>  at java.lang.Thread.run(Thread.java:595)
>
> Strange thing: if I replace the 'new File(path)' with 'new
> File("/tmp/test.txt")' it actually works (returning test.txt for every
> link ofcourse).
>
> Any ideas?
>
> thnx
> Jan
>
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>

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


Re: [Wicket-user] Prototype scoped Spring beans

2007-06-13 Thread Rüdiger Schulz

Igor, that makes perfect sense, thank you very much. I still have to try it,
but if it works with @Configurable, this will be great! It is definitely
better than implementing readResolve(), and manually "injecting" the
dependencies via reflection, as someone suggested on the myfaces list.

I'll post my experience after trying it.


Rüdiger

2007/6/12, Igor Vaynberg <[EMAIL PROTECTED]>:


if you think about it, your problem comes from the fact that you do not
want to serialize this stateful bean because it has references to other
beans which are not serializable and yet you want to put it into
httpsession.

the requirement of anything you put into httpsession is that it _is_
serializable for replication to other server nodes, etc. - unless you use
some nonstandard replication technique.

shale will run into the same limitation. its "dialog" scope is pretty much
the same as making something a field of a page. that field is there while
the page is, and is then cleaned up when the page is not needed. however it
runs into the same limitation because it most likely uses httpsession for
storing that dialog-scoped data and thus you are back to serialization
problem.

now a solution i see is thus. make this bean @Configurable and
serializable. keep all dependencies in transient vars. that way when the
bean is serialized its dependencies are not, and when it is deserialized i
think @Configurable wires in an intercept that will reinject the bean. that
way you get the best of both worlds. makes sense?

-igor

On 6/12/07, Rüdiger Schulz <[EMAIL PROTECTED]> wrote:
>
> 1) Convert the bean to a stateless service, and keep the state in
> another bean.
> 2) Make the bean references transient, and re-fetch them manually (i.e.
> without DI from spring) after de-serialization.
>
> There is nothing wrong with 1), I use it in other parts of my app. It
> sure would be nice to have stateful beans with DI-ed application logic, but
> 2) seems very clumsy. However, later in the above thread, someone mentions
> the dialog feature of Shale:
> http://mail-archives.apache.org/mod_mbox/myfaces-users/200609.mbox/[EMAIL 
PROTECTED]
>
>
> Maybe something like that could be applied to wicket as well?
>
>


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





--
greetings from Berlin,

Rüdiger Schulz

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


Re: [Wicket-user] label - input

2007-06-13 Thread Pieter Cogghe
Thanks for the responses,

I ran into trouble when using a panel. Somehow I can't get my model
property associated with the textfield in the panel.

class MyModel {
   (...)
  public String getText(){
return text;
  }
  (...)
}

My panel (simplified)

class MyPanel extends Panel{

  public MyPanel(String id, IModel fieldModel){
super(id);
add(new TextField("panelField", fieldModel));
(...)
  }
}

then I add the panel to the form (which has the MyModel as a
CompoundPropertyModel):

add(new MyPanel("textPanel", new PropertyModel(this.getModelObject(), "text"))

So the textfield within the panel should be associated with the "text"
property of the compoundProperty model (MyModel.getText).  Somehow I
feel I get something seriously wrong here.

Thanks,

Pieter



2007/6/13, Jean-Baptiste Quenot <[EMAIL PROTECTED]>:
> * Pieter Cogghe:
> > Hi,
> >
> > (I'm new to Wicket and relatively new to Java so beware of stupid
> > questions and bad code)
> > I've got a form with a text input. I want it rendered like this:
> >
> > 
> > (...)
> > 
> >   Name
> >   
> > 
> > (...)
> > 
> >
> > I want to write my own component, so I only have to write this
> > template html-code:
> >
> > 
> > (...)
> > 
> >   
> > 
> > (...)
> > 
> >
> > The java code to add this to a page (TextFieldWithIdLabel of the
> > custom component)
> >
> > add(new TextFieldWithIdLabel("name").setLabel(new Model("Name")));
> >
> >
> > I'm not sure how to this, I started by extending TextField and
> > overwriting onTagComponent like this:
> >
> > protected void onComponentTag(ComponentTag tag){
> >   setOutputMarkupId(true);
> >   super.onComponentTag(tag)
> > }
> >
> > This works fine for the input-id, however I'm not sure how I can add
> > the label tag in front of it. Maybe I should write a custom panel?
>
> A Panel would be nice, or otherwise there's a dirty hack to
> directly write tags into the response.
> --
>  Jean-Baptiste Quenot
> aka  John Banana   Qwerty
> http://caraldi.com/jbq/
>
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>


-- 
Pieter Cogghe
Ganzendries 186
9000 Gent
0487 10 14 21

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


Re: [Wicket-user] Input type="image" and relative urls in Wicket 1.3.0-incubating-SNAPSHOT

2007-06-13 Thread Mats Norén
Thanks,
I solved it by adding the behavior used in the
RelativePathPrefixHandler to my custom button. I'll take a look at the
ContextRelativeResource.

/Mats

On 6/12/07, Al Maw <[EMAIL PROTECTED]> wrote:
> Mats Norén wrote:
> > This must have been asked a million times but I couldn't find the right
> > answer in the list archives.
>
> I think it's only been asked once, actually. ;-)
>
> > I've upgraded one of my applications that uses 1.2.3 to 1.3 snapshot.
> > In the process I got rid of my PrependContextPathFilter since wicket
> > is supposed to make url:s relative.
> > It works for everything but my  > wicket:id="search" > - elements.
> >
> > Should wicket take care of them as well?
>
> The issue is that the relative URL prepender only acts on things that
> are not Wicket components. You have a wicket:id in there, so it leaves
> things alone.
>
> What component are you using for the ? There's an ImageButton
> component, which expects a WebResource, or a ResourceReference.
>
> I've just added an org.apache.wicket.resource.ContextRelativeResource,
> which you can use for this.
>
> I guess if you use a Button component, maybe it should rewrite the src
> attribute for you automatically, provided you don't have an attribute
> modifier attached. If you'd like this functionality, please open a JIRA
> issue.
>
> Best regards,
>
> Al
>
> --
> Alastair Maw
> Wicket-biased blog at http://herebebeasties.com
>
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>

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


Re: [Wicket-user] jUnit-testing and not existing images

2007-06-13 Thread Sven Schliesing

> As a quick workaround you can do this:
> 
> tester.startPage(WebTestPage.class);
> 
> Does it work?

This results in:

junit.framework.AssertionFailedError: page was null
at 
org.apache.wicket.util.tester.WicketTester.assertResult(WicketTester.java:499)
at 
org.apache.wicket.util.tester.WicketTester.assertRenderedPage(WicketTester.java:373)
at default.WebTestPageTest.simpleTest(WebTestPageTest.java:16)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at 
org.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99)
at 
org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.java:81)
at 
org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
at 
org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75)
at 
org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45)
at 
org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:71)
at 
org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35)
at 
org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42)
at 
org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
at 
org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
at 
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
at 
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)


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


Re: [Wicket-user] [GMAP contrib] IE7 Ajax target appendJavascript not working?

2007-06-13 Thread Nino Saturnino Martinez Vazquez Wael
I'll build a quickstart to show this behavior and we can them determine 
if its the one you are talking about. Do you think it would be a minor 
effort to backport the fix to 1.2.6, if it turns out that it are related??

regards Nino

Nino Saturnino Martinez Vazquez Wael wrote:
> Looking at the the post (I use paros as proxy), things are alright.
>
> Im now suspecting that its our function that aren't merged correctly. We 
> have a function called refreshGmap which we replace on ajax calls and 
> then evaluate on the client, im not sure if this are updated correctly 
> in IE.
>
> The error I get are that the map wont go to the place where the user 
> draged it, now when we intialize the gmap I in my example set the center 
> to 0,0 and there it stays not matter what in IE. However it looks as 
> everything are updated correctly. But the map keeps it center to 0,0 
> which makes me belive that the refreshGmap function arent updated correctly.
>
> So I guess it could be related to what you talked about in the first 
> instance?
>
> regards Nino
>
> Matej Knopp wrote:
>   
>> I dunno. Could be problem with ajax form serialization. Can you
>> intercept the post request to see what parameters are submitted?
>>
>> -Matej
>>
>> On 6/11/07, Nino Saturnino Martinez Vazquez Wael
>> <[EMAIL PROTECTED]> wrote:
>>   
>> 
>>> Looking even further into the problem I can see that the values are
>>> correct after the ajax post. So it seems that the models of our hidden
>>> fields arent updated. Im not sure what todo about this, Matej mentioned
>>> that it could be a problem with wicket 1.2.6 and IE7, im using IE6 are
>>> the same problem there?
>>>
>>> regards Nino
>>>
>>> Nino Saturnino Martinez Vazquez Wael wrote:
>>> 
>>>   
 In addition to the previous mail I would like to add, that we would like
 to resolve this using wicket 1.2.6.

 Now if anything are unclear or so please write and I'll try to explain
 further.

 Also the current version are the one available from SVN, I belive Iulian
 upgraded the example so that its now using that aswell. So you can just
 check out the code from wicket stuff repo if you want to see the code..


 regards Nino

 Nino Saturnino Martinez Vazquez Wael wrote:

   
 
> Hi Matej
>
> Currently gmap contrib are using wicket 1.2.6. And currently im testing
> with IE 6 which has the problems I mentioned, the ajax calls seems to
> yield no problems so far I can see we get a call when the form are
> submitted and it calls back after processing. However form values arent
> updated, im not sure if that has anything to do with the ajax part?
>
> Im not sure how far we are in the process of upgrading the gmap contrib
> to 1.3.
>
>
> regards Nino
>
> Matej Knopp wrote:
>
>
> 
>   
>> Can you please test it with latest wicket 1.3? There was a bug that
>> prevented IE7 from processing ajax requests properly, it might be
>> related.
>>
>> -Matej
>>
>> On 6/11/07, Nino Saturnino Martinez Vazquez Wael
>> <[EMAIL PROTECTED]> wrote:
>>
>>
>>
>>   
>> 
>>> Yes i'll try to explain in greater detail.
>>>
>>> Looks like it was not the appendjavascript that wasnt working. But
>>> something else.:)
>>>
>>> Our hidden variables arent updated when using IE. Why they arent updated
>>> correctly puzzles me, because just before the ajax call they seem to
>>> have the correct values.
>>>
>>> heres a snip of what I try to do(working everywhere but IE):
>>>
>>> GEvent.addListener(googleMap, "dragend", function () {
>>> var center = googleMap.getCenter();
>>> var sW = googleMap.getBounds().getSouthWest();
>>> var nE = googleMap.getBounds().getNorthEast();
>>> document.getElementById("latitudeCenter").value=center.lat();
>>> document.getElementById("longitudeCenter").value=center.lng();
>>> document.getElementById("latitudeSW").value=sW.lat();
>>> document.getElementById("longitudeSW").value=sW.lng();
>>> document.getElementById("latitudeNE").value=nE.lat();
>>> document.getElementById("longitudeNE").value=nE.lng();
>>> document.getElementById("zoomLevel").value=googleMap.getZoom();
>>> document.getElementById("gmap_ajaxGMapUpdatingFormSubmit").onclick();
>>> });
>>>
>>> So the different variables are stored in hidden fields. Just before the
>>> last entry above, every value looks ok.
>>>
>>> Here are some of the java server side code:
>>> Form gMapUpdatingForm = new Form("gmapUpdatingForm");
>>> gMapUpdatingForm.setOutputMarkupId(true);
>>> gMapUpdatingForm.add(new HiddenField("latitudeCenter", new
>>> PropertyModel(gMap.getCenter(),
>>> "latitude"))
>>> {
>>> public IC

Re: [Wicket-user] label - input

2007-06-13 Thread Jean-Baptiste Quenot
* Pieter Cogghe:
> Hi,
> 
> (I'm new to Wicket and relatively new to Java so beware of stupid
> questions and bad code)
> I've got a form with a text input. I want it rendered like this:
> 
> 
> (...)
> 
>   Name
>   
> 
> (...)
> 
> 
> I want to write my own component, so I only have to write this
> template html-code:
> 
> 
> (...)
> 
>   
> 
> (...)
> 
> 
> The java code to add this to a page (TextFieldWithIdLabel of the
> custom component)
> 
> add(new TextFieldWithIdLabel("name").setLabel(new Model("Name")));
> 
> 
> I'm not sure how to this, I started by extending TextField and
> overwriting onTagComponent like this:
> 
> protected void onComponentTag(ComponentTag tag){
>   setOutputMarkupId(true);
>   super.onComponentTag(tag)
> }
> 
> This works fine for the input-id, however I'm not sure how I can add
> the label tag in front of it. Maybe I should write a custom panel?

A Panel would be nice, or otherwise there's a dirty hack to
directly write tags into the response.
-- 
 Jean-Baptiste Quenot
aka  John Banana   Qwerty
http://caraldi.com/jbq/

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


Re: [Wicket-user] jUnit-testing and not existing images

2007-06-13 Thread Jean-Baptiste Quenot
* Sven Schliesing:
> Hi,
> 
> I just came across the following error:
> junit.framework.AssertionFailedError: expected: but 
> was:
> 
> To narrow it down I created a simple Testclass with the according html. 
> I also added a test case. Here we go:
> 
> WebTestPage.java:
> -
> [...]
> 
> public class WebTestPage extends WebPage {
> 
>   public WebTestPage() {
>   Model icon;
>   icon = new Model("gfx/offline.gif");
>   add(new Image("statusImage", icon));
>   }
>   
> }
> -
> 
> WebTestPage.html:
> -
> 
>   
>   
>   
>   
> 
> -
> 
> WebTestPageTest.java:
> -
> [...]
> 
> public class WebTestPageTest {
>   
>   private WicketTester tester = new WicketTester();
>   
>   @Test
>   public void simpleTest() throws Exception {
>   WebTestPage page = new WebTestPage();
>   tester.startPage(page);
>   tester.assertRenderedPage(WebTestPage.class);
>   }
>   
> }

As a quick workaround you can do this:

tester.startPage(WebTestPage.class);

Does it work?
-- 
 Jean-Baptiste Quenot
aka  John Banana   Qwerty
http://caraldi.com/jbq/

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


Re: [Wicket-user] nice url for DownloadLink

2007-06-13 Thread Jean-Baptiste Quenot
* Jan Van Besien:
> Jean-Baptiste Quenot wrote:
> > The concepts described in the static pages examples are the same
> > in 1.2.6.  You would just have to copy
> > URIRequestTargetUrlCodingStrategy in your project, it is
> > compatible with 1.2.6.
> 
> Ok, that's what I did.
> 
> In the WebPage class I have something like (StaticLink as in the example)
> 
> StaticLink fileLink = new StaticLink("fileLink", new Model("reports/" + 
> file.getAbsolutePath()));
> 
> In the WebApplication class I do
> 
> mount("/reports", new URIRequestTargetUrlCodingStrategy("/reports") {
>  public IRequestTarget decode(RequestParameters requestParameters) {
>  String path = getURI(requestParameters);
>  FileResourceStream fileStream = new FileResourceStream(new 
> File(path));
>  return new ResourceStreamRequestTarget(fileStream);
>  }
> });
> 
> Note that I use a FileResourceStream because my files are not in the 
> webapp. Now when I try to browse to a certain file, I get this in a 
> JBoss server
> 
> 08:09:44,384 ERROR [[rtApplication]] Servlet.service() for servlet 
> rtApplication threw exception
> java.lang.IllegalStateException: getOutputStream() has already been 
> called for this response
>  at 
> org.apache.catalina.connector.Response.getWriter(Response.java:596)
>  at 
> org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:186)
>  at wicket.protocol.http.WebResponse.write(WebResponse.java:315)
>  at 
> wicket.protocol.http.BufferedWebResponse.close(BufferedWebResponse.java:75)
>  at wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:229)
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
>  at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
>  at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
>  at 
> org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
>  at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
>  at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
>  at 
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
>  at 
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
>  at 
> org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
>  at 
> org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
>  at 
> org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
>  at 
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
>  at 
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
>  at 
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
>  at 
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
>  at 
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
>  at 
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
>  at 
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
>  at 
> org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
>  at java.lang.Thread.run(Thread.java:595)
> 
> Strange thing: if I replace the 'new File(path)' with 'new 
> File("/tmp/test.txt")' it actually works (returning test.txt for every 
> link ofcourse).

If this is Wicket 1.2.6, yes I can understand this issue, and it's
fixed in 1.3.  It was a bug in BufferedWebResponse, not buffering
enough.

Back to your problem: does it work on Tomcat or Jetty?

Note that for security reasons you shouldn't mention the absolute
path in the URL.  I advise to prepend the root path in the code.
Also be careful of the double slash!  By reading your code, the
request translates to:

reports//path/to/file
-- 
 Jean-Baptiste Quenot
aka  John Banana   Qwerty
http://caraldi.com/jbq/

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


Re: [Wicket-user] How to create Dynamic Label?

2007-06-13 Thread Carl-Eric Menzel
Simply give them both the same Model instance. To have it updated while typing, 
give the textfield an ajax updating behavior and repaint the label.
 
Carl-Eric



From: [EMAIL PROTECTED] on behalf of Edi
Sent: Wed 6/13/2007 09:05
To: wicket-user@lists.sourceforge.net
Subject: [Wicket-user] How to create Dynamic Label?




Hello Experts,

I have one Label, and Text Box. If I enter any text in textbox, then it
should be displayed in Label. How?

Please explain. (I am newbie.)

Thanking You.



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


[Wicket-user] How to create Dynamic Label?

2007-06-13 Thread Edi

Hello Experts,

I have one Label, and Text Box. If I enter any text in textbox, then it
should be displayed in Label. How?

Please explain. (I am newbie.)

Thanking You.
-- 
View this message in context: 
http://www.nabble.com/How-to-create-Dynamic-Label--tf3912921.html#a11093901
Sent from the Wicket - User mailing list archive at Nabble.com.


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