Re: Thanks!

2009-03-27 Thread Jeremy Thomerson
Glad it worked well for you - I believe strongly that it is the best web
framework available.

Regarding your fear of putting the domain name in the email - if you apply
some SEO tips to your site, this list would never come up ahead.  I've done
quite a bit of public site work where search engines gave us most of our
traffic.  Here are a few tips:

- Make URLs that have your keywords in them (and the keywords are relevant
to the page)
- Use smart page titles that have search-optimized keywords in them (and
again relevant to the page)
- Use semantic HTML - use an H1 for the most important title on the page, H2
for subtitles, H3 for important things, EM, etc.

Those three things make a phenomenal impact - in that order - URLs / titles
/ smart markup.

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



On Fri, Mar 27, 2009 at 5:11 PM, Kaspar Fischer wrote:

> Dear list members, contributors and Wicket core developers,
>
> Some time ago we have deployed a website which I have migrated from
> Tapestry 4. The website is using Alfresco CMS as its data repository. The
> front-end and the editor back-end (the latter you cannot see without being
> logged in) were written in Wicket 1.4.
>
> Working with Wicket was a pleasure. Many thanks to the Wicket developers
> and the community for providing such a high-quality framework and for the
> excellent support on this forum.
>
> Cheers,
> Kaspar
>
> --
>
> http://78.46.32.164/
>
> PLEASE DO NOT POST THE NAME OF THE WEBSITE/DOMAIN OR ITS PRODUCER HERE. I
> DON'T WANT PEOPLE TO FIND THIS (FIRST) WHEN THEY GOOGLE THE WEBSITE NAME.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: adding css and js to header

2009-03-27 Thread Jeremy Thomerson
Simple:

If you're adding JS code from your Page.html file - put it in a
 tag.

If you're adding it from your Page.java file - do this:

add(new AbstractBehavior() {
@Override
public void renderHead(IHeaderResponse response)
{
response.renderJavascript(javascript, id);
}
});

See the javadocs for what that ID does.

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



On Fri, Mar 27, 2009 at 6:03 PM, fachhoch  wrote:

>
>
> and my header section  already has some java script code
>
>
>
>function jqCheckAll(){
>$("INPUT[type='checkbox']").attr('checked',
> $('#checkAllAuto').is(':checked'));
>}
>
>
>
>
> 
>  window.onload = setupFunc();
> 
>
>
>
>
> from my page I am adding JS file using response.render(), the problem is
> wickets adds the script and css at the end of the my code in header section
> so all my java script functions defined will not work , is there a way to
> add the js and css at the top of my code in header section ?
>
> for eaxmple  this my html
>
> 
> 
>  my java script code
> 
> 
>
> when page is rendered
>
> 
> 
>  my java script code
> 
>  href="../../***.css.CSSPATH/pagemask.js" />
>
> 
>
> i want this
>
> 
>  href="../../***.css.CSSPATH/pagemask.js" />
> 
>  my java script code
> 
>
>
> 
>
>
> how to get this ?
>
> --
> View this message in context:
> http://www.nabble.com/adding-css-and-js-to-header-tp22751518p22751518.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: adding css and js to header

2009-03-27 Thread fachhoch

I am  a layman with java script so i just follow the examples ,  i have lot
of other java scrit which i call in head section and i cannot put them in
.js files , please tell me how to handle 

Steve Swinsburg-2 wrote:
> 
> Have you tried putting your js block in its own .js and including it  
> after the other wicket includes? It doesn't look like it's dynamic so  
> could be easily included this way
> 
> cheers,
> Steve
> 
> 
> 
> 
> On 27/03/2009, at 11:03 PM, fachhoch wrote:
> 
>>
>>
>> and my header section  already has some java script code
>>
>>
>>  
>>  function jqCheckAll(){
>>  $("INPUT[type='checkbox']").attr('checked',
>> $('#checkAllAuto').is(':checked'));
>>  }
>>  
>>
>>
>>
>> 
>>  window.onload = setupFunc();
>> 
>>
>>
>>
>>
>> from my page I am adding JS file using response.render(), the  
>> problem is
>> wickets adds the script and css at the end of the my code in header  
>> section
>> so all my java script functions defined will not work , is there a  
>> way to
>> add the js and css at the top of my code in header section ?
>>
>> for eaxmple  this my html
>>
>> 
>> 
>>  my java script code
>> 
>> 
>>
>> when page is rendered
>>
>> 
>> 
>>  my java script code
>> 
>> > href="../../***.css.CSSPATH/pagemask.js" />
>>
>> 
>>
>> i want this
>>
>> 
>> > href="../../***.css.CSSPATH/pagemask.js" />
>> 
>>  my java script code
>> 
>>
>>
>> 
>>
>>
>> how to get this ?
>>
>> -- 
>> View this message in context:
>> http://www.nabble.com/adding-css-and-js-to-header-tp22751518p22751518.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
>>
> 
> 
>  
> 

-- 
View this message in context: 
http://www.nabble.com/adding-css-and-js-to-header-tp22751518p22752255.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: adding css and js to header

2009-03-27 Thread Stephen Swinsburg
Have you tried putting your js block in its own .js and including it  
after the other wicket includes? It doesn't look like it's dynamic so  
could be easily included this way


cheers,
Steve




On 27/03/2009, at 11:03 PM, fachhoch wrote:




and my header section  already has some java script code



function jqCheckAll(){
$("INPUT[type='checkbox']").attr('checked',
$('#checkAllAuto').is(':checked'));
}





 window.onload = setupFunc();





from my page I am adding JS file using response.render(), the  
problem is
wickets adds the script and css at the end of the my code in header  
section
so all my java script functions defined will not work , is there a  
way to

add the js and css at the top of my code in header section ?

for eaxmple  this my html



 my java script code



when page is rendered



 my java script code





i want this




 my java script code






how to get this ?

--
View this message in context: 
http://www.nabble.com/adding-css-and-js-to-header-tp22751518p22751518.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





smime.p7s
Description: S/MIME cryptographic signature


adding css and js to header

2009-03-27 Thread fachhoch


and my header section  already has some java script code



function jqCheckAll(){
$("INPUT[type='checkbox']").attr('checked',
$('#checkAllAuto').is(':checked'));   
}





  window.onload = setupFunc();





from my page I am adding JS file using response.render(), the problem is
wickets adds the script and css at the end of the my code in header section  
so all my java script functions defined will not work , is there a way to
add the js and css at the top of my code in header section ?

for eaxmple  this my html



  my java script code



when page is rendered 



  my java script code





i want this 




  my java script code




 

how to get this ?

-- 
View this message in context: 
http://www.nabble.com/adding-css-and-js-to-header-tp22751518p22751518.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



Thanks!

2009-03-27 Thread Kaspar Fischer

Dear list members, contributors and Wicket core developers,

Some time ago we have deployed a website which I have migrated from  
Tapestry 4. The website is using Alfresco CMS as its data repository.  
The front-end and the editor back-end (the latter you cannot see  
without being logged in) were written in Wicket 1.4.


Working with Wicket was a pleasure. Many thanks to the Wicket  
developers and the community for providing such a high-quality  
framework and for the excellent support on this forum.


Cheers,
Kaspar

--

http://78.46.32.164/

PLEASE DO NOT POST THE NAME OF THE WEBSITE/DOMAIN OR ITS PRODUCER  
HERE. I DON'T WANT PEOPLE TO FIND THIS (FIRST) WHEN THEY GOOGLE THE  
WEBSITE NAME.


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



Re: images in root folder

2009-03-27 Thread Stephen Swinsburg
If you have an img tag, you can use a ContextImage to load an image  
relative to your webapp context.


ie

HTML


Java
add(new ContextImage("myimage", "path/to/your/image");

The path will be relative to your webapp, so if your images are  
deployed in the root of your webapp the path will just be "image.jpg".



cheers,
Steve


On 27/03/2009, at 9:22 PM, fachhoch wrote:



I have my images in root folder , i dont want to change  their  
location ,
please suggest me how to load images using resource reference ? what  
is the

equivalent of
request.getContextPath()\images\myimage.jpgin wicket html page ?  
I dont

want to hard code my application context root  in html pages
--
View this message in context: 
http://www.nabble.com/images-in-root-folder-tp22748451p22748451.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





smime.p7s
Description: S/MIME cryptographic signature


images in root folder

2009-03-27 Thread fachhoch

I have my images in root folder , i dont want to change  their location ,
please suggest me how to load images using resource reference ? what is the
equivalent of  
request.getContextPath()\images\myimage.jpgin wicket html page ? I dont
want to hard code my application context root  in html pages 
-- 
View this message in context: 
http://www.nabble.com/images-in-root-folder-tp22748451p22748451.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: Class org/apache/wicket/Component violates loader constraints

2009-03-27 Thread Fernando Wermus
Martijn & Serkan,
   I solved this problem with eclipse m2 plugin. I installed it and I
could debug my app inside eclipse with jetty.
   I was looking for any duplicity or some compiler version problem, but
I was having a hard time.

Thanks!

On Fri, Mar 27, 2009 at 4:17 PM, Serkan Camurcuoglu <
serkan.camurcuo...@telenity.com> wrote:

> it also probably indicates that wicket-xxx.jar exists in multiple locations
> within the application server..
>
>
>
> Martijn Dashorst wrote:
>
>> wicket version, OS version, Java version would be nice to have in such
>> a scenario. Did you try to generate a new quickstart and see if that
>> works?
>>
>> Martijn
>>
>> On Fri, Mar 27, 2009 at 7:43 PM, Fernando Wermus
>>  wrote:
>>
>>
>>> People,I was working with WTP to debug my wicket app. But I decided to
>>> move
>>> to jetty because there is no need to deploy de app, as I imagine that WTP
>>> does. I changed from Eclipse->Project->Java-build-path the directory
>>> where
>>> my class are compiled: src/main/webapp/WEB-INF/classes. I debug
>>> Start.java
>>> where it says:
>>> ...
>>>   WebAppContext bb = new WebAppContext();
>>>   bb.setServer(server);
>>>   bb.setContextPath("/misDeportes");
>>>   bb.setWar("src/main/webapp");
>>> ...
>>>
>>> But when I tried to login I got this expcetion. I really know what to do:
>>> I
>>> mean I dont know anything about class loaders and how I reached this
>>> situation.
>>>
>>> Thanks in advance!
>>>
>>> HTTP ERROR: 500
>>>
>>> Class org/apache/wicket/Component violates loader constraints
>>>
>>>
>>> Caused by:
>>>
>>> java.lang.LinkageError: Class org/apache/wicket/Component violates
>>> loader constraints
>>>   at java.lang.ClassLoader.defineClass1(Native Method)
>>>   at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
>>>   at
>>> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
>>>   at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
>>>   at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
>>>   at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
>>>   at java.security.AccessController.doPrivileged(Native Method)
>>>   at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>>>   at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>>>   at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
>>>   at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>>>   at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>>>   at
>>> org.apache.wicket.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy.authorize(MetaDataRoleAuthorizationStrategy.java:114)
>>>
>>>
>>>   public static final void authorize(final Component component, final
>>> Action action,
>>>   final String roles)
>>>   {
>>>   ActionPermissions permissions = (ActionPermissions)component
>>>
>>> --
>>> Fernando Wermus.
>>>
>>> www.linkedin.com/in/fernandowermus
>>> http://mientretiempo.blogspot.com/
>>>
>>>
>>>
>>
>>
>>
>>
>>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus
http://mientretiempo.blogspot.com/


Re: Caching of rendered panels

2009-03-27 Thread Matej Knopp
You have to be really brave to use IComponentSource :-)

It's almost never a good idea anyway. It makes sense if you have
container with big amount of small component and you can restore the
whole hierarchy from e.g. an entity Id.

but it was last time used with Wicket 1.3. There's not guarantee it will work...

-Matej

On Fri, Mar 27, 2009 at 8:13 PM, Igor Vaynberg  wrote:
> ive never had to do this, but maybe something like this will work :)
>
> class myheavypanel implements icomponentsource {
>  private String cache;
>
>  public Component restoreComponent(String id) {
>     if (cache==null) {
>       return this;
>     } else  {
>        return new label(id, cache).setescapemarkup(false);
>    }
>  }
>
>  public myheavypanel() {
>     .
>     add(new abstracttransformbehavor() {
>         public abstract CharSequence transform(final Component
> component, final CharSequence output) {
>            myheavypanel.this.cache=output;
>            return output;
>         }});
>   }
>
> }
>
>
> its kinda hacky but might work :)
>
> -igor
>
> On Fri, Mar 27, 2009 at 11:50 AM, Daniel Frisk  wrote:
>> In our case it's not really that the rendering itself is taking to long, it
>> is getting the data from the model (database) so your advice is in some
>> sense correct. Restructuring the code so that we can efficently cache the
>> model is a lot of work and I would prefer to somehow cache the rendered
>> html.
>>
>> So if we presume that I actually know what I am doing, any ideas how it can
>> be done?
>>
>> // Daniel
>>
>>
>> On 2009-03-27, at 19:23, Jeremy Thomerson wrote:
>>
>>> Don't share component instances across requests / especially sessions.
>>> Don't prematurely optimize.
>>>
>>> Cache your model and test the rendering.  If it really is taking too long,
>>> figure out why and worry about it then.
>>>
>>> --
>>> Jeremy Thomerson
>>> http://www.wickettraining.com
>>>
>>>
>>>
>>> On Fri, Mar 27, 2009 at 1:12 PM, Martin Grotzke <
>>> martin.grot...@javakaffee.de> wrote:
>>>
 Hi,

 I also thought about s.th. like this because we'll have very complex
 component graphs that have to be composed dynamically based on the
 language of the user and ~3 other things. I thought about caching
 complete component instances, but didn't come so far that I thought
 about how this could be integrated into wicket - perhaps dead simple via
 some
 _cacheService.getReallyComplexComponentCached( "complexComponent",
 userInfo )

 I don't know how cheap exactly rendering of our complex component
 structure will be, but if this would take more than say 10 millis we
 would also try to cache already rendered markup.

 Cheers,
 Martin


 On Fri, 2009-03-27 at 16:49 +0100, Daniel Frisk wrote:
>
> I have a situation where I have some panels which I want to render say
> at most once a minute and during that period they should be "static".
> I tried a few approches which hasn't really worked out for me so I
> wanted to know if somebody has created such a thing or how this could
> be done. Ideas are also welcome...
>
> // Daniel Frisk
> jalbum.net
>
> -
> 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



Re: Class org/apache/wicket/Component violates loader constraints

2009-03-27 Thread Serkan Camurcuoglu
it also probably indicates that wicket-xxx.jar exists in multiple 
locations within the application server..



Martijn Dashorst wrote:

wicket version, OS version, Java version would be nice to have in such
a scenario. Did you try to generate a new quickstart and see if that
works?

Martijn

On Fri, Mar 27, 2009 at 7:43 PM, Fernando Wermus
 wrote:
  

People,I was working with WTP to debug my wicket app. But I decided to move
to jetty because there is no need to deploy de app, as I imagine that WTP
does. I changed from Eclipse->Project->Java-build-path the directory where
my class are compiled: src/main/webapp/WEB-INF/classes. I debug Start.java
where it says:
...
   WebAppContext bb = new WebAppContext();
   bb.setServer(server);
   bb.setContextPath("/misDeportes");
   bb.setWar("src/main/webapp");
...

But when I tried to login I got this expcetion. I really know what to do: I
mean I dont know anything about class loaders and how I reached this
situation.

Thanks in advance!

HTTP ERROR: 500

Class org/apache/wicket/Component violates loader constraints


Caused by:

java.lang.LinkageError: Class org/apache/wicket/Component violates
loader constraints
   at java.lang.ClassLoader.defineClass1(Native Method)
   at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
   at 
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
   at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
   at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
   at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
   at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
   at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
   at 
org.apache.wicket.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy.authorize(MetaDataRoleAuthorizationStrategy.java:114)


   public static final void authorize(final Component component, final
Action action,
   final String roles)
   {
   ActionPermissions permissions = (ActionPermissions)component

--
Fernando Wermus.

www.linkedin.com/in/fernandowermus
http://mientretiempo.blogspot.com/






  



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



Re: Class org/apache/wicket/Component violates loader constraints

2009-03-27 Thread Martijn Dashorst
wicket version, OS version, Java version would be nice to have in such
a scenario. Did you try to generate a new quickstart and see if that
works?

Martijn

On Fri, Mar 27, 2009 at 7:43 PM, Fernando Wermus
 wrote:
> People,I was working with WTP to debug my wicket app. But I decided to move
> to jetty because there is no need to deploy de app, as I imagine that WTP
> does. I changed from Eclipse->Project->Java-build-path the directory where
> my class are compiled: src/main/webapp/WEB-INF/classes. I debug Start.java
> where it says:
> ...
>        WebAppContext bb = new WebAppContext();
>        bb.setServer(server);
>        bb.setContextPath("/misDeportes");
>        bb.setWar("src/main/webapp");
> ...
>
> But when I tried to login I got this expcetion. I really know what to do: I
> mean I dont know anything about class loaders and how I reached this
> situation.
>
> Thanks in advance!
>
> HTTP ERROR: 500
>
> Class org/apache/wicket/Component violates loader constraints
>
>
> Caused by:
>
> java.lang.LinkageError: Class org/apache/wicket/Component violates
> loader constraints
>        at java.lang.ClassLoader.defineClass1(Native Method)
>        at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
>        at 
> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
>        at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
>        at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
>        at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
>        at java.security.AccessController.doPrivileged(Native Method)
>        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
>        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>        at 
> org.apache.wicket.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy.authorize(MetaDataRoleAuthorizationStrategy.java:114)
>
>
>    public static final void authorize(final Component component, final
> Action action,
>            final String roles)
>    {
>        ActionPermissions permissions = (ActionPermissions)component
>
> --
> Fernando Wermus.
>
> www.linkedin.com/in/fernandowermus
> http://mientretiempo.blogspot.com/
>



-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.5 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

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



Re: Caching of rendered panels

2009-03-27 Thread Igor Vaynberg
ive never had to do this, but maybe something like this will work :)

class myheavypanel implements icomponentsource {
  private String cache;

  public Component restoreComponent(String id) {
 if (cache==null) {
   return this;
 } else  {
return new label(id, cache).setescapemarkup(false);
}
  }

  public myheavypanel() {
 .
 add(new abstracttransformbehavor() {
 public abstract CharSequence transform(final Component
component, final CharSequence output) {
myheavypanel.this.cache=output;
return output;
 }});
   }

}


its kinda hacky but might work :)

-igor

On Fri, Mar 27, 2009 at 11:50 AM, Daniel Frisk  wrote:
> In our case it's not really that the rendering itself is taking to long, it
> is getting the data from the model (database) so your advice is in some
> sense correct. Restructuring the code so that we can efficently cache the
> model is a lot of work and I would prefer to somehow cache the rendered
> html.
>
> So if we presume that I actually know what I am doing, any ideas how it can
> be done?
>
> // Daniel
>
>
> On 2009-03-27, at 19:23, Jeremy Thomerson wrote:
>
>> Don't share component instances across requests / especially sessions.
>> Don't prematurely optimize.
>>
>> Cache your model and test the rendering.  If it really is taking too long,
>> figure out why and worry about it then.
>>
>> --
>> Jeremy Thomerson
>> http://www.wickettraining.com
>>
>>
>>
>> On Fri, Mar 27, 2009 at 1:12 PM, Martin Grotzke <
>> martin.grot...@javakaffee.de> wrote:
>>
>>> Hi,
>>>
>>> I also thought about s.th. like this because we'll have very complex
>>> component graphs that have to be composed dynamically based on the
>>> language of the user and ~3 other things. I thought about caching
>>> complete component instances, but didn't come so far that I thought
>>> about how this could be integrated into wicket - perhaps dead simple via
>>> some
>>> _cacheService.getReallyComplexComponentCached( "complexComponent",
>>> userInfo )
>>>
>>> I don't know how cheap exactly rendering of our complex component
>>> structure will be, but if this would take more than say 10 millis we
>>> would also try to cache already rendered markup.
>>>
>>> Cheers,
>>> Martin
>>>
>>>
>>> On Fri, 2009-03-27 at 16:49 +0100, Daniel Frisk wrote:

 I have a situation where I have some panels which I want to render say
 at most once a minute and during that period they should be "static".
 I tried a few approches which hasn't really worked out for me so I
 wanted to know if somebody has created such a thing or how this could
 be done. Ideas are also welcome...

 // Daniel Frisk
 jalbum.net

 -
 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: Caching of rendered panels

2009-03-27 Thread Jeremy Thomerson
Even supposing that you don't already have some other cache engine built
into your app somewhere, couldn't you build a simple caching model class
much easier than caching rendered HTML.  To cache the rendered HTML you
must:

1 - on request one, create the component, render it, cache the rendered
HTML, output it
2 - on request two, not create the component, find the rendered HTML, use a
label or something to render the html instead

Perhaps you could easily just create a caching model that wraps another
model and uses ehcache.  It would be fairly simple:

See http://ehcache.sourceforge.net/samples.html

(pseudo-code)

class CachingModel extends LoadableDetachableModel {

final String cacheKey;
final IModel model;
public CachingModel(String cacheKey, IModel model) {
this.model = model;
this.cacheKey = cacheKey;
}

@Override
public T load() {
Cache cache =
CacheManager.getInstance().getCache(getClass().getSimpleName());
Element elem = cache.getElement(this.cacheKey);
if (elem == null) {
elem = new Element(this.cacheKey, this.model.getObject());
cache.put(elem);
}
return elem.getObjectValue();
}

@Override
public void onDetach() {
super.onDetach();
this.model.detach();
}
}

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



On Fri, Mar 27, 2009 at 1:50 PM, Daniel Frisk  wrote:

> In our case it's not really that the rendering itself is taking to long, it
> is getting the data from the model (database) so your advice is in some
> sense correct. Restructuring the code so that we can efficently cache the
> model is a lot of work and I would prefer to somehow cache the rendered
> html.
>
> So if we presume that I actually know what I am doing, any ideas how it can
> be done?
>
> // Daniel
>
>
>
> On 2009-03-27, at 19:23, Jeremy Thomerson wrote:
>
>  Don't share component instances across requests / especially sessions.
>> Don't prematurely optimize.
>>
>> Cache your model and test the rendering.  If it really is taking too long,
>> figure out why and worry about it then.
>>
>> --
>> Jeremy Thomerson
>> http://www.wickettraining.com
>>
>>
>>
>> On Fri, Mar 27, 2009 at 1:12 PM, Martin Grotzke <
>> martin.grot...@javakaffee.de> wrote:
>>
>>  Hi,
>>>
>>> I also thought about s.th. like this because we'll have very complex
>>> component graphs that have to be composed dynamically based on the
>>> language of the user and ~3 other things. I thought about caching
>>> complete component instances, but didn't come so far that I thought
>>> about how this could be integrated into wicket - perhaps dead simple via
>>> some
>>> _cacheService.getReallyComplexComponentCached( "complexComponent",
>>> userInfo )
>>>
>>> I don't know how cheap exactly rendering of our complex component
>>> structure will be, but if this would take more than say 10 millis we
>>> would also try to cache already rendered markup.
>>>
>>> Cheers,
>>> Martin
>>>
>>>
>>> On Fri, 2009-03-27 at 16:49 +0100, Daniel Frisk wrote:
>>>
 I have a situation where I have some panels which I want to render say
 at most once a minute and during that period they should be "static".
 I tried a few approches which hasn't really worked out for me so I
 wanted to know if somebody has created such a thing or how this could
 be done. Ideas are also welcome...

 // Daniel Frisk
 jalbum.net

 -
 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: Caching of rendered panels

2009-03-27 Thread Daniel Frisk
In our case it's not really that the rendering itself is taking to  
long, it is getting the data from the model (database) so your advice  
is in some sense correct. Restructuring the code so that we can  
efficently cache the model is a lot of work and I would prefer to  
somehow cache the rendered html.


So if we presume that I actually know what I am doing, any ideas how  
it can be done?


// Daniel


On 2009-03-27, at 19:23, Jeremy Thomerson wrote:


Don't share component instances across requests / especially sessions.
Don't prematurely optimize.

Cache your model and test the rendering.  If it really is taking too  
long,

figure out why and worry about it then.

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



On Fri, Mar 27, 2009 at 1:12 PM, Martin Grotzke <
martin.grot...@javakaffee.de> wrote:


Hi,

I also thought about s.th. like this because we'll have very complex
component graphs that have to be composed dynamically based on the
language of the user and ~3 other things. I thought about caching
complete component instances, but didn't come so far that I thought
about how this could be integrated into wicket - perhaps dead  
simple via

some
_cacheService.getReallyComplexComponentCached( "complexComponent",
userInfo )

I don't know how cheap exactly rendering of our complex component
structure will be, but if this would take more than say 10 millis we
would also try to cache already rendered markup.

Cheers,
Martin


On Fri, 2009-03-27 at 16:49 +0100, Daniel Frisk wrote:
I have a situation where I have some panels which I want to render  
say
at most once a minute and during that period they should be  
"static".

I tried a few approches which hasn't really worked out for me so I
wanted to know if somebody has created such a thing or how this  
could

be done. Ideas are also welcome...

// Daniel Frisk
jalbum.net

-
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



Class org/apache/wicket/Component violates loader constraints

2009-03-27 Thread Fernando Wermus
People,I was working with WTP to debug my wicket app. But I decided to move
to jetty because there is no need to deploy de app, as I imagine that WTP
does. I changed from Eclipse->Project->Java-build-path the directory where
my class are compiled: src/main/webapp/WEB-INF/classes. I debug Start.java
where it says:
...
WebAppContext bb = new WebAppContext();
bb.setServer(server);
bb.setContextPath("/misDeportes");
bb.setWar("src/main/webapp");
...

But when I tried to login I got this expcetion. I really know what to do: I
mean I dont know anything about class loaders and how I reached this
situation.

Thanks in advance!

HTTP ERROR: 500

Class org/apache/wicket/Component violates loader constraints


Caused by:

java.lang.LinkageError: Class org/apache/wicket/Component violates
loader constraints
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at 
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at 
org.apache.wicket.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy.authorize(MetaDataRoleAuthorizationStrategy.java:114)


public static final void authorize(final Component component, final
Action action,
final String roles)
{
ActionPermissions permissions = (ActionPermissions)component

-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus
http://mientretiempo.blogspot.com/


Re: Caching of rendered panels

2009-03-27 Thread Jeremy Thomerson
Don't share component instances across requests / especially sessions.
Don't prematurely optimize.

Cache your model and test the rendering.  If it really is taking too long,
figure out why and worry about it then.

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



On Fri, Mar 27, 2009 at 1:12 PM, Martin Grotzke <
martin.grot...@javakaffee.de> wrote:

> Hi,
>
> I also thought about s.th. like this because we'll have very complex
> component graphs that have to be composed dynamically based on the
> language of the user and ~3 other things. I thought about caching
> complete component instances, but didn't come so far that I thought
> about how this could be integrated into wicket - perhaps dead simple via
> some
>  _cacheService.getReallyComplexComponentCached( "complexComponent",
> userInfo )
>
> I don't know how cheap exactly rendering of our complex component
> structure will be, but if this would take more than say 10 millis we
> would also try to cache already rendered markup.
>
> Cheers,
> Martin
>
>
> On Fri, 2009-03-27 at 16:49 +0100, Daniel Frisk wrote:
> > I have a situation where I have some panels which I want to render say
> > at most once a minute and during that period they should be "static".
> > I tried a few approches which hasn't really worked out for me so I
> > wanted to know if somebody has created such a thing or how this could
> > be done. Ideas are also welcome...
> >
> > // Daniel Frisk
> > jalbum.net
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
>


Re: Caching of rendered panels

2009-03-27 Thread Martin Grotzke
Hi,

I also thought about s.th. like this because we'll have very complex
component graphs that have to be composed dynamically based on the
language of the user and ~3 other things. I thought about caching
complete component instances, but didn't come so far that I thought
about how this could be integrated into wicket - perhaps dead simple via
some
  _cacheService.getReallyComplexComponentCached( "complexComponent", userInfo )

I don't know how cheap exactly rendering of our complex component
structure will be, but if this would take more than say 10 millis we
would also try to cache already rendered markup.

Cheers,
Martin


On Fri, 2009-03-27 at 16:49 +0100, Daniel Frisk wrote:
> I have a situation where I have some panels which I want to render say  
> at most once a minute and during that period they should be "static".  
> I tried a few approches which hasn't really worked out for me so I  
> wanted to know if somebody has created such a thing or how this could  
> be done. Ideas are also welcome...
> 
> // Daniel Frisk
> jalbum.net
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 


signature.asc
Description: This is a digitally signed message part


Re: Can client cache pages effectively?

2009-03-27 Thread Jim Pinkham
Jeremy,

Thanks for your thoughtful reply - Scenario is exactly right.
I played around with page headers to make the whole page cacheable, but ran
into several problems - I have a search form, and there's an 'admin' login
that enables edit links.  So it's really a stateful page, but I want to
speed up the most common state.

The bulk of the content is from an AjaxFallbackDefaultDataTable with
sortable columns. I re-sorted a column with the Ajax Debug window open to
measure it's data size - about 225000 chars.  My database search takes
64ms.  Overall client repaint time is about 2 sec with browser on
localhost.  I haven't found the right hook to measure total wicket response
time yet, but it appears pretty quick - so that's why I thougth it made
sense to focus on client caching.

Before I give up entirely on this idea, I'm wondering if it might make sense
to make the grid a public Resource, which I'm hoping the browser would treat
like an image.  I can afford a separate db query to just get my
max(lastModified), which might let me save the time to generate HTML, which
looks as though it could be my bottleneck.  If this way is too hard, I'll
give up, but it sounds do-able - what do you think?
Thanks,
-- Jim.


On Thu, Mar 26, 2009 at 6:30 PM, Jeremy Thomerson  wrote:

> How is this going to help you?  Scenario as I understand it:
>
>
>   1. User requests homepage - pulls from site - with your etag in it
>   2. User requests homepage again - calls site - your server does all of
>   the loading of data - then you calculate / set etag
>   3. Browser now knows that it is the same as before and does not have to
>   pull the HTML down
>
> The user saves what is likely a very short time in the overall scheme of
> things - downloading the HTML.
> The user still has to sit through the process of you loading the data from
> the search / DB / etc. and generating HTML
> Your server saves no load - but a little bandwidth.
>
> I'd look at caching before it even gets to your server.  Otherwise your
> user
> will likely not see much benefit unless you are sending multiple MB of data
> back.  Sounds like premature optimization to me.
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>
>
>
>  On Thu, Mar 26, 2009 at 5:26 PM, Jim Pinkham  wrote:
>
> > Thanks Jerry; I think that applies only to static pages.
> >
> > My next idea is to try overridding WebPage.setHeaders and just set the
> >
> > response.setHeader("Cache-Control", "max-age=3600, must-revalidate");
> >
> > response.setHeader("ETag", "1");  // I'll use a checksum on the data
> coming
> > back from my search (Even better would be a checksum on the rendered page
> > data - any idea how to do that?)
> > Initial test (above) seems promising...
> >
> > Thanks,
> > -- Jim.
> >
> > On Thu, Mar 26, 2009 at 3:22 PM, Jeremy Thomerson <
> > jer...@wickettraining.com
> > > wrote:
> >
> > > Have you looked at a standard HTTP caching proxy like
> > > http://www.squid-cache.org/ ?
> > >
> > >
> > > --
> > > Jeremy Thomerson
> > > http://www.wickettraining.com
> > >
> > >
> > >
> > > On Thu, Mar 26, 2009 at 2:02 PM, Jim Pinkham 
> wrote:
> > >
> > > > Changing my search query to this got some better hits:
> > > > http://lmgtfy.com/?q=cacheability
> > > > So, allow me to refine my question based on that - has anyone tried
> > some
> > > of
> > > > these approaches (see first result from above) to generrate and dump
> > > > content
> > > > to a static file (renamed if it chages) and having the wicket home
> page
> > > be
> > > > a
> > > > redirect to that file, or something like that?
> > > >
> > > > Thanks,
> > > > -- Jim.
> > > > On Thu, Mar 26, 2009 at 12:53 PM, Jim Pinkham 
> > > wrote:
> > > >
> > > > > I've found a few posts about how to mark dynamic pages so they
> won't
> > be
> > > > > cached.
> > > > >
> > > > > I've got a different situation that I think is fairly common - the
> > > 'home'
> > > > > page of my app is effectively a (cheesr-like) catalog of items that
> > > > changes
> > > > > infrequently.   Users didn't like paging, so it's about 300 items
> in
> > a
> > > > > simple scrollable page.  Once a user views it, they often drill
> down
> > > into
> > > > an
> > > > > item, then use the back button (or sometimes the Home link) to
> > > re-display
> > > > > it.
> > > > >
> > > > > The db query is actually pretty fast; I think the bottleneck seems
> to
> > > be
> > > > > fetching the HTML.
> > > > >
> > > > > My question is, can I use some kind of header caching hint with a
> > > version
> > > > > number so that once the content is identified as being the same as
> a
> > > > > previously fetched page, the user's browser will repaint it from a
> > > local
> > > > > cache?  (I know this is typically done with images, but I was
> > wondering
> > > > if
> > > > > this would make sense to do also do with content that technically
> > > > 'dynamic'
> > > > > but actually is 'fairly static' ?   (I say version number rather
> than
> > > > time
> > > > > to expire s

AW: Formatting TabbedPanel with CSS

2009-03-27 Thread Christian Helmbold

As I found out that setting the css-class works, but at the wrong place. The 
css-class attribute is added to the surrounding container and not to the tabbed 
panel.

The following html code will be replaced by the tabbed panel:
Reiter

And this is the rendered result:




Wicket constructs another container within my "tabbedPanel" container. Thats 
why my css doesn't take effect.

Is there a way to alter the css-class of the inner container?

Another thing: it is possible to disable the link of the current tab, without a 
custom TabbedPanel class?

Thanks.
Christian






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



Formatting TabbedPanel with CSS

2009-03-27 Thread Christian Helmbold

Hello,

I have a page with a TabbedPanel and want to use my own css class names for 
formatting.

I tried to use a SimpleAttributeModifier to change the class attribute of the 
rendered html tag, but with no effect. Then I tried to use the following code:
tabbedPanel.add(new AttributeModifier("class", new Model("tabbed_panel")));

But the rendered html looks in both cases like this:

("tab-row" should be "tabbed_panel").

Why does it not work?

And it is possible to change the css-classes of the tabs? I'd like to have once 
css-class for the selected tab and a second one for not selected tabs.

Thanks in advance!

Christian





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



Re: Wicketizer: Create Wicket Application from DB via Hibernate

2009-03-27 Thread 192709

 ... we are in line.
Work In Progress!

Marcus

ptrthomas wrote:
> 
> On Fri, Mar 27, 2009 at 9:57 AM, 192709  wrote:
> 
>>
>> HI,
>>
>> this is the first strike.
>> I first want to collect Feedback  - and then decide how to proceed.
>>
>> My first intention was to impress Management how fast CRUD might go.
>> But in the process of building i decided to make it more useful (e.g. by
>> using LoadableDetachableModel)
>>
>> Best Regards,
>> Marcus
>>
>>
> This is a good idea, I feel that anything that can get the Wicket message
> across to the "suits" and the management crowd is really welcome.
> 
> There's something about demos that generate basic CRUD screens that grabs
> the attention of the crowd in a mysterious way.  See what it did for
> Rails.
> Seam tried to copy that as well.  I saw first hand how the audience went
> gaga when the Grails Twitter clone demo was done at SpringOne '08.
> 
> As someone who's used Wicket for 2 years - I'm right now stuck working on
> a
> project using Seam, IceFaces and Facelets.  Trust me, if you have used
> Wicket, you don't want this to happen to you.  I urge all Wicket users to
> step up evangelism of Wicket, please blog, tweet, present, whatever. 
> Please
> !
> 
> 
>>
>> nino martinez wael wrote:
>> >
>> > Hi
>> >
>> > Any plans on supporting Hibernate via JPA? And what about a maven mojo
>> > that does what wicketizer does?
>> >
>> > regards Nino
>> >
>> > 2009/3/27 192709 :
>> >>
>> >> Dear all,
>> >> I have created a  web site by which you can create a CRUD Application
>> >> using
>> >> Wicket.
>> >> Create a Database (or use existing) and provide annotated hibernate
>> POJOs
>> >> and your hibernate.cfg.xml.
>> >>
>> >> What you will get :
>> >> a complete Eclipse Project with
>> >> - a menu (for all Pages)
>> >> - one version using Ajax and one which only uses Ajax for Filter
>> >> - per Page you will get one ListPanel (filterable and sortable and
>> >> paginable) and one EditPanel (CRUDable).
>> >> It will use your Hibernate Stuff.
>> >>
>> >> http://www.wicketizer.org http://www.wicketizer.org
>> >>
>> >> A detailed HowTo Page is available. You can give Feedback directly via
>> >>info(AT)wicketizer.org
>> >>
>> >> Marcus
>> >>
>> >> By the way - thank you all for the famous Wicket Meetup 2009,
>> Amsterdam.
>> >> It
>> >> was great.
>> >>
>> >> -
>> >> Wicket meets Hibernate:
>> >> http://www.wicketizer.org
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/Wicketizer%3A-Create-Wicket-Application-from-DB-via-Hibernate-tp22744112p22744112.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
>> >
>> >
>>
>>
>> -
>> Wicket meets Hibernate:
>> http://www.wicketizer.org
>> --
>> View this message in context:
>> http://www.nabble.com/Wicketizer%3A-Create-Wicket-Application-from-DB-via-Hibernate-tp22744112p22744580.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
>>
>>
> 
> 


-
Wicket meets Hibernate:
http://www.wicketizer.org
-- 
View this message in context: 
http://www.nabble.com/Wicketizer%3A-Create-Wicket-Application-from-DB-via-Hibernate-tp22744112p22745179.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: Wicketizer: Create Wicket Application from DB via Hibernate

2009-03-27 Thread 192709

... well I thought to spice it with some Screenshots (@Marcel - you remember
- do you :-)?
I think about it (but it will be done at earliest in 9 days - if someone
else will record, I place it on the server ).

I have visited a lot of  http://www.rheinjug.de/ rheinjug (Düsseldorf) 
meetings. The most impressive is if demo is not recorded, but live - best if
the presentator quickly reacts on input from the audience. 

Using wicketizer.org it is possible to do it live.
By the way - if someone plans a important live presentation -please inform
me -then I will not do any updates in parallel. 
Imagine to present it on a Managers PC - and afterwards he can gamble with
the application.

Imho Managers have only a very little experience (mostly outdated) - and
decisions are taken in many cases without understanding impacts. Although I
am lucky and have  boss and bossboss and bossbossboss who believe in my
Knowledge, I am still restricted to work in line with Group Strategy. But I
am working on that 

Marcus


Martin Makundi wrote:
> 
> Demo is a magic word ... I'd like to see a live demo, either online or
> recorded...
> 
> **
> Martin
> 
> 2009/3/27 Peter Thomas :
>> On Fri, Mar 27, 2009 at 9:57 AM, 192709  wrote:
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 
> 
> 


-
Wicket meets Hibernate:
http://www.wicketizer.org
-- 
View this message in context: 
http://www.nabble.com/Wicketizer%3A-Create-Wicket-Application-from-DB-via-Hibernate-tp22744112p22745177.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



AutoCompleteTextField does not get refreshed

2009-03-27 Thread okrohne78

Hi,

I use the AutoCompleteTextField to allow the users to enter tags and I have
two issues:

1)
After the user has pressed the key "enter" I want to display the entered tag
in a label
and reset the AutoCompleteTextField to allow further inputs.
So the AutoCompleteTextField should be cleared which I try by 
setting a new empty String Model to AutoCompleteTextField :

final WebMarkupContainer wrapper = new WebMarkupContainer("tagWrapper");
wrapper.setOutputMarkupId(true);
form.add(wrapper);

wrapper.add(field);

selectedTags = new Label("selectedTags", new Model(""));
wrapper.add(selectedTags);
field.add(new AjaxFormSubmitBehavior(form, "onchange")
{
@Override
protected void onSubmit(AjaxRequestTarget target)
{
IModel tagModel = field.getModel();
String currentTags =
selectedTags.getDefaultModelObjectAsString();
currentTags = currentTags + " " + tagModel.getObject();
selectedTags.setDefaultModelObject(currentTags);
field.setModel(new Model(""));
//field.clearInput();

target.addComponent(wrapper);
}

});

The selectedTags label gets rerendered and displays the tags but the
AutoCompleteTextField still
shows the last users input. 
How can I clear it?


2)
Ideally I want to have the AutoCompleteTextField on a form with 
other input components but pressing the key "enter" causes the form to
submit
and all validartors are triggered. Can I disable the form submit for the
AutoCompleteTextField component? I know I have to change the
AjaxFormSubmitBehavior to AjaxEventBehavior and use the "onchange" event.
But even then the form gets submitted.


Does anybody has a hint what I can do?

Thanks,
Oliver


-- 
View this message in context: 
http://www.nabble.com/AutoCompleteTextField-does-not-get-refreshed-tp22745172p22745172.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: Wicketizer: Create Wicket Application from DB via Hibernate

2009-03-27 Thread Martin Makundi
Demo is a magic word ... I'd like to see a live demo, either online or
recorded...

**
Martin

2009/3/27 Peter Thomas :
> On Fri, Mar 27, 2009 at 9:57 AM, 192709  wrote:

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



Re: Wicketizer: Create Wicket Application from DB via Hibernate

2009-03-27 Thread Peter Thomas
On Fri, Mar 27, 2009 at 9:57 AM, 192709  wrote:

>
> HI,
>
> this is the first strike.
> I first want to collect Feedback  - and then decide how to proceed.
>
> My first intention was to impress Management how fast CRUD might go.
> But in the process of building i decided to make it more useful (e.g. by
> using LoadableDetachableModel)
>
> Best Regards,
> Marcus
>
>
This is a good idea, I feel that anything that can get the Wicket message
across to the "suits" and the management crowd is really welcome.

There's something about demos that generate basic CRUD screens that grabs
the attention of the crowd in a mysterious way.  See what it did for Rails.
Seam tried to copy that as well.  I saw first hand how the audience went
gaga when the Grails Twitter clone demo was done at SpringOne '08.

As someone who's used Wicket for 2 years - I'm right now stuck working on a
project using Seam, IceFaces and Facelets.  Trust me, if you have used
Wicket, you don't want this to happen to you.  I urge all Wicket users to
step up evangelism of Wicket, please blog, tweet, present, whatever.  Please
!


>
> nino martinez wael wrote:
> >
> > Hi
> >
> > Any plans on supporting Hibernate via JPA? And what about a maven mojo
> > that does what wicketizer does?
> >
> > regards Nino
> >
> > 2009/3/27 192709 :
> >>
> >> Dear all,
> >> I have created a  web site by which you can create a CRUD Application
> >> using
> >> Wicket.
> >> Create a Database (or use existing) and provide annotated hibernate
> POJOs
> >> and your hibernate.cfg.xml.
> >>
> >> What you will get :
> >> a complete Eclipse Project with
> >> - a menu (for all Pages)
> >> - one version using Ajax and one which only uses Ajax for Filter
> >> - per Page you will get one ListPanel (filterable and sortable and
> >> paginable) and one EditPanel (CRUDable).
> >> It will use your Hibernate Stuff.
> >>
> >> http://www.wicketizer.org http://www.wicketizer.org
> >>
> >> A detailed HowTo Page is available. You can give Feedback directly via
> >>info(AT)wicketizer.org
> >>
> >> Marcus
> >>
> >> By the way - thank you all for the famous Wicket Meetup 2009, Amsterdam.
> >> It
> >> was great.
> >>
> >> -
> >> Wicket meets Hibernate:
> >> http://www.wicketizer.org
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/Wicketizer%3A-Create-Wicket-Application-from-DB-via-Hibernate-tp22744112p22744112.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
> >
> >
>
>
> -
> Wicket meets Hibernate:
> http://www.wicketizer.org
> --
> View this message in context:
> http://www.nabble.com/Wicketizer%3A-Create-Wicket-Application-from-DB-via-Hibernate-tp22744112p22744580.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: Caching of rendered panels

2009-03-27 Thread Igor Vaynberg
normally you should cache your model, the rendering itself is very cheap.

-igor

On Fri, Mar 27, 2009 at 8:49 AM, Daniel Frisk  wrote:
> I have a situation where I have some panels which I want to render say at
> most once a minute and during that period they should be "static". I tried a
> few approches which hasn't really worked out for me so I wanted to know if
> somebody has created such a thing or how this could be done. Ideas are also
> welcome...
>
> // Daniel Frisk
> jalbum.net
>
> -
> 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: Wicketizer: Create Wicket Application from DB via Hibernate

2009-03-27 Thread 192709

HI,

this is the first strike.
I first want to collect Feedback  - and then decide how to proceed.

My first intention was to impress Management how fast CRUD might go.
But in the process of building i decided to make it more useful (e.g. by
using LoadableDetachableModel) 

Best Regards,
Marcus


nino martinez wael wrote:
> 
> Hi
> 
> Any plans on supporting Hibernate via JPA? And what about a maven mojo
> that does what wicketizer does?
> 
> regards Nino
> 
> 2009/3/27 192709 :
>>
>> Dear all,
>> I have created a  web site by which you can create a CRUD Application
>> using
>> Wicket.
>> Create a Database (or use existing) and provide annotated hibernate POJOs
>> and your hibernate.cfg.xml.
>>
>> What you will get :
>> a complete Eclipse Project with
>> - a menu (for all Pages)
>> - one version using Ajax and one which only uses Ajax for Filter
>> - per Page you will get one ListPanel (filterable and sortable and
>> paginable) and one EditPanel (CRUDable).
>> It will use your Hibernate Stuff.
>>
>> http://www.wicketizer.org http://www.wicketizer.org
>>
>> A detailed HowTo Page is available. You can give Feedback directly via
>>    info(AT)wicketizer.org
>>
>> Marcus
>>
>> By the way - thank you all for the famous Wicket Meetup 2009, Amsterdam.
>> It
>> was great.
>>
>> -
>> Wicket meets Hibernate:
>> http://www.wicketizer.org
>> --
>> View this message in context:
>> http://www.nabble.com/Wicketizer%3A-Create-Wicket-Application-from-DB-via-Hibernate-tp22744112p22744112.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
> 
> 


-
Wicket meets Hibernate:
http://www.wicketizer.org
-- 
View this message in context: 
http://www.nabble.com/Wicketizer%3A-Create-Wicket-Application-from-DB-via-Hibernate-tp22744112p22744580.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



Compound property model

2009-03-27 Thread Mathias P.W Nilsson

Hi,


When testing this the user in the onSubmit is null. I load a list of
Connectors and make an CompoundPropertyModel for the list. Every connector
has a user. How can I achive this so that the list is populated with users
in the onSubmit()?

package se.sosalarm.planner.web.page.chain.connector;


import java.util.List;

import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.markup.html.form.AjaxSubmitLink;
import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.form.ChoiceRenderer;
import org.apache.wicket.markup.html.form.DropDownChoice;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.list.ListItem;
import org.apache.wicket.markup.html.list.ListView;
import org.apache.wicket.model.CompoundPropertyModel;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.LoadableDetachableModel;
import org.apache.wicket.model.Model;
import org.apache.wicket.spring.injection.annot.SpringBean;

import se.sosalarm.planner.entities.chain.connector.Connector;
import se.sosalarm.planner.entities.user.User;
import se.sosalarm.planner.service.ConnectorService;
import se.sosalarm.planner.service.UserService;



public class ConfigureWindow extends WebPage {

private static final long serialVersionUID = 1L;

@SpringBean( name = "connectorService" )
private ConnectorService connectorService;

@SpringBean( name = "userService" )
private UserService userService;
   



public UserService getUserService() {
return userService;
}


public ConnectorService getConnectorService() {
return connectorService;
}


public void setConnectorService(ConnectorService connectorService) {
this.connectorService = connectorService;
}


private Connector connector;


public ConfigureWindow(final IModel model) {
this.connector = model.getObject();

IModel imo = new LoadableDetachableModel(){

@Override
protected Object load() {
 return  getConnectorService().getChilds(connector);
}

};

   Form configureForm = new Form( "configureForm" );
   
   final ListView view = new ListView( "userView" ,  new
CompoundPropertyModel( imo ) ){

@Override
protected void populateItem(final ListItem item) {

item.setModel(new 
CompoundPropertyModel(item.getModel().getObject()));
final Connector c = (Connector) item.getModelObject();
IModel ju = new LoadableDetachableModel(){

@Override
protected Object load() {
return 
getUserService().getAvailableUsers( c );
}

};


DropDownChoice userChoice = new DropDownChoice( "user", 
item.getModel(),ju  );
item.add( userChoice );
item.add( new Label( "name" ));
}
   
   };
   
   AjaxSubmitLink submit = new AjaxSubmitLink( "submit" , configureForm 
){

@Override
protected void onSubmit(AjaxRequestTarget target, Form form) 
{
List connectors = 
(List)view.getModelObject();
System.out.println( view.getModelObject() );

for( Connector c : connectors ){
if( c.getUser() != null ){
System.out.println( c.getName() + ":" + 
c.getUser().getFullName() );
}

}

}
   
   };
   configureForm.add( submit );
   configureForm.add( view );
   add( configureForm );

}

   
}
-- 
View this message in context: 
http://www.nabble.com/Compound-property-model-tp22744472p22744472.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



Caching of rendered panels

2009-03-27 Thread Daniel Frisk
I have a situation where I have some panels which I want to render say  
at most once a minute and during that period they should be "static".  
I tried a few approches which hasn't really worked out for me so I  
wanted to know if somebody has created such a thing or how this could  
be done. Ideas are also welcome...


// Daniel Frisk
jalbum.net

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



Re: Wicketizer: Create Wicket Application from DB via Hibernate

2009-03-27 Thread nino martinez wael
Hi

Any plans on supporting Hibernate via JPA? And what about a maven mojo
that does what wicketizer does?

regards Nino

2009/3/27 192709 :
>
> Dear all,
> I have created a  web site by which you can create a CRUD Application using
> Wicket.
> Create a Database (or use existing) and provide annotated hibernate POJOs
> and your hibernate.cfg.xml.
>
> What you will get :
> a complete Eclipse Project with
> - a menu (for all Pages)
> - one version using Ajax and one which only uses Ajax for Filter
> - per Page you will get one ListPanel (filterable and sortable and
> paginable) and one EditPanel (CRUDable).
> It will use your Hibernate Stuff.
>
> http://www.wicketizer.org http://www.wicketizer.org
>
> A detailed HowTo Page is available. You can give Feedback directly via
>    info(AT)wicketizer.org
>
> Marcus
>
> By the way - thank you all for the famous Wicket Meetup 2009, Amsterdam. It
> was great.
>
> -
> Wicket meets Hibernate:
> http://www.wicketizer.org
> --
> View this message in context: 
> http://www.nabble.com/Wicketizer%3A-Create-Wicket-Application-from-DB-via-Hibernate-tp22744112p22744112.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



Wicketizer: Create Wicket Application from DB via Hibernate

2009-03-27 Thread 192709

Dear all,
I have created a  web site by which you can create a CRUD Application using
Wicket.
Create a Database (or use existing) and provide annotated hibernate POJOs
and your hibernate.cfg.xml.

What you will get :  
a complete Eclipse Project with
- a menu (for all Pages)
- one version using Ajax and one which only uses Ajax for Filter
- per Page you will get one ListPanel (filterable and sortable and
paginable) and one EditPanel (CRUDable).
It will use your Hibernate Stuff.

http://www.wicketizer.org http://www.wicketizer.org 

A detailed HowTo Page is available. You can give Feedback directly via 
info(AT)wicketizer.org

Marcus

By the way - thank you all for the famous Wicket Meetup 2009, Amsterdam. It
was great.

-
Wicket meets Hibernate:
http://www.wicketizer.org
-- 
View this message in context: 
http://www.nabble.com/Wicketizer%3A-Create-Wicket-Application-from-DB-via-Hibernate-tp22744112p22744112.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



Need Wicket freelance developer

2009-03-27 Thread alevin

Hi.  We are a startup company in New York City working on a new data B2B
platform.  We need a Wicket developer help us implement a few screens for
the presentation layer.  Should be fairly simple stuff for someone who knows
what they are doing (a few entry forms with mostly dynamic dropdowns). 
Please contact me if interested with availability, Wicket experience, and
rates.  Thank you.

Alex Levin
COO
Brilig
ale...@brilig.com


-- 
View this message in context: 
http://www.nabble.com/Need-Wicket-freelance-developer-tp22743107p22743107.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: Ajax refresh component

2009-03-27 Thread Michael O'Cleirigh

Hello,

Your problem is that you calling setOutputMarkupId(true) on the wrong 
panel (you are calling it on LawView page constructor where in fact it 
should be called on the component
that is added to the ajax request target, LawPanel).  Also I think the 
updated panel has to replace the current instance in the page hierarchy 
as well as being added to the ajax request target.


Your class could benefit from using model's in a more intelligent way.

Make the LawPanel detail panel work with an IModel model.  Control 
the visibility of the details panel based on if there is a Law object 
present.


When an ajax link is clicked just update the model value of the details 
panel with the selected Law object and add the existing LawPanel into 
the AJAX request target.  This will allow your link to still work when 
it is just a normal link (the fallback case).


For example:

Assuming the details panel lawPanel is a private variable in the main class.

Assuming in the page constuctuor the lawPanel.setOutputMarkupId(true) 
method was called.


public void populateItem(final Item item) {  



   AjaxFallbackLink link = new
AjaxFallbackLink("linkViewLaw") {

   @Override

   public void onClick(AjaxRequestTarget target) {


Law law = (Law) item.getModelObject();
   
			lawPanel.setModelObject (law);


if(target != null) {
   
   target.addComponent(lawPanel);


   }

}

Regards, 


Mike





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



Re: Form validation with coupled components

2009-03-27 Thread Seven Corners

OK, good, thank you, Martin!

Shelah

-- 
View this message in context: 
http://www.nabble.com/Form-validation-with-coupled-components-tp22741741p22742000.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: Form validation with coupled components

2009-03-27 Thread Martin Makundi
Actually it's EqualInputValidator

**
Martin

2009/3/27 Martin Makundi :
>> I see how to validate that a single control is required but not to
>> check for coupled controls.
>
> This is a COMPONENT validator.
>
>> I have a form that contains a few checkboxes, and the form should fail
>> validation only if ALL of them are unchecked.
>
> You need FORM VALIDATOR. See for example EqualPasswordValidator and
> make something similar.
>
> **
> Martin
>
>> --
>> View this message in context: 
>> http://www.nabble.com/Form-validation-with-coupled-components-tp22741741p22741741.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



Re: Form validation with coupled components

2009-03-27 Thread Martin Makundi
> I see how to validate that a single control is required but not to
> check for coupled controls.

This is a COMPONENT validator.

> I have a form that contains a few checkboxes, and the form should fail
> validation only if ALL of them are unchecked.

You need FORM VALIDATOR. See for example EqualPasswordValidator and
make something similar.

**
Martin

> --
> View this message in context: 
> http://www.nabble.com/Form-validation-with-coupled-components-tp22741741p22741741.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



Form validation with coupled components

2009-03-27 Thread Seven Corners

I have a form that contains a few checkboxes, and the form should fail
validation only if ALL of them are unchecked.  How can I do this?  I see how
to validate that a single control is required but not to check for coupled
controls.
-- 
View this message in context: 
http://www.nabble.com/Form-validation-with-coupled-components-tp22741741p22741741.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



Ajax components on error pages

2009-03-27 Thread Michael Sparer

I stumbled across a tiny problem today - i have an ajax LoginForm on each
page which either displays an error message or performs a redirect after
login. this works on all pages - except on errorpages the Ajax-debug console
throws an error (Received Ajax response with code: 404) after correctly
performing the login process on server side. 

I'm not sure if a 404 should be returned there and if it wouldn't be better
if a 200 was returned if it's an ajax request. To make things short: is this
behaviour intended, should more options be offered (e.g. a flag on
ajaxcomponents where a 200 gets returned anyway) and/or should I raise a
JIRA issue for that?

regards,
Michael

PS: As a workaround I did the following in the onSubmit of my ajaxform:

if (page instanceof IErrorPage) {
final BufferedWebResponse res = (BufferedWebResponse)
RequestCycle.get().getResponse();
if (res.isAjax()) {

res.getHttpServletResponse().setStatus(HttpServletResponse.SC_OK);
}
}

-
Michael Sparer
http://techblog.molindo.at
-- 
View this message in context: 
http://www.nabble.com/Ajax-components-on-error-pages-tp22741192p22741192.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: Wicket+JaserReport, how to start?

2009-03-27 Thread freak182

Hello,

You can checkout this site: http://code.google.com/p/wicket-jasper-ui/

Cheers.


Mellon wrote:
> 
> Hello,
>  I am new in Wicket+JasperReport, I have the fundamental knowledge about
> wicket and JasperReport, but Now I need to integret them. How to do it?
> How to start? I need some tutorial guide. I will look forward to hear any
> suggestions. Appreciate your help.
> 
> Mellon
> 

-- 
View this message in context: 
http://www.nabble.com/Wicket%2BJaserReport%2C-how-to-start--tp22738167p22741057.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



AjaxFallbackDefaultDataTable and AjaxSelfUpdatingTimerBehavior

2009-03-27 Thread Murat Yücel
Hi All

I have a question regarding how to add AjaxSelfUpdatingTimerBehaviors to
some of the cells in a datatable.
What is the best practice and should i use something else?

Today i have a list of items which is retrieved from the database each time
there is a request. The refresh
rate can be set by the user in a setting page. I have made a quick solution
where i was adding an
AjaxSelfUpdatingTimerBehavior to the whole table. It is working perfectly
fine for high refresh rates, but
if the user sets the refresh rate to 1 second then the refresh gives
problem.

The AjaxFallbackDefaultDataTable includes checkboxes and is inside a form. I
am now trying to change
the logic so only the relevant cells are updated. The problem is that i
cannot figure out how to do it. Because
the model for each item will be called but the dataprovider is not called to
retrieve the newest data from the
database.

Hope that someone can help or suggest a better solution.

The project is open source so if you need to see code you just say the word
:)

Kind regards

/Murat


AW: AW: Bean Validation and Wicket

2009-03-27 Thread Christian Helmbold

> There seems to be no activity in this issue. I think it would be worse to 
> spend 

> some work for JSR 303 support

Uups, I mean "worth" :-)






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



AW: Bean Validation and Wicket

2009-03-27 Thread Christian Helmbold

Support for JSR 303 Bean Validation in Wicket was discussed three years ago.. 
http://www.nabble.com/JSR-303:-Bean-Validation---Anyone-following-this--td5288109.html
See comment from Eelco here: 
http://raibledesigns.com/rd/entry/validation_framework_consolidation#comments

There seems to be no activity in this issue. I think it would be worse to spend 
some work for JSR 303 support in Wicket because Bean Validation will likely 
become a wide accepted stanard. More and more frameworks plan to support Bean 
Validation. JPA 2.0 is a prominent example.

In my opinion validation is something that does not belong to presentation 
layer but to the domain layer. I find it very inelegant to declare validation 
for one property multiple times in different forms. A possible solution would 
be to declare the field once and use it in several forms, but it would be 
easier to declare constraints directly in the domain class and don't have to 
think of it when creating a form..


In my green vision you need only a custom wicket validator as a wrapper around 
a JSR 303 implementation like http://www.hibernate.org/412.html or 
http://code.google.com/p/agimatec-validation/ . Does anyone know if the 
integration of bean validation would be so easy? Are there any expected 
troubles?

Regards
Christian





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



wicket:path and Ajax

2009-03-27 Thread Andrea Aime

Hi,
I've set my Wicket application to generate wicket:path attributes.
Yet, it seems what whatever new element added following an ajax
link does not have the wicket:path attribute set.
I'm seeing this in ajax tabbed panels and in other ajaxy
behavious, like adding a row in a ListView by following
an Ajax button.

Any known workaround?
Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

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



Ajax and FileUpload

2009-03-27 Thread Daniel Ferreira Castro
Guys,

I know that XmlHttpRequest does not support upload.  But maybe there is
someone that managed a workaround for this case.
Then I start to look around on the internet and found those two links.
-
http://blog.demay-fr.net/index.php/2007/12/07/93-simulate-ajax-file-upload-with-wicket
-
http://www.dooriented.com/blog/2008/04/23/wicket-ajax-like-file-upload-on-a-modal-window/#comment-339

The dooriented seems to be a fixed version of the first one.  I tryed to put
it on my page, but seems to not work.
Did anyone had any experience with that?  Or at least with trying any
workaround to this upload issue and Ajax?

-- 
"Two rules to succeed in life:
1 - don´t tell people everything you know."

We shall go on to the end.
We shall fight in France
We shall fightover the seas and oceans.
We shall fight with growing confidence and growing strength in the air.
We shall defend our island whatever the cost may be
We shall fight on beaches, we shall fight on the landing grounds,
We shall fight in the fields and in the streets,
We shall fight on the hills.
We shall never surrender.
Winston Churchill


Re: Newbie -How to Implement LinkTree

2009-03-27 Thread Ajayi Yinka
hi all,

I am having problems in implementing LinkTree in my page.

I need someone to put me through.


I use to get the component not found exception (

WicketMessage: close tag not found for tag: . Component: [MarkupContainer [Component id = node1]]

Root cause:

org.apache.wicket.markup.MarkupException: close tag not found for tag: . Component: [MarkupContainer [Component id =
node1]]
at
org.apache.wicket.markup.html.panel.Panel.onComponentTagBody(Panel.java:121)
at org.apache.wicket.Component.renderComponent(Component.java:2480)
at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1411)
at org.apache.wicket.Component.render(Component.java:2317)
at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1297)
at
org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1476)
at
org.apache.wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer.java:639)
at
org.apache.wicket.markup.html.panel.Panel.onComponentTagBody(Panel.java:112)
at org.apache.wicket.Component.renderComponent(Component.java:2480)
at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1411)
at org.apache.wicket.Component.render(Component.java:2317)
at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1297)
at org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1427)
at org.apache.wicket.Page.onRender(Page.java:1470)
at org.apache.wicket.Component.render(Component.java:2317)
at org.apache.wicket.Page.renderPage(Page.java:904)
at
org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:231)
at
org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:104)
at
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1181)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1252)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1353)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:355)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:200)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:250)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:218)
at
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:250)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:218)
at
org.apache.catalina.core.StandardWrapperValve.preInvoke(StandardWrapperValve.java:460)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:139)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:186)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:719)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:657)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:96)
at
com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:98)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:187)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:719)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:657)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:651)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1030)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:142)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:719)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:657)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:651)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1030)
at
org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:325)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:242)
at
com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:180)
at
com.sun.grizzly.http.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:633)
at
com.sun.grizzly.http.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:570)
at
com.sun.grizzly.http.DefaultProcessorTask.process(DefaultProcessorTask.java:827)
at
com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:152)
at
com.sun.enterprise.v3.services.impl.GlassfishProtocolChain.executeProtocolFilter(GlassfishProtocolChain.java:71)
at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:103)
at
com.sun.grizzly.DefaultProtocolChai

DatePicker, TextField and AjaxEventBehavior

2009-03-27 Thread Michal Hybler

Hi,
i have problem with using datepicker in wicket. I have TextField and
DatePicker attached to it.

final TextField dateFieldfrom = new TextField("validityFrom",
new 
Model(userClassification.getValidity().getValidFrom()));
dateFieldfrom.add(new DatePicker());
dateFieldfrom.add(new 
DateFieldBehaviour(DateFieldBehaviour.FROM,
userClassification));
If value of textField is changed it invokes onEvent method. Its good.
Now I need to get value from textField with selected date. I have tried
getValue(), getModelObject() etc. Everything returns original value. New
value is displayed correctly but i cant get it from textField.
Any ideas?

Thx for your help.
With regards Michal
-- 
View this message in context: 
http://www.nabble.com/DatePicker%2C-TextField-and-AjaxEventBehavior-tp22738598p22738598.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



Wicket+JaserReport, how to start?

2009-03-27 Thread Mellon

Hello,
 I am new in Wicket+JasperReport, I have the fundamental knowledge about
wicket and JasperReport, but Now I need to integret them. How to do it? How
to start? I need some tutorial guide. I will look forward to hear any
suggestions. Appreciate your help.

Mellon
-- 
View this message in context: 
http://www.nabble.com/Wicket%2BJaserReport%2C-how-to-start--tp22738167p22738167.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: Open Session in View Pattern: some basic questions

2009-03-27 Thread Kaspar Fischer
Igor, this clarified a lot. Many thanks for your very detailed reply.  
Kaspar


On 26.03.2009, at 19:30, Igor Vaynberg wrote:


there are three patterns to transaction management

the default pattern is session-per-transaction. this is not convenient
because after your business logic closes the transaction you can no
longer use the session in the ui.

there are two ways to solve this: either use session-per-request -
which means on first transaction you open a session, and keep it open
for the duration of the requests. transactions share the session and
even after the transactions are done you still have a session. this is
better because after your business logic is done you have the session
you can use for ui with all the stuff from business logic already
loaded. this is what the spring osiv filter does.

the other way is a single transaction-per-request. this means on first
access you create a session and a transaction. all other operations
inside a request run within that one transaction.

the difference between session-per-request and transaction-per-request
is data integrity from the user's perspective. if the user sees an
error page have his changes been saved to the database to some degree?
with transaction-per-request you are guaranteed that if user sees an
error screen none of their changes have been preserved - because
whatever displayed the error screen also rolled back the transaction.
with session-per-request there is no such guarantee. eg the business
logic runs fine and saves the data but an error in the ui causes an
error page. user sees an error - but the data is already saved - a
little inconsistent.

personally i prefer transaction-per-request but afaik there is nothing
baked into spring that will do that so you will have to roll your own.

-igor

On Thu, Mar 26, 2009 at 5:31 AM, Kaspar Fischer  
 wrote:
I am learning about the OSIV pattern and have so far read the  
introduction
at hibernate.org [1], the Spring JavaDoc for  
OpenSessionInViewFilter [2],

the excellent MysticCoders tutorial [3] that uses Spring's
OpenSessionInViewFilter, and some more.

I have basic questions:

1. Is it correct that there are two variants of the pattern?

In one variant there is a single transaction (and a single session)  
that
gets committed at the end of the request, as described in [1]. If I  
am not
mistaken, James's wicket-advanced application [5] also uses this  
variant.


In the second variant, there is an intermediate commit. We  
therefore have
two transactions (and one or two Hibernate sessions). Examples for  
this are

WicketRAD and the London-Wicket PDF [4].

2. The first variant has the disadvantage that the code handling  
the request
cannot handle errors itself as the commit takes place at the end of  
the

request, in a filter. Correct?

As a concrete example, this means that if my code inserts an item  
that
already exists and does not explicitly check for duplicates, the  
request
will result in a rollback and the default error page. Where I would  
have
preferred to see a feedback message "This item already exists". (It  
seems to
me, however, that it is not a good practice to move error checking  
concerns

to the database integrity layer, so the code *should* check for
duplicates...)

4. Which variant(s) doe Spring's OpenSessionInViewFilter support  
and how

does it work?

I do not fully understand the documentation of the class but have the
feeling it implements the second, and you can specify whether you  
want a

single or two Hibernate sessions. I read [3]:

"NOTE: This filter will by default not flush the Hibernate Session,  
with the
flush mode set to FlushMode.NEVER. It assumes to be used in  
combination with

service layer transactions that care for the flushing: The active
transaction manager will temporarily change the flush mode to  
FlushMode.AUTO
during a read-write transaction, with the flush mode reset  
toFlushMode.NEVER
at the end of each transaction. If you intend to use this filter  
without

transactions, consider changing the default flush mode (through the
"flushMode" property)."

Here is my understanding of this, assuming I have configured a Spring
transaction manager and use transaction annotations:

When a request starts, a Hibernate session is opened. When the  
first method
with a @Transactional annotation is encountered, a transaction is  
started,
and Hibernate's session is associated with this transaction. When  
the method
exits, the transaction is committed but the session is left open  
(the OSIV

behaviour). At the end of the request, the session is closed. Is this
correct?

Thanks for a reply and sorry for the lengthy post,
Kaspar

--
[1] http://www.hibernate.org/43.html
[2]
http://static.springframework.org/spring/docs/2.5.x/api/org/springframework/orm/hibernate3/support/OpenSessionInViewFilter.html
[3]
http://www.mysticcoders.com/blog/2009/03/13/5-days-of-wicket-putting-it-all-together/
[4]
http://code.google.com/p/londonwicket/downloads/det

Ajax refresh component

2009-03-27 Thread Albert, Michael (LU - Luxembourg)
Hi,

 

I would like to do the same page as the Wicket - example source code:

-  A list of element on the left side

-  A main page wich displays the details of the selected element

 

My problem is that the element is correctly taken from database but not
displayed.

 

 

Thanks,

 

 

Here is my code :

 

package com.fred.micro.web;

 

 

import com.fred.micro.AbstractBasePage;

import com.fred.micro.common.TextilMultiLineLabel;

import org.apache.wicket.markup.repeater.Item;

 

import com.fred.micro.domain.Law;

import com.fred.micro.domain.LawNorm;

import com.fred.micro.services.MicrochangesService;

import com.fred.micro.web.model.DomainModelIteratorAdaptor;

import java.util.ArrayList;

import java.util.Iterator;

import java.util.List;

import org.apache.wicket.PageParameters;

import org.apache.wicket.ajax.AjaxRequestTarget;

import org.apache.wicket.ajax.markup.html.AjaxFallbackLink;

import org.apache.wicket.markup.html.WebMarkupContainer;

import org.apache.wicket.markup.html.basic.Label;

import org.apache.wicket.markup.html.navigation.paging.PagingNavigator;

import org.apache.wicket.markup.repeater.RefreshingView;

import org.apache.wicket.markup.repeater.data.DataView;

import org.apache.wicket.markup.repeater.data.ListDataProvider;

import org.apache.wicket.model.CompoundPropertyModel;

import org.apache.wicket.model.IModel;

import org.apache.wicket.spring.injection.annot.SpringBean;

 

/**

 * Homepage

 */

public class LawView extends AbstractBasePage {

 

  private static final long serialVersionUID = 1L;

 

  // TODO Add any page properties or variables here

 

/**

   * Constructor that is invoked when page is invoked without a
session.

   *

   * @param parameters

   *Page parameters

   */

 

 

@SpringBean

private MicrochangesService service;

 

 

public LawView(final PageParameters parameters) {

 

super();

//add(new DataView("laws", new LawProvider()), 1);

//List listLaws = service.findAllLaws();

 

RefreshingView listView = new RefreshingView("laws"){

 

@Override

  protected Iterator getItemModels() {

return new DomainModelIteratorAdaptor(service

.findAllLaws().iterator()) {

  @Override

  protected IModel model(Object object) {

return new CompoundPropertyModel((Law) object);

  }

};

  }

 

public void populateItem(final Item item) {

final Law law = (Law) item.getModelObject();

//item.add(new Label("lawUniqueId",
String.valueOf(law.getId()) ));

AjaxFallbackLink link = new
AjaxFallbackLink("linkViewLaw") {

@Override

public void onClick(AjaxRequestTarget target) {

if(target != null) {

super.onClick();

Law newLaw = service.getLaw(law.getId());

target.addComponent(new LawPanel("lawPanel",
newLaw));

renderComponent();

}

}

};

link.add(new Label("lawId", law.getLawArticle() + " - "
+ law.getLawArticleFirstArg() + " - " + law.getLawArticleSecondArg()));

item.add(link);

}

};

add(listView);

add(new LawPanel("lawPanel", service.findAllLaws().get(0)));

setOutputMarkupId(true);



 

}

}

 

 

 



MICHAEL 

 

 



Re: How to secure a Wicket 1.4 application?

2009-03-27 Thread Linda van der Pal
I'm still working on this problem myself. I'm still trying to combine 
wicket-auth-roles with JAAS and Glassfish. I'll let you know when I 
succeed. :)


Regards,
Linda

Christian Helmbold wrote:

Hello,

what would be your prefered way to secure a Wicket 1.4 application? 


"Spring Security and Wicket-auth-roles" seems to be outdated. This project 
suggests to use Wicket-Security. So it is presumably not the best idea to use it.
http://cwiki.apache.org/WICKET/spring-security-and-wicket-auth-roles.html

Wicket-Security seems also to be not up to date and supports only Wicket 1.3. 
http://wicketstuff.org/confluence/display/STUFFWIKI/Wicket-Security

Somewhere I've read that a version of Wicket-Security for Wicket 1.4 exists in 
a SVN repository. Maybe that makes Wicket-Security a candidate. But this 
framework looks quite complicated to me - WiComSec, WASP, Hive, SWARM sounds 
confusing. Is Wicket-Security limited to use JAAS permissions?
http://wicketstuff.org/confluence/display/STUFFWIKI/Getting+started+with+Swarm
I don't like JAAS very much ...

My first impression is, that it is easier to write custom authentication and 
authorization, than to use Wicket-Security. How are your experiences?

Regards
Christian


  



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




No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 8.5.278 / Virus Database: 270.11.29/2023 - Release Date: 03/25/09 18:54:00


  



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



YUI menu and development mode

2009-03-27 Thread Philippe Marzouk
Hi,

I am trying to use YUI menu2 however when the application is deployed in
development mode the menus are not working, ie no submenus, no change of
color when the mouse pointer is on an item...

Does anyone experience this or has a solution to this ?

Thanks,
Philippe

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