Re: [announce] Wicket in Action e-book has been published!

2008-08-19 Thread Martijn Dashorst
On Tue, Aug 19, 2008 at 12:05 AM, James Carman
[EMAIL PROTECTED] wrote:
 I never did receive my email telling me the final copy was available
 for download.  Should I email the publisher and ask for a new download
 link?

If you bought at the manning site, then yes. If you shopped at Amazon,
then you have to wait for the print edition.

Martijn

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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [announce] Wicket in Action e-book has been published!

2008-08-19 Thread Nino Saturnino Martinez Vazquez Wael
Hhhehe, know the situation my wifes pregnant with our second child, and 
we(I) need to do some fixing too and split a room into two pieces before 
it's born, so I sacrificed my Suzuki sv 650 (which I never used anyway 
btw)..


Eelco Hillenius wrote:

On Thu, Aug 14, 2008 at 3:47 AM, Johan Compagner [EMAIL PROTECTED] wrote:
  

finally
Eelco has now time over again for coding



And now my wife is pregnant and we're buying a house that needs
fixing. :-) Looks like my break will take a little longer.

Eelco

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: FeedbackPanel default outputMarkupId = true

2008-08-19 Thread Nino Saturnino Martinez Vazquez Wael
I still for one try to get ajax away for public(unauthorized) parts,  
for seo and caching purposes but it depends on the situation..


Timo Rantalaiho wrote:

On Mon, 18 Aug 2008, Patrick Angeles wrote:
  

Does it make sense to have outputMarkupId default to true for FeedbackPanel?

Use case:

somePanel.add (new OnChangeAjaxBehavior() {
  protected void onUpdate (AjaxRequestTarget target) {
// do stuff, 
Session.get().info (did stuff);

target.addChildren (getPage(), FeedbackPanel.class) ;
  }
});

This code will work from anywhere in the component hierarchy, regardless of
which component added the  feedbackpanel, without the owning component
having to call feedback.setOutputMarkupId(true)...

I could just as well subclass FeedbackPanel but this seems like a common
enough case that it makes sense to build it into the core...



With a suitable IComponentInstantiationListener you can
probably achieve the wanted behavior in your own
application.


All my Wicket applications are very ajaxy, but maybe there
is someone out there that is still doing the traditional
whole- page-request stuff :) And a lot of defaults on Wicket
are still based on that. 


It's kind of an established standard that by default,
outputMarkupId is false, so in 1.3 or 1.4 I don't see it
could be changed. Later on, if the change is made, maybe it
would be better to change the default for all Components and
not just FeedbackPanel.

What do others think?

Best wishes,
Timo

  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: 2 questions on Include

2008-08-19 Thread landry soules
Thanks a lot for your answer, Cemal, my first problem is solved !
For the second one, i can get the content, thanks to your explanation, but
can't figure out how to modify it before it's displayed.
Here is what i do :

add(new Include(stat,
http://myurl;) {
protected void onComponentTagBody(MarkupStream markupStream,
ComponentTag openTag) {
super.onComponentTagBody(markupStream, openTag);
String content = importAsString();

   logger.debug(content);
}
}.setEscapeModelStrings(false));


But how can i inject my modified content back to my component ?

Best regards.


Landry



2008/8/19 jWeekend [EMAIL PROTECTED]


 Landry,

 1 - setEscapeModelStrings(false)
 2 - Subclass Include. Override onComponentTagBody and use importAsString()

 Regards - Cemal
 http://www.jWeekend.co.uk http://jWeekend.co.uk


 landry soules wrote:
 
  Hello,
 
  In my firm, we're currently using a homegrown component-like framework,
  based on cgi-perl scripts calling servlets. I would like to prove my
  boss how smooth the transition towards Wicket could be.
  I'm trying to make a first step, replacing the perl scripts with Wicket,
  and calling the components (here servlets), with Include. But i have 2
  problems :
 
  1/ When i call a servlet that has several parameters, for example
  add(*new**
  *Include(maxMin,http://myserver/maxminservlet?id=0001periodes=1st;1a
 ;));
  Wicket actually replaces  with amp;, as shown in the trace :
  DEBUG - UrlResourceStream  - cannot convert url:
  http://myserver/maxminservlet?id=0001amp;periodes=1st;1a; to file (URI
  scheme is not file), falling back to the inputstream for polling
  This alters my servlet's behaviour, is there a mean to avoid this
  substitution ?
 
  2/ Is it possible to catch the content of the include, and so possibly
  modify it before it is actually displayed in my Wicket page ?
 
 
  Thanks for your help
 
 
  Landry
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

 --
 View this message in context:
 http://www.nabble.com/2-questions-on-Include-tp19036146p19041450.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




[announce] IWUG øredev getting closer

2008-08-19 Thread Nino Saturnino Martinez Vazquez Wael

Hi

I just wanted to remind you that IWUG (International wicket user group) 
are getting closer it would be really great to have other speakers that 
me, me and Martjin Dashorst. So please go to the meetup page and ad 
yourself along with an topic:) Otherwise just add yourself so we can see 
the interest and feel free to request a topic, just place the topic 
without an speaker.



http://cwiki.apache.org/confluence/display/WICKET/Community+meetups

I take it there still are an interest in IWUG at øredev?

See here for pricing etc to get into oredev 
http://www.nabble.com/WUG-%28wicket-user-group%29-%40-%C3%98redev-td17971424.html#a17982592


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: 2 questions on Include

2008-08-19 Thread jWeekend

Landry,
 
Component has a replaceComponentTagBody(markupStream, openTag, content)
method.

Regards - Cemal
http://www.jWeekend.co.uk http://jWeekend.co.uk 



landry soules wrote:
 
 Thanks a lot for your answer, Cemal, my first problem is solved !
 For the second one, i can get the content, thanks to your explanation, but
 can't figure out how to modify it before it's displayed.
 Here is what i do :
 
 add(new Include(stat,
 http://myurl;) {
 protected void onComponentTagBody(MarkupStream markupStream,
 ComponentTag openTag) {
 super.onComponentTagBody(markupStream, openTag);
 String content = importAsString();
 
logger.debug(content);
 }
 }.setEscapeModelStrings(false));
 
 
 But how can i inject my modified content back to my component ?
 
 Best regards.
 
 
 Landry
 
 
 
 2008/8/19 jWeekend [EMAIL PROTECTED]
 

 Landry,

 1 - setEscapeModelStrings(false)
 2 - Subclass Include. Override onComponentTagBody and use
 importAsString()

 Regards - Cemal
 http://www.jWeekend.co.uk http://jWeekend.co.uk


 landry soules wrote:
 
  Hello,
 
  In my firm, we're currently using a homegrown component-like framework,
  based on cgi-perl scripts calling servlets. I would like to prove my
  boss how smooth the transition towards Wicket could be.
  I'm trying to make a first step, replacing the perl scripts with
 Wicket,
  and calling the components (here servlets), with Include. But i have 2
  problems :
 
  1/ When i call a servlet that has several parameters, for example
  add(*new**
 
 *Include(maxMin,http://myserver/maxminservlet?id=0001periodes=1st;1a
 ;));
  Wicket actually replaces  with amp;, as shown in the trace :
  DEBUG - UrlResourceStream  - cannot convert url:
  http://myserver/maxminservlet?id=0001amp;periodes=1st;1a; to file (URI
  scheme is not file), falling back to the inputstream for polling
  This alters my servlet's behaviour, is there a mean to avoid this
  substitution ?
 
  2/ Is it possible to catch the content of the include, and so possibly
  modify it before it is actually displayed in my Wicket page ?
 
 
  Thanks for your help
 
 
  Landry
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

 --
 View this message in context:
 http://www.nabble.com/2-questions-on-Include-tp19036146p19041450.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 
 

-- 
View this message in context: 
http://www.nabble.com/2-questions-on-Include-tp19036146p19045669.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: ResourceModel vs. getLocalizer

2008-08-19 Thread Erik van Oosten
There is a big difference, the model variant will evaluate during the
render phase. You can not use localization in the constructor of your
component, you can however safely construct a ResourceModel (but not
call getObject on it).

In general, I would use localizer when you need direct access to a
message from code. This should be rare though, most message can be
placed with the wicket:message element.

Regards,
Erik.


Timo Rantalaiho wrote:
 On Mon, 18 Aug 2008, lesterburlap wrote:
   
 new ResourceModel(my.resource.key).getObject().toString();
 or
 getLocalizer().getString(my.resource.key, MyComponent.this);
 

 Isn't the latter same as 

   Component.getString(my.resource.key);

 ?

 And ResourceModel can typically be used directly as the 
 model of the Label displaying the String

   add(new Label(foo, new ResourceModel(my.resource.key)));

   
 I've been using getLocalizer almost everywhere, and only using ResourceModel
 when I'm trying to get a property string during Component construction (to
 avoid those getLocalizer warnings).  But I'm not really sure if my reasoning
 is good...
 

 I wouldn't think that there is any difference. If you are 
 worried about performance, try profiling the application.

 Best wishes,
 Timo
   

--
Erik van Oosten
http://day-to-day-stuff.blogspot.com/



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Dynamic PrependKeywordEncodingStrategy? (making a simple rule for caching with apache)

2008-08-19 Thread Nino Saturnino Martinez Vazquez Wael
I talked a bit on IRC on this. And got suggested to use headers instead. 
So this might be a viable option and much much simpler! I'll look into 
it and see how it works out.


Nino Saturnino Martinez Vazquez Wael wrote:

Hi

I've been fighting a bit with making a EncodingStrategy that can 
prepend a keyword (cacheable etc) to the url depending on page state, 
however I cant get the last bits to work heres what I got so far:



ApplicationClass:
   @Override
   protected IRequestCycleProcessor newRequestCycleProcessor() {
   return new WebRequestCycleProcessor() {
   protected IRequestCodingStrategy newRequestCodingStrategy() {
   return new PrependKeywordEncodingStrategy(
   new WebRequestCodingStrategy(), cacheable);
   }
   };
   }

I've posted the prepending strategy to pastebin:

http://pastebin.ca/1173557


So the idea are basically that there should be prepended cacheable 
to all pages where the user are not logged in. That way I can set my 
apache up to cache all pages with /cacheable prefix.





--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: 2 questions on Include

2008-08-19 Thread landry soules
Thanks a lot Cemal, you rock !
And please don't blame me for the dumbness of my questions  ;-)

Thanks again

Best regards


Landry



2008/8/19 jWeekend [EMAIL PROTECTED]


 Landry,

 Component has a replaceComponentTagBody(markupStream, openTag, content)
 method.

 Regards - Cemal
 http://www.jWeekend.co.uk http://jWeekend.co.uk



 landry soules wrote:
 
  Thanks a lot for your answer, Cemal, my first problem is solved !
  For the second one, i can get the content, thanks to your explanation,
 but
  can't figure out how to modify it before it's displayed.
  Here is what i do :
 
  add(new Include(stat,
  http://myurl;) {
  protected void onComponentTagBody(MarkupStream markupStream,
  ComponentTag openTag) {
  super.onComponentTagBody(markupStream, openTag);
  String content = importAsString();
 
 logger.debug(content);
  }
  }.setEscapeModelStrings(false));
 
 
  But how can i inject my modified content back to my component ?
 
  Best regards.
 
 
  Landry
 
 
 
  2008/8/19 jWeekend [EMAIL PROTECTED]
 
 
  Landry,
 
  1 - setEscapeModelStrings(false)
  2 - Subclass Include. Override onComponentTagBody and use
  importAsString()
 
  Regards - Cemal
  http://www.jWeekend.co.uk http://jWeekend.co.uk
 
 
  landry soules wrote:
  
   Hello,
  
   In my firm, we're currently using a homegrown component-like
 framework,
   based on cgi-perl scripts calling servlets. I would like to prove my
   boss how smooth the transition towards Wicket could be.
   I'm trying to make a first step, replacing the perl scripts with
  Wicket,
   and calling the components (here servlets), with Include. But i have 2
   problems :
  
   1/ When i call a servlet that has several parameters, for example
   add(*new**
  
  *Include(maxMin,
 http://myserver/maxminservlet?id=0001periodes=1st;1a
  ;));
   Wicket actually replaces  with amp;, as shown in the trace :
   DEBUG - UrlResourceStream  - cannot convert url:
   http://myserver/maxminservlet?id=0001amp;periodes=1st;1a; to file
 (URI
   scheme is not file), falling back to the inputstream for polling
   This alters my servlet's behaviour, is there a mean to avoid this
   substitution ?
  
   2/ Is it possible to catch the content of the include, and so possibly
   modify it before it is actually displayed in my Wicket page ?
  
  
   Thanks for your help
  
  
   Landry
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
 
  --
  View this message in context:
  http://www.nabble.com/2-questions-on-Include-tp19036146p19041450.html
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 

 --
 View this message in context:
 http://www.nabble.com/2-questions-on-Include-tp19036146p19045669.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




(WebRequest)getRequestCycle() is always null on first request

2008-08-19 Thread Wayne Pope
Hi,

I've got a problem that I have no idea how to fix. I'm using
IAuthorizationStrategy to authenticate the users of my application.
However on the first request to the server (WebRequest)getRequestCycle()
returns null all the time, so I therefore cannot get an cookies (which I
want). This is a real pain.
Why is it the case that its null here, but later in the flow its there?

Stack trace of nullpointer exception:

Root cause:

java.lang.NullPointerException
at mypackage.context.DefaultSession.isAuthenticated(DefaultSession.java:69)
at
mypackage.security.IntranetAuthorizationStrategy.isInstantiationAuthorized(IntranetAuthorizationStrategy.java:33)
at org.apache.wicket.Application$1.onInstantiation(Application.java:276)
at
org.apache.wicket.Application.notifyComponentInstantiationListeners(Application.java:974)
at org.apache.wicket.Component.init(Component.java:874)
at org.apache.wicket.MarkupContainer.init(MarkupContainer.java:105)
at org.apache.wicket.Page.init(Page.java:236)
at org.apache.wicket.markup.html.WebPage.init(WebPage.java:184)
at
org.apache.wicket.security.components.SecureWebPage.init(SecureWebPage.java:48)

etc..
DefaultSession.java:69 is:
Cookie cookie = ((WebRequest)getRequestCycle()).getCookie(user);

Any ideas?
thanks
Wayne


Re: [announce] Wicket in Action e-book has been published!

2008-08-19 Thread Thomas Singer
Just curious: why don't you make the full e-book available for free and 
charge only for the paper version? This works fine with the German Java book 
Java ist auch eine Insel and many others from the same publisher:


 http://www.galileocomputing.de/openbook/javainsel7/

--
Cheers,
Tom


Martijn Dashorst wrote:

Almost 3 years of hard work, loosing friends, moving abroad, marrying
lovely wives, late nights, early mornings, frustrated family, and all
other bad (and good) things that cross one's life is now rewarded with
the availability of the e-book edition of Wicket in Action. The print
edition (also know as dead-tree edition) will be available in just
over 2 weeks (estimated at Aug 29th).

Eelco and I are *really*, *really* glad that the journey is finally
over. We think it was worth it. Now we leave the book in your capable
hands to make beautiful applications that make your boss and customers
happy and we are sure you'll enjoy creating them.

Eelco Hillenius  Martijn Dashorst

About Wicket in Action

Wicket in Action is a comprehensive guide for Java developers building
Wicket-based web applications. It introduces Wicket's structure and
components, and moves quickly into examples of Wicket at work. Written
by core committers, this book shows you the how-to and the why of
Wicket. You'll learn to use and customize Wicket components, to
interact with Spring and Hibernate, and to implement rich Ajax-driven
features.

Some quotes of early access reviewers:

Finally, the Web Framework of web framework, Apache Wicket, now has a
bible of its own. - Per Ejeklint

Without question, Wicket in Action... is the be-all and end-all when
it comes to Wicket. - Geertjan Wielenga

Wicket In Action glues the areas of web development with Apache
Wicket together and gives a great overview of Apache Wicket...it will
make a great compendium. - Nino Martinez Wael

You can read full reviews here:
 - Nick Heudecker: Wicket In Action Book Review
   http://www.theserverside.com/news/thread.tss?thread_id=50326

 - Geertjan Wielenga: Wicket in Action: Undoubtedly The Wicket Bible
   http://blogs.sun.com/geertjan/entry/wicket_in_action_undoubtedly_the

Free content

If you don't think these reviewers are qualified to tell you to buy
Wicket in Action, let these free samples convince you:

 * Chapter 1: http://www.manning.com/dashorst/ch01_dashorst.pdf
 * Chapter 8: http://www.manning.com/dashorst/ch08_dashorst.pdf
 * Excerpt: Creating Secure Web Applications with Apache Wicket
(http://www.manning.com/free/excerpt_Wicket.html)

MEAP readers

If you bought the MEAP edition you'll receive a personal download link
for the final e-book in your inbox today (or possibly tomorrow). We'd
like to extend our gratitude to the MEAP readers - without you and
your encouragements we would've given up.

Limited summer discount

There is a 35% discount when you buy Wicket in Action at the manning
website before the end of August. For more details look here:
http://manning.com/dashorst

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: (WebRequest)getRequestCycle() is always null on first request

2008-08-19 Thread Wayne Pope
Please ignore this, I am being stupid. getRequestCycle() is not available
from the session, I had (auto)created that method in my class by mistake...

On Tue, Aug 19, 2008 at 10:28 AM, Wayne Pope 
[EMAIL PROTECTED] wrote:

 Hi,

 I've got a problem that I have no idea how to fix. I'm using
 IAuthorizationStrategy to authenticate the users of my application.
 However on the first request to the server (WebRequest)getRequestCycle()
 returns null all the time, so I therefore cannot get an cookies (which I
 want). This is a real pain.
 Why is it the case that its null here, but later in the flow its there?

 Stack trace of nullpointer exception:

 Root cause:

 java.lang.NullPointerException
 at mypackage.context.DefaultSession.isAuthenticated(DefaultSession.java:69)
 at
 mypackage.security.IntranetAuthorizationStrategy.isInstantiationAuthorized(IntranetAuthorizationStrategy.java:33)
 at org.apache.wicket.Application$1.onInstantiation(Application.java:276)
 at
 org.apache.wicket.Application.notifyComponentInstantiationListeners(Application.java:974)
 at org.apache.wicket.Component.init(Component.java:874)
 at org.apache.wicket.MarkupContainer.init(MarkupContainer.java:105)
 at org.apache.wicket.Page.init(Page.java:236)
 at org.apache.wicket.markup.html.WebPage.init(WebPage.java:184)
 at
 org.apache.wicket.security.components.SecureWebPage.init(SecureWebPage.java:48)

 etc..
 DefaultSession.java:69 is:
 Cookie cookie = ((WebRequest)getRequestCycle()).getCookie(user);

 Any ideas?
 thanks
 Wayne







Re: [announce] Wicket in Action e-book has been published!

2008-08-19 Thread Edward Yakop
On Tue, Aug 19, 2008 at 4:33 PM, Thomas Singer [EMAIL PROTECTED] wrote:
 Just curious: why don't you make the full e-book available for free and
 charge only for the paper version? This works fine with the German Java book
 Java ist auch eine Insel and many others from the same publisher:

Bad idea!
Printing an ebook in Malaysia cost 8 cents RM per page and
I know some people won't hesitate to print them.

For this case,
it would only cost less than 10.45 USD to get the book printed.

Regards,
Edward Yakop

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [announce] Wicket in Action e-book has been published!

2008-08-19 Thread Martijn Dashorst
Though we don't expect to become rich from this book, you *really*
don't have any idea what personal sacrifices Eelco and I have given to
make this book happen. If we get enough money to go on a weeks
vacation with our wives that would be exceeding my expectations, and
barely do justice to what we put them through.

Our publisher also needs to earn money. The only way they can do that
is to actually ask money for the books they publish. Without the
publisher, Wicket in Action would not have been possible, and wouldn't
have been nearly as good (MEAP subscribers can see the difference
between an edited and non-edited book). If you would like to continue
receive more books about your favorite Java projects, then don't
hesitate and support the publisher and authors and *buy* their books.

Martijn

On Tue, Aug 19, 2008 at 10:33 AM, Thomas Singer [EMAIL PROTECTED] wrote:
 Just curious: why don't you make the full e-book available for free and
 charge only for the paper version? This works fine with the German Java book
 Java ist auch eine Insel and many others from the same publisher:

  http://www.galileocomputing.de/openbook/javainsel7/

 --
 Cheers,
 Tom


 Martijn Dashorst wrote:

 Almost 3 years of hard work, loosing friends, moving abroad, marrying
 lovely wives, late nights, early mornings, frustrated family, and all
 other bad (and good) things that cross one's life is now rewarded with
 the availability of the e-book edition of Wicket in Action. The print
 edition (also know as dead-tree edition) will be available in just
 over 2 weeks (estimated at Aug 29th).

 Eelco and I are *really*, *really* glad that the journey is finally
 over. We think it was worth it. Now we leave the book in your capable
 hands to make beautiful applications that make your boss and customers
 happy and we are sure you'll enjoy creating them.

 Eelco Hillenius  Martijn Dashorst

 About Wicket in Action

 Wicket in Action is a comprehensive guide for Java developers building
 Wicket-based web applications. It introduces Wicket's structure and
 components, and moves quickly into examples of Wicket at work. Written
 by core committers, this book shows you the how-to and the why of
 Wicket. You'll learn to use and customize Wicket components, to
 interact with Spring and Hibernate, and to implement rich Ajax-driven
 features.

 Some quotes of early access reviewers:

 Finally, the Web Framework of web framework, Apache Wicket, now has a
 bible of its own. - Per Ejeklint

 Without question, Wicket in Action... is the be-all and end-all when
 it comes to Wicket. - Geertjan Wielenga

 Wicket In Action glues the areas of web development with Apache
 Wicket together and gives a great overview of Apache Wicket...it will
 make a great compendium. - Nino Martinez Wael

 You can read full reviews here:
  - Nick Heudecker: Wicket In Action Book Review
   http://www.theserverside.com/news/thread.tss?thread_id=50326

  - Geertjan Wielenga: Wicket in Action: Undoubtedly The Wicket Bible
   http://blogs.sun.com/geertjan/entry/wicket_in_action_undoubtedly_the

 Free content

 If you don't think these reviewers are qualified to tell you to buy
 Wicket in Action, let these free samples convince you:

  * Chapter 1: http://www.manning.com/dashorst/ch01_dashorst.pdf
  * Chapter 8: http://www.manning.com/dashorst/ch08_dashorst.pdf
  * Excerpt: Creating Secure Web Applications with Apache Wicket
 (http://www.manning.com/free/excerpt_Wicket.html)

 MEAP readers

 If you bought the MEAP edition you'll receive a personal download link
 for the final e-book in your inbox today (or possibly tomorrow). We'd
 like to extend our gratitude to the MEAP readers - without you and
 your encouragements we would've given up.

 Limited summer discount

 There is a 35% discount when you buy Wicket in Action at the manning
 website before the end of August. For more details look here:
 http://manning.com/dashorst

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: FeedbackPanel default outputMarkupId = true

2008-08-19 Thread Matej Knopp
Just making feedback panel write markup id doesn't mean your
application has to be all ajaxy...

-Matej

On Tue, Aug 19, 2008 at 8:25 AM, Nino Saturnino Martinez Vazquez Wael
[EMAIL PROTECTED] wrote:
 I still for one try to get ajax away for public(unauthorized) parts,  for
 seo and caching purposes but it depends on the situation..

 Timo Rantalaiho wrote:

 On Mon, 18 Aug 2008, Patrick Angeles wrote:


 Does it make sense to have outputMarkupId default to true for
 FeedbackPanel?

 Use case:

 somePanel.add (new OnChangeAjaxBehavior() {
  protected void onUpdate (AjaxRequestTarget target) {
// do stuff,Session.get().info (did stuff);
target.addChildren (getPage(), FeedbackPanel.class) ;
  }
 });

 This code will work from anywhere in the component hierarchy, regardless
 of
 which component added the  feedbackpanel, without the owning component
 having to call feedback.setOutputMarkupId(true)...

 I could just as well subclass FeedbackPanel but this seems like a common
 enough case that it makes sense to build it into the core...


 With a suitable IComponentInstantiationListener you can
 probably achieve the wanted behavior in your own
 application.


 All my Wicket applications are very ajaxy, but maybe there
 is someone out there that is still doing the traditional
 whole- page-request stuff :) And a lot of defaults on Wicket
 are still based on that.
 It's kind of an established standard that by default,
 outputMarkupId is false, so in 1.3 or 1.4 I don't see it
 could be changed. Later on, if the change is made, maybe it
 would be better to change the default for all Components and
 not just FeedbackPanel.

 What do others think?

 Best wishes,
 Timo



 --
 -Wicket for love

 Nino Martinez Wael
 Java Specialist @ Jayway DK
 http://www.jayway.dk
 +45 2936 7684


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: IndicatingAjaxLink with BaseTree appends after /td

2008-08-19 Thread Matej Knopp
Hi,

This is caused by the fact that component border is rendered
after/before behaviors. We can't really change this for 1.3 because it
could break existing applications. I have changed the rendering order
in trunk (1.4) though.

-Matej

On Mon, Aug 18, 2008 at 3:36 PM, Kaspar Fischer [EMAIL PROTECTED] wrote:
 I override BaseTree's newLink() to return an IndicatingAjaxLink:

@Override
public MarkupContainer newLink(String id, final ILinkCallback callback)
{
  return new IndicatingAjaxLink(id)
  {
private static final long serialVersionUID = 1L;
@Override
public void onClick(AjaxRequestTarget target)
{
  callback.onClick(target);
}
  };
}

 Strangely, this produces markup like this:

 div id=tree1c7
  table style=display:none id=tree1c7_0
  /table
  table class=wicket-tree-content id=tree1c7_1
   tr
td class=half-line
 a class=junction-open href=# id=junctionLink1c8
 onclick=wicketShow('junctionLink1c8--ajax-indicator');var
 wcall=wicketAjaxGet('../?wicket:interface=html:14:left-column:1:item:tree:i:1:junctionLink::IBehaviorListener:0:1',function(){;wicketHide('junctionLink1c8--ajax-indicator');}.bind(this),function()
 { ;wicketHide('junctionLink1c8--ajax-indicator');}.bind(this), function()
 {return Wicket.$('junctionLink1c8') != null;}.bind(this));return
 !wcall;/a
/td
span style=display:none; class=wicket-ajax-indicator
 id=junctionLink1c8--ajax-indicatorimg
 src=../resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/indicator.gif
 alt=//span
td
...

 Notice that the indicater span output by IndicatingAjaxLink's
 WicketAjaxIndicatorAppender
 comes after the /td and not after the /a as I would have expected.

 Is this a bug?

 Thanks,
 Kaspar

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: FeedbackPanel default outputMarkupId = true

2008-08-19 Thread Nino Saturnino Martinez Vazquez Wael
Hehe no completely true.. But it does generate more output.. However 
dosent matter much for me what the default are.. as long as I can set a 
property to control it:)


Matej Knopp wrote:

Just making feedback panel write markup id doesn't mean your
application has to be all ajaxy...

-Matej

On Tue, Aug 19, 2008 at 8:25 AM, Nino Saturnino Martinez Vazquez Wael
[EMAIL PROTECTED] wrote:
  

I still for one try to get ajax away for public(unauthorized) parts,  for
seo and caching purposes but it depends on the situation..

Timo Rantalaiho wrote:


On Mon, 18 Aug 2008, Patrick Angeles wrote:

  

Does it make sense to have outputMarkupId default to true for
FeedbackPanel?

Use case:

somePanel.add (new OnChangeAjaxBehavior() {
 protected void onUpdate (AjaxRequestTarget target) {
   // do stuff,Session.get().info (did stuff);
   target.addChildren (getPage(), FeedbackPanel.class) ;
 }
});

This code will work from anywhere in the component hierarchy, regardless
of
which component added the  feedbackpanel, without the owning component
having to call feedback.setOutputMarkupId(true)...

I could just as well subclass FeedbackPanel but this seems like a common
enough case that it makes sense to build it into the core...



With a suitable IComponentInstantiationListener you can
probably achieve the wanted behavior in your own
application.


All my Wicket applications are very ajaxy, but maybe there
is someone out there that is still doing the traditional
whole- page-request stuff :) And a lot of defaults on Wicket
are still based on that.
It's kind of an established standard that by default,
outputMarkupId is false, so in 1.3 or 1.4 I don't see it
could be changed. Later on, if the change is made, maybe it
would be better to change the default for all Components and
not just FeedbackPanel.

What do others think?

Best wishes,
Timo


  

--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Markup Inheritance - not working for head element

2008-08-19 Thread Martijn Dashorst
There is the slight possibility that the wiki is inaccurate.

Martijn

On Tue, Aug 19, 2008 at 11:52 AM, Wayne Pope
[EMAIL PROTECTED] wrote:
 Hi,

 I just wanted to check I'm not alone on this, before going to the dev group.
 I've created a simple base page and markup and using market inheritance I
 have a child page with the content.

 This worsd fine, except that Wicket does not interprets head as
 wicket:head automatically in the child page - as stated on the Wiki. I
 need to use wicket:head to get it work.

 Anyone have this working without using wicket:head?




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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: IndicatingAjaxLink with BaseTree appends after /td

2008-08-19 Thread Kaspar Fischer


On 19.08.2008, at 12:03, Matej Knopp wrote:


Hi,

This is caused by the fact that component border is rendered
after/before behaviors. We can't really change this for 1.3 because it
could break existing applications. I have changed the rendering order
in trunk (1.4) though.

-Matej


Great! Thanks a lot for looking into this.

Kaspar

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Markup Inheritance - not working for head element

2008-08-19 Thread Wayne Pope
:-) that might be it!

Its a none issue really, just would be 'nice to have'

On Tue, Aug 19, 2008 at 12:19 PM, Martijn Dashorst 
[EMAIL PROTECTED] wrote:

 There is the slight possibility that the wiki is inaccurate.

 Martijn

 On Tue, Aug 19, 2008 at 11:52 AM, Wayne Pope
 [EMAIL PROTECTED] wrote:
  Hi,
 
  I just wanted to check I'm not alone on this, before going to the dev
 group.
  I've created a simple base page and markup and using market inheritance I
  have a child page with the content.
 
  This worsd fine, except that Wicket does not interprets head as
  wicket:head automatically in the child page - as stated on the Wiki. I
  need to use wicket:head to get it work.
 
  Anyone have this working without using wicket:head?
 



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

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: Markup Inheritance - not working for head element

2008-08-19 Thread Martijn Dashorst
I think it is a nice *not* to have. If head sections were included
automatically, there is no way to distinguish between stuff that is
there for design purposes and runtime purposes.

Martijn

On Tue, Aug 19, 2008 at 12:28 PM, Wayne Pope
[EMAIL PROTECTED] wrote:
 :-) that might be it!

 Its a none issue really, just would be 'nice to have'

 On Tue, Aug 19, 2008 at 12:19 PM, Martijn Dashorst 
 [EMAIL PROTECTED] wrote:

 There is the slight possibility that the wiki is inaccurate.

 Martijn

 On Tue, Aug 19, 2008 at 11:52 AM, Wayne Pope
 [EMAIL PROTECTED] wrote:
  Hi,
 
  I just wanted to check I'm not alone on this, before going to the dev
 group.
  I've created a simple base page and markup and using market inheritance I
  have a child page with the content.
 
  This worsd fine, except that Wicket does not interprets head as
  wicket:head automatically in the child page - as stated on the Wiki. I
  need to use wicket:head to get it work.
 
  Anyone have this working without using wicket:head?
 



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

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]






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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Wicketstuff snapshots

2008-08-19 Thread Kaspar Fischer

When/how often are the Wicketstuff snapshots generated? I am using

  dependency
groupIdorg.wicketstuff/groupId
artifactIdwicketstuff-scriptaculous/artifactId
version1.4-SNAPSHOT/version
  /dependency

in my pom.xml but get

 java.lang.NoSuchMethodError:  
org 
.wicketstuff 
.scriptaculous.dragdrop.SortableListView.getModelObject()Ljava/lang/ 
Object;


although the latest SortableListView.java does not contain the text
getModelObject().

I fear I lack some basic knowledge on Maven repos, so appologies
if I am asking something obvious.

Kaspar

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Markup Inheritance - not working for head element

2008-08-19 Thread Wayne Pope
yes good point.


On Tue, Aug 19, 2008 at 12:31 PM, Martijn Dashorst 
[EMAIL PROTECTED] wrote:

 I think it is a nice *not* to have. If head sections were included
 automatically, there is no way to distinguish between stuff that is
 there for design purposes and runtime purposes.

 Martijn

 On Tue, Aug 19, 2008 at 12:28 PM, Wayne Pope
 [EMAIL PROTECTED] wrote:
  :-) that might be it!
 
  Its a none issue really, just would be 'nice to have'
 
  On Tue, Aug 19, 2008 at 12:19 PM, Martijn Dashorst 
  [EMAIL PROTECTED] wrote:
 
  There is the slight possibility that the wiki is inaccurate.
 
  Martijn
 
  On Tue, Aug 19, 2008 at 11:52 AM, Wayne Pope
  [EMAIL PROTECTED] wrote:
   Hi,
  
   I just wanted to check I'm not alone on this, before going to the dev
  group.
   I've created a simple base page and markup and using market
 inheritance I
   have a child page with the content.
  
   This worsd fine, except that Wicket does not interprets head as
   wicket:head automatically in the child page - as stated on the Wiki.
 I
   need to use wicket:head to get it work.
  
   Anyone have this working without using wicket:head?
  
 
 
 
  --
  Become a Wicket expert, learn from the best: http://wicketinaction.com
  Apache Wicket 1.3.4 is released
  Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 



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

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: [announce] Wicket in Action e-book has been published!

2008-08-19 Thread Bert Radke
I have been following the progress of the book via MEAP and it helped
me a lot in my progress. Unfortunately, the place i work is leaning
towards ADF (JSF), but i use Wicket for my spare time projects and
love it so far. Thanks for the book and the project.

about the a free pdf version: i must agree with Martijn Dashorst. The
PDF is not that expensive and at least you get a PDF along with book.
most other publishers don 't give you this.

Thanks again, Bert

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tree component looses page

2008-08-19 Thread ckuehne

I'm doing drag and drop operations with an implementation of
org.apache.wicket.markup.html.tree.BaseTree. For the drop event I call 

...
dropNode.add(dragNode); 
tree.repaint(target);
...

However I get an IllegalStateException when processing the ajax request (in
detach(RequestCycle)) because somehow the component for the dropNode - as
supplied by baseTreeImpl.newNodeComponent() - looses its page. I am not sure
when this happens exactly. After the calls as described above the page is
still not null.

I guess the problem is related to
https://issues.apache.org/jira/browse/WICKET-1366

Help appreciated.

Conny 
-- 
View this message in context: 
http://www.nabble.com/Tree-component-looses-page-tp19048069p19048069.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [announce] Wicket in Action e-book has been published!

2008-08-19 Thread James Carman
I bought it via the MEAP program through Manning.  So, I guess I'll
shoot them a quick email.  Thanks!

On Tue, Aug 19, 2008 at 2:09 AM, Martijn Dashorst
[EMAIL PROTECTED] wrote:
 On Tue, Aug 19, 2008 at 12:05 AM, James Carman
 [EMAIL PROTECTED] wrote:
 I never did receive my email telling me the final copy was available
 for download.  Should I email the publisher and ask for a new download
 link?

 If you bought at the manning site, then yes. If you shopped at Amazon,
 then you have to wait for the print edition.

 Martijn

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

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wicketstuff snapshots

2008-08-19 Thread Kaspar Fischer

On 19.08.2008, at 12:45, Martijn Dashorst wrote:

On Tue, Aug 19, 2008 at 12:32 PM, Kaspar Fischer  
[EMAIL PROTECTED] wrote:

When/how often are the Wicketstuff snapshots generated? I am using


Everytime the source code changes for the project, or when Wicket is
updated (depending on the configuration of the projects in Teamcity
(http://wicketstuff.org/teamcity).

Martijn


I see. So this means something with the configuration is wrong (as the
JAR is outdate, see my previous mail).

Loggin into teamcity as guest, I see Problems with VCS connection:

  Failed for the root 'Wicket Stuff 1.4 repository' #3: Checking  
changes for checkout rule 'trunk/wicket-contrib-tinymce=trunk/wicket- 
contrib-tinymce' failed with erorr:  
org.tmatesoft.svn.core.SVNException: svn: PROPFIND request failed on '/ 
svnroot/wicket-stuff/trunk/wicket-contrib-tinymce/src/java/wicket/ 
contrib/tinymce/tiny_mce/langs/tw.js' svn: Network is unreachable


and in addition a build error:

[ERROR] BUILD ERROR
[12:26:40]: [INFO]  


[12:26:40]: [INFO] Failed to resolve artifact.
[12:26:40]:
[12:26:40]: Missing:
[12:26:40]: --
[12:26:40]: 1) org.wicketstuff:wicketstuff-prototype:jar:1.4-SNAPSHOT
[12:26:40]:
[12:26:40]: Try downloading the file manually from the project website.
[12:26:40]:
[12:26:40]: Then, install it using the command:
[12:26:40]: mvn install:install-file -DgroupId=org.wicketstuff - 
DartifactId=wicketstuff-prototype -Dversion=1.4-SNAPSHOT - 
Dpackaging=jar -Dfile=/path/to/file

[12:26:40]:
[12:26:40]: Alternatively, if you host your own repository you can  
deploy the file there:
[12:26:40]: mvn deploy:deploy-file -DgroupId=org.wicketstuff - 
DartifactId=wicketstuff-prototype -Dversion=1.4-SNAPSHOT - 
Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

[12:26:40]:
[12:26:40]: Path to dependency:
[12:26:40]: 1) org.wicketstuff:wicketstuff-scriptaculous:jar:1.4- 
SNAPSHOT

[12:26:40]: 2) org.wicketstuff:wicketstuff-prototype:jar:1.4-SNAPSHOT
[12:26:40]:
[12:26:40]: --
[12:26:40]: 1 required artifact is missing.
[12:26:40]:
[12:26:40]: for artifact:
[12:26:40]: org.wicketstuff:wicketstuff-scriptaculous:jar:1.4-SNAPSHOT
[12:26:40]:
[12:26:40]: from the specified remote repositories:
[12:26:40]: central (http://repo1.maven.org/maven2),
[12:26:40]: wicket-stuff-repository (http://www.wicketstuff.org/maven/repository/ 
)


(I get the same build error if I download the SVN code and do a mvn  
install.)


Can this be fixed in some way?

Kaspar

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Dynamic PrependKeywordEncodingStrategy? (making a simple rule for caching with apache)

2008-08-19 Thread Nino Saturnino Martinez Vazquez Wael

Well, i've looked a bit into it and it turns out that this will not work.

Im trying to cache pages that *could* be statefull the only way to make 
a rule for this are that the current page that links cachable pages do 
it by giving a special url like /cachable/mypage. If I try the header 
approach the page would have to render first..



This must be possible somehow with wicket?

Nino Saturnino Martinez Vazquez Wael wrote:
I talked a bit on IRC on this. And got suggested to use headers 
instead. So this might be a viable option and much much simpler! I'll 
look into it and see how it works out.


Nino Saturnino Martinez Vazquez Wael wrote:

Hi

I've been fighting a bit with making a EncodingStrategy that can 
prepend a keyword (cacheable etc) to the url depending on page state, 
however I cant get the last bits to work heres what I got so far:



ApplicationClass:
   @Override
   protected IRequestCycleProcessor newRequestCycleProcessor() {
   return new WebRequestCycleProcessor() {
   protected IRequestCodingStrategy newRequestCodingStrategy() {
   return new PrependKeywordEncodingStrategy(
   new WebRequestCodingStrategy(), cacheable);
   }
   };
   }

I've posted the prepending strategy to pastebin:

http://pastebin.ca/1173557


So the idea are basically that there should be prepended cacheable 
to all pages where the user are not logged in. That way I can set my 
apache up to cache all pages with /cacheable prefix.







--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [announce] Wicket in Action e-book has been published!

2008-08-19 Thread Thomas Singer
Maybe my message caused misunderstandings. I was not complaining *that* the 
book costs money. I just was curious why doing it the old-style 
distribution way. Finally, Galileo-Computing also needs to make money to pay 
their book authors.


Personally, I prefer reading a paper book over reading on the display (I 
haven't had the chance to read something on an e-book-reader), but having an 
always-up-to-date online-version which allows fast searching is incredible 
helpful for small problems and hence targets a different use-case. No, the 
wiki is not an adequate alternative.


And yes, I have a rough idea about how much effort writing a book takes, 
because I wrote a 100-pages diploma thesis, an article in the German Java 
Magazin and we always have to maintain our help. No question, writing a 
book in a well understandable style is hard work.


--
Cheers,
Tom


Thomas Singer wrote:
Just curious: why don't you make the full e-book available for free and 
charge only for the paper version? This works fine with the German Java 
book Java ist auch eine Insel and many others from the same publisher:


 http://www.galileocomputing.de/openbook/javainsel7/

--
Cheers,
Tom



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Nested forms

2008-08-19 Thread John Krasnay
On Mon, Aug 18, 2008 at 11:10:29PM +0200, Matej Knopp wrote:
 Can't you just override isEnabled() on the inner form and return
 true/false depending on whether the inner form should be processed?
 

Hrm, something like this I suppose?

  public boolean isEnabled() {
return findFormSubmittingButton().getForm() == this;
  }

I'll give it a try. Thanks!

jk

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wicketstuff snapshots

2008-08-19 Thread Kaspar Fischer
I guess the first error (see below) is not relevant as other projects  
have

it, too.

Regarding the second error: Does anybody have an idea why wicketstuff- 
prototype

makes the build fail?

I can see wicketstuff-prototype in the SVN repo but it is not listed on
http://wicketstuff.org/teamcity/overview.html -- is this normal?

Being a Maven newbie, I am a lost here. Maybe the problem is that the
scriptaculous-pom.xml lists the repo as

  repository
idwicket-stuff-repository/id
nameWicket-Stuff Repository/name
urlhttp://www.wicketstuff.org/maven/repository//url
  /repository

without a

  snapshots
enabledtrue/enabled
  /snapshots

? Too many trees in this forest for me ;-)

On 19.08.2008, at 13:30, Kaspar Fischer wrote:

Loggin into teamcity as guest, I see Problems with VCS connection:

 Failed for the root 'Wicket Stuff 1.4 repository' #3: Checking  
changes for checkout rule 'trunk/wicket-contrib-tinymce=trunk/ 
wicket-contrib-tinymce' failed with erorr:  
org.tmatesoft.svn.core.SVNException: svn: PROPFIND request failed on  
'/svnroot/wicket-stuff/trunk/wicket-contrib-tinymce/src/java/wicket/ 
contrib/tinymce/tiny_mce/langs/tw.js' svn: Network is unreachable


and in addition a build error:

[ERROR] BUILD ERROR
[12:26:40]: [INFO]  


[12:26:40]: [INFO] Failed to resolve artifact.
[12:26:40]:
[12:26:40]: Missing:
[12:26:40]: --
[12:26:40]: 1) org.wicketstuff:wicketstuff-prototype:jar:1.4-SNAPSHOT
[12:26:40]:
[12:26:40]: Try downloading the file manually from the project  
website.

[12:26:40]:
[12:26:40]: Then, install it using the command:
[12:26:40]: mvn install:install-file -DgroupId=org.wicketstuff - 
DartifactId=wicketstuff-prototype -Dversion=1.4-SNAPSHOT - 
Dpackaging=jar -Dfile=/path/to/file

[12:26:40]:
[12:26:40]: Alternatively, if you host your own repository you can  
deploy the file there:
[12:26:40]: mvn deploy:deploy-file -DgroupId=org.wicketstuff - 
DartifactId=wicketstuff-prototype -Dversion=1.4-SNAPSHOT - 
Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

[12:26:40]:
[12:26:40]: Path to dependency:
[12:26:40]: 1) org.wicketstuff:wicketstuff-scriptaculous:jar:1.4- 
SNAPSHOT

[12:26:40]: 2) org.wicketstuff:wicketstuff-prototype:jar:1.4-SNAPSHOT
[12:26:40]:
[12:26:40]: --
[12:26:40]: 1 required artifact is missing.
[12:26:40]:
[12:26:40]: for artifact:
[12:26:40]: org.wicketstuff:wicketstuff-scriptaculous:jar:1.4-SNAPSHOT
[12:26:40]:
[12:26:40]: from the specified remote repositories:
[12:26:40]: central (http://repo1.maven.org/maven2),
[12:26:40]: wicket-stuff-repository (http://www.wicketstuff.org/maven/repository/ 
)


Is the first error the one 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: FeedbackPanel default outputMarkupId = true

2008-08-19 Thread Ryan Sonnek

 It's kind of an established standard that by default,
 outputMarkupId is false, so in 1.3 or 1.4 I don't see it
 could be changed. Later on, if the change is made, maybe it
 would be better to change the default for all Components and
 not just FeedbackPanel.


+1 from me.  I don't see any reason to *not* output the markup id by
default.  It would make the transition to ajax-ifying your application just
a little easier.  The only thing you need to worry about is if someone tries
to use that markup id for css styling since those markup ids are subject to
change.


Re: Nested forms

2008-08-19 Thread John Krasnay
On Tue, Aug 19, 2008 at 09:15:55AM -0400, John Krasnay wrote:
 On Mon, Aug 18, 2008 at 11:10:29PM +0200, Matej Knopp wrote:
  Can't you just override isEnabled() on the inner form and return
  true/false depending on whether the inner form should be processed?
  
 
 Hrm, something like this I suppose?
 
   public boolean isEnabled() {
 return findFormSubmittingButton().getForm() == this;
   }
 
 I'll give it a try. Thanks!
 
 jk
 

It should be like this...

@Override
public boolean isEnabled() {
return getRootForm().findSubmittingButton().getForm() == this;
}

...but it works fine. I've updated the wiki with an example.

Thanks again, Matej.

jk

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: ResourceModel vs. getLocalizer

2008-08-19 Thread lesterburlap

 you can however safely construct a ResourceModel 
 (but not call getObject on it).

So, doing ResourceModel(key).getObject().getString() is really kind of
silly and defeats the whole purpose of the ResourceModel?

LBB
-- 
View this message in context: 
http://www.nabble.com/ResourceModel-vs.-getLocalizer-tp19040992p19051586.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: url when requestTarget is of type IListenerInterfaceRequestTarget

2008-08-19 Thread miro

I tried the redirect ie setRedirect(true), it still does not show the 
mountpath.


Michael Sparer wrote:
 
 Subclass form, override onSubmit, make it final, perform the redirect in
 there, offer another method to be overriden instead of onsubmit and use
 that form throughout your app
 
 
 
 miro wrote:
 
 Is there  a global configration for redirect  , ie if I want all my form
 submission to do a redirect ?
  
 
 Michael Sparer wrote:
 
 No you only mount your page once, and after e.g. a formsubmit you could
 perform a redirect to the page if you want to keep your nice url - but i
 think we had that topic before, hadn't we?
 
 
 miro wrote:
 
 do you mean that I should mount  a class several times  for all 
 different implementations of IRequestTaget ?
 like 
 
 Michael Sparer wrote:
 
 mount the page in your application class with a different
 encodingstrategy. e.g. indexedparamurlencodingstrategy which produces
 neat urls
 
 
 miro wrote:
 
 if my requestTarget is of type IListenerInterfaceRequestTarget,  
 WebRequestCodingStrategy  it calls  the method   protected
 CharSequence encode(RequestCycle requestCycle,
  IListenerInterfaceRequestTarget requestTarget) , this 
 method puts
 lot of details in url l?wicket:interface=:60 which does not makes
 sense to me. Is there any way I can  rephrase this and use the
 mounted string for this page ?  
  
 
 
 
 
 
 
 
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/url-when-requestTarget-is-of-type-IListenerInterfaceRequestTarget-tp19005159p19052822.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: 2 questions on Include

2008-08-19 Thread jWeekend

Landry,

My pleasure. Let's pass that credit on to where it's really due - the people
who provide the brains and hard work behind this framework, not to mention
all the support we all get here. 

I have yet to introduce a serious Java/OO developer to Wicket who (after
spending an appropriate amount of time to understand the fundamentals) can
help wanting to use it instead of their current Java web framework.

Regards - Cemal
http://www.jWeekend.co.uk http://jWeekend.co.uk 



landry soules wrote:
 
 Thanks a lot Cemal, you rock !
 And please don't blame me for the dumbness of my questions  ;-)
 
 Thanks again
 
 Best regards
 
 
 Landry
 
 
 
 2008/8/19 jWeekend [EMAIL PROTECTED]
 

 Landry,

 Component has a replaceComponentTagBody(markupStream, openTag, content)
 method.

 Regards - Cemal
 http://www.jWeekend.co.uk http://jWeekend.co.uk



 landry soules wrote:
 
  Thanks a lot for your answer, Cemal, my first problem is solved !
  For the second one, i can get the content, thanks to your explanation,
 but
  can't figure out how to modify it before it's displayed.
  Here is what i do :
 
  add(new Include(stat,
  http://myurl;) {
  protected void onComponentTagBody(MarkupStream
 markupStream,
  ComponentTag openTag) {
  super.onComponentTagBody(markupStream, openTag);
  String content = importAsString();
 
 logger.debug(content);
  }
  }.setEscapeModelStrings(false));
 
 
  But how can i inject my modified content back to my component ?
 
  Best regards.
 
 
  Landry
 
 
 
  2008/8/19 jWeekend [EMAIL PROTECTED]
 
 
  Landry,
 
  1 - setEscapeModelStrings(false)
  2 - Subclass Include. Override onComponentTagBody and use
  importAsString()
 
  Regards - Cemal
  http://www.jWeekend.co.uk http://jWeekend.co.uk
 
 
  landry soules wrote:
  
   Hello,
  
   In my firm, we're currently using a homegrown component-like
 framework,
   based on cgi-perl scripts calling servlets. I would like to prove my
   boss how smooth the transition towards Wicket could be.
   I'm trying to make a first step, replacing the perl scripts with
  Wicket,
   and calling the components (here servlets), with Include. But i have
 2
   problems :
  
   1/ When i call a servlet that has several parameters, for example
   add(*new**
  
  *Include(maxMin,
 http://myserver/maxminservlet?id=0001periodes=1st;1a
  ;));
   Wicket actually replaces  with amp;, as shown in the trace :
   DEBUG - UrlResourceStream  - cannot convert url:
   http://myserver/maxminservlet?id=0001amp;periodes=1st;1a; to file
 (URI
   scheme is not file), falling back to the inputstream for polling
   This alters my servlet's behaviour, is there a mean to avoid this
   substitution ?
  
   2/ Is it possible to catch the content of the include, and so
 possibly
   modify it before it is actually displayed in my Wicket page ?
  
  
   Thanks for your help
  
  
   Landry
  
  
 -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
 
  --
  View this message in context:
  http://www.nabble.com/2-questions-on-Include-tp19036146p19041450.html
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 

 --
 View this message in context:
 http://www.nabble.com/2-questions-on-Include-tp19036146p19045669.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 
 

-- 
View this message in context: 
http://www.nabble.com/2-questions-on-Include-tp19036146p19052992.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Question on resource caching

2008-08-19 Thread Boris Goldowsky
Hi,

I have some pages that reference images that are in files external to
the web application and I am serving the images via SharedResources like
so:

public class ExternalImageResource extends WebResource {
  ...
public IResourceStream getResourceStream() {
return new FileResourceStream(file);
}

Note I am never adding these as components to wicket pages -- I just
have HTML that refers to the known shared-resource URLs.

I am puzzled by the fact that if an image is updated on the file system,
the application does not seem to notice this - I get the old version of
the image until the application is shut down and restarted.  It's not
browser or network caching; shift-reload doesn't help.

Am I doing something wrong, or do I need to write my own code to check
the file system periodically for updates?

Thanks

Boris


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: ResourceModel vs. getLocalizer

2008-08-19 Thread Timo Rantalaiho
On Tue, 19 Aug 2008, Erik van Oosten wrote:
 There is a big difference, the model variant will evaluate during the
 render phase. You can not use localization in the constructor of your

Well, this

  new ResourceModel(my.resource.key).getObject().toString();

will of course evaluate right away (and thus cannot be used 
in a constructor), but as lesterburlap also came to think, 
this is a really weird use of ResourceModel :) What you say 
here

 component, you can however safely construct a ResourceModel (but not
 call getObject on it).

would be the normal way.

Best wishes,
Timo

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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Severe log: no Header Container was found but components..

2008-08-19 Thread Serkan Camurcuoglu

Hi all,
I need to change the direction of the html file to rtl if the logged in 
user's locale is arabic. I followed the method in this previous message 
http://www.nabble.com/How-can-I-switch-page-direction-(LTR-RTL)--td13747743.html#a14025235 
. It works fine, but I'm constantly getting the following log:


SEVERE: You probably forgot to add a body or header tag to your 
markup since no Header Container was

found but components where found which want to write to the head section.
link rel=stylesheet type=text/css href=../stylesheets/generic.css /
script type=text/javascript src=../javascript/util.js/script

because I have

add(HeaderContributor.forCss(stylesheets/generic.css));
add(HeaderContributor.forJavaScript(javascript/util.js));


in my page code, right after I add the html markup container. Actually 
this log does not seem to cause any error, but I really would like to 
get rid of it. Does anybody have any idea?


Best regards,

SerkanC


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Help needed - ListView.onPopulate IndexOutOfBoundsException

2008-08-19 Thread tfu

I'm using Wicket 1.3.2 and I got this weird exception.

-- source code
WebMarkupContainer result = new WebMarkupContainer(result);
result.add(new AjaxSelfUpdatingTimerBehavior(Duration.seconds(5)));
ListView view = new ListView(connections, new PropertyModel(this,
connections)){...};
result.add(view);
add(result);

-- exception

 2008-08-19 13:46:46,749 ERROR [TP-Processor3]
org.apache.wicket.RequestCycle - Error attaching this container for
rendering: [MarkupContainer [Component id = result, page =
com..rss.web.connection.ShowConnection, path =
16:panel:result.WebMarkupContainer, isVisible = true, isVersioned = false]]
 org.apache.wicket.WicketRuntimeException: Error attaching this container
for rendering: [MarkupContainer [Component id = result, page =
com..rss.web.connection.ShowConnection, path =
16:panel:result.WebMarkupContainer, isVisible = true, isVersioned = false]]
at
org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1589)
at org.apache.wicket.Component.onBeforeRender(Component.java:3673)
at
org.apache.wicket.Component.internalBeforeRender(Component.java:995)
at org.apache.wicket.Component.beforeRender(Component.java:1027)
at org.apache.wicket.Component.prepareForRender(Component.java:2151)
at
org.apache.wicket.ajax.AjaxRequestTarget.respondComponent(AjaxRequestTarget.java:698)
at
org.apache.wicket.ajax.AjaxRequestTarget.respondComponents(AjaxRequestTarget.java:605)
at
org.apache.wicket.ajax.AjaxRequestTarget.respond(AjaxRequestTarget.java:520)
at
org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:104)
at
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1172)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1243)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1330)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
at
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:358)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:194)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
at
org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)
at
org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773)
at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
at
org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.IndexOutOfBoundsException: Index: 23, Size: 23
at java.util.ArrayList.RangeCheck(ArrayList.java:547)
at java.util.ArrayList.get(ArrayList.java:322)
at
org.apache.wicket.markup.html.list.ListItemModel.getObject(ListItemModel.java:55)
at org.apache.wicket.Component.getModelObject(Component.java:1551)
at
com..rss.web.connection.ShowConnectionPanel$1.populateItem(ShowConnectionPanel.java:86)
at
org.apache.wicket.markup.html.list.ListView.onPopulate(ListView.java:573)
at
org.apache.wicket.markup.repeater.AbstractRepeater.onBeforeRender(AbstractRepeater.java:127)
at
org.apache.wicket.Component.internalBeforeRender(Component.java:995)
at org.apache.wicket.Component.beforeRender(Component.java:1027)
at
org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1577)
... 29 more


Any feedback is highly appreciated
-- 
View this message in context: 
http://www.nabble.com/Help-needed---ListView.onPopulate-IndexOutOfBoundsException-tp19058649p19058649.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Adding ClassStringResourceLoader(s)

2008-08-19 Thread lesterburlap

Hi!

I've been having a blast sorting out my String resources the last couple of
days.  Thanks for everyone's help.  I am using Wicket in an OSGI environment
with modular Blades (these are not Wicket Components).  In addition to the
root MyApplication.properties, I need to have a independent and separate
ApplicationBlade.properties for each of these modules.  In Application.init,
this is working great for me:

for (Class c : myBladeClassList)
{
   getResourceSettings().addStringResourceLoader(new
ClassStringResourceLoader(c));
}

// but then I have to do this to set MyWebApplication.properties 
// and the default ComponentStringResourceLoader
getResourceSettings()
   .addStringResourceLoader(
  new ClassStringResourceLoader(MyWebApplication.class));
getResourceSettings()
   .addStringResourceLoader(
  new ComponentStringResourceLoader());

Again, this works fine, but seems so wrong and dangerous.  

Why does the Wicket Settings class clear the stringResourceLoaders list and
set overriddenStringResourceLoaders to true when you add an
IStringResourceLoader?  This occurs at line 387 of Settings in Wicket 1.3.4.

Would it be reasonable to have an enhancement wherein there's an optional
argument indicating NOT to clear the stringResourceLoaders list?  Maybe I
don't understand the bigger picture of setting your own
StringResourceLoaders.

Thanks for any input.

Lester Burlap
-- 
View this message in context: 
http://www.nabble.com/Adding-ClassStringResourceLoader%28s%29-tp19058925p19058925.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Help needed - ListView.onPopulate IndexOutOfBoundsException

2008-08-19 Thread jWeekend

tfu,

What does your populateItem implementation (conveniently dotted out ;-) look
like? 
Are you looking for an element (with index = 23) in the ListView's backing
ArrayList that does not (no longer) exist(s). 

Regards - Cemal
http://www.jWeekend.co.uk http://jWeekend.co.uk 


tfu wrote:
 
 I'm using Wicket 1.3.2 and I got this weird exception.
 
 -- source code
 WebMarkupContainer result = new WebMarkupContainer(result);
 result.add(new
 AjaxSelfUpdatingTimerBehavior(Duration.seconds(5)));
 ListView view = new ListView(connections, new
 PropertyModel(this, connections)){...};
   result.add(view);
 add(result);
 
 -- exception
 
  2008-08-19 13:46:46,749 ERROR [TP-Processor3]
 org.apache.wicket.RequestCycle - Error attaching this container for
 rendering: [MarkupContainer [Component id = result, page =
 com..rss.web.connection.ShowConnection, path =
 16:panel:result.WebMarkupContainer, isVisible = true, isVersioned =
 false]]
  org.apache.wicket.WicketRuntimeException: Error attaching this container
 for rendering: [MarkupContainer [Component id = result, page =
 com..rss.web.connection.ShowConnection, path =
 16:panel:result.WebMarkupContainer, isVisible = true, isVersioned =
 false]]
 at
 org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1589)
 at org.apache.wicket.Component.onBeforeRender(Component.java:3673)
 at
 org.apache.wicket.Component.internalBeforeRender(Component.java:995)
 at org.apache.wicket.Component.beforeRender(Component.java:1027)
 at
 org.apache.wicket.Component.prepareForRender(Component.java:2151)
 at
 org.apache.wicket.ajax.AjaxRequestTarget.respondComponent(AjaxRequestTarget.java:698)
 at
 org.apache.wicket.ajax.AjaxRequestTarget.respondComponents(AjaxRequestTarget.java:605)
 at
 org.apache.wicket.ajax.AjaxRequestTarget.respond(AjaxRequestTarget.java:520)
 at
 org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:104)
 at
 org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1172)
 at org.apache.wicket.RequestCycle.step(RequestCycle.java:1243)
 at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1330)
 at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
 at
 org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:358)
 at
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:194)
 at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
 at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
 at
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
 at
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
 at
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
 at
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
 at
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
 at
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
 at
 org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)
 at
 org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
 at
 org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773)
 at
 org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
 at
 org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895)
 at
 org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
 at java.lang.Thread.run(Thread.java:595)
 Caused by: java.lang.IndexOutOfBoundsException: Index: 23, Size: 23
 at java.util.ArrayList.RangeCheck(ArrayList.java:547)
 at java.util.ArrayList.get(ArrayList.java:322)
 at
 org.apache.wicket.markup.html.list.ListItemModel.getObject(ListItemModel.java:55)
 at org.apache.wicket.Component.getModelObject(Component.java:1551)
 at
 com..rss.web.connection.ShowConnectionPanel$1.populateItem(ShowConnectionPanel.java:86)
 at
 org.apache.wicket.markup.html.list.ListView.onPopulate(ListView.java:573)
 at
 org.apache.wicket.markup.repeater.AbstractRepeater.onBeforeRender(AbstractRepeater.java:127)
 at
 org.apache.wicket.Component.internalBeforeRender(Component.java:995)
 at org.apache.wicket.Component.beforeRender(Component.java:1027)
 at
 org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1577)
 ... 29 more
 
 
 Any feedback is highly appreciated
 

-- 
View this message in context: 

Re: Help needed - ListView.onPopulate IndexOutOfBoundsException

2008-08-19 Thread tfu

Hi Cemal,

The populateItem method is just doing what it is supposed to do for a
ListView and nothing fancy. Moreover, my other ListViews are working just
fine. I suspect it is the AjaxSelfUpdatingTimerBehavior which is causing the
problem, but I don't know exactly the root of it and how to work around with
this problem. 

Regards,
Tony


jWeekend wrote:
 
 tfu,
 
 What does your populateItem implementation (conveniently dotted out ;-)
 look like? 
 Are you looking for an element (with index = 23) in the ListView's backing
 ArrayList that does not (no longer) exist(s). 
 
 Regards - Cemal
  http://www.jWeekend.co.uk http://jWeekend.co.uk 
 
 
 tfu wrote:
 
 I'm using Wicket 1.3.2 and I got this weird exception.
 
 -- source code
 WebMarkupContainer result = new WebMarkupContainer(result);
 result.add(new
 AjaxSelfUpdatingTimerBehavior(Duration.seconds(5)));
 ListView view = new ListView(connections, new
 PropertyModel(this, connections)){...};
  result.add(view);
 add(result);
 
 -- exception
 
  2008-08-19 13:46:46,749 ERROR [TP-Processor3]
 org.apache.wicket.RequestCycle - Error attaching this container for
 rendering: [MarkupContainer [Component id = result, page =
 com..rss.web.connection.ShowConnection, path =
 16:panel:result.WebMarkupContainer, isVisible = true, isVersioned =
 false]]
  org.apache.wicket.WicketRuntimeException: Error attaching this container
 for rendering: [MarkupContainer [Component id = result, page =
 com..rss.web.connection.ShowConnection, path =
 16:panel:result.WebMarkupContainer, isVisible = true, isVersioned =
 false]]
 at
 org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1589)
 at
 org.apache.wicket.Component.onBeforeRender(Component.java:3673)
 at
 org.apache.wicket.Component.internalBeforeRender(Component.java:995)
 at org.apache.wicket.Component.beforeRender(Component.java:1027)
 at
 org.apache.wicket.Component.prepareForRender(Component.java:2151)
 at
 org.apache.wicket.ajax.AjaxRequestTarget.respondComponent(AjaxRequestTarget.java:698)
 at
 org.apache.wicket.ajax.AjaxRequestTarget.respondComponents(AjaxRequestTarget.java:605)
 at
 org.apache.wicket.ajax.AjaxRequestTarget.respond(AjaxRequestTarget.java:520)
 at
 org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:104)
 at
 org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1172)
 at org.apache.wicket.RequestCycle.step(RequestCycle.java:1243)
 at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1330)
 at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
 at
 org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:358)
 at
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:194)
 at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
 at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
 at
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
 at
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
 at
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
 at
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
 at
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
 at
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
 at
 org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)
 at
 org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
 at
 org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773)
 at
 org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
 at
 org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895)
 at
 org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
 at java.lang.Thread.run(Thread.java:595)
 Caused by: java.lang.IndexOutOfBoundsException: Index: 23, Size: 23
 at java.util.ArrayList.RangeCheck(ArrayList.java:547)
 at java.util.ArrayList.get(ArrayList.java:322)
 at
 org.apache.wicket.markup.html.list.ListItemModel.getObject(ListItemModel.java:55)
 at
 org.apache.wicket.Component.getModelObject(Component.java:1551)
 at
 com..rss.web.connection.ShowConnectionPanel$1.populateItem(ShowConnectionPanel.java:86)
 at
 org.apache.wicket.markup.html.list.ListView.onPopulate(ListView.java:573)
 at
 org.apache.wicket.markup.repeater.AbstractRepeater.onBeforeRender(AbstractRepeater.java:127)
 at
 

Hibernate automatic dirty checking not working

2008-08-19 Thread shetc

Hi All,

I have a Wicket-based project that is using Spring  Hibernate to persist
data. I have followed the
examples set out in the Wicket in Action book. That is:

1) Use the Open Session in View pattern to get a Hibernate session per
request -- I am using the
Spring OpenSessionInViewFilter filter class and
2) Use the Spring tx:jta-transaction-manager / and tx:annotation-driven
/ tags to handle
transactions via the application server's transaction manager (in this
case, WebSphere);
methods are marked with the @Transactional where required.

Problem Scenario
a) I have a main WebPage that uses Hibernate to load an object graph. The
contents of the graph
are displayed using a list. Each item in the list includes a link.
Clicking a link causes an Adobe
PDF form to be displayed -- this is done by using a RequestTarget.
b) The user submits the Adobe PDF form. On submit, the form is posted to a
second processing WebPage.
c) The processing WebPage reloads the original object graph and modifies a
property based on
data posted from the Adobe PDF form.

The problem is that modifications to the object graph are not persisted to
the database even
though I assume Hibernate's automatic dirty checking would take care of it.

I am looking for help here as I am not sure if I have a Hibernate issue or a
Wicket/Spring one.
Any help will be gratefully received.

Thanks,
Steve

-- 
View this message in context: 
http://www.nabble.com/Hibernate-automatic-dirty-checking-not-working-tp19060207p19060207.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Help needed - ListView.onPopulate IndexOutOfBoundsException

2008-08-19 Thread tfu

Cemal,

I'm not sure where/how to force a ListView removeAll() in my case.
Overriding the Ajax timer behavior?

I agree the problem could be that the underlying model for the ListView is
changed before it is rendered completely. So, the real solution is to
prevent this from happening. Synchronization? Where? How?

Regards,
Tony



jWeekend wrote:
 
 Tony,
 
 On your ListView, try setReuseItems(true) and force a removeAll() ... Any
 different? 
 It's seems like the number of elements in your ListView's model object
 (the ArrayList mentioned in the stack trace) has changed (been reduced) by
 the time the WMC is refreshed, and then the new size no longer matches
 some stale size.
 
 Regards - Cemal
  http://www.jWeekend.co.uk http://jWeekend.co.uk 
 

-- 
View this message in context: 
http://www.nabble.com/Help-needed---ListView.onPopulate-IndexOutOfBoundsException-tp19058649p19060689.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Question on resource caching

2008-08-19 Thread Johan Compagner
Shared resources do set some cache headers. But a forced reload should
do a new get. Is the getResourceStream() method hit in such a case?

On 8/19/08, Boris Goldowsky [EMAIL PROTECTED] wrote:
 Hi,

 I have some pages that reference images that are in files external to
 the web application and I am serving the images via SharedResources like
 so:

 public class ExternalImageResource extends WebResource {
   ...
 public IResourceStream getResourceStream() {
   return new FileResourceStream(file);
 }

 Note I am never adding these as components to wicket pages -- I just
 have HTML that refers to the known shared-resource URLs.

 I am puzzled by the fact that if an image is updated on the file system,
 the application does not seem to notice this - I get the old version of
 the image until the application is shut down and restarted.  It's not
 browser or network caching; shift-reload doesn't help.

 Am I doing something wrong, or do I need to write my own code to check
 the file system periodically for updates?

 Thanks

 Boris


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Hibernate automatic dirty checking not working

2008-08-19 Thread shetc

Ignore all this -- I made a very basic error in one of my Hibernate
mappings.:blush:
-- 
View this message in context: 
http://www.nabble.com/Hibernate-automatic-dirty-checking-not-working-tp19060207p19061053.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Help needed - ListView.onPopulate IndexOutOfBoundsException

2008-08-19 Thread Timo Rantalaiho
On Tue, 19 Aug 2008, tfu wrote:
 I agree the problem could be that the underlying model for the ListView is
 changed before it is rendered completely. So, the real solution is to
 prevent this from happening. Synchronization? Where? How?

It sounds like you could be better off using a more dynamic
kind of a repeater (RefreshingView maybe?) instead of
ListView.

Best wishes,
Timo

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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reorder links in DataTable

2008-08-19 Thread Artem D.

Hi,

is there a way to implement reordering of rows in DatTable?
I'd like to add a column with moveUp,moveDown,remove having the same
behaviour as corresponging links of the ListView component.
I suppose DataTable should be set to model reusing with
setItemReuseStrategy(ReuseIfModelsEqualStrategy.getInstance()) and
DataProvider should be a simple wrapper around List object but could not
find a more or less generic way to implement ListView reordering behavior.




-- 
View this message in context: 
http://www.nabble.com/Reorder-links-in-DataTable-tp19062831p19062831.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]