WIcket mounting on root (Was: URL Encoding strategy)

2010-02-25 Thread Erik van Oosten

Hi Nishant,

Its live: http://blog.jteam.nl/2010/02/24/wicket-root-mounts/

Regards,
   Erik.


Nishant Neeraj schreef:

Thanks Erik. I guess, I'll go with sevlet filter approach for now.

However, I'll be looking for your blog post. If possible, post the link to
the article in this thread when you're done.

Thanks again.
Nishant

On Sat, Feb 20, 2010 at 6:40 PM, Erik van Oosten e.vanoos...@grons.nlwrote:

  

Hi Nishant,

This is tricky stuff.

Here is some information:
http://old.nabble.com/How-to-catch-unknown-%28not-mounted%29-URLs--td14949092.html
Another approach is to do redirects from a servlet filter.

If you have a couple of days of patience I'll have finished a blog article
on it, with example code to make it a lot easier from within Wicket.

Regards,
   Erik.


Op 20-02-10 11:07, Nishant Neeraj wrote:



Hi,

I wanted to apply URL encoding strategy to application context root but I
cant mount empty string because it throws exception at start-up.
Is there a work around to this?

Regards
Nishant
  


--
Send from my SMTP compliant software
Erik van Oosten
http://day-to-day-stuff.blogspot.com/



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



Re: Speeding Up HTML Parse???

2010-02-25 Thread Jochen Mader
a) Read the speed tracer output, if the time is spent with the redirect or
loading the actual markup it will tell you.
b) HTML rendering in the browser is influenced by the markup and ajax. Read
the speed tracer output and it will tell you where the time is spent. It's
most likely not wicket that costs the initial 30 second delay but some
resource taking long to load, an AJAX component doing its magic ...
But that's all client(browser)-side stuff.


RE: format float/double in dataview

2010-02-25 Thread Andreas Lüdtke
James,

thanks a lot for the code snippet. My numbers are now perfectly formatted. Do
you know how to right align the column? Normally, I would do this in the
markup but I don't see a possibility where I can modify this in the code.

Thanks again

Andreas 

 -Original Message-
 From: James Carman [mailto:jcar...@carmanconsulting.com] 
 Sent: Wednesday, February 24, 2010 8:35 PM
 To: users@wicket.apache.org
 Subject: Re: format float/double in dataview
 
 public class MessageFormatColumnT extends PropertyColumnT
 {
 private final String pattern;
 
 public MessageFormatColumn(IModelString displayModel, String
 propertyExpression, String pattern)
 {
 super(displayModel, propertyExpression);
 this.pattern = pattern;
 }
 
 public MessageFormatColumn(IModelString displayModel, String
 sortProperty, String propertyExpression, String pattern)
 {
 super(displayModel, sortProperty, propertyExpression);
 this.pattern = pattern;
 }
 
 @Override
 protected IModel? createLabelModel(IModelT itemModel)
 {
 IModel? superModel = super.createLabelModel(itemModel);
 return new ModelString(MessageFormat.format(pattern,
 superModel.getObject()));
 }
 }
 
 
 On Wed, Feb 24, 2010 at 1:43 PM, Andreas Lüdtke 
 sam.lued...@t-online.de wrote:
  I'm displaying doubles in an AjaxFallbackDefaultDataTable. 
 Is it possible to
  format them i.e. with a precision of 2 digits and right aligned?
 
  Currently I don't see a possibility to do this.
 
  Thanks
 
         Andreas
 
 
  
 -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 


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



Re: format float/double in dataview

2010-02-25 Thread James Carman
I would think that you'd add either a style or class attribute to the
cell, perhaps?

On Thu, Feb 25, 2010 at 6:02 AM, Andreas Lüdtke sam.lued...@t-online.de wrote:
 James,

 thanks a lot for the code snippet. My numbers are now perfectly formatted. Do
 you know how to right align the column? Normally, I would do this in the
 markup but I don't see a possibility where I can modify this in the code.

 Thanks again

 Andreas

 -Original Message-
 From: James Carman [mailto:jcar...@carmanconsulting.com]
 Sent: Wednesday, February 24, 2010 8:35 PM
 To: users@wicket.apache.org
 Subject: Re: format float/double in dataview

 public class MessageFormatColumnT extends PropertyColumnT
 {
     private final String pattern;

     public MessageFormatColumn(IModelString displayModel, String
 propertyExpression, String pattern)
     {
         super(displayModel, propertyExpression);
         this.pattern = pattern;
     }

     public MessageFormatColumn(IModelString displayModel, String
 sortProperty, String propertyExpression, String pattern)
     {
         super(displayModel, sortProperty, propertyExpression);
         this.pattern = pattern;
     }

     @Override
     protected IModel? createLabelModel(IModelT itemModel)
     {
         IModel? superModel = super.createLabelModel(itemModel);
         return new ModelString(MessageFormat.format(pattern,
 superModel.getObject()));
     }
 }


 On Wed, Feb 24, 2010 at 1:43 PM, Andreas Lüdtke
 sam.lued...@t-online.de wrote:
  I'm displaying doubles in an AjaxFallbackDefaultDataTable.
 Is it possible to
  format them i.e. with a precision of 2 digits and right aligned?
 
  Currently I don't see a possibility to do this.
 
  Thanks
 
         Andreas
 
 
 
 -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 

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




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



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



Validate with info messages, instead of errors

2010-02-25 Thread espen . pedersen
Hi all!

I'm Looking for a way to perform validation, but print the messages as 
INFO (with Ajax), instead of ERRORs. I'd like to have a combination of 
error and info validators. An error will prevent the user from submitting 
the form, the info message will give the user a warning/info message. The 
messages should popup during an onblur event from the component and be 
displayed in a way similar to: 
http://stuq.nl/weblog/2008-09-03/user-friendly-form-validation-with-wicket
.

I've been looking into extending for instance MaximumValidator and let it 
report info messages, unfortunately I'm unable to get hold og the 
Component through the IValidatable interface impl. The error message, 
which I'd like to use, is built up inside the FromComponents error method 
and unavailable for me. Maybe I'm on the wrong the wrong path here? 
Anybody that has done something similar?

--
Espen Ønvik Pedersen

Re: [OT] Wicket App Hosting

2010-02-25 Thread Josh Kamau
When i wanted to do the same,  i bought a server space at
www.theserverexperts.com  and installed my staff there . ie. Jetty, postgres
and the like. I then bought a domain and liked it with my public ip address.

Regards.

On Thu, Feb 25, 2010 at 3:50 AM, Mauro Ciancio maurocian...@gmail.comwrote:

 Hello everyone,

  I need to deploy a couple of wicket apps (2 or 3 apps). I'm looking for
 advices
 in order to get a good hosting service. In fact, I think i'll get a vps
 service.

 Any advices? Which vps providers are good?

 Thanks in advance.
 Cheers!
 --
 Mauro Ciancio maurociancio at gmail dot com

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




Re: DropDown where (type of model property) != (type of choices)

2010-02-25 Thread MattyDE

Great! Thanks a lot for this BeanDropDownChoice-Component ... iam a little
bit dissapointed that something similiar is not include inside the
standard-wicket framework

One again: Great! :o)




elygre wrote:
 
 
 elygre wrote:
 
 It seems to me that it is a fairly hard requirement that the model and
 the choice list have identical types. I'll investigate a bit further, to
 see if I can build a generic mechanism for both a Map and a bean-style
 object.
 
 
 After looking deeper into this, I created two different specialized
 DropDownChoices, with different properties. The class signatures
 (interfaces) are as follows with complete code further below
 
 Now, of all the things I did in Wicket, this is the one thing that turned
 out to be furthest from expectations. It wasn't the hardest, but it was
 the easiest thing that turned out to be hard :-). If there is interest (or
 at least no objections...), I'll create a jira issue and submit this code
 for inclusion into 1.5.
 
 Class signatures:
 
 public class MapDropDownChoiceT extends DropDownChoiceT {
 public MapDropDownChoice(String id, MapT, ? choices);
 public MapDropDownChoice(String id, IModelT model, MapT, ?
 choices);
 }
 
 public class BeanDropDownChoiceT extends MapDropDownChoiceT {
 public BeanDropDownChoice(String id, List choices, IChoiceRenderer
 renderer);
 public BeanDropDownChoice(String id, IModelT model, List choices,
 IChoiceRenderer renderer);
 }
 
 
 Full code:
 public class MapDropDownChoiceT extends DropDownChoiceT {
 
 public MapDropDownChoice(String id, MapT, ? choices) {
 super(id, new ArrayListT(choices.keySet()), new
 MapChoiceRenderer(choices));
 }
 
 public MapDropDownChoice(String id, IModelT model, MapT, ?
 choices) {
 super(id, model, new ArrayListT(choices.keySet()), new
 MapChoiceRenderer(choices));
 }
 
 private static class MapChoiceRenderer extends ChoiceRenderer {
 
 private final Map map;
 
 public MapChoiceRenderer(Map map) {
 super(value, key);
 this.map = map;
 }
 
 public Object getDisplayValue(Object object) {
 Object value = map.get(object);
 return value == null ?  : value.toString();
 }
 
 public String getIdValue(Object object, int index) {
 return object == null ?  : object.toString();
 }
 }
 
 }
 
 public class BeanDropDownChoiceT extends MapDropDownChoiceT {
 
 public BeanDropDownChoice(String id, List choices, IChoiceRenderer
 renderer) {
 super(id, createMap(choices, renderer));
 }
 
 public BeanDropDownChoice(String id, IModelT model, List choices,
 IChoiceRenderer renderer) {
 super(id, model, createMap(choices, renderer));
 }
 
 static Map createMap(Collection choices, IChoiceRenderer renderer) {
 Map map = new HashMap();
 for (Object choice : choices) {
 map.put(renderer.getIdValue(choice, -1),
 renderer.getDisplayValue(choice));
 }
 return map;
 }
 }
 
 
 

-- 
View this message in context: 
http://old.nabble.com/DropDown-where-%28type-of-model-property%29-%21%3D-%28type-of-choices%29-tp25052893p27714412.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Redirect to bookmarkable page from self - broken in 1.4.6?

2010-02-25 Thread Gianni
I've mounted a bookmarkable page as follows:

mount(new IndexedParamUrlCodingStrategy(destinations, 
DestinationGuidePage.class));

Then I've got a drop-down menu with an ajax behaviour to redirect to the same 
page with different parameters:

destinationChoice.add(new AjaxFormComponentUpdatingBehavior(onchange) {
@Override
protected void onUpdate(AjaxRequestTarget target) {
onUpdateSelection(target);
}
});

protected void onUpdateSelection(AjaxRequestTarget target) {
PageParameters params = new PageParameters(0= + 
selectedCountry.getId());
setResponsePage(DestinationGuidePage.class, params);
}

In 1.4.5 this works fine and the relative redirect is ../destinations/my 
parameter

DEBUG org.apache.wicket.Page - ending request for page [Page class = 
com.myapp.webapp.destguide.DestinationGuidePage, id = 3, version = 0], request 
[method = POST, protocol = HTTP/1.1, requestURL = 
http://local.mydomain.com:8180/myapp/URC107/, contentType = 
application/x-www-form-urlencoded, contentLength = 35, contextPath = 
/myapp/URC107, pathInfo = null, requestURI = /myapp/URC107/, servletPath = 
/URC107/, pathTranslated = null]
DEBUG org.apache.wicket.protocol.http.WebResponse - Redirecting to 
../destinations/AN

This no longer works in 1.4.6 as it redirects to destinations/my parameter 
which results in the full URL /myapp/URC107/destinations/destinations/my 
parameter

DEBUG org.apache.wicket.Page - ending request for page [Page class = 
com.myapp.webapp.destguide.DestinationGuidePage, id = 6, version = 0], request 
[method = POST, protocol = HTTP/1.1, requestURL = 
http://local.mydomain.com:8180/myapp/URC107/, contentType = 
application/x-www-form-urlencoded, contentLength = 35, contextPath = 
/myapp/URC107, pathInfo = null, requestURI = /myapp/URC107/, servletPath = 
/URC107/, pathTranslated = null]
DEBUG org.apache.wicket.protocol.http.WebResponse - Redirecting to 
destinations/AT

I can't see any indications in the 1.4.6 release notes to say this behaviour 
may have changed, is this a bug?
-Gianni


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



Re: Redirect to bookmarkable page from self - broken in 1.4.6?

2010-02-25 Thread vineet semwal
i think it's the same known issue (2717),you can confirm the correct
behavior in 1.4.x.

On Thu, Feb 25, 2010 at 6:31 PM, Gianni gdoe6...@yahoo.it wrote:

 I've mounted a bookmarkable page as follows:

 mount(new IndexedParamUrlCodingStrategy(destinations,
 DestinationGuidePage.class));

 Then I've got a drop-down menu with an ajax behaviour to redirect to the
 same page with different parameters:

 destinationChoice.add(new AjaxFormComponentUpdatingBehavior(onchange) {
@Override
protected void onUpdate(AjaxRequestTarget target) {
onUpdateSelection(target);
}
 });

 protected void onUpdateSelection(AjaxRequestTarget target) {
PageParameters params = new PageParameters(0= +
 selectedCountry.getId());
setResponsePage(DestinationGuidePage.class, params);
 }

 In 1.4.5 this works fine and the relative redirect is ../destinations/my
 parameter

 DEBUG org.apache.wicket.Page - ending request for page [Page class =
 com.myapp.webapp.destguide.DestinationGuidePage, id = 3, version = 0],
 request [method = POST, protocol = HTTP/1.1, requestURL =
 http://local.mydomain.com:8180/myapp/URC107/, contentType =
 application/x-www-form-urlencoded, contentLength = 35, contextPath =
 /myapp/URC107, pathInfo = null, requestURI = /myapp/URC107/, servletPath =
 /URC107/, pathTranslated = null]
 DEBUG org.apache.wicket.protocol.http.WebResponse - Redirecting to
 ../destinations/AN

 This no longer works in 1.4.6 as it redirects to destinations/my
 parameter which results in the full URL
 /myapp/URC107/destinations/destinations/my parameter

 DEBUG org.apache.wicket.Page - ending request for page [Page class =
 com.myapp.webapp.destguide.DestinationGuidePage, id = 6, version = 0],
 request [method = POST, protocol = HTTP/1.1, requestURL =
 http://local.mydomain.com:8180/myapp/URC107/, contentType =
 application/x-www-form-urlencoded, contentLength = 35, contextPath =
 /myapp/URC107, pathInfo = null, requestURI = /myapp/URC107/, servletPath =
 /URC107/, pathTranslated = null]
 DEBUG org.apache.wicket.protocol.http.WebResponse - Redirecting to
 destinations/AT

 I can't see any indications in the 1.4.6 release notes to say this
 behaviour may have changed, is this a bug?
 -Gianni


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




-- 
regards,
Vineet Semwal


Re: [OT] Wicket App Hosting

2010-02-25 Thread Fatih Mehmet Ucar
linode is the best for me up to now

www.linode.com  you may need to know a little bit linux/unix though

On 25 February 2010 12:39, Josh Kamau joshnet2...@gmail.com wrote:
 When i wanted to do the same,  i bought a server space at
 www.theserverexperts.com  and installed my staff there . ie. Jetty, postgres
 and the like. I then bought a domain and liked it with my public ip address.

 Regards.

 On Thu, Feb 25, 2010 at 3:50 AM, Mauro Ciancio maurocian...@gmail.comwrote:

 Hello everyone,

  I need to deploy a couple of wicket apps (2 or 3 apps). I'm looking for
 advices
 in order to get a good hosting service. In fact, I think i'll get a vps
 service.

 Any advices? Which vps providers are good?

 Thanks in advance.
 Cheers!
 --
 Mauro Ciancio maurociancio at gmail dot com

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




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



[OT] Apache con 2010 europe, when?

2010-02-25 Thread nino martinez wael
Hi Guys

Im trying todo a conference lineup so we at our company can decide which
conference to go to. But can't find the date for Apache con europe 2010, I
thought it were somewhere in march.

If interested these are in my lineup so far:

Apache Con
Devoxx
Øredev

Are there some conference I forgot? The conference should be about java and
development in general, preferably like Øredev (with tracks like Test,
Agile, Architecture, User Experience etc), so we can see what happens in the
development world. And somewhere in the europe region... I haven't got
budget for a us trip. Otherwise It would only be me going :)

Ohh and forgive my intrusion :)

Regards Nino


Re: [OT] Apache con 2010 europe, when?

2010-02-25 Thread Leo . Erlandsson
SDC2010 - Scandinavian Developer Conference in Gothenburg, Sweden.

There is even a lecture on Wicket! :)

http://www.scandevconf.se/2010/conference/speakers/andrew-lombardi/?backlnk=dptgday=togglewrap1






nino martinez wael nino.martinez.w...@gmail.com 
2010-02-25 14:45
Sänd svar till
users@wicket.apache.org


Till
users@wicket.apache.org
Kopia

Ärende
[OT] Apache con 2010 europe, when?






Hi Guys

Im trying todo a conference lineup so we at our company can decide which
conference to go to. But can't find the date for Apache con europe 2010, I
thought it were somewhere in march.

If interested these are in my lineup so far:

Apache Con
Devoxx
Øredev

Are there some conference I forgot? The conference should be about java 
and
development in general, preferably like Øredev (with tracks like Test,
Agile, Architecture, User Experience etc), so we can see what happens in 
the
development world. And somewhere in the europe region... I haven't got
budget for a us trip. Otherwise It would only be me going :)

Ohh and forgive my intrusion :)

Regards Nino



SV: [OT] Apache con 2010 europe, when?

2010-02-25 Thread Wilhelmsen Tor Iver
Then there is JavaZone in Oslo later on.

- Tor Iver


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



serializable problem

2010-02-25 Thread bj�rn liffers
hello,
i´ve got a problem with serialization.

my application is connected to a mysql-db and every class of mine implements 
serializable.
but still there are exceptions telling me that java.lang.Object isn´t 
serializable...

quote
org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException: 
Unable to serialize class: java.lang.Object

private java.util.Map com.mysql.jdbc.ConnectionImpl.charsetConverterMap 
[class=java.util.HashMap]
private java.util.Map 
com.mysql.jdbc.ConnectionImpl.charsetConverterMap[write:1][write:2] 
[class=java.lang.Object] - field that is not serializable
/quote

is there a possibility to deactivate serialization?
or how shall i solve this problem?

kind regards ans many thanks to those who can help me out of the 
serialization-jungle (never serialized anything before and i am relatively new 
to wicket with my very first real wicket-project)

Immer auf dem Laufenden! Sport, Auto, Reise, Politik und Promis. Von uns für 
Sie: der neue Arcor.de-Newsletter!
Jetzt anmelden und einfach alles wissen: 
http://www.arcor.de/rd/footer.newsletter

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



Re: serializable problem

2010-02-25 Thread nino martinez wael
declare it transient

But im not sure why you a object of that kind in there... Would be nice with
some more code..

2010/2/25 björn liffers bad.ad...@arcor.de

 hello,
 i´ve got a problem with serialization.

 my application is connected to a mysql-db and every class of mine
 implements serializable.
 but still there are exceptions telling me that java.lang.Object isn´t
 serializable...

 quote
 org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException:
 Unable to serialize class: java.lang.Object

 private java.util.Map com.mysql.jdbc.ConnectionImpl.charsetConverterMap
 [class=java.util.HashMap]
 private java.util.Map
 com.mysql.jdbc.ConnectionImpl.charsetConverterMap[write:1][write:2]
 [class=java.lang.Object] - field that is not serializable
 /quote

 is there a possibility to deactivate serialization?
 or how shall i solve this problem?

 kind regards ans many thanks to those who can help me out of the
 serialization-jungle (never serialized anything before and i am relatively
 new to wicket with my very first real wicket-project)

 Immer auf dem Laufenden! Sport, Auto, Reise, Politik und Promis. Von uns
 für Sie: der neue Arcor.de-Newsletter!
 Jetzt anmelden und einfach alles wissen:
 http://www.arcor.de/rd/footer.newsletter

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




Re: serializable problem

2010-02-25 Thread James Carman
Do you have a java.sql.Connection field in one of your components/pages?

2010/2/25 björn liffers bad.ad...@arcor.de:
 hello,
 i´ve got a problem with serialization.

 my application is connected to a mysql-db and every class of mine implements 
 serializable.
 but still there are exceptions telling me that java.lang.Object isn´t 
 serializable...

 quote
 org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException: 
 Unable to serialize class: java.lang.Object

 private java.util.Map com.mysql.jdbc.ConnectionImpl.charsetConverterMap 
 [class=java.util.HashMap]
 private java.util.Map 
 com.mysql.jdbc.ConnectionImpl.charsetConverterMap[write:1][write:2] 
 [class=java.lang.Object] - field that is not serializable
 /quote

 is there a possibility to deactivate serialization?
 or how shall i solve this problem?

 kind regards ans many thanks to those who can help me out of the 
 serialization-jungle (never serialized anything before and i am relatively 
 new to wicket with my very first real wicket-project)

 Immer auf dem Laufenden! Sport, Auto, Reise, Politik und Promis. Von uns für 
 Sie: der neue Arcor.de-Newsletter!
 Jetzt anmelden und einfach alles wissen: 
 http://www.arcor.de/rd/footer.newsletter

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



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



Re: serializable problem

2010-02-25 Thread Fatih Mehmet Ucar
probably you have some non-serializable object in your page, have you checked?

-fmu

On 25 February 2010 14:40, James Carman jcar...@carmanconsulting.com wrote:
 Do you have a java.sql.Connection field in one of your components/pages?

 2010/2/25 björn liffers bad.ad...@arcor.de:
 hello,
 i´ve got a problem with serialization.

 my application is connected to a mysql-db and every class of mine implements 
 serializable.
 but still there are exceptions telling me that java.lang.Object isn´t 
 serializable...

 quote
 org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException:
  Unable to serialize class: java.lang.Object

 private java.util.Map com.mysql.jdbc.ConnectionImpl.charsetConverterMap 
 [class=java.util.HashMap]
 private java.util.Map 
 com.mysql.jdbc.ConnectionImpl.charsetConverterMap[write:1][write:2] 
 [class=java.lang.Object] - field that is not serializable
 /quote

 is there a possibility to deactivate serialization?
 or how shall i solve this problem?

 kind regards ans many thanks to those who can help me out of the 
 serialization-jungle (never serialized anything before and i am relatively 
 new to wicket with my very first real wicket-project)

 Immer auf dem Laufenden! Sport, Auto, Reise, Politik und Promis. Von uns für 
 Sie: der neue Arcor.de-Newsletter!
 Jetzt anmelden und einfach alles wissen: 
 http://www.arcor.de/rd/footer.newsletter

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



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



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



Re: Validate with info messages, instead of errors

2010-02-25 Thread Antoine van Wel
As for the link you show, the author is building something which is
available in the Wicket core, which he seems to have missed or perhaps
it's just an outdated article.

Make a FeedbackPanel for every FormComponent you want to have messages
for and initialize it with a ComponentFeedbackMessageFilter so you
will only see the info/error messages relevant to the FormComponent
you attach that filter to.

I don't really see the problem with adapting a MaximumValidator output
info messages instead of errors, just override validate or copy and
paste the whole thing and adapt it, it's a small class.


Antoine.

On Thu, Feb 25, 2010 at 1:27 PM,  espen.peder...@husbanken.no wrote:
 Hi all!

 I'm Looking for a way to perform validation, but print the messages as
 INFO (with Ajax), instead of ERRORs. I'd like to have a combination of
 error and info validators. An error will prevent the user from submitting
 the form, the info message will give the user a warning/info message. The
 messages should popup during an onblur event from the component and be
 displayed in a way similar to:
 http://stuq.nl/weblog/2008-09-03/user-friendly-form-validation-with-wicket
 .

 I've been looking into extending for instance MaximumValidator and let it
 report info messages, unfortunately I'm unable to get hold og the
 Component through the IValidatable interface impl. The error message,
 which I'd like to use, is built up inside the FromComponents error method
 and unavailable for me. Maybe I'm on the wrong the wrong path here?
 Anybody that has done something similar?

 --
 Espen Ønvik Pedersen

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



Ad: Re: Validate with info messages, instead of errors

2010-02-25 Thread espen . pedersen
Hmm .. you're probably right about your first statement. I still have some 
issues with adapting MaximumValidator as it does not give access to the 
FormComponent that has this validator attached. So as far as I can see I 
have to send the component in as a parameter, which I'd like to avoid. 
Also the error message that is created by the validator which available 
from within the Validator itself, so I would have to fetch it my self. Not 
a big deal I guess if I have the instance object of the FormComponent, but 
if possible I'd like to inherit the creation of the messages from 
MaximumValidator.

--
Espen Ønvik Pedersen



Fra:
Antoine van Wel antoine.van@gmail.com
Til:
users@wicket.apache.org
Dato:
25.02.2010 16:04
Emne:
Re: Validate with info messages, instead of errors



As for the link you show, the author is building something which is
available in the Wicket core, which he seems to have missed or perhaps
it's just an outdated article.

Make a FeedbackPanel for every FormComponent you want to have messages
for and initialize it with a ComponentFeedbackMessageFilter so you
will only see the info/error messages relevant to the FormComponent
you attach that filter to.

I don't really see the problem with adapting a MaximumValidator output
info messages instead of errors, just override validate or copy and
paste the whole thing and adapt it, it's a small class.


Antoine.

On Thu, Feb 25, 2010 at 1:27 PM,  espen.peder...@husbanken.no wrote:
 Hi all!

 I'm Looking for a way to perform validation, but print the messages as
 INFO (with Ajax), instead of ERRORs. I'd like to have a combination of
 error and info validators. An error will prevent the user from 
submitting
 the form, the info message will give the user a warning/info message. 
The
 messages should popup during an onblur event from the component and be
 displayed in a way similar to:
 
http://stuq.nl/weblog/2008-09-03/user-friendly-form-validation-with-wicket
 .

 I've been looking into extending for instance MaximumValidator and let 
it
 report info messages, unfortunately I'm unable to get hold og the
 Component through the IValidatable interface impl. The error message,
 which I'd like to use, is built up inside the FromComponents error 
method
 and unavailable for me. Maybe I'm on the wrong the wrong path here?
 Anybody that has done something similar?

 --
 Espen Ønvik Pedersen

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




Re: [OT] Wicket App Hosting

2010-02-25 Thread Apple Grew
I am using http://www.eapps.com . Very good service and hosting option. They
are not cheap but not too exorbitant either.

Regards,
Apple Grew
my blog @ http://blog.applegrew.com/


On Thu, Feb 25, 2010 at 7:15 PM, Fatih Mehmet Ucar fmu...@gmail.com wrote:

 linode is the best for me up to now

 www.linode.com  you may need to know a little bit linux/unix though

 On 25 February 2010 12:39, Josh Kamau joshnet2...@gmail.com wrote:
  When i wanted to do the same,  i bought a server space at
  www.theserverexperts.com  and installed my staff there . ie. Jetty,
 postgres
  and the like. I then bought a domain and liked it with my public ip
 address.
 
  Regards.
 
  On Thu, Feb 25, 2010 at 3:50 AM, Mauro Ciancio maurocian...@gmail.com
 wrote:
 
  Hello everyone,
 
   I need to deploy a couple of wicket apps (2 or 3 apps). I'm looking for
  advices
  in order to get a good hosting service. In fact, I think i'll get a vps
  service.
 
  Any advices? Which vps providers are good?
 
  Thanks in advance.
  Cheers!
  --
  Mauro Ciancio maurociancio at gmail dot com
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 

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




Re: serializable problem

2010-02-25 Thread T Ames
Serialization gets tricky. You must be very careful about all of the class
level fields/objects you use. They must all be serializable and each object
that those objects use or refer to must be serializable. Instead of using
class level fields, wherever possible, pass objects around as parameters to
your methods and constructors.  This would include class level
fields/objects in the Session object too since obviously that gets
serialized.


I had a situation similar to yours where a class that is used by the JDBC
driver was not serializable.  To make a long story short, I was using a
class level field that down the chain eventually ended up being mapped to
the database and thus utilizing the jdbc driver's class.  It took me quite a
while to find this one :)

I did not really need that field/object at the class level.  When I removed
it and reworked the code a bit, the problem went away.  After I found it, I
was wondering why I used this at the class level anyway.



2010/2/25 björn liffers bad.ad...@arcor.de

 hello,
 i´ve got a problem with serialization.

 my application is connected to a mysql-db and every class of mine
 implements serializable.
 but still there are exceptions telling me that java.lang.Object isn´t
 serializable...

 quote
 org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException:
 Unable to serialize class: java.lang.Object

 private java.util.Map com.mysql.jdbc.ConnectionImpl.charsetConverterMap
 [class=java.util.HashMap]
 private java.util.Map
 com.mysql.jdbc.ConnectionImpl.charsetConverterMap[write:1][write:2]
 [class=java.lang.Object] - field that is not serializable
 /quote

 is there a possibility to deactivate serialization?
 or how shall i solve this problem?

 kind regards ans many thanks to those who can help me out of the
 serialization-jungle (never serialized anything before and i am relatively
 new to wicket with my very first real wicket-project)

 Immer auf dem Laufenden! Sport, Auto, Reise, Politik und Promis. Von uns
 für Sie: der neue Arcor.de-Newsletter!
 Jetzt anmelden und einfach alles wissen:
 http://www.arcor.de/rd/footer.newsletter

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




wicket:enclosure does not get re-rendered

2010-02-25 Thread Anna Simbirtsev
Hi,

I have fragment inside wicket:enclosure. When ajax submit takes place, it
tries to re-render fragment, but does not succeed, since wicket:enclosure is
still invisible, even though isVisible method returns true.



div class=largeinput-required
h2Password/h2
input wicket:id=password type=text /
/div
div class=submitareaa wicket:id=submit href=#
class=buttonSUBMIT/a/div

wicket:enclosure child=fragment
   span wicket:id=fragmentfragments contents come here/span
   wicket:fragment wicket:id=fragmentid


   /wicket:fragment
/wicket:enclosure




boolean authenticated=false;
final ModelString m = new ModelString();
form.add(new RequiredTextFieldString(password, m));

AjaxSubmitLink submitbutton = new AjaxSubmitLink(submit) {

private static final long serialVersionUID = 1L;

protected void onSubmit(AjaxRequestTarget target, Form? form)
{

authenticated = true;

target.addComponent(f);
}
};
form.add(submitbutton);

f = new Fragment(fragment, fragmentid, form) {

private static final long serialVersionUID =
2612235776527846442L;

public boolean isVisible() {
  if (authenticated)
   return true;

  return false;
}
};
 f.setOutputMarkupId(true);
 form.add(f);


Thanks
Anna


Re: Wicket used for mobile.walmart.com

2010-02-25 Thread Ilja Pavkovic
Hi,

how did you measure the system performance? I know that you investigated some 
time for improving wicket performace and I see you created jolirium. Did you 
use this for multiuser performance measurements? Or anything else?

Best Regards,
Ilja Pavkovic

Am Mittwoch, 24. Februar 2010 19:19:36 schrieb Joachim F. Kainz:
 Jeff,
 
 I will try to do better on the documentation and examples, but I think
 the tests are quite useful if you would like to see how the components
 work.
 
 Best regards,
 
 Joachim
 
 On Tue, 2010-02-23 at 09:46 -0600, Jeffrey Schneller wrote:
  Joachim,
  
  
  
  Thanks for this information.  It shows that we made the right choice with
  Wicket for a new retail site.  Also thank you for posting your
  components as open source.  Do you have any examples of how these
  components can and should be used.  In particular the jofilter,
  wicket-stateless, and expiring-cache.
  
  
  
  Thanks.
  
  
  
  Jeff
  
  
  
  
  
  From: Joachim F. Kainz [mailto:j...@jolira.com]
  Sent: Monday, February 22, 2010 12:05 PM
  To: users@wicket.apache.org
  Subject: Wicket used for mobile.walmart.com
  
  
  
  Fellow Wicket Users,
  
  The question if Wicket is suitable for large enterprises has just become
  easier to answer: The largest enterprise in the world is now using
  Wicket for its mobile site. Check out mobile.walmart.com (or just point
  your mobile phone to www.walmart.com and get redirected automatically).
  
  The reason why my client decided to go with Wicket makes it easy to
  support multiple different types of devices. The walmart mobile
  application supports different HTML for three categories of devices (L1:
  iPhones  challengers, L2: BlackBerries, L3: Plain Old Devices). These
  three experiences are supported by the same Java code on the server
  side.
  
  We added a few components to Wicket, mostly because in the retail arena
  being stateless is very important. Our components are available at
  http://code.google.com/p/jolira-tools/.
  http://code.google.com/p/jolira-tools/
  
  Wicket is an awesome product and I would like to thank the Wicket team
  for all there work. One day I hope to get the largest enterprise in the
  world to donate an appropriate amount of money for future development!
  :)
  
  Best regards,
  
  Joachim
  
  http://www.jolira.com


-- 
binaere bauten gmbh · tempelhofer ufer 1a · 10961 berlin

   +49 · 171 · 9342 465

Handelsregister: HRB 115854 - Amtsgericht Charlottenburg
Geschäftsführer: Dipl.-Inform. Ilja Pavkovic, Dipl.-Inform. Jost Becker

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



Question about WicketTester and using my class which extends WebApplication

2010-02-25 Thread Eric Reagan
Hello,
 I am pretty well new to wicket and I am running into a problem I was
wondering if anyone knew how to solve. I have a class which extends the
WebApplication class. I have a static get method which is outlined below
  public static MyApp get(){
 return (MyApp) Application.get();
  }
 I then have the standard getHomePage() which returns null. In my Wicket
tester application I am trying to test what the getHomePage() for my app
returns. So when I try and construct a tester like WicketTester tester = new
WicketTester(MyApp.get()) I get the following error:
  org.apache.wicket.WicketRuntimeException there is no application
attached to the current thread.

 It seams to me that my MyApp application is null and not initialized?
My question really is how do I directly test my own WebApplication class
directly with wicket tester? For part of my tests I don't want to use the
default mock.

thank you,

-- 
Eric Reagan


Re: Question about WicketTester and using my class which extends WebApplication

2010-02-25 Thread Thomas Kappler

On 02/25/10 17:47, Eric Reagan wrote:

Hello,
  I am pretty well new to wicket and I am running into a problem I was
wondering if anyone knew how to solve. I have a class which extends the
WebApplication class. I have a static get method which is outlined below
   public static MyApp get(){
  return (MyApp) Application.get();
   }
  I then have the standard getHomePage() which returns null. In my Wicket
tester application I am trying to test what the getHomePage() for my app
returns. So when I try and construct a tester like WicketTester tester = new
WicketTester(MyApp.get()) I get the following error:
   org.apache.wicket.WicketRuntimeException there is no application
attached to the current thread.


You need to instantiate the application for WicketTester:
WicketTester tester = new WicketTester(new MyApp())

cheers,
Thomas

--
---
  Thomas Kapplerthomas.kapp...@isb-sib.ch
  Swiss Institute of Bioinformatics Tel: +41 22 379 51 89
  CMU, rue Michel Servet 1
  1211 Geneve 4
  Switzerland  http://www.uniprot.org
---

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



Re: wicket:enclosure does not get re-rendered

2010-02-25 Thread Igor Vaynberg
enclosures are a shortcut/convenience and do nto work for all
scenarios. whenever the enclosure does not work you can use
EnclosureContainer or simply a WebMarkupContainer.

to repaint something via ajax that is initially invisible you need to
call setoutputmarkupplacehodlertag(true) on it.

-igor

On Thu, Feb 25, 2010 at 8:43 AM, Anna Simbirtsev asimbirt...@gmail.com wrote:
 Hi,

 I have fragment inside wicket:enclosure. When ajax submit takes place, it
 tries to re-render fragment, but does not succeed, since wicket:enclosure is
 still invisible, even though isVisible method returns true.



 div class=largeinput-required
        h2Password/h2
        input wicket:id=password type=text /
 /div
 div class=submitareaa wicket:id=submit href=#
 class=buttonSUBMIT/a/div

 wicket:enclosure child=fragment
   span wicket:id=fragmentfragments contents come here/span
   wicket:fragment wicket:id=fragmentid
 

   /wicket:fragment
 /wicket:enclosure




 boolean authenticated=false;
 final ModelString m = new ModelString();
 form.add(new RequiredTextFieldString(password, m));

 AjaxSubmitLink submitbutton = new AjaxSubmitLink(submit) {

            private static final long serialVersionUID = 1L;

            protected void onSubmit(AjaxRequestTarget target, Form? form)
 {

                authenticated = true;

                target.addComponent(f);
            }
 };
 form.add(submitbutton);

 f = new Fragment(fragment, fragmentid, form) {

            private static final long serialVersionUID =
 2612235776527846442L;

            public boolean isVisible() {
                  if (authenticated)
                       return true;

                  return false;
            }
 };
  f.setOutputMarkupId(true);
  form.add(f);


 Thanks
 Anna


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



Re: wicket:enclosure does not get re-rendered

2010-02-25 Thread Anna Simbirtsev
Thanks, its working now.

On Thu, Feb 25, 2010 at 12:02 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote:

 enclosures are a shortcut/convenience and do nto work for all
 scenarios. whenever the enclosure does not work you can use
 EnclosureContainer or simply a WebMarkupContainer.

 to repaint something via ajax that is initially invisible you need to
 call setoutputmarkupplacehodlertag(true) on it.

 -igor

 On Thu, Feb 25, 2010 at 8:43 AM, Anna Simbirtsev asimbirt...@gmail.com
 wrote:
  Hi,
 
  I have fragment inside wicket:enclosure. When ajax submit takes place, it
  tries to re-render fragment, but does not succeed, since wicket:enclosure
 is
  still invisible, even though isVisible method returns true.
 
 
 
  div class=largeinput-required
 h2Password/h2
 input wicket:id=password type=text /
  /div
  div class=submitareaa wicket:id=submit href=#
  class=buttonSUBMIT/a/div
 
  wicket:enclosure child=fragment
span wicket:id=fragmentfragments contents come here/span
wicket:fragment wicket:id=fragmentid
  
 
/wicket:fragment
  /wicket:enclosure
 
 
 
 
  boolean authenticated=false;
  final ModelString m = new ModelString();
  form.add(new RequiredTextFieldString(password, m));
 
  AjaxSubmitLink submitbutton = new AjaxSubmitLink(submit) {
 
 private static final long serialVersionUID = 1L;
 
 protected void onSubmit(AjaxRequestTarget target, Form?
 form)
  {
 
 authenticated = true;
 
 target.addComponent(f);
 }
  };
  form.add(submitbutton);
 
  f = new Fragment(fragment, fragmentid, form) {
 
 private static final long serialVersionUID =
  2612235776527846442L;
 
 public boolean isVisible() {
   if (authenticated)
return true;
 
   return false;
 }
  };
   f.setOutputMarkupId(true);
   form.add(f);
 
 
  Thanks
  Anna
 

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




-- 
Anna Simbirtsev
(416) 729-7331


Re: [OT] Wicket App Hosting

2010-02-25 Thread Mauro Ciancio
Thanks all for the responses.

Cheers.

On Thu, Feb 25, 2010 at 12:46 PM, Apple Grew appleg...@gmail.com wrote:
 I am using http://www.eapps.com . Very good service and hosting option. They
 are not cheap but not too exorbitant either.

 Regards,
 Apple Grew
 my blog @ http://blog.applegrew.com/


 On Thu, Feb 25, 2010 at 7:15 PM, Fatih Mehmet Ucar fmu...@gmail.com wrote:

 linode is the best for me up to now

 www.linode.com  you may need to know a little bit linux/unix though

 On 25 February 2010 12:39, Josh Kamau joshnet2...@gmail.com wrote:
  When i wanted to do the same,  i bought a server space at
  www.theserverexperts.com  and installed my staff there . ie. Jetty,
 postgres
  and the like. I then bought a domain and liked it with my public ip
 address.
 
  Regards.
 
  On Thu, Feb 25, 2010 at 3:50 AM, Mauro Ciancio maurocian...@gmail.com
 wrote:
 
  Hello everyone,
 
   I need to deploy a couple of wicket apps (2 or 3 apps). I'm looking for
  advices
  in order to get a good hosting service. In fact, I think i'll get a vps
  service.
 
  Any advices? Which vps providers are good?
 
  Thanks in advance.
  Cheers!
  --
  Mauro Ciancio maurociancio at gmail dot com
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 

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






-- 
Mauro Ciancio maurociancio at gmail dot com

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



RE: Speeding Up HTML Parse???

2010-02-25 Thread Corbin, James
Thanks Russell.

This is good information.  I am going to evaluate the server side
activity first and then will look into any inefficiencies on the client.

J.D.

-Original Message-
From: Russell Morrisey [mailto:russell.morri...@missionse.com] 
Sent: Thursday, February 25, 2010 11:39 AM
To: users@wicket.apache.org
Subject: RE: Speeding Up HTML Parse???

Before spending a lot of time trying to debug client-side performance,
be sure that the problem is on the client side, and not the server. A
lot of performance problems I see on my project arise from user code on
the server side which takes a long time to run (such as redundant or
inefficient database hits).

If you do find that the problem is client-side, a couple of ideas of
things to look for:
-Excessive/redundant javascript. Externalize scripts as much as
possible, using header contribution, instead of pushing all of the logic
out in an ajax request.
-Heavy javascript widgets (I think you mentioned using YUI controls in
an earlier message? Maybe they are taking a long time to run or too much
memory?)
-User agent memory leaks or pseudo leaks which cause performance to
degrade over time (especially in IE)
MSDN actually has a fairly useful article on IE memory leaks:
http://msdn.microsoft.com/en-us/library/bb250448%28VS.85%29.aspx

Don't try to fix until you've verified the source of the performance
hit.

RUSSELL E. MORRISEY
Programmer Analyst Professional
Mission Solutions Engineering, LLC

| russell.morri...@missionse.com | www.missionse.com

-Original Message-
From: Jochen Mader [mailto:pflanzenmoer...@gmail.com]
Sent: Thursday, February 25, 2010 4:48 AM
To: users@wicket.apache.org
Subject: Re: Speeding Up HTML Parse???

a) Read the speed tracer output, if the time is spent with the redirect
or
loading the actual markup it will tell you.
b) HTML rendering in the browser is influenced by the markup and ajax.
Read
the speed tracer output and it will tell you where the time is spent.
It's
most likely not wicket that costs the initial 30 second delay but some
resource taking long to load, an AJAX component doing its magic ...
But that's all client(browser)-side stuff.

This is a PRIVATE message. If you are not the intended recipient, please
delete without copying and kindly advise us by e-mail of the mistake in
delivery.
NOTE: Regardless of content, this e-mail shall not operate to bind MSE
to any order or other contract unless pursuant to explicit written
agreement or government initiative expressly permitting the use of
e-mail for such purpose.

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


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



RE: Speeding Up HTML Parse???

2010-02-25 Thread Russell Morrisey
Before spending a lot of time trying to debug client-side performance, be sure 
that the problem is on the client side, and not the server. A lot of 
performance problems I see on my project arise from user code on the server 
side which takes a long time to run (such as redundant or inefficient database 
hits).

If you do find that the problem is client-side, a couple of ideas of things to 
look for:
-Excessive/redundant javascript. Externalize scripts as much as possible, using 
header contribution, instead of pushing all of the logic out in an ajax request.
-Heavy javascript widgets (I think you mentioned using YUI controls in an 
earlier message? Maybe they are taking a long time to run or too much memory?)
-User agent memory leaks or pseudo leaks which cause performance to degrade 
over time (especially in IE)
MSDN actually has a fairly useful article on IE memory leaks: 
http://msdn.microsoft.com/en-us/library/bb250448%28VS.85%29.aspx

Don't try to fix until you've verified the source of the performance hit.

RUSSELL E. MORRISEY
Programmer Analyst Professional
Mission Solutions Engineering, LLC

| russell.morri...@missionse.com | www.missionse.com

-Original Message-
From: Jochen Mader [mailto:pflanzenmoer...@gmail.com]
Sent: Thursday, February 25, 2010 4:48 AM
To: users@wicket.apache.org
Subject: Re: Speeding Up HTML Parse???

a) Read the speed tracer output, if the time is spent with the redirect or
loading the actual markup it will tell you.
b) HTML rendering in the browser is influenced by the markup and ajax. Read
the speed tracer output and it will tell you where the time is spent. It's
most likely not wicket that costs the initial 30 second delay but some
resource taking long to load, an AJAX component doing its magic ...
But that's all client(browser)-side stuff.

This is a PRIVATE message. If you are not the intended recipient, please delete 
without copying and kindly advise us by e-mail of the mistake in delivery.
NOTE: Regardless of content, this e-mail shall not operate to bind MSE to any 
order or other contract unless pursuant to explicit written agreement or 
government initiative expressly permitting the use of e-mail for such purpose.

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



Re: Multiple Copies of One Wicket App

2010-02-25 Thread Jim Pinkham
I have a follow-up question related to this.

My current setup is simply myclient.war with my web.xml having one
filter-name and one filter-mapping with url-pattern /*  so my home page is
myhost/myclient.   Life is good, but now I'm growing!

What I'd like to do is have separate versions of the app for several
clients.  So I'd rename myclient.war to generic.war, then have
several filter-mappings with url-pattern  /myclient and /mynewclient.   I
think this way I can have specific init-param entries for each one and get
the right database and so forth for each one - that's pretty much how I
read this answer, so that's great as far as it goes.

So my followup question is, I have some ThisPage.properties files with text
specific to my current client, and I'd like to have some way to load
properties in a consistent way, perhaps ThisPage.properites, with overrides
taken from myclient.properties - kind of like locales, but not exactly.
For that matter, I might even do the same thing with ThisPage.html and
ThisPage.mynewclient.html files.   I also have a few
MyApplication.properties.  Perhaps I could refactor these (there aren't too
many) into some other organization?

Anyone have any tips for me in this regard?  I don't anticipate any other
future locales other than default US, but I'd hate to break from convention
allowing for that if there's a better way.

I'm still on 1.3.7 btw, if that matters.

Thanks,
-- Jim.

On Fri, Jan 9, 2009 at 8:42 AM, Serkan Camurcuoglu 
serkan.camurcuo...@telenity.com wrote:

 I know this would be very difficult to create by hand, but if you
 automatically create a web.xml which includes 200 such filter definitions
 (replacing Application1 and dbfile1 with other values) I think that would do
 what you want. Note that here you obtain the db configuration file name as a
 filter init parameter, you should modify your application's init method
 accordingly..

   filter
   filter-nameApplication1/filter-name

 filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class
   init-param
   param-nameapplicationClassName/param-name
   param-valuecom.mycompany.MyApplication/param-value
   /init-param
   init-param
   param-namedbFileName/param-name
   param-valuedbfile1.properties/param-value
   /init-param
   /filter

   filter-mapping
   filter-nameApplication1/filter-name
   url-pattern/dbfile1/*/url-pattern
   dispatcherREQUEST/dispatcher
   dispatcherINCLUDE/dispatcher
   /filter-mapping




 Sean W wrote:

 path:
 /ContextPath/wicket/BookmarkablePage

 It appears to me that using Wicket you cannot place anything in the path
 between the context path and the mounted name except for wicket, which
 is
 defined as your url-pattern. In other words, a mounted page cannot be
 referenced from more than one path. This also means Wicket can't support
 sub contexts.

 Perhaps I'll have to try and deploy a single app 200 times in tomcat with
 the same WAR. :-S




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




Re: Announcing: visural-wicket 0.5 released - open source wicket components

2010-02-25 Thread danisevsky
visural-wicket is great, thank you very much for sharing!

I have one small issue, Fancybox does not calculate width of my images
right. This is part of rendered html:

div id=fancybox-inner style=overflow: auto; top: 10px; left: 10px;
width: 1024px; height: 501px; display: block;

heigh: 501px - correct
width: 1024px - not correct, this is width of original image, this could be
smaller

as a result is that Fancybox is wider then image.

I serve images like shared resources.

java code:

WebMarkupContainer container = new WebMarkupContainer(img) {
@Override
protected void onComponentTag(ComponentTag tag) {
super.onComponentTag(tag);
tag.put(src, urlFor(new ResourceReference(image)) +
?pictureId=08d7463i4mh53bavkkmr);
}
};
add(container);
container.setOutputMarkupId(true);

add(new Fancybox(image1,
container).setGroup(group).setBoxTitle(Photo 1 of 4));

markup:

a class=button href=# wicket:id=image1Image 1/a
div style=display: none;
 img style=height:100%; wicket:id=img/
/div

Could you gime me some advice?


Re: [OT] Wicket App Hosting

2010-02-25 Thread Riyad Kalla
Slicehost or RimuHosting - support from both is excellent and immediately
accessible which I find invaluable given that when things are working,
almost any of the 150 VPS hosts out there are all the same.. it is when
stuff breaks that they differentiate themselves.

Best,
Riyad

On Thu, Feb 25, 2010 at 10:42 AM, Matej Knopp matej.kn...@gmail.com wrote:

 If you want dedicated server you can consider hetzner, although the
 hosting is in germany which might be an issue

 http://www.hetzner.de/en/hosting/produkte_rootserver/eq4/

 -Matej

 On Thu, Feb 25, 2010 at 6:38 PM, Mauro Ciancio maurocian...@gmail.com
 wrote:
  Thanks all for the responses.
 
  Cheers.
 
  On Thu, Feb 25, 2010 at 12:46 PM, Apple Grew appleg...@gmail.com
 wrote:
  I am using http://www.eapps.com . Very good service and hosting option.
 They
  are not cheap but not too exorbitant either.
 
  Regards,
  Apple Grew
  my blog @ http://blog.applegrew.com/
 
 
  On Thu, Feb 25, 2010 at 7:15 PM, Fatih Mehmet Ucar fmu...@gmail.com
 wrote:
 
  linode is the best for me up to now
 
  www.linode.com  you may need to know a little bit linux/unix though
 
  On 25 February 2010 12:39, Josh Kamau joshnet2...@gmail.com wrote:
   When i wanted to do the same,  i bought a server space at
   www.theserverexperts.com  and installed my staff there . ie. Jetty,
  postgres
   and the like. I then bought a domain and liked it with my public ip
  address.
  
   Regards.
  
   On Thu, Feb 25, 2010 at 3:50 AM, Mauro Ciancio 
 maurocian...@gmail.com
  wrote:
  
   Hello everyone,
  
I need to deploy a couple of wicket apps (2 or 3 apps). I'm looking
 for
   advices
   in order to get a good hosting service. In fact, I think i'll get a
 vps
   service.
  
   Any advices? Which vps providers are good?
  
   Thanks in advance.
   Cheers!
   --
   Mauro Ciancio maurociancio at gmail dot com
  
  
 -
   To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
   For additional commands, e-mail: users-h...@wicket.apache.org
  
  
  
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
 
 
  --
  Mauro Ciancio maurociancio at gmail dot com
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 

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




Hint on best way of setting a dinamic value to a localized message

2010-02-25 Thread Esteban Masoero

Hi there:

In a onSubmit() method, I'm supossed to send an email that says 
something like Follow this link: ${url} to activate your accout, and 
the url has just been obtained dynamically. I could add an url field 
to my page and do this.getString(someKey, new Model(this)) (using a 
.properties as it's supposed to), but is there a simpler option? I just 
don't want to add this temporal value as a field that will not be used 
always.
Can't I just say this.getString(someKey, new 
Model(recentlyCalculatedUrl); and in the .properties file do something 
like someKey:Follow this link: ${theObjectItself} to activate your 
accout ?


Thanks,

Esteban

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



Re: Wicket 1.4m3 - AjaxButton, AjaxSubmitLink in ModalWindow in IE 7 Problem ?

2010-02-25 Thread jortiz

Thank you for your post Dave. I was having the same problem for a couple of
days until I found your post. The funny think is that one may expect Wicket
to use a different markup id if no id is defined in the markup and
setOutputMarkupId(true) is invoked on the component. However it still fails
and an explicit id (other than id=id) is required, at least in Wicket
1.3.5.


FakeBoy wrote:
 
 Hi, I GOT IT 
 I found the problem. The Problem was in the TextField with wicket id id.
 When you want to safetly use ajax submit components (AjaxButton,
 AjaxSubmitLink) your form components (TextFiels etc.) CAN NOT have wicket
 id id, because ajax submit stop work in IE. For example:
 form.add(new TextField(id,...)) - cause in IE Ajax Submit Problem
 
 I hope that it helps you, if you will have same problems like I had
 :thinking:
 
 Dave
 
 
 
 FakeBoy wrote:
 
 Thanks for your interest :)
 I tried to isolate problem, because I use it in some context of my
 application. I made small fake startup project only with only necessary
 classes and this problem hasn't occured. So everything works fine. But I
 made only simple dummy modal window with no listeners and other features.
 Now I will try make it more complex step by step and I will try
 recognize, when it will stop working. If I detect something, let you
 know.
 Thanks one more for your help ;)
 
 Dave
 
 
 kag1526 wrote:
 
 I just tested my app in IE 7 since I also have a ModalWindow with an
 AjaxSubmitLink that submits my form and closes the window and mine
 worked fine. sorry I can't help with a solution but I can tell you that
 it is possible to make work.
 
 
 
 FakeBoy wrote:
 
 Hi,
 I tried to submit form from ModalWindow with AjaxButton or
 AjaxSubmitLink.
 In Firefox, Opera, Safari everything works fine, but in IE 7 doesn't.
 No onSubmit or onError method is fired after button or link cliked in
 IE 7.
 I used WICKET DEBUG console and after clik on Button or Link i see
 message:
 INFO: Ajax POST stopped because of precondition check,
 url:?wicket:interface=modal-dialog-pagemap:0:form:testLink1::IActivePageBehaviorListener:0:wicket:ignoreIfNotActive=true
 What doe's it mean? It's wicket problem or I did something wrong? 
 Thanks a lot for your soon reply.
 
 
 
 
 
 
 
 

-- 
View this message in context: 
http://old.nabble.com/Wicket-1.4m3---AjaxButton%2C-AjaxSubmitLink-in-ModalWindow-in-IE-7-Problem---tp18912755p27714538.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Hint on best way of setting a dinamic value to a localized message

2010-02-25 Thread Igor Vaynberg
getstring(key,new model(new micromap(url,url));

-igor

On Thu, Feb 25, 2010 at 1:59 PM, Esteban Masoero
emaso...@getsense.com.ar wrote:
 Hi there:

 In a onSubmit() method, I'm supossed to send an email that says something
 like Follow this link: ${url} to activate your accout, and the url has
 just been obtained dynamically. I could add an url field to my page and do
 this.getString(someKey, new Model(this)) (using a .properties as it's
 supposed to), but is there a simpler option? I just don't want to add this
 temporal value as a field that will not be used always.
 Can't I just say this.getString(someKey, new Model(recentlyCalculatedUrl);
 and in the .properties file do something like someKey:Follow this link:
 ${theObjectItself} to activate your accout ?

 Thanks,

 Esteban

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



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



Getting a TextField's value without form submitting

2010-02-25 Thread Tony Wu
Is there a way to get a TextField's value without submitting the form? For
example, if I have a TextField and a Link (not a submit Button), I want the
Link's onClick to System.out.println the TextField's value at that time. I
tried using TextField.getInput, getConvertedInput, no dice on both.

I even tried adding a AjaxFormComponentUpdatingBehavior to the TextField for
onchange, which does work to change the TextField's model whenever a user
types something, but it's getInput and getConvertedInput is always null when
I click the Link. Even if the AjaxFormComponentUpdatingBehavior's onUpdate I
do TextField.setConvertedInput(model's new value) explicity, both getInput
and getConvertedInput are both null.

Any ideas?


Re: Getting a TextField's value without form submitting

2010-02-25 Thread Igor Vaynberg
links do not transfer form values to the serverside, so you need to
use a bit of js to do it for you. not sure exactly what your usecase
is (sounds strange), but here goes off the top of my head:

abstract class myuberlink extends link {
 private final textfield tf;
 public myuberlink(string id, textfield tf) { super(id);this.tf=tf;
tf.setoutputmarkupid(true);}
 public void oncomponenttag(tag) {
  
tag.put(onclick,this.href=this.href+'+tf.getinputname()+='+document.getElementById('+tf.getmarkupid()+').value;
return true;); }

  public final void onclick() {
onclick(getrequest().getattribute(tf.getinputname()); }

  protected abstract void onclick(string value);
}

-igor

On Thu, Feb 25, 2010 at 3:51 PM, Tony Wu e90t...@gmail.com wrote:
 Is there a way to get a TextField's value without submitting the form? For
 example, if I have a TextField and a Link (not a submit Button), I want the
 Link's onClick to System.out.println the TextField's value at that time. I
 tried using TextField.getInput, getConvertedInput, no dice on both.

 I even tried adding a AjaxFormComponentUpdatingBehavior to the TextField for
 onchange, which does work to change the TextField's model whenever a user
 types something, but it's getInput and getConvertedInput is always null when
 I click the Link. Even if the AjaxFormComponentUpdatingBehavior's onUpdate I
 do TextField.setConvertedInput(model's new value) explicity, both getInput
 and getConvertedInput are both null.

 Any ideas?


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



Re: Getting a TextField's value without form submitting

2010-02-25 Thread Victor Dolirio Ferreira Barbosa
Perhaps the AjaxSubmitLink component have the behavior that you expect.

On Thu, Feb 25, 2010 at 9:00 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote:

 links do not transfer form values to the serverside, so you need to
 use a bit of js to do it for you. not sure exactly what your usecase
 is (sounds strange), but here goes off the top of my head:

 abstract class myuberlink extends link {
  private final textfield tf;
  public myuberlink(string id, textfield tf) { super(id);this.tf=tf;
 tf.setoutputmarkupid(true);}
  public void oncomponenttag(tag) {

  
 tag.put(onclick,this.href=this.href+'+tf.getinputname()+='+document.getElementById('+tf.getmarkupid()+').value;
 return true;); }

  public final void onclick() {
 onclick(getrequest().getattribute(tf.getinputname()); }

  protected abstract void onclick(string value);
 }

 -igor

 On Thu, Feb 25, 2010 at 3:51 PM, Tony Wu e90t...@gmail.com wrote:
  Is there a way to get a TextField's value without submitting the form?
 For
  example, if I have a TextField and a Link (not a submit Button), I want
 the
  Link's onClick to System.out.println the TextField's value at that time.
 I
  tried using TextField.getInput, getConvertedInput, no dice on both.
 
  I even tried adding a AjaxFormComponentUpdatingBehavior to the TextField
 for
  onchange, which does work to change the TextField's model whenever a
 user
  types something, but it's getInput and getConvertedInput is always null
 when
  I click the Link. Even if the AjaxFormComponentUpdatingBehavior's
 onUpdate I
  do TextField.setConvertedInput(model's new value) explicity, both
 getInput
  and getConvertedInput are both null.
 
  Any ideas?
 

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




-- 
[]s,
Victor Dolirio


Localized PropertyTreeColumn header string

2010-02-25 Thread DCarr

Hi,

   Is there a recommended way to set the header string in a 
PropertyTreeColumn when that string should come from a resource file?  
It doesn't take a model, so the load cannot be deferred until later; 
using getLocalizer().getString(...) results in:


   -WARN::org.apache.wicket.Localizer: Tried to retrieve a localized 
string for a component that has not yet been added to the page. This can 
sometimes lead to an invalid or no localized resource returned. Make 
sure you are not calling Component#getString() inside your Component's 
constructor. Offending component: [MarkupContainer [Component id = panel]]


That is only a warning, but I'd prefer to not have any warnings in 
production code. 

There does not appear to be a way to set the column header value after 
the column (or the TreeTable the column is in) has been constructed.  
The TreeTable has to be added, or Wicket complains about


Unable to find component with id 'x' in [MarkupContainer [Component id = 
panel]].

but I don't think TreeTable can be constructed without the column 
definitions (i.e. construct a TreeTable placeholder, and then fill in 
the column details later).


Thanks,
Doug.


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



Re: Getting a TextField's value without form submitting

2010-02-25 Thread Tony Wu
Thanks Igor, my use case was an attempt to solve a bigger problem. Let me
try to describe the main problem I am trying to solve:

I have 1 big form with 3 distinct sections. Each section has an update
link which should run every FormComponent's validators for that section. The
trick is I can't use form submission because I don't want to validate the
other parts of the form, just that 1 section and provide error feedback if
necessary. The final button on the form is an actual submit, which will run
through every FormComponent's validators on the page. I thought about
splitting it up into 3 separate forms so each update link is actually a
submit, but the final button needs to validate every input in every section
- so that's why I'm using 1 form. I thought about nested forms as well, but
that isn't syntactically correct in HTML.

The crux of the problem is I need to run validators for only specific
FormComponents without doing a form submit. Is there any way I can do that
with wicket?

Thanks,
Tony

On Thu, Feb 25, 2010 at 5:00 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote:

 links do not transfer form values to the serverside, so you need to
 use a bit of js to do it for you. not sure exactly what your usecase
 is (sounds strange), but here goes off the top of my head:

 abstract class myuberlink extends link {
  private final textfield tf;
  public myuberlink(string id, textfield tf) { super(id);this.tf=tf;
 tf.setoutputmarkupid(true);}
  public void oncomponenttag(tag) {

  
 tag.put(onclick,this.href=this.href+'+tf.getinputname()+='+document.getElementById('+tf.getmarkupid()+').value;
 return true;); }

  public final void onclick() {
 onclick(getrequest().getattribute(tf.getinputname()); }

  protected abstract void onclick(string value);
 }

 -igor

 On Thu, Feb 25, 2010 at 3:51 PM, Tony Wu e90t...@gmail.com wrote:
  Is there a way to get a TextField's value without submitting the form?
 For
  example, if I have a TextField and a Link (not a submit Button), I want
 the
  Link's onClick to System.out.println the TextField's value at that time.
 I
  tried using TextField.getInput, getConvertedInput, no dice on both.
 
  I even tried adding a AjaxFormComponentUpdatingBehavior to the TextField
 for
  onchange, which does work to change the TextField's model whenever a
 user
  types something, but it's getInput and getConvertedInput is always null
 when
  I click the Link. Even if the AjaxFormComponentUpdatingBehavior's
 onUpdate I
  do TextField.setConvertedInput(model's new value) explicity, both
 getInput
  and getConvertedInput are both null.
 
  Any ideas?
 

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




Re: Wicket Examples on NetBeans

2010-02-25 Thread Igor Vaynberg
the version is defined in the parent pom, maybe that is the one you
have to open.

-igor

On Thu, Feb 25, 2010 at 4:23 PM,  b...@actrix.gen.nz wrote:
 Hi,

 How can I run the wicket examples that are included in the
 distribution in the NetBeans IDE?

 I have tried to open the Maven project but I get errors [0]
 'dependencies.dependency.version' is missing for
 org.apache.wicket:wicket

 It would be nice to have a quick and easy way to get these running in
 NetBeans so that I can use the Wicket Examples as an easy reference
 and starting point for the NetBeans developers (testcases for
 performance issues etc.).

 Ideally, I would just want to ask them to open the Maven project,
 specify a server i.e. GlassFish V3 and run the project.

 Many thanks

 Bernard



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



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



Re: Getting a TextField's value without form submitting

2010-02-25 Thread Igor Vaynberg
easy. put each section into its own form, all inside the one big form.
if a button of the inner form is pressed only that form is validated,
while values for the entire form are preserved.

there is a wiki page which explains how embedded forms work.

-igor

On Thu, Feb 25, 2010 at 4:30 PM, Tony Wu e90t...@gmail.com wrote:
 Thanks Igor, my use case was an attempt to solve a bigger problem. Let me
 try to describe the main problem I am trying to solve:

 I have 1 big form with 3 distinct sections. Each section has an update
 link which should run every FormComponent's validators for that section. The
 trick is I can't use form submission because I don't want to validate the
 other parts of the form, just that 1 section and provide error feedback if
 necessary. The final button on the form is an actual submit, which will run
 through every FormComponent's validators on the page. I thought about
 splitting it up into 3 separate forms so each update link is actually a
 submit, but the final button needs to validate every input in every section
 - so that's why I'm using 1 form. I thought about nested forms as well, but
 that isn't syntactically correct in HTML.

 The crux of the problem is I need to run validators for only specific
 FormComponents without doing a form submit. Is there any way I can do that
 with wicket?

 Thanks,
 Tony

 On Thu, Feb 25, 2010 at 5:00 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote:

 links do not transfer form values to the serverside, so you need to
 use a bit of js to do it for you. not sure exactly what your usecase
 is (sounds strange), but here goes off the top of my head:

 abstract class myuberlink extends link {
  private final textfield tf;
  public myuberlink(string id, textfield tf) { super(id);this.tf=tf;
 tf.setoutputmarkupid(true);}
  public void oncomponenttag(tag) {

  tag.put(onclick,this.href=this.href+'+tf.getinputname()+='+document.getElementById('+tf.getmarkupid()+').value;
 return true;); }

  public final void onclick() {
 onclick(getrequest().getattribute(tf.getinputname()); }

  protected abstract void onclick(string value);
 }

 -igor

 On Thu, Feb 25, 2010 at 3:51 PM, Tony Wu e90t...@gmail.com wrote:
  Is there a way to get a TextField's value without submitting the form?
 For
  example, if I have a TextField and a Link (not a submit Button), I want
 the
  Link's onClick to System.out.println the TextField's value at that time.
 I
  tried using TextField.getInput, getConvertedInput, no dice on both.
 
  I even tried adding a AjaxFormComponentUpdatingBehavior to the TextField
 for
  onchange, which does work to change the TextField's model whenever a
 user
  types something, but it's getInput and getConvertedInput is always null
 when
  I click the Link. Even if the AjaxFormComponentUpdatingBehavior's
 onUpdate I
  do TextField.setConvertedInput(model's new value) explicity, both
 getInput
  and getConvertedInput are both null.
 
  Any ideas?
 

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




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



Re: Announcing: visural-wicket 0.5 released - open source wicket components

2010-02-25 Thread Richard Nichols
To apply Fancybox to an image it's best to use a a href tag pointing
to the image instead. Otherwise it tries to calculate based on the
size of the DOM element, which might be a bit hit-and-miss (check out
examples at http://fancybox.net/ also)

e.g.

-- markup:

a href=# wicket:id=myImgMy Image Fancybox/a

-- java:

new Fancybox(myImg, ImageReferenceFactory.fromURL(+urlFor(new
ResourceReference(image))+?pictureId=08d7463i4mh53bavkkmr)).setGroup(group).setBoxTitle(Photo
1 of 4));

--
The example source does this type of thing also -

http://visural-wicket-examples.appspot.com/app/fancybox?wicket:bookmarkablePage=:com.visural.wicket.examples.ViewSourcePageresource=/com/visural/wicket/examples/fancybox/FancyBoxExamplePage.java

HTH

On 26 February 2010 08:24, danisevsky danisev...@gmail.com wrote:
 visural-wicket is great, thank you very much for sharing!

 I have one small issue, Fancybox does not calculate width of my images
 right. This is part of rendered html:

 div id=fancybox-inner style=overflow: auto; top: 10px; left: 10px;
 width: 1024px; height: 501px; display: block;

 heigh: 501px - correct
 width: 1024px - not correct, this is width of original image, this could be
 smaller

 as a result is that Fancybox is wider then image.

 I serve images like shared resources.

 java code:

        WebMarkupContainer container = new WebMarkupContainer(img) {
           �...@override
            protected void onComponentTag(ComponentTag tag) {
                super.onComponentTag(tag);
                tag.put(src, urlFor(new ResourceReference(image)) +
 ?pictureId=08d7463i4mh53bavkkmr);
            }
        };
        add(container);
        container.setOutputMarkupId(true);

        add(new Fancybox(image1,
 container).setGroup(group).setBoxTitle(Photo 1 of 4));

 markup:

        a class=button href=# wicket:id=image1Image 1/a
        div style=display: none;
             img style=height:100%; wicket:id=img/
        /div

 Could you gime me some advice?




-- 
Richard Nichols :: http://www.visural.com/ :: http://www.richardnichols.net/

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



Wicket Examples on NetBeans

2010-02-25 Thread bht
Hi,

How can I run the wicket examples that are included in the
distribution in the NetBeans IDE?

I have tried to open the Maven project but I get errors [0]
'dependencies.dependency.version' is missing for
org.apache.wicket:wicket

It would be nice to have a quick and easy way to get these running in
NetBeans so that I can use the Wicket Examples as an easy reference
and starting point for the NetBeans developers (testcases for
performance issues etc.).

Ideally, I would just want to ask them to open the Maven project,
specify a server i.e. GlassFish V3 and run the project.

Many thanks

Bernard



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



Re: Getting a TextField's value without form submitting

2010-02-25 Thread Tony Wu
Any solution that doesn't require nested forms?

On Thu, Feb 25, 2010 at 5:33 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote:

 easy. put each section into its own form, all inside the one big form.
 if a button of the inner form is pressed only that form is validated,
 while values for the entire form are preserved.

 there is a wiki page which explains how embedded forms work.

 -igor

 On Thu, Feb 25, 2010 at 4:30 PM, Tony Wu e90t...@gmail.com wrote:
  Thanks Igor, my use case was an attempt to solve a bigger problem. Let me
  try to describe the main problem I am trying to solve:
 
  I have 1 big form with 3 distinct sections. Each section has an update
  link which should run every FormComponent's validators for that section.
 The
  trick is I can't use form submission because I don't want to validate the
  other parts of the form, just that 1 section and provide error feedback
 if
  necessary. The final button on the form is an actual submit, which will
 run
  through every FormComponent's validators on the page. I thought about
  splitting it up into 3 separate forms so each update link is actually a
  submit, but the final button needs to validate every input in every
 section
  - so that's why I'm using 1 form. I thought about nested forms as well,
 but
  that isn't syntactically correct in HTML.
 
  The crux of the problem is I need to run validators for only specific
  FormComponents without doing a form submit. Is there any way I can do
 that
  with wicket?
 
  Thanks,
  Tony
 
  On Thu, Feb 25, 2010 at 5:00 PM, Igor Vaynberg igor.vaynb...@gmail.com
 wrote:
 
  links do not transfer form values to the serverside, so you need to
  use a bit of js to do it for you. not sure exactly what your usecase
  is (sounds strange), but here goes off the top of my head:
 
  abstract class myuberlink extends link {
   private final textfield tf;
   public myuberlink(string id, textfield tf) { super(id);this.tf=tf;
  tf.setoutputmarkupid(true);}
   public void oncomponenttag(tag) {
 
 
  
 tag.put(onclick,this.href=this.href+'+tf.getinputname()+='+document.getElementById('+tf.getmarkupid()+').value;
  return true;); }
 
   public final void onclick() {
  onclick(getrequest().getattribute(tf.getinputname()); }
 
   protected abstract void onclick(string value);
  }
 
  -igor
 
  On Thu, Feb 25, 2010 at 3:51 PM, Tony Wu e90t...@gmail.com wrote:
   Is there a way to get a TextField's value without submitting the form?
  For
   example, if I have a TextField and a Link (not a submit Button), I
 want
  the
   Link's onClick to System.out.println the TextField's value at that
 time.
  I
   tried using TextField.getInput, getConvertedInput, no dice on both.
  
   I even tried adding a AjaxFormComponentUpdatingBehavior to the
 TextField
  for
   onchange, which does work to change the TextField's model whenever a
  user
   types something, but it's getInput and getConvertedInput is always
 null
  when
   I click the Link. Even if the AjaxFormComponentUpdatingBehavior's
  onUpdate I
   do TextField.setConvertedInput(model's new value) explicity, both
  getInput
   and getConvertedInput are both null.
  
   Any ideas?
  
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 

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




Re: [OT] Apache con 2010 europe, when?

2010-02-25 Thread nino martinez wael
Thanks for the suggestions..

But no one know's when apache con eu are?

2010/2/25 Wilhelmsen Tor Iver toriv...@arrive.no

 Then there is JavaZone in Oslo later on.

 - Tor Iver


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