How to use Apache Commons FileUpload in Wicket ?

2009-09-02 Thread FaRHaN
I want to upload a file using apache commons FileUpload API. As it requires 
HttpServletRequest for uploading files, but in wicket 
IMultipartWebRequest/IMultipartServletWebRequest is required for uploading 
purposes.

How can I use apache commons FileUpload for uploading in Wicket ? Is there any 
example to do so ?

Thanks...



  

Re: What is the best way to handle Undefined attribute name (wicket:id) warnings from Eclipse Ganymede?

2009-09-02 Thread PDiefent

This works fine for pages, but how can I manage it when working with panels -
there are no html tags to put the DTD in ...


wicket:extend
div class=OptionsContainer wicket:id=options/div
...
/wicket:extend


Timo Rantalaiho wrote:
 
 On Mon, 02 Feb 2009, jWeekend wrote:
 We've been using: 
 xmlns:wicket=http://svn.apache.org/repos/asf/wicket/trunk/wicket/wicket-xhtml1-strict.dtd;.
 
 Nowadays there's also
 
 http://wicket.apache.org/dtds.data/wicket-xhtml1.3-strict.dtd
 
 http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd
 
 Best wishes,
 Timo
 
 -- 
 Timo Rantalaiho   
 Reaktor Innovations OyURL: http://www.ri.fi/ 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 

-- 
View this message in context: 
http://www.nabble.com/What-is-the-best-way-to-handle-%22Undefined-attribute-name-%28wicket%3Aid%29%22--warnings-from-Eclipse-Ganymede--tp2179p25252744.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: UTF-8

2009-09-02 Thread Maarten Bosteels
FYI,  spring supports UTF-8 property files as well:

see org.springframework.context.support.ReloadableResourceBundleMessageSource

Maarten


On Wed, Sep 2, 2009 at 2:37 AM, Eelco Hillenius
eelco.hillen...@gmail.comwrote:

  But I'm sure you can write a properties implementation that reads from
  UTF-8 in a few hours max, especially now that you have an example in
  Tapestry's code. Patch is welcome :-)
 
  Why not just borrow the code from Tapestry?  It's Apache licensed of
  course, so no issues there.

 Sure, if it makes sense. But it needs to fit in Wicket's framework,
 and I don't know how Tapestry specific that code for handling those
 UTF-8 properties files in Tapestry is.

 Eelco

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




Re: What is the best way to handle Undefined attribute name (wicket:id) warnings from Eclipse Ganymede?

2009-09-02 Thread Bert
You can always surround your wicket:extend tags with a HTML header.
I do so all the time,
that i can preview the panel.

Everything outside the wicket:extends gets thrown away by wicket
when using the panel.

On Wed, Sep 2, 2009 at 09:18, PDiefentpdief...@csc.com wrote:

 This works fine for pages, but how can I manage it when working with panels -
 there are no html tags to put the DTD in ...


 wicket:extend
 div class=OptionsContainer wicket:id=options/div
 ...
 /wicket:extend


 Timo Rantalaiho wrote:

 On Mon, 02 Feb 2009, jWeekend wrote:
 We've been using:
 xmlns:wicket=http://svn.apache.org/repos/asf/wicket/trunk/wicket/wicket-xhtml1-strict.dtd;.

 Nowadays there's also

 http://wicket.apache.org/dtds.data/wicket-xhtml1.3-strict.dtd

 http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd

 Best wishes,
 Timo

 --
 Timo Rantalaiho
 Reaktor Innovations Oy    URL: http://www.ri.fi/ 

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




 --
 View this message in context: 
 http://www.nabble.com/What-is-the-best-way-to-handle-%22Undefined-attribute-name-%28wicket%3Aid%29%22--warnings-from-Eclipse-Ganymede--tp2179p25252744.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



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



Return a DynamicWebResource on a Form onSubmit.

2009-09-02 Thread Jordi Deu-Pons
Hi,

 I've been looking for a solution without luck. How can I return a
resource after a form submit?

Thanks.

-- 
a10! i fins aviat.
J:-Deu

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



Re: Palette rendering issue

2009-09-02 Thread Martijn Dashorst
Or create a foo_companystyle.html markup file in the specific place
and set the style. Then you're independent of classloading issues (and
it is a bit nicer imo).

See 
http://cwiki.apache.org/WICKET/localization-and-skinning-of-applications.html
for more information

Martijn

On Wed, Sep 2, 2009 at 5:10 AM, Jeremy
Thomersonjer...@wickettraining.com wrote:
 If you want to replace any html for a component, simply put it in your
 source tree at the same location it would appear in Wicket's jar.  As long
 as your jar takes precedence on your classpath (which is usually the case
 since you build yours into the war and wicket goes in the lib dir), then
 your file will be loaded instead.

 --
 Jeremy Thomerson
 http://www.wickettraining.com



 On Tue, Sep 1, 2009 at 8:25 PM, Troy Cauble troycau...@gmail.com wrote:

 When rows is small, say 4, and allowOrder is false, Palette
 renders less than perfectly.

 I think it's due to a couple of extra br/ s left in the buttons panel
 when the order buttons are made invisible.

 Is there any way I could replace that Palette.html without replacing
 the whole component?  Or maybe CSS magic could work around this?

 Thanks,
 -troy

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






-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.4 increases type safety for web applications
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.0

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



Re: UTF-8

2009-09-02 Thread Olivier Bourgeois

 But I'm sure you can write a properties implementation that reads from
 UTF-8 in a few hours max, especially now that you have an example in
 Tapestry's code. Patch is welcome :-)

 Eelco

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

I just had a look at Tapestry 4.0.2 implementation and it uses 13
classes all located in the package org.apache.tapestry.util.text.* and
that are under  Apache License, Version 2.0. All other imports are
java.util.* and java.io.* so at first look it seems to be reusable.

The important point is that the reader uses an InputStreamReader that
honors the encoding you set in the application. The other 12 classes
are a nice reimplementation of the JDK Properties.load0(LineReader lr)
method. IMHO the JDK stuff is really outdated and looke like C/C++
code.

And 90% of the code in both version is here to handle comments,
whitespaces, carriage return and all that kind of stuff, so if
somebody knows a good reusable parser able to handle properties files
grammar, the job is almost done.

Later I'll have a look at T 5.1 implementation and
org.springframework.context.support.ReloadableResourceBundleMessageSource
as suggested and I'll let you know.

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



Re: UTF-8

2009-09-02 Thread Antoine van Wel
On Tue, Sep 1, 2009 at 3:39 PM, Johan Compagner jcompag...@gmail.comwrote:

 Everybody should stop using any other encoding then UTF-8
 Common people we should start this change from happening now :)

 Drop all charsets and all over the world. ban them everywhere, it should be
 illegal to use them, if you do still use them you should be thrown in to
 prison for at least 5 years.
 UTF-8 everywhere!



Agreed! So let's set the default settings to UTF-8, instead of the system
settings. Would have saved me some time debugging... My development
environment uses UTF-8, deployment environment does not, so that was causing
some trouble.


Antoine


Re: Is it possible to let messages in a FeedbackPanel contain links?

2009-09-02 Thread Ernesto Reinaldo Barreiro
Individual messages are created via the factory method
protected Component newMessageDisplayComponent(String id, FeedbackMessage
{
Serializable serializable = message.getMessage();
Label label = new Label(id, (serializable == null) ?  :
serializable.toString());
label.setEscapeModelStrings(FeedbackPanel.this.getEscapeModelStrings());
return label;
}

So, maybe you could override it to return a Panel with the functionality you
want (instead of a simple label). Otherwise, rolling out your own
implementation of FeedBackPanel should not be very difficult in case you
find out doing this is not enough to achieve what you want.

Best,

Ernesto

On Wed, Sep 2, 2009 at 10:59 AM, Pieter Degraeuwe 
pieter.degrae...@systemworks.be wrote:

 Hi,
 After some actions the user did trigger in my webapp, I give the user some
 messages like 'The order was successfully created.'

 However, sometimes I want to give a message like. 'The order was
 successfully created, but some warnings were created. Click *here* to view
 these warnings'

 Is this possible in using the standard FeedbackPanel? If so, is there
 somewhere documentation how to do so?, If not, what is the best approach to
 achieve this.

 Thanks



Re: LinkTree and Tabbed Panel + inMethod DataGrid

2009-09-02 Thread Oliver-Sven Fritsch

Thanks Igor,

I found out that some chaching I did was responsible for that behavior. 
The cell data of the datagrid now gets loaded each time I click on my 
LinkTree. What's still not working is the refreshment of the datagrid 
itself although it's put into a WMC.


What I do is override the onNodeLinkClicked method with 
target.addComponent(mygrid);
Is there anything else i have to add to the click behavior? It still 
updates only if I click the tab or refresh the entire page (f5).


My page layout has two div-containers, one for the tree and one for the 
tab panel. Maybe putting a WMC around the entire 'content'-DIV is the 
solution? Can't believe that.


Really apreciate any further hints!

Oliver

Igor Vaynberg wrote:

sounds like you are ginving your datagrid a static model, instead try
to give it a model that always checks the current treenode and pulls
the associated data.

-igor

On Tue, Sep 1, 2009 at 2:35 AM, Oliver-Sven Fritscho...@3blogos.com wrote:
  

Hi everybody,

I have a LinkTree which will work as my navigation and a panel with tabs for
the content.
Right now the tree loads all the neccesary data and displays correctly. On
one of my tabs I have the inMethod datagrid which displays the values for
the selected treenode well.
My problem is that if I choose another node the datagrid does not refresh
except if I use the browsers refresh (f5). I tried to override the
onNodeLinkClicked method but don't seem to get it working. Could someone
please point me to the right direction? Can't get it working with refresh,
replaceWith etc...

here's my code for the LinkTree

tree = new LinkTree(myLinkTree, t) {
  @Override
  protected void onNodeLinkClicked(java.lang.Object node, BaseTree
tree, AjaxRequestTarget target) {
// this is for updating some global variables
  ((WicketApplication)
getApplication()).setViewId(Integer.valueOf(((MyTreeNode)
node).getPraram1()));
// this is my inMethod datagrid
  target.addComponent( ((ExplorerApplication)
getApplication()).getGrid());

//- what comes here?
  }
  };

Thanks in advance!
Oliver



-
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



Article in german Javamagazin

2009-09-02 Thread Rüdiger Schulz
Hello everybody,

the next issue of german Javamagazin (http://www.javamagazin.de/) has their
title story about Wicket. It consists of two articles. One technical one,
showing basic setup and principles of Wicket, and another about practical
use of the framework.

Despite constructive criticism (e.g. Wiki needs much better structuring to
find anything useful, markup hierarchy and wicket:ids have to match Java
code, without tool support for refactoring) they give a strong
recommendation for using Wicket, and regard it on par with the industry
standard JSF.

So thumbs up to all of you Wicket devs, and hopefully this will lead to a
little wider spreading of Wicket!



greetings from Berlin,

Rüdiger Schulz


Re: Is it possible to let messages in a FeedbackPanel contain links?

2009-09-02 Thread Pieter Degraeuwe
Perfect !.
I'll give it a try.

Thanks

On Wed, Sep 2, 2009 at 11:55 AM, Ernesto Reinaldo Barreiro 
reier...@gmail.com wrote:

 Individual messages are created via the factory method
 protected Component newMessageDisplayComponent(String id, FeedbackMessage
 {
 Serializable serializable = message.getMessage();
 Label label = new Label(id, (serializable == null) ?  :
 serializable.toString());
 label.setEscapeModelStrings(FeedbackPanel.this.getEscapeModelStrings());
 return label;
 }

 So, maybe you could override it to return a Panel with the functionality
 you
 want (instead of a simple label). Otherwise, rolling out your own
 implementation of FeedBackPanel should not be very difficult in case you
 find out doing this is not enough to achieve what you want.

 Best,

 Ernesto

 On Wed, Sep 2, 2009 at 10:59 AM, Pieter Degraeuwe 
 pieter.degrae...@systemworks.be wrote:

  Hi,
  After some actions the user did trigger in my webapp, I give the user
 some
  messages like 'The order was successfully created.'
 
  However, sometimes I want to give a message like. 'The order was
  successfully created, but some warnings were created. Click *here* to
 view
  these warnings'
 
  Is this possible in using the standard FeedbackPanel? If so, is there
  somewhere documentation how to do so?, If not, what is the best approach
 to
  achieve this.
 
  Thanks
 




-- 
Pieter Degraeuwe
Systemworks bvba
Belgiëlaan 61
9070 Destelbergen
GSM: +32 (0)485/68.60.85
Email: pieter.degrae...@systemworks.be
visit us at http://www.systemworks.be


Re: Is it possible to let messages in a FeedbackPanel contain links?

2009-09-02 Thread Pieter Degraeuwe
Hmm,
this approach (overriding the method newMessageDisplayComponent(...) seems
to work almost;

I can show links in the feedbackpanel, but when I click on them, wicket does
not find the component anymore (maybe because it was removed (since messages
are removed too?

Any tips?



On Wed, Sep 2, 2009 at 12:59 PM, Pieter Degraeuwe 
pieter.degrae...@systemworks.be wrote:

 Perfect !.
 I'll give it a try.

 Thanks

 On Wed, Sep 2, 2009 at 11:55 AM, Ernesto Reinaldo Barreiro 
 reier...@gmail.com wrote:

 Individual messages are created via the factory method
 protected Component newMessageDisplayComponent(String id, FeedbackMessage
 {
 Serializable serializable = message.getMessage();
 Label label = new Label(id, (serializable == null) ?  :
 serializable.toString());
 label.setEscapeModelStrings(FeedbackPanel.this.getEscapeModelStrings());
 return label;
 }

 So, maybe you could override it to return a Panel with the functionality
 you
 want (instead of a simple label). Otherwise, rolling out your own
 implementation of FeedBackPanel should not be very difficult in case you
 find out doing this is not enough to achieve what you want.

 Best,

 Ernesto

 On Wed, Sep 2, 2009 at 10:59 AM, Pieter Degraeuwe 
 pieter.degrae...@systemworks.be wrote:

  Hi,
  After some actions the user did trigger in my webapp, I give the user
 some
  messages like 'The order was successfully created.'
 
  However, sometimes I want to give a message like. 'The order was
  successfully created, but some warnings were created. Click *here* to
 view
  these warnings'
 
  Is this possible in using the standard FeedbackPanel? If so, is there
  somewhere documentation how to do so?, If not, what is the best approach
 to
  achieve this.
 
  Thanks
 




 --
 Pieter Degraeuwe
 Systemworks bvba
 Belgiëlaan 61
 9070 Destelbergen
 GSM: +32 (0)485/68.60.85
 Email: pieter.degrae...@systemworks.be
 visit us at http://www.systemworks.be




-- 
Pieter Degraeuwe
Systemworks bvba
Belgiëlaan 61
9070 Destelbergen
GSM: +32 (0)485/68.60.85
Email: pieter.degrae...@systemworks.be
visit us at http://www.systemworks.be


Re: How to use Apache Commons FileUpload in Wicket ?

2009-09-02 Thread Fernando Wermus
You have pickwick project that has an example exaclty as the way you want

On Wed, Sep 2, 2009 at 4:02 AM, FaRHaN farhan.ba...@ymail.com wrote:

 I want to upload a file using apache commons FileUpload API. As it requires
 HttpServletRequest for uploading files, but in wicket
 IMultipartWebRequest/IMultipartServletWebRequest is required for uploading
 purposes.

 How can I use apache commons FileUpload for uploading in Wicket ? Is there
 any example to do so ?

 Thanks...








-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


tree-images.png with real transparencies

2009-09-02 Thread Johannes Schneider
Hi,

does anybody out there have a tree-images.png with real transparancies?
I use a dark background and the shadows are only optimized for white
backgrounds.


Thanks,

Johannes

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



problem with locating lightbox resources - images etc.

2009-09-02 Thread James Stewart
I created a subversion branch on my local machine of the lightbox wicket 
stuff and built the wicket-lightbox.jar using mvn install. I then put 
the jar in my war/WEB-INF/lib folder.


It seems to work except for when I click on the thumbnail. It loads the 
image correctly and does the animation of loading the image and displays 
it. However, the decorative images are missing and I get the following 
error in the logs:
02/09/2009 12:07:57 PM 
com.google.appengine.tools.development.LocalResourceFileServlet doGet
WARNING: No file found for: 
/resources/org.wicketstuff.lightbox.LightboxBehavior/resources/images/loading.gif

...and some other images like closelabel etc.

I can see this image in the resouces/images/ folder within the jar. The 
resources folder is in org.wicketstuff.lightbox package within the jar.


I'm a bit lost as to how it's supposed to work and find these images. Is 
there something I'm missing in the way that I built it or am using it. 
The docs within the lightbox are a bit light (excuse the pun).



Thanks.

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



Re: Is it possible to let messages in a FeedbackPanel contain links?

2009-09-02 Thread Ernesto Reinaldo Barreiro
Sorry but I do not understand well what you want to achieve?

I think messages are removed after page has been rendered... (see references
to WebSession.cleanupFeedbackMessages() at RequestCycle.detach()).

What kind of links are you using? Why not cache yourself the values you
are interested at? And then have some kind of panel which you display, lets
say, via AJAX, where you show the information you want?

Best,

Ernesto

On Wed, Sep 2, 2009 at 2:16 PM, Pieter Degraeuwe 
pieter.degrae...@systemworks.be wrote:

 Hmm,
 this approach (overriding the method newMessageDisplayComponent(...) seems
 to work almost;

 I can show links in the feedbackpanel, but when I click on them, wicket
 does
 not find the component anymore (maybe because it was removed (since
 messages
 are removed too?

 Any tips?



 On Wed, Sep 2, 2009 at 12:59 PM, Pieter Degraeuwe 
 pieter.degrae...@systemworks.be wrote:

  Perfect !.
  I'll give it a try.
 
  Thanks
 
  On Wed, Sep 2, 2009 at 11:55 AM, Ernesto Reinaldo Barreiro 
  reier...@gmail.com wrote:
 
  Individual messages are created via the factory method
  protected Component newMessageDisplayComponent(String id,
 FeedbackMessage
  {
  Serializable serializable = message.getMessage();
  Label label = new Label(id, (serializable == null) ?  :
  serializable.toString());
  label.setEscapeModelStrings(FeedbackPanel.this.getEscapeModelStrings());
  return label;
  }
 
  So, maybe you could override it to return a Panel with the functionality
  you
  want (instead of a simple label). Otherwise, rolling out your own
  implementation of FeedBackPanel should not be very difficult in case you
  find out doing this is not enough to achieve what you want.
 
  Best,
 
  Ernesto
 
  On Wed, Sep 2, 2009 at 10:59 AM, Pieter Degraeuwe 
  pieter.degrae...@systemworks.be wrote:
 
   Hi,
   After some actions the user did trigger in my webapp, I give the user
  some
   messages like 'The order was successfully created.'
  
   However, sometimes I want to give a message like. 'The order was
   successfully created, but some warnings were created. Click *here* to
  view
   these warnings'
  
   Is this possible in using the standard FeedbackPanel? If so, is there
   somewhere documentation how to do so?, If not, what is the best
 approach
  to
   achieve this.
  
   Thanks
  
 
 
 
 
  --
  Pieter Degraeuwe
  Systemworks bvba
  Belgiëlaan 61
  9070 Destelbergen
  GSM: +32 (0)485/68.60.85
  Email: pieter.degrae...@systemworks.be
  visit us at http://www.systemworks.be
 



 --
 Pieter Degraeuwe
 Systemworks bvba
 Belgiëlaan 61
 9070 Destelbergen
 GSM: +32 (0)485/68.60.85
 Email: pieter.degrae...@systemworks.be
 visit us at http://www.systemworks.be



Re: Is it possible to let messages in a FeedbackPanel contain links?

2009-09-02 Thread Pieter Degraeuwe
Indeed,
The messages are removed on detach. So when clicking on the link, the actual
message is already removed, this the component is not visible anymore.

I will now -as you suggest- use another panel to show my links. (The
feedback mechanism is not ideal for that.

Thanks anyway

On Wed, Sep 2, 2009 at 3:15 PM, Ernesto Reinaldo Barreiro 
reier...@gmail.com wrote:

 Sorry but I do not understand well what you want to achieve?

 I think messages are removed after page has been rendered... (see
 references
 to WebSession.cleanupFeedbackMessages() at RequestCycle.detach()).

 What kind of links are you using? Why not cache yourself the values you
 are interested at? And then have some kind of panel which you display, lets
 say, via AJAX, where you show the information you want?

 Best,

 Ernesto

 On Wed, Sep 2, 2009 at 2:16 PM, Pieter Degraeuwe 
 pieter.degrae...@systemworks.be wrote:

  Hmm,
  this approach (overriding the method newMessageDisplayComponent(...)
 seems
  to work almost;
 
  I can show links in the feedbackpanel, but when I click on them, wicket
  does
  not find the component anymore (maybe because it was removed (since
  messages
  are removed too?
 
  Any tips?
 
 
 
  On Wed, Sep 2, 2009 at 12:59 PM, Pieter Degraeuwe 
  pieter.degrae...@systemworks.be wrote:
 
   Perfect !.
   I'll give it a try.
  
   Thanks
  
   On Wed, Sep 2, 2009 at 11:55 AM, Ernesto Reinaldo Barreiro 
   reier...@gmail.com wrote:
  
   Individual messages are created via the factory method
   protected Component newMessageDisplayComponent(String id,
  FeedbackMessage
   {
   Serializable serializable = message.getMessage();
   Label label = new Label(id, (serializable == null) ?  :
   serializable.toString());
  
 label.setEscapeModelStrings(FeedbackPanel.this.getEscapeModelStrings());
   return label;
   }
  
   So, maybe you could override it to return a Panel with the
 functionality
   you
   want (instead of a simple label). Otherwise, rolling out your own
   implementation of FeedBackPanel should not be very difficult in case
 you
   find out doing this is not enough to achieve what you want.
  
   Best,
  
   Ernesto
  
   On Wed, Sep 2, 2009 at 10:59 AM, Pieter Degraeuwe 
   pieter.degrae...@systemworks.be wrote:
  
Hi,
After some actions the user did trigger in my webapp, I give the
 user
   some
messages like 'The order was successfully created.'
   
However, sometimes I want to give a message like. 'The order was
successfully created, but some warnings were created. Click *here*
 to
   view
these warnings'
   
Is this possible in using the standard FeedbackPanel? If so, is
 there
somewhere documentation how to do so?, If not, what is the best
  approach
   to
achieve this.
   
Thanks
   
  
  
  
  
   --
   Pieter Degraeuwe
   Systemworks bvba
   Belgiëlaan 61
   9070 Destelbergen
   GSM: +32 (0)485/68.60.85
   Email: pieter.degrae...@systemworks.be
   visit us at http://www.systemworks.be
  
 
 
 
  --
  Pieter Degraeuwe
  Systemworks bvba
  Belgiëlaan 61
  9070 Destelbergen
  GSM: +32 (0)485/68.60.85
  Email: pieter.degrae...@systemworks.be
  visit us at http://www.systemworks.be
 




-- 
Pieter Degraeuwe
Systemworks bvba
Belgiëlaan 61
9070 Destelbergen
GSM: +32 (0)485/68.60.85
Email: pieter.degrae...@systemworks.be
visit us at http://www.systemworks.be


Re: wicket + jquery

2009-09-02 Thread John Krasnay
Yeah, $(document).ready will not re-run upon AJAX changes. I think
jQuery 1.3 has something called live selectors that kick in whenever
the DOM changes. Alternatively, you could just attach some Javascript to
the AjaxResponseTarget that initializes qtip for the new elements you're
adding.

jk

On Mon, Aug 31, 2009 at 11:43:58PM +0200, Mostafa Mohamed wrote:
 Hi i'm using the qtip jquery plugin to add tooltips, i use the following 
 script:
 
 $(document).ready(function()
 {
 $('a[title]').qtip(
 {
 show: {
 when: 'click',
 solo: true
 },
 position: {
 corner: {
 target: 'topRight',
 tooltip: 'bottomLeft'
 }
 },
 style: {
 border: {
 width: 1,
 radius: 0,
 color: 'black'
 },
 padding: 10,
 textAlign: 'center',
 tip: true,
 title: {
 'border-width': '1px',
 'border-style': 'solid',
 'border-color': 'black'
 }
 }
 });
 });
 
 this will take a title=tooltip texttip/a and display a tooltip
 when the link is clicked.
 
 However in one of my pages, when a user selects something from a drop
 down choice i add a fragment to the page using ajax. when i click on
 the tooltip link in this fragment the tooltip refuses to show. when i
 click on a non-ajax loaded tooltip link, it works just fine. i'm
 guessing it's because of $(document).ready. any clue as to how this
 could be solved? can wicket be of help in something like this?
 
 -
 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: UTF-8

2009-09-02 Thread Olivier Bourgeois
I had a look at T5 and Spring code :

- Spring checks if the JDK supports UTF-8 files, and if it does not
support it acts like T4 and parses the properties file. The
implementation is much more compact than in T4.

- T5 does a native2ascii conversion of the properties files on the fly.

So I figured out a quick patch that is a combination of the 3 methods :

- try to use JDK 6 native implementation
- if not available then convert on the fly to ASCII and use native JDK
=5 properties

The result is in the attachment file (sorry but I don't have a quick
way to do a patch file against SVN trunk at the moment). The method
readUTFStreamToEscapedASCII is directly borrowed from T5.1 (Apache
License 2.0), and I slightly modified PropertiesFilePropertiesLoader
constructor and loadProperties().Tell me what you think of that.

I only runed the Maven build on wicket-1.4.1 to check that the unit
tests are not broken. I think that I should use
application.getMarkupSettings().getDefaultMarkupEncoding() to set the
encoding of my InputStream, but when doing this the unit tests fail
with NullPointerException (and I don't have taken the time to look
deeper into this).

2009/9/2 Maarten Bosteels mbosteels@gmail.com:
 FYI,  spring supports UTF-8 property files as well:

 see org.springframework.context.support.ReloadableResourceBundleMessageSource

 Maarten



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

Weird exception

2009-09-02 Thread John Krasnay
We've been getting the following exception intermittently during a
performance test:

Caused by: java.lang.ClassCastException: [B
  at org.apache.wicket.Session.pageMapForName(Session.java:928)
  at org.apache.wicket.PageMap.forName(PageMap.java:67)
  at org.apache.wicket.Page.init(Page.java:1167)
  at org.apache.wicket.Page.init(Page.java:236)
  at org.apache.wicket.markup.html.WebPage.init(WebPage.java:184)
  at ca.on.ssha.oneid.web.ui.BasePage.init(BasePage.java:52)
  at ca.on.ssha.oneid.web.ui.login.LoginPage.init(LoginPage.java:45)
  ... 29 more

We are using Wicket 1.3.5. At Session.java:928 Wicket is trying to cast
a session attribute to IPageMap but apparently the attribute value is a
byte array. So far we've only seen it on the initial page for the
session, such as the login page in the example above.

Any ideas?

jk

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



Re: UTF-8

2009-09-02 Thread Eelco Hillenius
 The result is in the attachment file (sorry but I don't have a quick
 way to do a patch file against SVN trunk at the moment).

The mailing list daemon thinks attachments are delicious. The way to
submit patches is to attach it to a JIRA issue. Did anyone already
open a feature request for this? If not, please open an issue here:
http://issues.apache.org/jira/browse/WICKET. Further discussion and
patches can go there.

Cheers,

Eelco

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



Re: Weird exception

2009-09-02 Thread John Krasnay
OC4J 10.1.3.3
Java 1.5.0_06
Red Hat Linux (not sure of the version)

jk

On Wed, Sep 02, 2009 at 07:31:31PM +0200, nino martinez wael wrote:
 What kind of container are you running it in? And java version etc..?
 
 2009/9/2 John Krasnay j...@krasnay.ca:
  We've been getting the following exception intermittently during a
  performance test:
 
  Caused by: java.lang.ClassCastException: [B
   at org.apache.wicket.Session.pageMapForName(Session.java:928)
   at org.apache.wicket.PageMap.forName(PageMap.java:67)
   at org.apache.wicket.Page.init(Page.java:1167)
   at org.apache.wicket.Page.init(Page.java:236)
   at org.apache.wicket.markup.html.WebPage.init(WebPage.java:184)
   at ca.on.ssha.oneid.web.ui.BasePage.init(BasePage.java:52)
   at ca.on.ssha.oneid.web.ui.login.LoginPage.init(LoginPage.java:45)
   ... 29 more
 
  We are using Wicket 1.3.5. At Session.java:928 Wicket is trying to cast
  a session attribute to IPageMap but apparently the attribute value is a
  byte array. So far we've only seen it on the initial page for the
  session, such as the login page in the example above.
 
  Any ideas?
 
  jk
 
  -
  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: Article in german Javamagazin

2009-09-02 Thread David Brown
JSF, JSP, ASP, PHP et. al. is the reason I am using Wicket.

There are 10 kinds of people in this world: those who understand binary and 
those who don’t (Valid only for 2's complement).

- Original Message -
From: Peter Ertl pe...@gmx.org
To: users@wicket.apache.org
Sent: Wednesday, September 2, 2009 1:15:18 PM GMT -06:00 US/Canada Central
Subject: Re: Article in german Javamagazin

 recommendation for using Wicket, and regard it on par with the  
 industry
 standard JSF.

being on par with JSF is quite an insult *imho* :-)

Am 02.09.2009 um 12:45 schrieb Rüdiger Schulz:

 Hello everybody,

 the next issue of german Javamagazin (http://www.javamagazin.de/)  
 has their
 title story about Wicket. It consists of two articles. One technical  
 one,
 showing basic setup and principles of Wicket, and another about  
 practical
 use of the framework.

 Despite constructive criticism (e.g. Wiki needs much better  
 structuring to
 find anything useful, markup hierarchy and wicket:ids have to match  
 Java
 code, without tool support for refactoring) they give a strong
 recommendation for using Wicket, and regard it on par with the  
 industry
 standard JSF.

 So thumbs up to all of you Wicket devs, and hopefully this will lead  
 to a
 little wider spreading of Wicket!



 greetings from Berlin,

 Rüdiger Schulz


-
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: Is it possible to let messages in a FeedbackPanel contain links?

2009-09-02 Thread Igor Vaynberg
https://issues.apache.org/jira/browse/WICKET-2438

-igor

On Wed, Sep 2, 2009 at 6:19 AM, Pieter
Degraeuwepieter.degrae...@systemworks.be wrote:
 Indeed,
 The messages are removed on detach. So when clicking on the link, the actual
 message is already removed, this the component is not visible anymore.

 I will now -as you suggest- use another panel to show my links. (The
 feedback mechanism is not ideal for that.

 Thanks anyway

 On Wed, Sep 2, 2009 at 3:15 PM, Ernesto Reinaldo Barreiro 
 reier...@gmail.com wrote:

 Sorry but I do not understand well what you want to achieve?

 I think messages are removed after page has been rendered... (see
 references
 to WebSession.cleanupFeedbackMessages() at RequestCycle.detach()).

 What kind of links are you using? Why not cache yourself the values you
 are interested at? And then have some kind of panel which you display, lets
 say, via AJAX, where you show the information you want?

 Best,

 Ernesto

 On Wed, Sep 2, 2009 at 2:16 PM, Pieter Degraeuwe 
 pieter.degrae...@systemworks.be wrote:

  Hmm,
  this approach (overriding the method newMessageDisplayComponent(...)
 seems
  to work almost;
 
  I can show links in the feedbackpanel, but when I click on them, wicket
  does
  not find the component anymore (maybe because it was removed (since
  messages
  are removed too?
 
  Any tips?
 
 
 
  On Wed, Sep 2, 2009 at 12:59 PM, Pieter Degraeuwe 
  pieter.degrae...@systemworks.be wrote:
 
   Perfect !.
   I'll give it a try.
  
   Thanks
  
   On Wed, Sep 2, 2009 at 11:55 AM, Ernesto Reinaldo Barreiro 
   reier...@gmail.com wrote:
  
   Individual messages are created via the factory method
   protected Component newMessageDisplayComponent(String id,
  FeedbackMessage
   {
   Serializable serializable = message.getMessage();
   Label label = new Label(id, (serializable == null) ?  :
   serializable.toString());
  
 label.setEscapeModelStrings(FeedbackPanel.this.getEscapeModelStrings());
   return label;
   }
  
   So, maybe you could override it to return a Panel with the
 functionality
   you
   want (instead of a simple label). Otherwise, rolling out your own
   implementation of FeedBackPanel should not be very difficult in case
 you
   find out doing this is not enough to achieve what you want.
  
   Best,
  
   Ernesto
  
   On Wed, Sep 2, 2009 at 10:59 AM, Pieter Degraeuwe 
   pieter.degrae...@systemworks.be wrote:
  
Hi,
After some actions the user did trigger in my webapp, I give the
 user
   some
messages like 'The order was successfully created.'
   
However, sometimes I want to give a message like. 'The order was
successfully created, but some warnings were created. Click *here*
 to
   view
these warnings'
   
Is this possible in using the standard FeedbackPanel? If so, is
 there
somewhere documentation how to do so?, If not, what is the best
  approach
   to
achieve this.
   
Thanks
   
  
  
  
  
   --
   Pieter Degraeuwe
   Systemworks bvba
   Belgiëlaan 61
   9070 Destelbergen
   GSM: +32 (0)485/68.60.85
   Email: pieter.degrae...@systemworks.be
   visit us at http://www.systemworks.be
  
 
 
 
  --
  Pieter Degraeuwe
  Systemworks bvba
  Belgiëlaan 61
  9070 Destelbergen
  GSM: +32 (0)485/68.60.85
  Email: pieter.degrae...@systemworks.be
  visit us at http://www.systemworks.be
 




 --
 Pieter Degraeuwe
 Systemworks bvba
 Belgiëlaan 61
 9070 Destelbergen
 GSM: +32 (0)485/68.60.85
 Email: pieter.degrae...@systemworks.be
 visit us at http://www.systemworks.be


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



Re: 32 External CSS Files Limitation of Internet Explorer 6,7,8

2009-09-02 Thread Martin Letendre
Thanks for your time.

On Tue, Sep 1, 2009 at 10:45 AM, nino martinez wael 
nino.martinez.w...@gmail.com wrote:

 Hmm what about the merged resources from wicketstuff:


 http://wicketstuff.org/confluence/display/STUFFWIKI/wicketstuff-merged-resources


 2009/9/1 Martin Letendre letendre.mar...@gmail.com:
  Hello Folks
 
  Is there a feature that can be enabled that merge css ressource into one
  file ?
 
  Someone answer in this post that this kind of feature does not exist...
 
 
 http://www.nabble.com/Wicket-resources-%28css,-js-and-images%29--td19160980.html
 
  This is sad because it's causing a bug if you are using IE (6,7 or 8) and
  have more than 31 css file included in one Wicket page.
 
  Please read this article for more details:
 
 
 http://acidmartin.wordpress.com/2008/11/25/the-32-external-css-files-limitation-of-internet-explorer-and-more/
 
 
  Martin Letendre
  Montreal, Quebec
  Canada
 

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




-- 
Martin Letendre
4230 Wilson
Montréal, Qc
514.690.8027


clean way to avoid DynamicWebResource to look for non existing file

2009-09-02 Thread Daniele Dellafiore
Hi all, I use a DynamicWebResource to display images previously uploaded by
user ion the context of my application. I have this DWR subclass:

   class LogoResource extends DynamicImageResource {

  private final IModel logoModel;

  public LogoResource(IModel model) {
 this.logoModel = model;
  }

  @Override
  protected byte[] getImageData() {
 String basePath = upload/images/;
 Object name = logoModel.getObject();
 File file = new File(., basePath + name);
 LoggerFactory.getLogger(getClass()).info(serving file:  + file);
 try {
return IOUtils.toByteArray(new FileInputStream(file));
 } catch (FileNotFoundException e) {
e.printStackTrace();
 } catch (IOException e) {
e.printStackTrace();
 }
 return null;
  }
   }

now, when the file is found, everything is ok.
When it is not, I receive a NullPo9nterException, this is the output when
you can see my log and then the begin of the trace:

INFO  - LogoResource - serving file: ./upload/images/null
ERROR - RequestCycle   -
java.lang.NullPointerException
at java.io.ByteArrayInputStream.init(ByteArrayInputStream.java:89)
at
org.apache.wicket.markup.html.DynamicWebResource$1.getInputStream(DynamicWebResource.java:221)

at
org.apache.wicket.request.target.resource.ResourceStreamRequestTarget.respond(ResourceStreamRequestTarget.java:160)

at
org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:105)

at org.apache.wicket.RequestCycle.respond(RequestCycle.java:1267)

This is annoying and, more important, it seems to cause the page not to
reload properly. In fact when after a submit I call a setResponse on the
same page, the page is not reloaded.

At the end of all the exceptions, I get:

WARN  - DataRequestCycle   - Completed exception handling for
request [requestcy...@1ec3ffd thread=10193...@qtp-28693170-2]
INFO  - DataRequestCycle   - Request ended
[requestcy...@1ec3ffdthread=10193106@qtp-28693170-2](time:
33

And the page has the same URL as before, correclty, but not the new
rendering: If I reload the page, I get the new stuff.

In the same page I have other forms, with the same setResponse onSubmit,
that work perfectly.
Do you think that these exceptions could be the problem for the undone
refresh? Or maybe is better to look elsewhere?

And, in any case, there is a clean way to avoid the getImageData to be
called if I do not have a file for the image?

Thanks.

-- 
Daniele Dellafiore
http://blog.ildella.net
http://twitter.com/ildella


Re: Testing ajax form behavior still confused me.

2009-09-02 Thread pete swulius
Okay, I'm on the trail of what is happening, but don't have the full answer
yet.  I doubt this is a defect, but rather a misuse of nested forms  ajax
components on my part.  Though I don't feel like I know enough about wicket
to make the call.

What I know is: the wrong AjaxButton is being selected as the
submittingComponent in Form.findSubmittingButton().

I have the following nesting:

panel-A
  form-1
 AjaxButton (foo)
 panel-B
form-2
AjaxButton (bar)

I'm calling executeAjaxEvent on 'foo', but it is not the first AjaxButton
encountered during my pages visitChildren().  At least in my situation, the
first AjaxButton encountered is 'bar' and it's selected and returned as
submittingComponent.  This seems to cause form-2 to be posted on the
request.

Any thoughts on this would be greatly appreciated!

--pete


Properties file and validators

2009-09-02 Thread hill180
When the user does not place enough characters (19) I want to show a error
message different than
'1234' is not exactly 19 characters long.

I have a properties file, but I don't know what the element would be called.

I have tried

form.card.ExactLengthValidator=19 Digits are required.

But Obviously ExactLengthValidator is not the right key.

My Java code looks like this..
form.add(new TextField(card, String.class).setRequired(true).add(new
StringValidator.ExactLengthValidator(19)));

What is the key, and where in the JavaDocs is the best place to find all the
keys.  (The wiki only had a couple of the keys.)

Thank you,
jose


Re: Properties file and validators

2009-09-02 Thread Igor Vaynberg
you can turn on debug logging and wicket will spit out all keys it tries to use.

-igor

On Wed, Sep 2, 2009 at 5:27 PM, hill180hill...@gmail.com wrote:
 When the user does not place enough characters (19) I want to show a error
 message different than
 '1234' is not exactly 19 characters long.

 I have a properties file, but I don't know what the element would be called.

 I have tried

 form.card.ExactLengthValidator=19 Digits are required.

 But Obviously ExactLengthValidator is not the right key.

 My Java code looks like this..
 form.add(new TextField(card, String.class).setRequired(true).add(new
 StringValidator.ExactLengthValidator(19)));

 What is the key, and where in the JavaDocs is the best place to find all the
 keys.  (The wiki only had a couple of the keys.)

 Thank you,
 jose


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



Re: Properties file and validators

2009-09-02 Thread hill180
Added DEBUG to log4j.
Thanks! that is what I was looking for. form.card.StringValidator.exact

jose

On Wed, Sep 2, 2009 at 5:41 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote:

 you can turn on debug logging and wicket will spit out all keys it tries to
 use.

 -igor

 On Wed, Sep 2, 2009 at 5:27 PM, hill180hill...@gmail.com wrote:
  When the user does not place enough characters (19) I want to show a
 error
  message different than
  '1234' is not exactly 19 characters long.
 
  I have a properties file, but I don't know what the element would be
 called.
 
  I have tried
 
  form.card.ExactLengthValidator=19 Digits are required.
 
  But Obviously ExactLengthValidator is not the right key.
 
  My Java code looks like this..
  form.add(new TextField(card, String.class).setRequired(true).add(new
  StringValidator.ExactLengthValidator(19)));
 
  What is the key, and where in the JavaDocs is the best place to find all
 the
  keys.  (The wiki only had a couple of the keys.)
 
  Thank you,
  jose
 

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




Re: Article in german Javamagazin

2009-09-02 Thread Jonathan Locke


nice!


Rüdiger_Schulz wrote:
 
 Hello everybody,
 
 the next issue of german Javamagazin (http://www.javamagazin.de/) has
 their
 title story about Wicket. It consists of two articles. One technical one,
 showing basic setup and principles of Wicket, and another about practical
 use of the framework.
 
 Despite constructive criticism (e.g. Wiki needs much better structuring to
 find anything useful, markup hierarchy and wicket:ids have to match Java
 code, without tool support for refactoring) they give a strong
 recommendation for using Wicket, and regard it on par with the industry
 standard JSF.
 
 So thumbs up to all of you Wicket devs, and hopefully this will lead to a
 little wider spreading of Wicket!
 
 
 
 greetings from Berlin,
 
 Rüdiger Schulz
 
 

-- 
View this message in context: 
http://www.nabble.com/Article-in-german-Javamagazin-tp25255240p25268588.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: Testing ajax form behavior still confused me.

2009-09-02 Thread pete swulius
Wicket 1.4.1 resolved my issue.

I still had fun tracing through the wicket code though.  It's pristine in
there.

--pete


[OT] Test Driven Scaffolding

2009-09-02 Thread James Perry
I thought fellow Wicket users would be interested in my article:

http://www.theserverside.com/news/thread.tss?thread_id=57443
Cheers,
James.