Re: [Wicket-user] wicket emailaddress validation incorrect

2006-06-21 Thread Frank Bille Jensen
On Tue, 2006-06-20 at 08:42 -0700, Igor Vaynberg wrote:
 i wonder how big the created state machine is for this beast :)


It's quite big. I just tried to profile it and compare it to the regex,
which Michael Korthuis provided. If I can calculate correctly it is over
100 times larger than Michaels regex.

Attached is the memory tables for the Pattern object in the to different
tests.


Regards
Frank Bille
Avaleo


monster_emailvalidation_pattern.png
Description: PNG image


small_emailvalidation_pattern.png
Description: PNG image
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] How to reuse panels with form fields

2006-06-21 Thread Hugo Visser
Hi,As my first wicket exercise I thought I'd create a little utility like wicket application. My application needs to log in to a server on a few occations. I'd like to create a generic login panel and reuse that on my other pages when credentials are required. 
So I started of creating a panel with a form on it and all is well. However that form needs a submit button to update the model, and that's not what I want :) I'd like to incorporate the login panel in another page as part of one form. For example, I'd like to present a page with login credentials, some action and a do it button. It must be even possible to have more then one login panels on a page, if the action involves multiple servers. 
Things that I've come up with is using ajax and onblur events to update the login model, but that doesn't seem the right thing to me.Can anybody give me some hints/tips on this to get my app started?
Thanks,Hugo
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] How to reuse panels with form fields

2006-06-21 Thread Eelco Hillenius
Just put the form components on your panel, and nest that panel in any
form you want. Their models will be updated, no matter how deep the
components are nested.

Eelco


On 6/20/06, Hugo Visser [EMAIL PROTECTED] wrote:
 Hi,

 As my first wicket exercise I thought I'd create a little utility like
 wicket application. My application needs to log in to a server on a few
 occations. I'd like to create a generic login panel and reuse that on my
 other pages when credentials are required.

 So I started of creating a panel with a form on it and all is well. However
 that form needs a submit button to update the model, and that's not what I
 want :) I'd like to incorporate the login panel in another page as part of
 one form. For example, I'd like to present a page with login credentials,
 some action and a do it button. It must be even possible to have more then
 one login panels on a page, if the action involves multiple servers.
 Things that I've come up with is using ajax and onblur events to update the
 login model, but that doesn't seem the right thing to me.

 Can anybody give me some hints/tips on this to get my app started?

 Thanks,

 Hugo



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





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


Re: [Wicket-user] Cache control for shared resources

2006-06-21 Thread jan_bar
Thanks, now I can create my own NonCacheablePackageResource and override
setHeaders().

Jan

Eelco Hillenius [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 I changed PackageResource so that the constructor is protected instead
 of private now. Having a private constructor in a non final class
 doesn't make sense anyway.

 Could you try if extending that class and overriding setHeaders does
 the job for you?

 Eelco






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


Re: [Wicket-user] How to reuse panels with form fields

2006-06-21 Thread Hugo Visser
Thanks, that works. Come to think of it, it sounds really obvious actually :)Thanks again,HugoOn 6/21/06, Eelco Hillenius 
[EMAIL PROTECTED] wrote:Just put the form components on your panel, and nest that panel in any
form you want. Their models will be updated, no matter how deep thecomponents are nested.EelcoOn 6/20/06, Hugo Visser [EMAIL PROTECTED] wrote:
 Hi, As my first wicket exercise I thought I'd create a little utility like wicket application. My application needs to log in to a server on a few occations. I'd like to create a generic login panel and reuse that on my
 other pages when credentials are required. So I started of creating a panel with a form on it and all is well. However that form needs a submit button to update the model, and that's not what I
 want :) I'd like to incorporate the login panel in another page as part of one form. For example, I'd like to present a page with login credentials, some action and a do it button. It must be even possible to have more then
 one login panels on a page, if the action involves multiple servers. Things that I've come up with is using ajax and onblur events to update the login model, but that doesn't seem the right thing to me.
 Can anybody give me some hints/tips on this to get my app started? Thanks, Hugo ___ Wicket-user mailing list
 Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
___Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] ajax modal dialog

2006-06-21 Thread Nili Adoram
Dear Mr. Knopp,
On February you have posted a wonderful example of an ajax modal dialog.
Did you upgrade this example to wicket-1.2?
Thanks for your cooperation,
Nili



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


[Wicket-user] Logins and Sessions...

2006-06-21 Thread Pablo Cabezas
Hi!This is my very first post here, so I'm going to introduce my self briefly. My name is Pablo Cabezas, and I work in San sebastián (Spain). This list is very helpful and the atmosphere very pleasant. I hope to be of some aid (if not by now, at least in the future near ;-) ).
I have to develop a web application using Wicket and Osgi, so my first battle is against the famous signin example.I have simply created two web pages (modifying the example and pasting the classes in my own project). These classes are WebPageLogin and WebPageMain. The first class extends from a WebPage (typical from Wicket), while the second one extends from an AuthenticatedWebPage (as in the signin example figures).
The problem is in this piece of code, located at the WebApplication class:protected void init()
 {
  getSecuritySettings().setAuthorizationStrategy(new IAuthorizationStrategy()
  {
   public boolean isActionAuthorized(Component component, Action action)
   {
return true;
   }
   public boolean isInstantiationAuthorized(Class componentClass)
   {
if (AuthenticatedWebPage.class.isAssignableFrom(componentClass))
{
 // Is user signed in? 
 if (((SignInSession)Session.get()).isSignedIn())
 {
  // okay to proceed
  return true;
 }
 // Force sign in
 throw new RestartResponseAtInterceptPageException(WebPageLogin.class);
}
return true;
   }
  });
 }and exactly in the if (((SignInSession)Session.get()).isSignedIn()) line. If I comment this line the browser shows the WebPageMain without any problem. The error that appears with this condition is:

UnexpectedRuntimeException	
 ...WicketMessage: Can't instantiate page using constructor public es.ceit.wicket.iFusionWebApp.view.pages.WebPageMain(wicket.PageParameters) and argument Root cause:java.lang.ClassCastException
: wicket.protocol.http.WebSession at es.ceit.wicket.iFusionWebApp.view.FusionApplication$1.isInstantiationAuthorized(FusionApplication.java:71) at wicket.Application$1.onInstantiation(Application.java:243)
 at wicket.Application.notifyComponentInstantiationListeners(Application.java:775) at wicket.Component.init(Component.java:577) at wicket.MarkupContainer.init(MarkupContainer.java:123)
 at wicket.Page.init(Page.java:208) ...
The code is practically a copy-paste from the example, so I feel I'm missing something... Anybody could tell me something to go around?Thank you very much!Pablo Cabezas

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


Re: [Wicket-user] ajax modal dialog

2006-06-21 Thread Matej Knopp
Hi, I actually haven't done that yet, although it is on my to-do list. 
Hopefully in couple of weeks I'll look into it.

-Matej

Nili Adoram wrote:
 Dear Mr. Knopp,
 On February you have posted a wonderful example of an ajax modal dialog.
 Did you upgrade this example to wicket-1.2?
 Thanks for your cooperation,
 Nili
 
 
 
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 



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


[Wicket-user] Beginner Form Questions

2006-06-21 Thread Stefan Arentz
I have two simple use cases that I can't figure out how to implement with Wicket.Example form. Pretty basic and works.public class CreateAdministratorPage extends WebPage{ @SpringBean private CreateAdministratorFacade mCreateAdministratorFacade;
 public CreateAdministratorPage() { add(new FeedbackPanel(feedback)); add(new AdministratorForm(administratorForm, new Administrator())); } class AdministratorForm extends Form
 { public AdministratorForm(String name, Administrator administrator) { super(name, new CompoundPropertyModel(administrator)); add(new RequiredTextField(name));
 add(new RequiredTextField(emailAddress).add(EmailAddressPatternValidator.getInstance())); } @Override protected void onSubmit() { Administrator administrator = (Administrator) getModelObject();
 mCreateAdministratorFacade.createAdministrator(administrator); } }}1. Checking a confirmationField.I want to add an emailConfirmation field to the form. But, I don't want to add this field to the Administrator object. What is common practice to implement this? Create a new AdministratorModel like this:
public class AdministratorModel { public Administrator administrator; public String emailConfirmation;}together with: public AdministratorForm(String name, AdministratorModel administrator)

 {
 super(name, new CompoundPropertyModel(administrator));
 add(new RequiredTextField(administrator.name));
 add(new RequiredTextField(administrator.emailAddress).add(EmailAddressPatternValidator.getInstance())); add(new RequiredTextField(emailAddressConfirmation).add(EmailAddressPatternValidator.getInstance
()));
 }
Or is there an easier way?2. Doing validation on submit.The code above works, but what I really need to do is something like this: protected void onSubmit()
 {
 Administrator administrator = (Administrator) getModelObject();
 result = mCreateAdministratorFacade.createAdministrator(administrator); if (result == SUCCESS) { REDIRECT TO A SUCCESS PAGE BASED ON THE EMAIL ADDRESS } else {
 SET A GLOBAL FORM ERROR, SHOW THE FORM AGAIN }
 }
I read the Form documentation but it is not really clear how the Form workflow is setup and where I need to plugin.S.
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] anybody in NL going to NL-JUG tomorrow?

2006-06-21 Thread Stefan Arentz
I was there too. For the first time. Was interesting, but a lot of incrowd. Eye opener for me was the 'JSF Pitfalls' session. I'm glad I chose Wicket instead of JSF :-)S.On 6/15/06, 
Johan Compagner [EMAIL PROTECTED] wrote:
i will be thereJohan
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Logins and Sessions...

2006-06-21 Thread Pablo Cabezas
Here am I again. The problem is solved, doing it the way the libraryExample does. So sorry for the flame :-PSalutes, PabloOn 6/21/06, 
Pablo Cabezas [EMAIL PROTECTED] wrote:
Hi!This is my very first post here, so I'm going to introduce my self briefly. My name is Pablo Cabezas, and I work in San sebastián (Spain). This list is very helpful and the atmosphere very pleasant. I hope to be of some aid (if not by now, at least in the future near ;-) ).
I have to develop a web application using Wicket and Osgi, so my first battle is against the famous signin example.I have simply created two web pages (modifying the example and pasting the classes in my own project). These classes are WebPageLogin and WebPageMain. The first class extends from a WebPage (typical from Wicket), while the second one extends from an AuthenticatedWebPage (as in the signin example figures).
The problem is in this piece of code, located at the WebApplication class:protected void init()
 {
  getSecuritySettings().setAuthorizationStrategy(new IAuthorizationStrategy()
  {
   public boolean isActionAuthorized(Component component, Action action)
   {
return true;
   }
   public boolean isInstantiationAuthorized(Class componentClass)
   {
if (AuthenticatedWebPage.class.isAssignableFrom(componentClass))
{
 // Is user signed in? 
 if (((SignInSession)Session.get()).isSignedIn())
 {
  // okay to proceed
  return true;
 }
 // Force sign in
 throw new RestartResponseAtInterceptPageException(WebPageLogin.class);
}
return true;
   }
  });
 }and exactly in the if (((SignInSession)Session.get()).isSignedIn()) line. If I comment this line the browser shows the WebPageMain without any problem. The error that appears with this condition is:

UnexpectedRuntimeException	
 ...WicketMessage: Can't instantiate page using constructor public es.ceit.wicket.iFusionWebApp.view.pages.WebPageMain(wicket.PageParameters) and argument Root cause:java.lang.ClassCastException
: wicket.protocol.http.WebSession at es.ceit.wicket.iFusionWebApp.view.FusionApplication$1.isInstantiationAuthorized(FusionApplication.java:71) at wicket.Application$1.onInstantiation(Application.java:243)
 at wicket.Application.notifyComponentInstantiationListeners(Application.java:775) at wicket.Component.init(Component.java:577) at wicket.MarkupContainer.init(MarkupContainer.java
:123) at wicket.Page.init(Page.java:208) ...
The code is practically a copy-paste from the example, so I feel I'm missing something... Anybody could tell me something to go around?Thank you very much!Pablo Cabezas




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


Re: [Wicket-user] Beginner Form Questions

2006-06-21 Thread Martijn Dashorst
Re your first point: I'd say you need to register your own converter.
This will remove the need for a special component. Converters are not
the most beautiful part of wicket (yet), but it is not that hard to
accomplish.

in Application#init() :
applicationSettings.setConverterFactory(new MyConverterFactory());

in your own converter factory:


DateFormat dateFormat = new 
SimpleDateFormat(dd-MM-);
Locale nl = new Locale(nl, NL);
DateConverter dateConverter = new DateConverter();
dateConverter.setDateFormat(nl, dateFormat);
StringConverter stringConverter = new StringConverter();

DateToStringConverter dateToStringConverter = new 
DateToStringConverter();
dateToStringConverter.setDateFormat(nl, dateFormat);

// voeg alle java.util.Date afgeleidingen toe, 
aangezien onze
// grote Hibernate vriend van alles terug kan geven.

stringConverter.set(java.util.Date.class, 
dateToStringConverter);
stringConverter.set(java.sql.Date.class, 
dateToStringConverter);
stringConverter.set(java.sql.Timestamp.class, 
dateToStringConverter);

// voeg alle java.util.Date afgeleidingen toe, 
aangezien onze
// grote Hibernate vriend van alles terug kan geven.
Converter converter = new Converter(locale);
converter.set(java.sql.Timestamp.class, dateConverter);
converter.set(java.sql.Date.class, dateConverter);
converter.set(java.util.Date.class, dateConverter);
converter.set(String.class, stringConverter);

return converter;


Re your second point: you can create your own (form) validator that
performs your check (provides great reuse if you need it elsewhere).
This will hook into the population/validation mechanism provided by
wicket, so your bean won't be contaminated with invalid values from
the GUI.

An other option is to invoke: 'error(My horrifying error message);'
in your onsubmit handler, and just redisplay the page (i.e. don't set
the response page).

on success: setResponsePage(new MySuccessPage());



On 6/21/06, Stefan Arentz [EMAIL PROTECTED] wrote:
 I have two simple use cases that I can't figure out how to implement with
 Wicket.

 Example form. Pretty basic and works.

 public class CreateAdministratorPage extends WebPage
 {
 @SpringBean
 private CreateAdministratorFacade mCreateAdministratorFacade;

 public CreateAdministratorPage()
 {
 add(new FeedbackPanel(feedback));
 add(new AdministratorForm(administratorForm, new
 Administrator()));
 }

 class AdministratorForm extends Form
 {
 public AdministratorForm(String name, Administrator administrator)
 {
 super(name, new
 CompoundPropertyModel(administrator));
 add(new RequiredTextField(name));
 add(new
 RequiredTextField(emailAddress).add(EmailAddressPatternValidator.getInstance()));
 }

 @Override
 protected void onSubmit()
 {
 Administrator administrator = (Administrator) getModelObject();

 mCreateAdministratorFacade.createAdministrator(administrator);
 }
 }
 }

 1. Checking a confirmationField.

 I want to add an emailConfirmation field to the form. But, I don't want to
 add this field to the Administrator object. What is common practice to
 implement this? Create a new AdministratorModel like this:

 public class AdministratorModel {
 public Administrator administrator;
 public String emailConfirmation;
 }

 together with:

 public AdministratorForm(String name, AdministratorModel
 administrator)
  {
  super(name, new
 CompoundPropertyModel(administrator));
  add(new RequiredTextField(administrator.name));
  add(new
 RequiredTextField(administrator.emailAddress).add(EmailAddressPatternValidator.getInstance()));
 add(new
 RequiredTextField(emailAddressConfirmation).add(EmailAddressPatternValidator.getInstance
 ()));
  }

 Or is there an easier way?

 2. Doing validation on submit.

 The code above works, but what I really need to do is something like this:

 protected void onSubmit()
  {
  Administrator administrator = (Administrator) getModelObject();
  result =
 mCreateAdministratorFacade.createAdministrator(administrator);
 if (result == SUCCESS) {
 REDIRECT TO A SUCCESS PAGE BASED ON THE EMAIL ADDRESS
 } else {
 SET A GLOBAL FORM ERROR, SHOW THE FORM AGAIN
 }
  }

 I read the Form 

[Wicket-user] Beginner Image question

2006-06-21 Thread Alex Objelean

I am trying to insert in my page an Image located at some URL... 
I have looked at the examples, but there are only the following situations:
- Image as package resource 
- Dynamically created image. Re-render whenever resource is asked for. 
- Simple model 
- Dynamically created buffered image 

but no example which would suite my need. Can you help me?
--
View this message in context: 
http://www.nabble.com/Beginner-Image-question-t1823773.html#a4973872
Sent from the Wicket - User forum at Nabble.com.



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


[Wicket-user] WicketTester in 1.2 causing internal error cloning object errors.

2006-06-21 Thread Gert Jan Verhoog
Hi list,

After upgrading to Wicket 1.2, wicket tests for my project don't work 
anymore. Testing a page that is initialized using a custom constructor 
causes a WicketRuntimeException:

wicket.WicketRuntimeException: Internal error cloning object. Make sure 
all dependent objects implement Serializable. Class: 
wicket.util.tester.DummyHomePage
   at 
wicket.protocol.http.HttpSessionStore.setAttribute(HttpSessionStore.java:62)
[... bits of stacktrace omitted for brevity ...]
Caused by: java.io.NotSerializableException: com.example.MyPageTest$1
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
at 
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1369)
[... rest of stacktrace omitted for brevity ...]


I created the initialized page with an anonymous ITestPageSource, as per 
the WicketTester javadocs.

Consider the following example code that causes the error:

MyPage.html:
- - - - - - - - - - - - - - - - - - - - - - - - - -
html xmlns:wicket=http://wicket.sourceforge.net/;
   headtitlebla/title/head
   body
 h1span wicket:id=title(title)/span/h1
   /body
/html
- - - - - - - - - - - - - - - - - - - - - - - - - -


MyPage.java:
- - - - - - - - - - - - - - - - - - - - - - - - - -
package com.example;

import wicket.markup.html.WebPage;
import wicket.markup.html.basic.Label;

public class MyPage extends WebPage {

   public MyPage() {
 this(empty);
   }

   public MyPage(String title) {
 add(new Label(title,title));
   }
}
- - - - - - - - - - - - - - - - - - - - - - - - - -


and finally, MyPageTest.java:
- - - - - - - - - - - - - - - - - - - - - - - - - -
package com.example;

import junit.framework.TestCase;
import wicket.Page;
import wicket.util.tester.ITestPageSource;
import wicket.util.tester.WicketTester;

public class MyPageTest extends TestCase {

   public void testRenderMyPage() {
 WicketTester tester = new WicketTester();

 // the following statement throws the exception:
 tester.startPage(new ITestPageSource() {
   public Page getTestPage() {
 return new MyPage(hello world);
   }
 });
   }
}
- - - - - - - - - - - - - - - - - - - - - - - - - -

What's happening here? Most of my pages use custom constructors to 
initialize the page, and every test method that use these cause the 
error. What can I do about it?

cheers,
Gert


-- 
Gert Jan Verhoog
Func. Internet Integration
W http://www.func.nl
T +31 30 2109750
F +31 30 2109751


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


Re: [Wicket-user] Beginner Image question

2006-06-21 Thread Stefan Arentz
Do you mean something like this:html
 body
 img wicket:id=externalImage/ 
 /body
/htmlpublic class TestPage extends WebPage{ public TestPage() { add(new ExternalImage(externalImage, 
http://images.apple.com/macbook/images/macbookglossydisplay20060516.jpg)); }}If so, then I just hacked this together. Warning: might contain lame code from a Wicket newbie.public class ExternalImage extends WebMarkupContainer
{ private final IModel src; public ExternalImage(String id, String src) { super(id); this.src = "" Model(src); } public ExternalImage(String id, IModel model)
 { super(id); this.src = ""> } protected void onComponentTag(ComponentTag tag) { if (src != null) { Object srcValue = src.getObject(this);
 if (srcValue != null) { tag.put(src, srcValue.toString()); } } } protected void onComponentTagBody(MarkupStream markupStream, ComponentTag openTag)
 { this.checkComponentTag(openTag, img); super.onComponentTagBody(markupStream, openTag); }}Enjoy :-)S.On 6/21/06, 
Alex Objelean [EMAIL PROTECTED] wrote:
I am trying to insert in my page an Image located at some URL...I have looked at the examples, but there are only the following situations:- Image as package resource- Dynamically created image. Re-render whenever resource is asked for.
- Simple model- Dynamically created buffered imagebut no example which would suite my need. Can you help me?--View this message in context: 
http://www.nabble.com/Beginner-Image-question-t1823773.html#a4973872Sent from the Wicket - User forum at Nabble.com.___
Wicket-user mailing listWicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user

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


Re: [Wicket-user] [Beginner] Image question

2006-06-21 Thread Alex Objelean

Yes, this is exactly what I need! :)
Thank you very much!
--
View this message in context: 
http://www.nabble.com/-Beginner--Image-question-t1823773.html#a4974481
Sent from the Wicket - User forum at Nabble.com.



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


Re: [Wicket-user] Beginner Image question

2006-06-21 Thread Alex Objelean

Yes, this is exactly what I need! :)
Thank you very much!
--
View this message in context: 
http://www.nabble.com/-Beginner--Image-question-t1823773.html#a4974498
Sent from the Wicket - User forum at Nabble.com.



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


Re: [Wicket-user] [Beginner] Image question

2006-06-21 Thread Stefan Arentz
:-)I just refactored that code to take a URL instead of a String. That is a bit nicer and guarantees that the URL is valid.S.On 6/21/06, Alex Objelean
 [EMAIL PROTECTED] wrote:Yes, this is exactly what I need! :)
Thank you very much!--View this message in context: http://www.nabble.com/-Beginner--Image-question-t1823773.html#a4974481
Sent from the Wicket - User forum at Nabble.com.___Wicket-user mailing list
Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] [Beginner] Image question

2006-06-21 Thread Alex Objelean

Unfortunatelly, this code throws an exception:

WicketMessage: Unable to find package resource [path =
training/wicket/countryInfo/http:/www.oorsprong.org/WebSamples.CountryInfo/Images/Romania.jpg,
style = null, locale = en_US]

Root cause:

wicket.WicketRuntimeException: Unable to find package resource [path =
training/wicket/countryInfo/http:/www.oorsprong.org/WebSamples.CountryInfo/Images/Romania.jpg,
style = null, locale = en_US]
at
wicket.markup.html.PackageResource.getResourceStream(PackageResource.java:520)
at wicket.markup.html.PackageResource.init(PackageResource.java:501)
at wicket.markup.html.PackageResource.get(PackageResource.java:269)
at
wicket.markup.html.image.resource.LocalizedImageResource$1.newResource(LocalizedImageResource.java:361)
at wicket.ResourceReference.bind(ResourceReference.java:118)
at
wicket.markup.html.image.resource.LocalizedImageResource.bind(LocalizedImageResource.java:180)
at
wicket.markup.html.image.resource.LocalizedImageResource.loadStaticImage(LocalizedImageResource.java:368)
at
wicket.markup.html.image.resource.LocalizedImageResource.setSrcAttribute(LocalizedImageResource.java:283)
at wicket.markup.html.image.Image.onComponentTag(Image.java:225)

etc...


any suggestions?

PS: Thank you for fast reply!
--
View this message in context: 
http://www.nabble.com/-Beginner--Image-question-t1823773.html#a4974633
Sent from the Wicket - User forum at Nabble.com.



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


[Wicket-user] page reloades infinitely

2006-06-21 Thread Ittay Dror
Hi,

I'm using firefox. when i duplicate a tab, the tab reloads in an infinite loop.

this is the reason:
script type=text/javascript!--//--![CDATA[//!--
var pagemapcookie = getWicketCookie('pm-nullwicket');
if(!pagemapcookie  pagemapcookie != '1'){setWicketCookie('pm-nullwicket',1);}
else {document.location.href = 
'/page/SomePage;jsessionid=E43E09C7B61190F3C8C5E98CB988F21F?';}

//--!]]/script

/head
body onunload=deleteWicketCookie('pm-nullwicket');

 
what happens is that the pagemapcookie is there when the page is rendered, 
because the previous page was not unloaded, so the document's href is changed 
to itself. of course, when the page loads, the cookie is still 1, so the loop 
continues. the same will happen if i just open a new tab and load the same url.

what gives?


also, the code that writes this script is WebPage.PageMapChecker the comment in 
the code is:
/**
 * Tries to determine whether this page was opened in a new window or 
tab.
 * If it is (and this checker were able to recognize that), a new page 
map
 * is created for this page instance, so that it will start using it's 
own
 * history in sync with the browser window or tab.
 */

i've tried to debug this, but it doesn't look like a new PageMap is created (i 
don't use it, so the PageMap instance is the default one). so it seems i 
*don't* get a history per tab. 

can/should i remove the AutomaticMultiWindowSupport setting? 

thanx,
ittay
-- 
===
Ittay Dror, 
Chief architect, openQRM TL, 
RD, Qlusters Inc.
[EMAIL PROTECTED]
+972-3-6081994 Fax: +972-3-6081841

http://www.openQRM.org
- Keeps your Data-Center Up and Running


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


Re: [Wicket-user] page reloades infinitely

2006-06-21 Thread Matej Knopp
Strange. I'm looking into PageMapChecker#renderHead and it doesn't seem 
obvious why the generated url doesn't contain pageMap name.

Are you using a custom URL encoding scheme or anything like that?

-Matej

Ittay Dror wrote:
 Hi,
 
 I'm using firefox. when i duplicate a tab, the tab reloads in an infinite 
 loop.
 
 this is the reason:
 script type=text/javascript!--//--![CDATA[//!--
 var pagemapcookie = getWicketCookie('pm-nullwicket');
 if(!pagemapcookie  pagemapcookie != 
 '1'){setWicketCookie('pm-nullwicket',1);}
 else {document.location.href = 
 '/page/SomePage;jsessionid=E43E09C7B61190F3C8C5E98CB988F21F?';}
 
 //--!]]/script
 
 /head
 body onunload=deleteWicketCookie('pm-nullwicket');
 
  
 what happens is that the pagemapcookie is there when the page is rendered, 
 because the previous page was not unloaded, so the document's href is changed 
 to itself. of course, when the page loads, the cookie is still 1, so the loop 
 continues. the same will happen if i just open a new tab and load the same 
 url.
 
 what gives?
 
 
 also, the code that writes this script is WebPage.PageMapChecker the comment 
 in the code is:
 /**
* Tries to determine whether this page was opened in a new window or 
 tab.
* If it is (and this checker were able to recognize that), a new page 
 map
* is created for this page instance, so that it will start using it's 
 own
* history in sync with the browser window or tab.
*/
 
 i've tried to debug this, but it doesn't look like a new PageMap is created 
 (i don't use it, so the PageMap instance is the default one). so it seems i 
 *don't* get a history per tab. 
 
 can/should i remove the AutomaticMultiWindowSupport setting? 
 
 thanx,
 ittay



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


Re: [Wicket-user] page reloades infinitely

2006-06-21 Thread Ittay Dror
further investigation shows that for IE and openning new windows, it works fine 
- a PageMap instance is created, and the page loads fine.

i've also started firefox with a new profile (no extensions), to make sure it's 
not extension related, and no, it happens there also, and also when i open a 
new window instead of new tab. it seems to be related to differences in cookie 
(session) handling between firefox and IE. 

ittay

Ittay Dror wrote:
 Hi,
 
 I'm using firefox. when i duplicate a tab, the tab reloads in an infinite 
 loop.
 
 this is the reason:
 script type=text/javascript!--//--![CDATA[//!--
 var pagemapcookie = getWicketCookie('pm-nullwicket');
 if(!pagemapcookie  pagemapcookie != 
 '1'){setWicketCookie('pm-nullwicket',1);}
 else {document.location.href = 
 '/page/SomePage;jsessionid=E43E09C7B61190F3C8C5E98CB988F21F?';}
 
 //--!]]/script
 
 /head
 body onunload=deleteWicketCookie('pm-nullwicket');
 
  
 what happens is that the pagemapcookie is there when the page is rendered, 
 because the previous page was not unloaded, so the document's href is changed 
 to itself. of course, when the page loads, the cookie is still 1, so the loop 
 continues. the same will happen if i just open a new tab and load the same 
 url.
 
 what gives?
 
 
 also, the code that writes this script is WebPage.PageMapChecker the comment 
 in the code is:
 /**
* Tries to determine whether this page was opened in a new window or 
 tab.
* If it is (and this checker were able to recognize that), a new page 
 map
* is created for this page instance, so that it will start using it's 
 own
* history in sync with the browser window or tab.
*/
 
 i've tried to debug this, but it doesn't look like a new PageMap is created 
 (i don't use it, so the PageMap instance is the default one). so it seems i 
 *don't* get a history per tab. 
 
 can/should i remove the AutomaticMultiWindowSupport setting? 
 
 thanx,
 ittay


-- 
===
Ittay Dror, 
Chief architect, openQRM TL, 
RD, Qlusters Inc.
[EMAIL PROTECTED]
+972-3-6081994 Fax: +972-3-6081841

http://www.openQRM.org
- Keeps your Data-Center Up and Running


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


Re: [Wicket-user] [Beginner] Image question

2006-06-21 Thread Stefan Arentz
On 6/21/06, Alex Objelean [EMAIL PROTECTED] wrote:
Unfortunatelly, this code throws an exception:WicketMessage: Unable to find package resource [path =training/wicket/countryInfo/http:/www.oorsprong.org/WebSamples.CountryInfo/Images/Romania.jpg,style = null, locale = en_US]
Root cause:wicket.WicketRuntimeException: Unable to find package resource [path =training/wicket/countryInfo/http:/www.oorsprong.org/WebSamples.CountryInfo/Images/Romania.jpg,style = null, locale = en_US]
atwicket.markup.html.PackageResource.getResourceStream(PackageResource.java:520)at wicket.markup.html.PackageResource.init(PackageResource.java:501)at wicket.markup.html.PackageResource.get(PackageResource.java
:269)atwicket.markup.html.image.resource.LocalizedImageResource$1.newResource(LocalizedImageResource.java:361)at wicket.ResourceReference.bind(ResourceReference.java:118)atwicket.markup.html.image.resource.LocalizedImageResource.bind
(LocalizedImageResource.java:180)atwicket.markup.html.image.resource.LocalizedImageResource.loadStaticImage(LocalizedImageResource.java:368)atwicket.markup.html.image.resource.LocalizedImageResource.setSrcAttribute
(LocalizedImageResource.java:283)at wicket.markup.html.image.Image.onComponentTag(Image.java:225)etc...any suggestions?This code is not using the ExternalImage component. But now I am also confused. Do you want to link to an image outside of your own web app or ... ?
S.
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] page reloades infinitely

2006-06-21 Thread Matej Knopp
Hmm.. The problem with this kind of bugs is that it's very difficult to 
reproduce.

IMHO The problem is in this line:
else {document.location.href = 
'/page/SomePage;jsessionid=E43E09C7B61190F3C8C5E98CB988F21F?';}

The url should contain pagemap name (something like wicket-1).

In wicket-1.2 the url is built in PageMapChecker#renderHead 
(WebPage.java line 388 -
IBookmarkablePageRequestTarget current = 
(IBookmarkablePageRequestTarget)target;
BookmarkablePageRequestTarget redirect = new 
BookmarkablePageRequestTarget(  getSession().createAutoPageMapName(), 
current.getPageClass(), current.getPageParameters());
url = cycle.urlFor(redirect);
)

I wonder why the generated url doesn't contain the pageMap name.

-Matej

Ittay Dror wrote:
 further investigation shows that for IE and openning new windows, it works 
 fine - a PageMap instance is created, and the page loads fine.
 
 i've also started firefox with a new profile (no extensions), to make sure 
 it's not extension related, and no, it happens there also, and also when i 
 open a new window instead of new tab. it seems to be related to differences 
 in cookie (session) handling between firefox and IE. 
 
 ittay
 
 Ittay Dror wrote:
 Hi,

 I'm using firefox. when i duplicate a tab, the tab reloads in an infinite 
 loop.

 this is the reason:
 script type=text/javascript!--//--![CDATA[//!--
 var pagemapcookie = getWicketCookie('pm-nullwicket');
 if(!pagemapcookie  pagemapcookie != 
 '1'){setWicketCookie('pm-nullwicket',1);}
 else {document.location.href = 
 '/page/SomePage;jsessionid=E43E09C7B61190F3C8C5E98CB988F21F?';}

 //--!]]/script

 /head
 body onunload=deleteWicketCookie('pm-nullwicket');

  
 what happens is that the pagemapcookie is there when the page is rendered, 
 because the previous page was not unloaded, so the document's href is 
 changed to itself. of course, when the page loads, the cookie is still 1, so 
 the loop continues. the same will happen if i just open a new tab and load 
 the same url.

 what gives?


 also, the code that writes this script is WebPage.PageMapChecker the comment 
 in the code is:
 /**
   * Tries to determine whether this page was opened in a new window or 
 tab.
   * If it is (and this checker were able to recognize that), a new page 
 map
   * is created for this page instance, so that it will start using it's 
 own
   * history in sync with the browser window or tab.
   */

 i've tried to debug this, but it doesn't look like a new PageMap is created 
 (i don't use it, so the PageMap instance is the default one). so it seems i 
 *don't* get a history per tab. 

 can/should i remove the AutomaticMultiWindowSupport setting? 

 thanx,
 ittay
 
 



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


Re: [Wicket-user] [Beginner] Image question

2006-06-21 Thread Alex Objelean

Yes, exactly... the Image I am trying to use is located outside my
application... 
I thought it will be a piece of cake:(
--
View this message in context: 
http://www.nabble.com/-Beginner--Image-question-t1823773.html#a4975150
Sent from the Wicket - User forum at Nabble.com.



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


Re: [Wicket-user] page reloades infinitely

2006-06-21 Thread Ittay Dror


Matej Knopp wrote:
 Strange. I'm looking into PageMapChecker#renderHead and it doesn't seem 
 obvious why the generated url doesn't contain pageMap name.
 
 Are you using a custom URL encoding scheme or anything like that?

yes about the custom schema. the page map name is mull. does it cause any harm?

if i manage to figure out how to create a PageMap, will it be created on every 
page request (do i need somehow to generate a new name per tab/window, how?)? 
or is it still per session? if it is per session, then i think that the tabs / 
windows share the session, which means the same cookie, which causes the 
infinite reloading.

 
 -Matej
 
 Ittay Dror wrote:
 Hi,

 I'm using firefox. when i duplicate a tab, the tab reloads in an infinite 
 loop.

 this is the reason:
 script type=text/javascript!--//--![CDATA[//!--
 var pagemapcookie = getWicketCookie('pm-nullwicket');
 if(!pagemapcookie  pagemapcookie != 
 '1'){setWicketCookie('pm-nullwicket',1);}
 else {document.location.href = 
 '/page/SomePage;jsessionid=E43E09C7B61190F3C8C5E98CB988F21F?';}

 //--!]]/script

 /head
 body onunload=deleteWicketCookie('pm-nullwicket');

  
 what happens is that the pagemapcookie is there when the page is rendered, 
 because the previous page was not unloaded, so the document's href is 
 changed to itself. of course, when the page loads, the cookie is still 1, so 
 the loop continues. the same will happen if i just open a new tab and load 
 the same url.

 what gives?


 also, the code that writes this script is WebPage.PageMapChecker the comment 
 in the code is:
 /**
   * Tries to determine whether this page was opened in a new window or 
 tab.
   * If it is (and this checker were able to recognize that), a new page 
 map
   * is created for this page instance, so that it will start using it's 
 own
   * history in sync with the browser window or tab.
   */

 i've tried to debug this, but it doesn't look like a new PageMap is created 
 (i don't use it, so the PageMap instance is the default one). so it seems i 
 *don't* get a history per tab. 

 can/should i remove the AutomaticMultiWindowSupport setting? 

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


-- 
===
Ittay Dror, 
Chief architect, openQRM TL, 
RD, Qlusters Inc.
[EMAIL PROTECTED]
+972-3-6081994 Fax: +972-3-6081841

http://www.openQRM.org
- Keeps your Data-Center Up and Running


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


Re: [Wicket-user] page reloades infinitely

2006-06-21 Thread Ittay Dror


Matej Knopp wrote:
 Hmm.. The problem with this kind of bugs is that it's very difficult to 
 reproduce.
 
 IMHO The problem is in this line:
 else {document.location.href = 
 '/page/SomePage;jsessionid=E43E09C7B61190F3C8C5E98CB988F21F?';}
 
 The url should contain pagemap name (something like wicket-1).
 
 In wicket-1.2 the url is built in PageMapChecker#renderHead 
 (WebPage.java line 388 -
 IBookmarkablePageRequestTarget current = 
 (IBookmarkablePageRequestTarget)target;
 BookmarkablePageRequestTarget redirect = new 
 BookmarkablePageRequestTarget(
 getSession().createAutoPageMapName(), 
 current.getPageClass(), current.getPageParameters());
 url = cycle.urlFor(redirect);
 )
 
 I wonder why the generated url doesn't contain the pageMap name.

ok, i will look into that. thanx for the tip. 

 
 -Matej
 
 Ittay Dror wrote:
 further investigation shows that for IE and openning new windows, it works 
 fine - a PageMap instance is created, and the page loads fine.

 i've also started firefox with a new profile (no extensions), to make sure 
 it's not extension related, and no, it happens there also, and also when i 
 open a new window instead of new tab. it seems to be related to differences 
 in cookie (session) handling between firefox and IE. 

 ittay

 Ittay Dror wrote:
 Hi,

 I'm using firefox. when i duplicate a tab, the tab reloads in an infinite 
 loop.

 this is the reason:
 script type=text/javascript!--//--![CDATA[//!--
 var pagemapcookie = getWicketCookie('pm-nullwicket');
 if(!pagemapcookie  pagemapcookie != 
 '1'){setWicketCookie('pm-nullwicket',1);}
 else {document.location.href = 
 '/page/SomePage;jsessionid=E43E09C7B61190F3C8C5E98CB988F21F?';}

 //--!]]/script

 /head
 body onunload=deleteWicketCookie('pm-nullwicket');

  
 what happens is that the pagemapcookie is there when the page is rendered, 
 because the previous page was not unloaded, so the document's href is 
 changed to itself. of course, when the page loads, the cookie is still 1, 
 so the loop continues. the same will happen if i just open a new tab and 
 load the same url.

 what gives?


 also, the code that writes this script is WebPage.PageMapChecker the 
 comment in the code is:
 /**
  * Tries to determine whether this page was opened in a new window or 
 tab.
  * If it is (and this checker were able to recognize that), a new page 
 map
  * is created for this page instance, so that it will start using it's 
 own
  * history in sync with the browser window or tab.
  */

 i've tried to debug this, but it doesn't look like a new PageMap is created 
 (i don't use it, so the PageMap instance is the default one). so it seems i 
 *don't* get a history per tab. 

 can/should i remove the AutomaticMultiWindowSupport setting? 

 thanx,
 ittay

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


-- 
===
Ittay Dror, 
Chief architect, openQRM TL, 
RD, Qlusters Inc.
[EMAIL PROTECTED]
+972-3-6081994 Fax: +972-3-6081841

http://www.openQRM.org
- Keeps your Data-Center Up and Running


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


Re: [Wicket-user] [Beginner] Image question

2006-06-21 Thread Alex Objelean

Sorry.. my mistake. It works. I indeed forgot to use the ExternalImage
component. 

Thank you again! :)
--
View this message in context: 
http://www.nabble.com/-Beginner--Image-question-t1823773.html#a4975300
Sent from the Wicket - User forum at Nabble.com.



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


Re: [Wicket-user] page reloades infinitely

2006-06-21 Thread Ittay Dror
well, this is the code in WebRequestCodingStrategy:
public final CharSequence encode(final RequestCycle requestCycle,
final IRequestTarget requestTarget)
{
// first check whether the target was mounted
CharSequence path = pathForTarget(requestTarget);
if (path != null)
{
CharSequence prefix = urlPrefix(requestCycle);
final AppendingStringBuffer buffer = new 
AppendingStringBuffer(prefix.length()
+ path.length());
buffer.append(prefix);
buffer.append(path);
return 
requestCycle.getOriginalResponse().encodeURL(buffer);
}


the page (target) is indeed mounted, so pathForTarget goes to the encoding 
strategy to encode the path. in case the target was not mounted, it would have 
encoded the url itself (in my case, the target is 
IBookmarkablePageRequestTarget)

the code there is less than trivial, should i copy  paste? can i reference it 
somehow?


ittay


Matej Knopp wrote:
 Hmm.. The problem with this kind of bugs is that it's very difficult to 
 reproduce.
 
 IMHO The problem is in this line:
 else {document.location.href = 
 '/page/SomePage;jsessionid=E43E09C7B61190F3C8C5E98CB988F21F?';}
 
 The url should contain pagemap name (something like wicket-1).
 
 In wicket-1.2 the url is built in PageMapChecker#renderHead 
 (WebPage.java line 388 -
 IBookmarkablePageRequestTarget current = 
 (IBookmarkablePageRequestTarget)target;
 BookmarkablePageRequestTarget redirect = new 
 BookmarkablePageRequestTarget(
 getSession().createAutoPageMapName(), 
 current.getPageClass(), current.getPageParameters());
 url = cycle.urlFor(redirect);
 )
 
 I wonder why the generated url doesn't contain the pageMap name.
 
 -Matej
 
 Ittay Dror wrote:
 further investigation shows that for IE and openning new windows, it works 
 fine - a PageMap instance is created, and the page loads fine.

 i've also started firefox with a new profile (no extensions), to make sure 
 it's not extension related, and no, it happens there also, and also when i 
 open a new window instead of new tab. it seems to be related to differences 
 in cookie (session) handling between firefox and IE. 

 ittay

 Ittay Dror wrote:
 Hi,

 I'm using firefox. when i duplicate a tab, the tab reloads in an infinite 
 loop.

 this is the reason:
 script type=text/javascript!--//--![CDATA[//!--
 var pagemapcookie = getWicketCookie('pm-nullwicket');
 if(!pagemapcookie  pagemapcookie != 
 '1'){setWicketCookie('pm-nullwicket',1);}
 else {document.location.href = 
 '/page/SomePage;jsessionid=E43E09C7B61190F3C8C5E98CB988F21F?';}

 //--!]]/script

 /head
 body onunload=deleteWicketCookie('pm-nullwicket');

  
 what happens is that the pagemapcookie is there when the page is rendered, 
 because the previous page was not unloaded, so the document's href is 
 changed to itself. of course, when the page loads, the cookie is still 1, 
 so the loop continues. the same will happen if i just open a new tab and 
 load the same url.

 what gives?


 also, the code that writes this script is WebPage.PageMapChecker the 
 comment in the code is:
 /**
  * Tries to determine whether this page was opened in a new window or 
 tab.
  * If it is (and this checker were able to recognize that), a new page 
 map
  * is created for this page instance, so that it will start using it's 
 own
  * history in sync with the browser window or tab.
  */

 i've tried to debug this, but it doesn't look like a new PageMap is created 
 (i don't use it, so the PageMap instance is the default one). so it seems i 
 *don't* get a history per tab. 

 can/should i remove the AutomaticMultiWindowSupport setting? 

 thanx,
 ittay

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


-- 
===
Ittay Dror, 
Chief architect, openQRM TL, 
RD, Qlusters Inc.
[EMAIL PROTECTED]
+972-3-6081994 Fax: +972-3-6081841

http://www.openQRM.org
- Keeps your Data-Center Up and Running


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


Re: [Wicket-user] [Beginner] Image question

2006-06-21 Thread Alex Objelean

Well, in my case the URL is not static... it has different value depending on
what the service returns.(In my specific small application, I input
countryCode in the form and get the URL to the image which is the country
Flag...)
--
View this message in context: 
http://www.nabble.com/-Beginner--Image-question-t1823773.html#a4975709
Sent from the Wicket - User forum at Nabble.com.



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


Re: [Wicket-user] page reloades infinitely

2006-06-21 Thread Ittay Dror
ok, i did the same magic in my coding strategy and it works. in new tabs the 
url now looks like
http://localhost/page/SomePage?wicket:bookmarkablePage=wicket-0:com.package.SomePage

can someone explain the mechanism to me? also, why should i take care of this 
and not WebRequestCodingStrategy?

thanx,
ittay

Ittay Dror wrote:
 well, this is the code in WebRequestCodingStrategy:
 public final CharSequence encode(final RequestCycle requestCycle,
   final IRequestTarget requestTarget)
   {
   // first check whether the target was mounted
   CharSequence path = pathForTarget(requestTarget);
   if (path != null)
   {
   CharSequence prefix = urlPrefix(requestCycle);
   final AppendingStringBuffer buffer = new 
 AppendingStringBuffer(prefix.length()
   + path.length());
   buffer.append(prefix);
   buffer.append(path);
   return 
 requestCycle.getOriginalResponse().encodeURL(buffer);
   }
   
 
 the page (target) is indeed mounted, so pathForTarget goes to the encoding 
 strategy to encode the path. in case the target was not mounted, it would 
 have encoded the url itself (in my case, the target is 
 IBookmarkablePageRequestTarget)
 
 the code there is less than trivial, should i copy  paste? can i reference 
 it somehow?
 
 
 ittay
 
 
 Matej Knopp wrote:
 Hmm.. The problem with this kind of bugs is that it's very difficult to 
 reproduce.

 IMHO The problem is in this line:
 else {document.location.href = 
 '/page/SomePage;jsessionid=E43E09C7B61190F3C8C5E98CB988F21F?';}

 The url should contain pagemap name (something like wicket-1).

 In wicket-1.2 the url is built in PageMapChecker#renderHead 
 (WebPage.java line 388 -
 IBookmarkablePageRequestTarget current = 
 (IBookmarkablePageRequestTarget)target;
 BookmarkablePageRequestTarget redirect = new 
 BookmarkablePageRequestTarget(   
 getSession().createAutoPageMapName(), 
 current.getPageClass(), current.getPageParameters());
 url = cycle.urlFor(redirect);
 )

 I wonder why the generated url doesn't contain the pageMap name.

 -Matej

 Ittay Dror wrote:
 further investigation shows that for IE and openning new windows, it works 
 fine - a PageMap instance is created, and the page loads fine.

 i've also started firefox with a new profile (no extensions), to make sure 
 it's not extension related, and no, it happens there also, and also when i 
 open a new window instead of new tab. it seems to be related to differences 
 in cookie (session) handling between firefox and IE. 

 ittay

 Ittay Dror wrote:
 Hi,

 I'm using firefox. when i duplicate a tab, the tab reloads in an infinite 
 loop.

 this is the reason:
 script type=text/javascript!--//--![CDATA[//!--
 var pagemapcookie = getWicketCookie('pm-nullwicket');
 if(!pagemapcookie  pagemapcookie != 
 '1'){setWicketCookie('pm-nullwicket',1);}
 else {document.location.href = 
 '/page/SomePage;jsessionid=E43E09C7B61190F3C8C5E98CB988F21F?';}

 //--!]]/script

 /head
 body onunload=deleteWicketCookie('pm-nullwicket');

  
 what happens is that the pagemapcookie is there when the page is rendered, 
 because the previous page was not unloaded, so the document's href is 
 changed to itself. of course, when the page loads, the cookie is still 1, 
 so the loop continues. the same will happen if i just open a new tab and 
 load the same url.

 what gives?


 also, the code that writes this script is WebPage.PageMapChecker the 
 comment in the code is:
 /**
 * Tries to determine whether this page was opened in a new window or 
 tab.
 * If it is (and this checker were able to recognize that), a new page 
 map
 * is created for this page instance, so that it will start using it's 
 own
 * history in sync with the browser window or tab.
 */

 i've tried to debug this, but it doesn't look like a new PageMap is 
 created (i don't use it, so the PageMap instance is the default one). so 
 it seems i *don't* get a history per tab. 

 can/should i remove the AutomaticMultiWindowSupport setting? 

 thanx,
 ittay


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

 
 


-- 
===
Ittay Dror, 
Chief architect, openQRM TL, 
RD, Qlusters Inc.
[EMAIL PROTECTED]
+972-3-6081994 Fax: +972-3-6081841

http://www.openQRM.org
- Keeps your Data-Center Up and Running


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


Re: [Wicket-user] page reloades infinitely

2006-06-21 Thread Ittay Dror
one other question. the original page map name is still 'null'. is this ok?

Ittay Dror wrote:
 ok, i did the same magic in my coding strategy and it works. in new tabs 
 the url now looks like
 http://localhost/page/SomePage?wicket:bookmarkablePage=wicket-0:com.package.SomePage
  
 
 
 can someone explain the mechanism to me? also, why should i take care of 
 this and not WebRequestCodingStrategy?
 
 thanx,
 ittay
 
 Ittay Dror wrote:
 well, this is the code in WebRequestCodingStrategy:
 public final CharSequence encode(final RequestCycle requestCycle,
 final IRequestTarget requestTarget)
 {
 // first check whether the target was mounted
 CharSequence path = pathForTarget(requestTarget);
 if (path != null)
 {
 CharSequence prefix = urlPrefix(requestCycle);
 final AppendingStringBuffer buffer = new 
 AppendingStringBuffer(prefix.length()
 + path.length());
 buffer.append(prefix);
 buffer.append(path);
 return requestCycle.getOriginalResponse().encodeURL(buffer);
 }
 

 the page (target) is indeed mounted, so pathForTarget goes to the 
 encoding strategy to encode the path. in case the target was not 
 mounted, it would have encoded the url itself (in my case, the target 
 is IBookmarkablePageRequestTarget)

 the code there is less than trivial, should i copy  paste? can i 
 reference it somehow?


 ittay


 Matej Knopp wrote:
 Hmm.. The problem with this kind of bugs is that it's very difficult 
 to reproduce.

 IMHO The problem is in this line:
 else {document.location.href = 
 '/page/SomePage;jsessionid=E43E09C7B61190F3C8C5E98CB988F21F?';}

 The url should contain pagemap name (something like wicket-1).

 In wicket-1.2 the url is built in PageMapChecker#renderHead 
 (WebPage.java line 388 -
 IBookmarkablePageRequestTarget current = 
 (IBookmarkablePageRequestTarget)target;
 BookmarkablePageRequestTarget redirect = new 
 BookmarkablePageRequestTarget(
 getSession().createAutoPageMapName(), current.getPageClass(), 
 current.getPageParameters());
 url = cycle.urlFor(redirect);
 )

 I wonder why the generated url doesn't contain the pageMap name.

 -Matej

 Ittay Dror wrote:
 further investigation shows that for IE and openning new windows, it 
 works fine - a PageMap instance is created, and the page loads fine.

 i've also started firefox with a new profile (no extensions), to 
 make sure it's not extension related, and no, it happens there also, 
 and also when i open a new window instead of new tab. it seems to be 
 related to differences in cookie (session) handling between firefox 
 and IE.
 ittay

 Ittay Dror wrote:
 Hi,

 I'm using firefox. when i duplicate a tab, the tab reloads in an 
 infinite loop.

 this is the reason:
 script type=text/javascript!--//--![CDATA[//!--
 var pagemapcookie = getWicketCookie('pm-nullwicket');
 if(!pagemapcookie  pagemapcookie != 
 '1'){setWicketCookie('pm-nullwicket',1);}
 else {document.location.href = 
 '/page/SomePage;jsessionid=E43E09C7B61190F3C8C5E98CB988F21F?';}

 //--!]]/script

 /head
 body onunload=deleteWicketCookie('pm-nullwicket');

  
 what happens is that the pagemapcookie is there when the page is 
 rendered, because the previous page was not unloaded, so the 
 document's href is changed to itself. of course, when the page 
 loads, the cookie is still 1, so the loop continues. the same will 
 happen if i just open a new tab and load the same url.

 what gives?


 also, the code that writes this script is WebPage.PageMapChecker 
 the comment in the code is:
 /**
  * Tries to determine whether this page was opened in a new 
 window or tab.
  * If it is (and this checker were able to recognize that), a 
 new page map
  * is created for this page instance, so that it will start 
 using it's own
  * history in sync with the browser window or tab.
  */

 i've tried to debug this, but it doesn't look like a new PageMap is 
 created (i don't use it, so the PageMap instance is the default 
 one). so it seems i *don't* get a history per tab.
 can/should i remove the AutomaticMultiWindowSupport setting?
 thanx,
 ittay


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



 
 


-- 
===
Ittay Dror, 
Chief architect, openQRM TL, 
RD, Qlusters Inc.
[EMAIL PROTECTED]
+972-3-6081994 Fax: +972-3-6081841

http://www.openQRM.org
- Keeps your Data-Center Up and Running


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


Re: [Wicket-user] page reloades infinitely

2006-06-21 Thread Matej Knopp
Yes, null is all right.

For every page the javascript checks, whether it's opened in new 
window/tab (therefore the cookie). If so, new pagemap is created, page 
is cloned into the new pagemap and the browser tab/window is redirected 
to the page in new pagemap).

-Matej

Ittay Dror wrote:
 one other question. the original page map name is still 'null'. is this ok?
 
 Ittay Dror wrote:
 ok, i did the same magic in my coding strategy and it works. in new tabs 
 the url now looks like
 http://localhost/page/SomePage?wicket:bookmarkablePage=wicket-0:com.package.SomePage
  


 can someone explain the mechanism to me? also, why should i take care of 
 this and not WebRequestCodingStrategy?

 thanx,
 ittay

 Ittay Dror wrote:
 well, this is the code in WebRequestCodingStrategy:
 public final CharSequence encode(final RequestCycle requestCycle,
 final IRequestTarget requestTarget)
 {
 // first check whether the target was mounted
 CharSequence path = pathForTarget(requestTarget);
 if (path != null)
 {
 CharSequence prefix = urlPrefix(requestCycle);
 final AppendingStringBuffer buffer = new 
 AppendingStringBuffer(prefix.length()
 + path.length());
 buffer.append(prefix);
 buffer.append(path);
 return requestCycle.getOriginalResponse().encodeURL(buffer);
 }
 

 the page (target) is indeed mounted, so pathForTarget goes to the 
 encoding strategy to encode the path. in case the target was not 
 mounted, it would have encoded the url itself (in my case, the target 
 is IBookmarkablePageRequestTarget)

 the code there is less than trivial, should i copy  paste? can i 
 reference it somehow?


 ittay


 Matej Knopp wrote:
 Hmm.. The problem with this kind of bugs is that it's very difficult 
 to reproduce.

 IMHO The problem is in this line:
 else {document.location.href = 
 '/page/SomePage;jsessionid=E43E09C7B61190F3C8C5E98CB988F21F?';}

 The url should contain pagemap name (something like wicket-1).

 In wicket-1.2 the url is built in PageMapChecker#renderHead 
 (WebPage.java line 388 -
 IBookmarkablePageRequestTarget current = 
 (IBookmarkablePageRequestTarget)target;
 BookmarkablePageRequestTarget redirect = new 
 BookmarkablePageRequestTarget(
 getSession().createAutoPageMapName(), current.getPageClass(), 
 current.getPageParameters());
 url = cycle.urlFor(redirect);
 )

 I wonder why the generated url doesn't contain the pageMap name.

 -Matej

 Ittay Dror wrote:
 further investigation shows that for IE and openning new windows, it 
 works fine - a PageMap instance is created, and the page loads fine.

 i've also started firefox with a new profile (no extensions), to 
 make sure it's not extension related, and no, it happens there also, 
 and also when i open a new window instead of new tab. it seems to be 
 related to differences in cookie (session) handling between firefox 
 and IE.
 ittay

 Ittay Dror wrote:
 Hi,

 I'm using firefox. when i duplicate a tab, the tab reloads in an 
 infinite loop.

 this is the reason:
 script type=text/javascript!--//--![CDATA[//!--
 var pagemapcookie = getWicketCookie('pm-nullwicket');
 if(!pagemapcookie  pagemapcookie != 
 '1'){setWicketCookie('pm-nullwicket',1);}
 else {document.location.href = 
 '/page/SomePage;jsessionid=E43E09C7B61190F3C8C5E98CB988F21F?';}

 //--!]]/script

 /head
 body onunload=deleteWicketCookie('pm-nullwicket');

  
 what happens is that the pagemapcookie is there when the page is 
 rendered, because the previous page was not unloaded, so the 
 document's href is changed to itself. of course, when the page 
 loads, the cookie is still 1, so the loop continues. the same will 
 happen if i just open a new tab and load the same url.

 what gives?


 also, the code that writes this script is WebPage.PageMapChecker 
 the comment in the code is:
 /**
  * Tries to determine whether this page was opened in a new 
 window or tab.
  * If it is (and this checker were able to recognize that), a 
 new page map
  * is created for this page instance, so that it will start 
 using it's own
  * history in sync with the browser window or tab.
  */

 i've tried to debug this, but it doesn't look like a new PageMap is 
 created (i don't use it, so the PageMap instance is the default 
 one). so it seems i *don't* get a history per tab.
 can/should i remove the AutomaticMultiWindowSupport setting?
 thanx,
 ittay

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



 
 



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


Re: [Wicket-user] wicket emailaddress validation incorrect

2006-06-21 Thread Igor Vaynberg
heh, my vote is for michael's :) i merged it into 1.2 and 2.0 branches.what do you guys think? the big pattern is quiete a bit bigger and the way it works right now is every instance of email addr validator will create its own copy - maybe if we refactor that to keep the pattern as a singleton it wouldnt be too bad. but as it is right now that is 1K extra session space per validator isntance which is pretty creepy
-IgorOn 6/20/06, Frank Bille Jensen [EMAIL PROTECTED] wrote:
On Tue, 2006-06-20 at 08:42 -0700, Igor Vaynberg wrote: i wonder how big the created state machine is for this beast :)It's quite big. I just tried to profile it and compare it to the regex,which Michael Korthuis provided. If I can calculate correctly it is over
100 times larger than Michaels regex.Attached is the memory tables for the Pattern object in the to differenttests.RegardsFrank BilleAvaleo___
Wicket-user mailing listWicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user

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


Re: [Wicket-user] How to reuse panels with form fields

2006-06-21 Thread Igor Vaynberg
On 6/21/06, Hugo Visser [EMAIL PROTECTED] wrote:
it sounds really obvious actually :)welcome to wicket :)-Igor
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Ajax Panel Include

2006-06-21 Thread Igor Vaynberg
yeah, unfortunately it is not that simple. we do need to remember what we have already rendered and not to duplicate it again just because of ajax render. yuck, any ideas on how to do that?-Igor
On 6/20/06, Juergen Donnerstag [EMAIL PROTECTED] wrote:
Without having tested it. IHeaderContributor is the major interfaceand it has one method void renderHead(final Response response); ThePage calls visitChildren to iterate over all components and thecomponents iterate over all there behaviors. Hence, if an ajax
response should include the header contributions as well the onlything you need to do is to call Component.renderHead() for allcomponents involved in the ajax request. But first you need to changeComponent.renderHead
(HtmlHeaderContainer) toComponent.renderHead(Response). One more thing to consider.HtmlHeaderContainer makes sure that headers are not printed more thanonce etc.. Is that required for ajax responses as well? If yes, than
we probably need some more changes.JuergenOn 6/20/06, Igor Vaynberg [EMAIL PROTECTED] wrote: juergen is there an easy way to capture the wicket:head output from an ajax
 render into the ajax target? i think we can just dump it as part of ajax response via document.write or something like that. -Igor On 6/20/06, samyem 
[EMAIL PROTECTED] wrote:   Has this problem been fixed yet? This is becoming a major problem in my  project.  --  View this message in context: 
http://www.nabble.com/Ajax-Panel-Include-t1606490.html#a4957969  Sent from the Wicket - User forum at Nabble.com. ___
  Wicket-user mailing list  Wicket-user@lists.sourceforge.net  
https://lists.sourceforge.net/lists/listinfo/wicket-user  ___ Wicket-user mailing list 
Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user___
Wicket-user mailing listWicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user

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


Re: [Wicket-user] wicket emailaddress validation incorrect

2006-06-21 Thread Nick Heudecker
If people want the monster validator, they can write their own email address validator.On 6/21/06, Igor Vaynberg 
[EMAIL PROTECTED] wrote:heh, my vote is for michael's :) i merged it into 
1.2 and 2.0 branches.what do you guys think? the big pattern is quiete a bit bigger and the way it works right now is every instance of email addr validator will create its own copy - maybe if we refactor that to keep the pattern as a singleton it wouldnt be too bad. but as it is right now that is 1K extra session space per validator isntance which is pretty creepy
-IgorOn 6/20/06, Frank Bille Jensen 
[EMAIL PROTECTED] wrote:

On Tue, 2006-06-20 at 08:42 -0700, Igor Vaynberg wrote: i wonder how big the created state machine is for this beast :)It's quite big. I just tried to profile it and compare it to the regex,which Michael Korthuis provided. If I can calculate correctly it is over
100 times larger than Michaels regex.Attached is the memory tables for the Pattern object in the to differenttests.RegardsFrank BilleAvaleo___
Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


___Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

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


Re: [Wicket-user] wicket emailaddress validation incorrect

2006-06-21 Thread Michael Day
I only glanced quickly at the larger expression, but it seems to  
allow for quite a bit that you would NOT want.  I think it's more  
geared toward mail servers.  For example, I think it will evaluate  
the following as a valid email address (possibly with random tabs and  
spaces throughout):  [EMAIL PROTECTED]

Is this what most people want?  Probably not.  I would prefer to  
ensure the email address is in a format like this: [EMAIL PROTECTED]  And  
I think the smaller expression will validate emails in this format  
just fine.

Michael Day


On Jun 21, 2006, at 11:53 AM, Igor Vaynberg wrote:

 heh, my vote is for michael's :) i merged it into 1.2 and 2.0  
 branches.

 what do you guys think? the big pattern is quiete a bit bigger and  
 the way it works right now is every instance of email addr  
 validator will create its own copy - maybe if we refactor that to  
 keep the pattern as a singleton it wouldnt be too bad. but as it is  
 right now that is 1K extra session space per validator isntance  
 which is pretty creepy

 -Igor


 On 6/20/06, Frank Bille Jensen [EMAIL PROTECTED] wrote: On  
 Tue, 2006-06-20 at 08:42 -0700, Igor Vaynberg wrote:
  i wonder how big the created state machine is for this beast :)


 It's quite big. I just tried to profile it and compare it to the  
 regex,
 which Michael Korthuis provided. If I can calculate correctly it is  
 over
 100 times larger than Michaels regex.

 Attached is the memory tables for the Pattern object in the to  
 different
 tests.


 Regards
 Frank Bille
 Avaleo




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




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



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


Re: [Wicket-user] Formatting Dates

2006-06-21 Thread Igor Vaynberg
yeah, you pretty much nailed it. although i would extend webmarkupcomponent instead of label since you are really not using any of label's functionality.as an alternative to this method you can create an imodel decorator that has the formatting in getobject...
IModel.getObject(Component c) { Date d=(Datre)delegate.getObject(c); return formattedDate(d);}that way you can use any existing output component and still maintain the format.in the project i work on i have the model and the component wraps whatever it gets passed through the consturctor with that model
ie...class DateLabel extends Label { public DateLabel(String id, IModel model) { super(id, new DateFormatModel(model)); }}but in the end, whatever works for you :)
-IgorOn 6/21/06, Stefan Arentz [EMAIL PROTECTED] wrote:
I keep asking silly questions :-)I have a lot of ListViews that need to show ISO formatted dates. Is it common practice to make a WebComponent for that? For example like this:public class DateLabel extends Label
{ static private final Format sDateFormat = new SimpleDateFormat(-MM-dd HH:mm:ss); public DateLabel(String id) { super(id); } public DateLabel(String id, Date model)
 { super(id, new Model(model)); } public DateLabel(String id, IModel model) { super(id, model); } protected void onComponentTagBody(final MarkupStream markupStream, final ComponentTag openTag)
 { replaceComponentTagBody(markupStream, openTag, sDateFormat.format(getModelObject())); }}I must admit that I'm not really in a Wicket Mindset yet. Maybe a Wicket Jedi Master can tell me whether this is the right approach :-)
S.

___Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

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


[Wicket-user] JFreeChart Experiment

2006-06-21 Thread Stefan Arentz
Wicket is pretty cool :-)I created a little JFreeChart experiment. You can see all the code athttp://stuff.sateh.com/JFreeChartImageResource/
The test page looks like this: http://stuff.sateh.com/JFreeChartImageResource/TestPage.pngI'm sure you all have done this a thousand times already, but I was really surprised how easy it was to create this. In for example Spring MVC I have to jump through hoops to get this done; generating the image, storing it somewhere, keeping a reference, linking it in a page, writing a custom jsp tag probably, etc. etc. With Wicket it is so000 much easer.
Did I mention that Wicket is pretty cool?S.
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] JFreeChart Experiment

2006-06-21 Thread Igor Vaynberg
mm...sexy...here is something you might want to try:class JFreeChartImage extends Image { protected Resource getImageResource() {  Chart chart=(Chart)getModelObject();
 return new JFreeChartImageResource(chart,  }}this way your chart data will be updated from request to request and it can be detachable, etc. models rock!-Igor
On 6/21/06, Stefan Arentz [EMAIL PROTECTED] wrote:
Wicket is pretty cool :-)I created a little JFreeChart experiment. You can see all the code at
http://stuff.sateh.com/JFreeChartImageResource/
The test page looks like this: http://stuff.sateh.com/JFreeChartImageResource/TestPage.png
I'm sure you all have done this a thousand times already, but I was really surprised how easy it was to create this. In for example Spring MVC I have to jump through hoops to get this done; generating the image, storing it somewhere, keeping a reference, linking it in a page, writing a custom jsp tag probably, etc. etc. With Wicket it is so000 much easer.
Did I mention that Wicket is pretty cool?S.

___Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

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


Re: [Wicket-user] JFreeChart Experiment

2006-06-21 Thread Stefan Arentz
On 6/21/06, Igor Vaynberg [EMAIL PROTECTED] wrote:
mm...sexy...here is something you might want to try:class JFreeChartImage extends Image { protected Resource getImageResource() {  Chart chart=(Chart)getModelObject();
 return new JFreeChartImageResource(chart,  }}this way your chart data will be updated from request to request and it can be detachable, etc. models rock!
Ok so by moving the Chart's data out of the Resource and into a Model I can now share that data between different components (for example having two images on the same page containing the same chart). Right?And also moving the Chart's data (model) into a Wicket Model it allows for serialization and thus clustering?
Did I get that right?S.
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] JFreeChart Experiment

2006-06-21 Thread Igor Vaynberg
yes. but the biggest part is detaching - if you have a chart that has 1 data points, you dont want those sitting in session/being replicated across cluster. so a detachable model will retrieve them when they are needed, but dump them before it is serialized into session. and this has an advantage of data being refreshed every request so it is up to date.
-IgorOn 6/21/06, Stefan Arentz [EMAIL PROTECTED] wrote:
On 6/21/06, Igor Vaynberg 
[EMAIL PROTECTED] wrote:
mm...sexy...here is something you might want to try:class JFreeChartImage extends Image { protected Resource getImageResource() {  Chart chart=(Chart)getModelObject();
 return new JFreeChartImageResource(chart,  }}this way your chart data will be updated from request to request and it can be detachable, etc. models rock!

Ok so by moving the Chart's data out of the Resource and into a Model I can now share that data between different components (for example having two images on the same page containing the same chart). Right?And also moving the Chart's data (model) into a Wicket Model it allows for serialization and thus clustering?
Did I get that right?S.

___Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

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


Re: [Wicket-user] Beginner Image question

2006-06-21 Thread Eelco Hillenius
Yep. Or alternatively, use attribute modifiers:

WebMarkupContainer c = new WebMarkupContainer(myimage);
c.add(new SimpleAttributeModifier(src,
http://images.apple.com/macbook/images/macbookglossydisplay20060516.jpg;));
add(c);

or

public class ExternalImage extends WebMarkupContainer {

  public ExternalImage(String id, IModel model) {
add(new AttributeModifier(src, true, model));
  }
}

etc.

Eelco


On 6/21/06, Stefan Arentz [EMAIL PROTECTED] wrote:
 Do you mean something like this:

 html
body
  img wicket:id=externalImage/
/body
  /html

 public class TestPage extends WebPage
 {
 public TestPage()
 {
 add(new ExternalImage(externalImage, 
 http://images.apple.com/macbook/images/macbookglossydisplay20060516.jpg;));
 }
 }

 If so, then I just hacked this together. Warning: might contain lame code
 from a Wicket newbie.

 public class ExternalImage extends WebMarkupContainer
 {
 private final IModel src;

 public ExternalImage(String id, String src)
 {
 super(id);
 this.src = new Model(src);
 }

 public ExternalImage(String id, IModel model)
 {
 super(id);
 this.src = model;
 }

 protected void onComponentTag(ComponentTag tag)
 {
 if (src != null) {
 Object srcValue = src.getObject(this);
 if (srcValue != null) {
 tag.put(src, srcValue.toString());
 }
 }
 }

 protected void onComponentTagBody(MarkupStream markupStream,
 ComponentTag openTag)
 {
 this.checkComponentTag(openTag, img);
 super.onComponentTagBody(markupStream, openTag);
 }
 }

 Enjoy :-)

  S.


 On 6/21/06, Alex Objelean [EMAIL PROTECTED] wrote:
 
  I am trying to insert in my page an Image located at some URL...
  I have looked at the examples, but there are only the following
 situations:
  - Image as package resource
  - Dynamically created image. Re-render whenever resource is asked for.
  - Simple model
  - Dynamically created buffered image
 
  but no example which would suite my need. Can you help me?
  --
  View this message in context:
 http://www.nabble.com/Beginner-Image-question-t1823773.html#a4973872
  Sent from the Wicket - User forum at Nabble.com.
 
 
 
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 




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





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


Re: [Wicket-user] How to reuse panels with form fields

2006-06-21 Thread Eelco Hillenius
I have to admit, it was the first thing I missed when I started
playing with wicket. I even attempted to create some special form for
deep nesting *slaps himself on the head*.

Eelco


On 6/21/06, Hugo Visser [EMAIL PROTECTED] wrote:
 Thanks, that works. Come to think of it, it sounds really obvious actually
 :)

 Thanks again,
 Hugo


 On 6/21/06, Eelco Hillenius  [EMAIL PROTECTED] wrote:
  Just put the form components on your panel, and nest that panel in any
  form you want. Their models will be updated, no matter how deep the
  components are nested.
 
  Eelco
 
 
  On 6/20/06, Hugo Visser [EMAIL PROTECTED] wrote:
   Hi,
  
   As my first wicket exercise I thought I'd create a little utility like
   wicket application. My application needs to log in to a server on a few
   occations. I'd like to create a generic login panel and reuse that on my
   other pages when credentials are required.
  
   So I started of creating a panel with a form on it and all is well.
 However
   that form needs a submit button to update the model, and that's not what
 I
   want :) I'd like to incorporate the login panel in another page as part
 of
   one form. For example, I'd like to present a page with login
 credentials,
   some action and a do it button. It must be even possible to have more
 then
   one login panels on a page, if the action involves multiple servers.
   Things that I've come up with is using ajax and onblur events to update
 the
   login model, but that doesn't seem the right thing to me.
  
   Can anybody give me some hints/tips on this to get my app started?
  
   Thanks,
  
   Hugo
  
  
  
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
  
 https://lists.sourceforge.net/lists/listinfo/wicket-user
  
  
  
 
 
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 




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





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


Re: [Wicket-user] Embedding video links

2006-06-21 Thread Eelco Hillenius
I'm afraid I have no experience with that. Maybe someone else on the list?

Eelco


On 6/19/06, Ross Mark [EMAIL PROTECTED] wrote:
 I've just written my first wicket app and I'm having a small problem.
 The web app is a simple survey form where the user will navigate a
 series of video clips and answer questions about each clip. The video
 link and the questions all come from a database as the order may change.
 What I can't find is any indication of what sort of wicket object I
 should be using to include the video. The best I can find is an
 ExternalLink however I would rather display the video in-line as when I
 try and access via an ExternalLink the browsers just bring up a download
 page. I'm not a web developer so I've been searching for how other web
 pages include video content and most sites talk of using embed and
 object tags. My ideal solution would also allow the user to play the
 video on demand either though a play control or pop-up that when called
 starts the playing.

 Any help would be appreciated.

 Cheers

 Ross


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



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


Re: [Wicket-user] Formatting Dates

2006-06-21 Thread Eelco Hillenius
And if you always/ throughout your whole web application have to
format in a certain style, you can register a converter that does
that.

Eelco


On 6/21/06, Igor Vaynberg [EMAIL PROTECTED] wrote:
 yeah, you pretty much nailed it. although i would extend webmarkupcomponent
 instead of label since you are really not using any of label's
 functionality.

 as an alternative to this method you can create an imodel decorator that has
 the formatting in getobject...

 IModel.getObject(Component c) {
Date d=(Datre)delegate.getObject(c);
return formattedDate(d);
 }

 that way you can use any existing output component and still maintain the
 format.

 in the project i work on i have the model and the component wraps whatever
 it gets passed through the consturctor with that model

 ie...

 class DateLabel extends Label {

 public DateLabel(String id, IModel model) {
   super(id, new DateFormatModel(model));
 }
 }

 but in the end, whatever works for you :)

 -Igor




 On 6/21/06, Stefan Arentz [EMAIL PROTECTED] wrote:
 

 I keep asking silly questions :-)

 I have a lot of ListViews that need to show ISO formatted dates. Is it
 common practice to make a WebComponent for that? For example like this:

 public class DateLabel extends Label
 {
 static private final Format sDateFormat = new
 SimpleDateFormat(-MM-dd HH:mm:ss);

 public DateLabel(String id)
 {
 super(id);
 }

 public DateLabel(String id, Date model)
 {
 super(id, new Model(model));
 }

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

 protected void onComponentTagBody(final MarkupStream markupStream, final
 ComponentTag openTag)
 {
 replaceComponentTagBody(markupStream, openTag,
 sDateFormat.format(getModelObject()));
 }
 }

 I must admit that I'm not really in a Wicket Mindset yet. Maybe a Wicket
 Jedi Master can tell me whether this is the right approach :-)

  S.




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






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





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


[Wicket-user] Cascading column lists

2006-06-21 Thread Nathan Hamblen
Not sure how common this is, but more than once I've had to hack up
models that split a list into sublists for the UI:

A   D   G
B   E   H
C   F   I
...

I've hit upon a nice way of doing it I thought I'd share with everyone:
http://databinder.net/wsvn/Databinder/databinder/trunk/src/main/java/net/databinder/models/SublistProjectionModel.java?op=file

And some background on the problem:
http://technically.us/n8/articles/2006/06/21/a-nested-for-for-wicket

Nathan



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


Re: [Wicket-user] wicket emailaddress validation incorrect

2006-06-21 Thread Igor Vaynberg
How about having a RfcCompliantEmailAddressPatternValidator living nextto the normal EmailAddressPatternValidator? Then developers would only
pick the RFC compliant version if they actually needed it. Just athought.if you attach one to sf.net tracker or an email i will happily put it into extensions.
-Igor
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnkkid=107521bid=248729dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] wicket emailaddress validation incorrect

2006-06-21 Thread Frank Bille Jensen
On Wed, 2006-06-21 at 12:23 -0700, Igor Vaynberg wrote:
 if you attach one to sf.net tracker or an email i will happily put it
 into extensions. 


Yeah, why not :) I'll brew something together when I have a spare
moment.

- fb


All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnkkid=107521bid=248729dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] wicket emailaddress validation incorrect

2006-06-21 Thread Frank Bille Jensen
On Wed, 2006-06-21 at 21:27 +0200, Frank Bille Jensen wrote:
 On Wed, 2006-06-21 at 12:23 -0700, Igor Vaynberg wrote:
  if you attach one to sf.net tracker or an email i will happily put it
  into extensions. 
 
 
 Yeah, why not :) I'll brew something together when I have a spare
 moment.


And that time was now ;-)

http://sourceforge.net/tracker/index.php?func=detailaid=1510238group_id=119783atid=684977

- fb


All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnkkid=107521bid=248729dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Beginner Image question

2006-06-21 Thread Martijn Dashorst
Now making commercials for Apple, are you? :)

Martijn

On 6/21/06, Eelco Hillenius [EMAIL PROTECTED] wrote:
 Yep. Or alternatively, use attribute modifiers:

 WebMarkupContainer c = new WebMarkupContainer(myimage);
 c.add(new SimpleAttributeModifier(src,
 http://images.apple.com/macbook/images/macbookglossydisplay20060516.jpg;));
 add(c);

 or

 public class ExternalImage extends WebMarkupContainer {

   public ExternalImage(String id, IModel model) {
 add(new AttributeModifier(src, true, model));
   }
 }

 etc.

 Eelco


 On 6/21/06, Stefan Arentz [EMAIL PROTECTED] wrote:
  Do you mean something like this:
 
  html
 body
   img wicket:id=externalImage/
 /body
   /html
 
  public class TestPage extends WebPage
  {
  public TestPage()
  {
  add(new ExternalImage(externalImage, 
  http://images.apple.com/macbook/images/macbookglossydisplay20060516.jpg;));
  }
  }
 
  If so, then I just hacked this together. Warning: might contain lame code
  from a Wicket newbie.
 
  public class ExternalImage extends WebMarkupContainer
  {
  private final IModel src;
 
  public ExternalImage(String id, String src)
  {
  super(id);
  this.src = new Model(src);
  }
 
  public ExternalImage(String id, IModel model)
  {
  super(id);
  this.src = model;
  }
 
  protected void onComponentTag(ComponentTag tag)
  {
  if (src != null) {
  Object srcValue = src.getObject(this);
  if (srcValue != null) {
  tag.put(src, srcValue.toString());
  }
  }
  }
 
  protected void onComponentTagBody(MarkupStream markupStream,
  ComponentTag openTag)
  {
  this.checkComponentTag(openTag, img);
  super.onComponentTagBody(markupStream, openTag);
  }
  }
 
  Enjoy :-)
 
   S.
 
 
  On 6/21/06, Alex Objelean [EMAIL PROTECTED] wrote:
  
   I am trying to insert in my page an Image located at some URL...
   I have looked at the examples, but there are only the following
  situations:
   - Image as package resource
   - Dynamically created image. Re-render whenever resource is asked for.
   - Simple model
   - Dynamically created buffered image
  
   but no example which would suite my need. Can you help me?
   --
   View this message in context:
  http://www.nabble.com/Beginner-Image-question-t1823773.html#a4973872
   Sent from the Wicket - User forum at Nabble.com.
  
  
  
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/wicket-user
  
 
 
 
 
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 


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



-- 
Download Wicket 1.2 now! Write Ajax applications without touching JavaScript!
-- http://wicketframework.org

All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnkkid=107521bid=248729dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Beginner Image question

2006-06-21 Thread Igor Vaynberg
you know what would be a great commercial, the scene from hot shots where sheen cooks an egg on golino's sexy stomich.-IgorOn 6/21/06, Martijn Dashorst
 [EMAIL PROTECTED] wrote:
Now making commercials for Apple, are you? :)MartijnOn 6/21/06, Eelco Hillenius [EMAIL PROTECTED] wrote: Yep. Or alternatively, use attribute modifiers:
 WebMarkupContainer c = new WebMarkupContainer(myimage); c.add(new SimpleAttributeModifier(src, 
http://images.apple.com/macbook/images/macbookglossydisplay20060516.jpg)); add(c); or public class ExternalImage extends WebMarkupContainer { public ExternalImage(String id, IModel model) {
 add(new AttributeModifier(src, true, model)); } } etc. Eelco On 6/21/06, Stefan Arentz 
[EMAIL PROTECTED] wrote:  Do you mean something like this:   html body img wicket:id=externalImage/
 /body /html   public class TestPage extends WebPage  {  public TestPage()  {  add(new ExternalImage(externalImage, 
  http://images.apple.com/macbook/images/macbookglossydisplay20060516.jpg));  }  } 
  If so, then I just hacked this together. Warning: might contain lame code  from a Wicket newbie.   public class ExternalImage extends WebMarkupContainer  {
  private final IModel src;   public ExternalImage(String id, String src)  {  super(id);  this.src = "" Model(src);  }
   public ExternalImage(String id, IModel model)  {  super(id);  this.src = "">  }   protected void onComponentTag(ComponentTag tag)
  {  if (src != null) {  Object srcValue = src.getObject(this);  if (srcValue != null) {  tag.put(src, 
srcValue.toString());  }  }  }   protected void onComponentTagBody(MarkupStream markupStream,  ComponentTag openTag)  {
  this.checkComponentTag(openTag, img);  super.onComponentTagBody(markupStream, openTag);  }  }   Enjoy :-) 
 S.On 6/21/06, Alex Objelean [EMAIL PROTECTED] wrote: I am trying to insert in my page an Image located at some URL...
   I have looked at the examples, but there are only the following  situations:   - Image as package resource   - Dynamically created image. Re-render whenever resource is asked for.
   - Simple model   - Dynamically created buffered image but no example which would suite my need. Can you help me?   --   View this message in context:
  http://www.nabble.com/Beginner-Image-question-t1823773.html#a4973872   Sent from the Wicket - User forum at 
Nabble.com. ___   Wicket-user mailing list   
Wicket-user@lists.sourceforge.net   https://lists.sourceforge.net/lists/listinfo/wicket-user
___  Wicket-user mailing list  
Wicket-user@lists.sourceforge.net  https://lists.sourceforge.net/lists/listinfo/wicket-user   
 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net 
https://lists.sourceforge.net/lists/listinfo/wicket-user--Download Wicket 1.2 now! Write Ajax applications without touching _javascript_!-- http://wicketframework.org
All the advantages of Linux Managed Hosting--Without the Cost and Risk!Fully trained technicians. The highest number of Red Hat certifications inthe hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnkkid=107521bid=248729dat=121642___
Wicket-user mailing listWicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user

All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnkkid=107521bid=248729dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] How to get Attribute in HttpSession in wicketApplication?

2006-06-21 Thread 8723056

I'm a rookie in Wicket, please forgive me if this is a stupid question.
I have a loginServlet which is as follows:

 public void doPost(HttpServletRequest request, HttpServletResponse response)  
 throws ServletException, IOException
  {
//Do some Authentication actions... 
httpSession = request.getSession();
httpSession.setAttribute( sessionid, strSessionID );
httpSession.setAttribute( userid,strUserID );
//...
  }

Now, I want to get the attributes sessionid and userid in a wicket 
Application, And I wrote some codes:

---
public class AlarmApp extends WebApplication{

  private HttpSessionStore session = null;

  public ISessionStore newMySessionStore(){
   
ISessionStore sessionStore = new HttpSessionStore();

 if(RequestCycle.get().getSession() != null){

  sessionStore.bind(RequestCycle.get().getRequest(),RequestCycle.get
().getSession());

  System.out.print ( UserID:  + sessionStore.getAttribute
(RequestCycle.get().getRequest(),userid));

  System.out.print ( ,sessionid:  + sessionStore.getAttribute
(RequestCycle.get().getRequest(),sessionid));

   }

  return sessionStore;
}

   public Class getHomePage()
   {
  newMySessionStore();
  return ListAlarm.class;
   }
}
---
 But the result of print is always UserID:null,sessionid:null.
 How could I access the HttpSession directly?
 

-
交通大學資訊科學系 WebMail https://mail.cis.nctu.edu.tw

All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnkkid=107521bid=248729dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] How to get Attribute in HttpSession in wicketApplication?

2006-06-21 Thread Igor Vaynberg
((WebRequest)RequestCycle.get().getRequest()).getHttpServletRequest().getHttpSession()-IgorOn 6/21/06, 8723056 
[EMAIL PROTECTED] wrote:I'm a rookie in Wicket, please forgive me if this is a stupid question.
I have a loginServlet which is as follows: public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException{//Do some Authentication actions...
httpSession = request.getSession();httpSession.setAttribute( sessionid, strSessionID );httpSession.setAttribute( userid,strUserID );//...}Now, I want to get the attributes sessionid and userid in a wicket
Application, And I wrote some codes:---public class AlarmApp extends WebApplication{private HttpSessionStore session = null;public ISessionStore newMySessionStore(){
ISessionStore sessionStore = new HttpSessionStore(); if(RequestCycle.get().getSession() != null){sessionStore.bind(RequestCycle.get().getRequest(),RequestCycle.get().getSession());
System.out.print ( UserID:  + sessionStore.getAttribute(RequestCycle.get().getRequest(),userid));System.out.print ( ,sessionid:  + sessionStore.getAttribute
(RequestCycle.get().getRequest(),sessionid)); }return sessionStore;} public Class getHomePage() {newMySessionStore();return 
ListAlarm.class; }}--- But the result of print is always UserID:null,sessionid:null. How could I access the HttpSession directly?
-交通大學資訊科學系 WebMail https://mail.cis.nctu.edu.twAll the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications inthe hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnkkid=107521bid=248729dat=121642___Wicket-user mailing list
Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnkkid=107521bid=248729dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] wicket emailaddress validation incorrect

2006-06-21 Thread jan_bar
Hi,

just in the case, do you take IDN (International Domain Names) into
consideration? Allowed characters for .de domain are listed here:
http://www.denic.de/en/domains/idns/liste.html.

http://www.mädchen.de (doesn't work but is registered)

Jan




All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnkkid=107521bid=248729dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] will wicket-contrib-dojo upgrade to wicket 1.2?

2006-06-21 Thread Nili Adoram
Hi all,
Does anyone know whether it is planned to upgrade wicket-contrib-dojo to 
wicket 1.2?
Currently we cannot use them both in the same classpath since there are 
collisions.
Thanks
Nili

All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnkkid=107521bid=248729dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] How to get Attribute in HttpSession in wicketApplication (part 2)?

2006-06-21 Thread Martijn Dashorst
If you're building a wicket-only application, typically you would
create your own session class (extends WebSession) and add normal
properties to that class just as you would do with a normal object.
This provides a better way of dealing with session usage from a
programmers point of view: no more guessing what the session attribute
was, just invoke the MySession.get().getUser()

For instance, the wicket-auth-role examples project shows how to
create such a session class.

Martijn

On 6/22/06, JFC [EMAIL PROTECTED] wrote:



 Hey:


 I've found a way to solve this problem:

 ---
  javax.servlet.http.HttpServletRequest httpRequest =
((ServletWebRequest)
 RequestCycle.get().getRequest()).getHttpServletRequest();

HttpSession sessionStore = httpRequest.getSession();

 System.out.print ( UserID:  + sessionStore.getAttribute(userid));
 System.out.print ( sessionid:  +
 sessionStore.getAttribute(sessionid));
 -
 Is this safe?

 P.s I don't know why my subject How to get Attribute in HttpSession in
 wicketApplication can't be replied by using the button on the
   page
 http://www.mail-archive.com/wicket-user@lists.sourceforge.net/msg15266.html,
 could anyone please tell me did I make
 any mistake? (I send to the email:
 wicket-user@lists.sourceforge.net) , thx very much!

 JFC Hsieh
 All the advantages of Linux Managed Hosting--Without the Cost and Risk!
 Fully trained technicians. The highest number of Red Hat certifications in
 the hosting industry. Fanatical Support. Click to learn more
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=107521bid=248729dat=121642

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





-- 
Download Wicket 1.2 now! Write Ajax applications without touching JavaScript!
-- http://wicketframework.org

All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnkkid=107521bid=248729dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user