WicketTester, FormTester and submit after validation failure

2007-12-01 Thread Neil Green
I'm using WicketTester with wicket 1.3.0-rc1 and I've run into some 
problems when I test form validation. I submit an invalid form and as 
expected I am returned to the same page with feedback errors. In the 
same test, I correct the error in the form and resubmit. Instead of the 
form being submitted and the result page rendered the same form page is 
rendered with the same validation error. The form is correctly submitted 
if there is no validation error on the first try.


   @Test
   public void testOne() {

   WicketTester tester = new WicketTester();
   tester.startPage(DemoPage.class);
   tester.assertRenderedPage(DemoPage.class);
   tester.assertComponent(demoForm, Form.class);
   tester.assertComponent(demoForm:name, RequiredTextField.class);

   // submit an invalid form
   FormTester form = tester.newFormTester(demoForm);
   form.submit();

   // validation should keep us on the same page
   tester.assertRenderedPage(DemoPage.class);

   // submit a valid form and we should be sent to the result page
   form = tester.newFormTester(demoForm);
   form.setValue(name, ASDF);
   form.submit();
   // this is where the failure occurs
   // we remain on DemoPage
   // the error message is Field 'name' is required.
   tester.assertRenderedPage(ResultPage.class);
   }

   @Test
   public void testTwo() {

   WicketTester tester = new WicketTester();
   tester.startPage(DemoPage.class);
   tester.assertRenderedPage(DemoPage.class);
   tester.assertComponent(demoForm, Form.class);
   tester.assertComponent(demoForm:name, RequiredTextField.class);

   // submit a valid form and we should be sent to the result page
   FormTester form = tester.newFormTester(demoForm);
   form.setValue(name, ASDF);
   form.submit();
   // this works fine
   tester.assertRenderedPage(ResultPage.class);
   }

In the code above, testTwo passes successfully but testOne fails with 
expected:ResultPage but was:DemoPage


Am I doing something wrong in my use of WicketTester?

Many thanks
Neil

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



Re: WicketTester, FormTester and submit after validation failure

2007-12-01 Thread Per Newgro
Hi Neil,

you always get the same page, unless you send it again.
I think you have to use a WebRequestCycle to achieve your goal.
See this thread
http://www.nabble.com/WicketTester---reload-page-after-model-changed-tf4691262.html#a1348

Cheers
Per

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



Re: advice about ImageSubmitButton and AjaxImageSubmitButton

2007-12-01 Thread Martijn Dashorst
You are the first one to miss them, so they are not used very often :).
They are easy enough to create yourself, -1 on adding more bloated buttons
to the core.

Martijn

On Nov 29, 2007 10:17 AM, xiefei [EMAIL PROTECTED] wrote:

 In the Button type hierachy, there are ImageButton and AjaxSubmitButton,
 but no ImageSubmitButton or AjaxImageSubmitButton found.

 These two are also very often used in practice, worth being provided as
 standard component.
 _
 Windows Live Photo gallery 数码相机的超级伴侣,轻松管理和编辑照片,还能制作全景美图!
 http://get.live.cn/product/photo.html




-- 
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.0-rc1 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-rc1/


Re: Regarding POP-UP window

2007-12-01 Thread Martijn Dashorst
What have you tried to accomplish this?
Martijn

On Nov 30, 2007 6:48 AM, Edi [EMAIL PROTECTED] wrote:


 Hello,

 I have one combo box, I have selected one combo item,

 when I click the button, the selected combo item should be displayed in
 the
 pop-up window.

 how can i do this?

 please advise.


 --
 View this message in context:
 http://www.nabble.com/Regarding-POP-UP-window-tf4901757.html#a14041182
 Sent from the Wicket - User mailing list archive at Nabble.com.


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




-- 
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.0-rc1 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-rc1/


Re: Binding application to another thred

2007-12-01 Thread Martijn Dashorst
You know that creating threads in a servlet container yourself is A Bad
Thing (tm)?
You could try to use Application.get(String key) instead of Application.get
().

Martijn

On Nov 30, 2007 11:40 AM, Vit Rozkovec [EMAIL PROTECTED] wrote:

 Good day,
 when I create new thread, what is the proper way of binding application
 to this new thread?

 Vitek


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




-- 
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.0-rc1 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-rc1/


Re: Thx everybody that attended the user group meeting in The Netherlands

2007-12-01 Thread Johan Compagner
You cant make suggestions because as usual igor wasnt there! But of
course next year apache on eu you come over ofcourse (and the wicket
meetup in thayland is still ofcourse a big option)

On 12/1/07, Igor Vaynberg [EMAIL PROTECTED] wrote:
 On Nov 30, 2007 4:38 PM, Johan Compagner [EMAIL PROTECTED] wrote:
  if you have a wicket feature request tell me! ;)

 i would like

 transparent clustering
 client side state without requirement for js
 jsf integration
 jsp integration
 maverick integration
 gwt widgets
 extjs widgets
 cms lib
 world piece
 all this done before 2008

 -igor





 
  johan
 

 -
 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: Asynchronous Ajax update of Panels, non-blocking

2007-12-01 Thread Martijn Dashorst
On Nov 30, 2007 11:56 AM, axess [EMAIL PROTECTED] wrote:

 I have a page with Panels that need some more operation time to construct
 their model, because of heavy statistics calculation and database
 operations. The Panels should render their content when they are done
 after
 some seconds, but the user shouldn't get blocked with using the Page, i.e.
 clicking on links, etc.


See LazyLoadPanel (Lazyctrl-space)


 The problem is, as I understood, Wicket only supports one request at a
 time.
 All clicks are just collected as pending, as can be seen in the Wicket
 Ajax Debug window.


Yep.


 Is there only one Ajax channel? How could I use more? If this isn't
 possible, what could be a workaround for the Panels, so that they can
 respond immediately on the request, but update the content again when they
 have done their calculations?


The problem is that the page cannot be accessed by more than one thread:
this would create serious syncronization problems, and would hinder our
programming model.

If it really takes that long to establish your models, perhaps you should
create a queue and use a polling mechanism to update the panels that are
'ready'.

Martijn

-- 
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.0-rc1 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-rc1/


Re: [RFE] HeaderContributor.forFavicon(Reference)

2007-12-01 Thread Alex Objelean

I think William is not talking about when js is executed, but how it is
included - in the bottom of the body tag.

Alex.


igor.vaynberg wrote:
 
 you can already sorta do this
 
 our iheadercontributor's iheaderresponse has
 renderOnDomReadyJavascript and renderOnLoadJavascript so you can put
 javascript that will be executed after page loads..
 
 -igor
 
 
 On Nov 30, 2007 4:29 AM, William Hoover [EMAIL PROTECTED] wrote:
 While your on the subject... shouldn't there be a forJavaScript that is
 external from the HeaderContributor that does a more intelligent
 insertion of the script farther down the dom tree to increase performance
 (http://developer.yahoo.com/performance/rules.html#js_bottom)?


 -Original Message-
 From: Johan Compagner [mailto:[EMAIL PROTECTED]
 Sent: Friday, November 30, 2007 2:35 AM
 To: users@wicket.apache.org
 Subject: Re: [RFE] HeaderContributor.forFavicon(Reference)


 I dont think there is any thing magical at the headerresponse if you
 ask me. Do remeber that when doing header responses you have to
 override that method on component anyway and then you are getting that
 headerresponse param.

 But maybe i dont see the complete picture here what you are
 describing. So how does XxxxResource.headerContribution() method look
 like? What params does it get? How does it get the right response
 object? (it has to be an implementation of (Ajax)HeaderResponse)

 Johan

 On 11/29/07, Ryan Sonnek [EMAIL PROTECTED] wrote:
  I don't quite understand this...
  Instead of having to know a ton of classes, you just have to know this
  one.
 
  I really struggled with wicket originally when trying to do these
  header contributions.  I was using the IDE and searching for
  Javascript* or CSS* and nothing relevant came up.  Instead, I had
  to dig through tutorials to find out how to do this.  IMO, it would be
  much more straightforward for users to use a static method on the
  related class instead of knowing about the magical HeaderContributor
  object...
 
  Just my two cents...
 
  -
  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]



 -
 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]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/-RFE--HeaderContributor.forFavicon%28Reference%29-tf4896178.html#a14103968
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: Thx everybody that attended the user group meeting in The Netherlands

2007-12-01 Thread Martijn Dashorst
And much more:
http://flickr.com/photos/tags/wicketmeetup

On Dec 1, 2007 2:20 AM, Johan Compagner [EMAIL PROTECTED] wrote:

 a few:

 http://flickr.com/photos/tags/wicketmeeting/

 On Dec 1, 2007 2:17 AM, Eelco Hillenius [EMAIL PROTECTED] wrote:

   On Nov 30, 2007 4:38 PM, Johan Compagner [EMAIL PROTECTED] wrote:
   The number of people that eventually really attended was really high,
  and i
   enjoyed it a lot.
  
   Special thx to Arjé for organizing it in this way, if you have a
 wicket
   feature request tell me! ;)
 
  Where are the pictures, slides and videos? :-)
 
  Eelco
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 




-- 
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.0-rc1 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-rc1/


Re: Thx everybody that attended the user group meeting in The Netherlands

2007-12-01 Thread Martijn Dashorst
Everyone needs to add the tag wicket to their uploaded photo's. This can
be done pretty quickly even in the browser...
Martijn

On Dec 1, 2007 2:24 AM, Eelco Hillenius [EMAIL PROTECTED] wrote:

 On Nov 30, 2007 5:20 PM, Johan Compagner [EMAIL PROTECTED] wrote:
  a few:
 
  http://flickr.com/photos/tags/wicketmeeting/

 Nice. Any way we can add those to the group I recently created? See
 http://flickr.com/groups/wicket/

 Eelco

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




-- 
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.0-rc1 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-rc1/


Re: WicketTester, FormTester and submit after validation failure

2007-12-01 Thread Neil Green

Per Newgro wrote:

you always get the same page, unless you send it again.
I think you have to use a WebRequestCycle to achieve your goal.
See this thread
http://www.nabble.com/WicketTester---reload-page-after-model-changed-tf4691262.html#a1348
  


Thanks for your response. I think I've found the problem: 
session.cleanupFeedbackMessages() is not being called in the test 
context as RequestCycle#automaticallyClearFeedbackMessages is set to 
false. Perhaps the call to cleanupFeedbackMessages should be in 
FormTester#submit().


To fix the problem I added 
tester.getWicketSession().cleanupFeedbackMessages() to my test method 
after asserting on the messages.


Kind regards
Neil



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



Re: WicketTester, FormTester and submit after validation failure

2007-12-01 Thread Per Newgro
Hi Neil,

but isn't this cheating? Hmm. I never saw the FeedbackMessageClearing.
I always assumed that my test has to simulate the browser behavior. So i used 
the request cycle. If you get an error prone page (with messages) the browser 
will not reset the messages simply, or? If i'm not completely wrong you will 
stay on the page if you get errors. So you have to assign valid values to 
form components and send the page again. Then the appropriate attributes 
(error messages and so on) have to be reseted by the framework. If you do it 
manually it isn't testing as expected or?

Don't hit me if i'm wrong. Maybe i'm on the wooden way.

Cheers
Per

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



Re: Gzip filter and resource problem

2007-12-01 Thread Matej Knopp
Check the response headers.

-Matej

On Dec 1, 2007 12:08 PM, Artur W. [EMAIL PROTECTED] wrote:

 Hi!


 Matej Knopp-2 wrote:
 
  Yes. Your filter should check if the resource is already compressed.
  Wicket compress javascripts and css files already. Your filter
  probably compresses it again.
 
 
 You are right! But how can I check it?

 I thought that better idea than compress it be myself is to force wicket to
 compress everything not only resources? Is is possible?


 Thanks,
 Artur

 --
 View this message in context: 
 http://www.nabble.com/Gzip-filter-and-resource-problem-tf4914410.html#a14104145

 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 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: Serialized pages location on the disk ?

2007-12-01 Thread Matej Knopp
On Dec 1, 2007 3:39 AM, mfs [EMAIL PROTECTED] wrote:

 I see..what about SimpleSynchronousFilePageStore, doesnt this solve the
 problem ?  i remember johan about it being an alternative (other than using
 an httpsessionstore as per 1.2) in clustered-env/shared disk scenario...

SimpleSynchronouseFilePageStore is not meant to be used in production
environment. It's too slow. The clustered DiskPageStore could be done
by the end of december.

-Matej


 Also the replication DiskPageStore you're talking about, when approx is that
 planned to be out ? can u give me an idea..?

 Farhan.



 Matej Knopp-2 wrote:
 
  Sorry, that will not work anyway. The files stored on disk are not
  self-contained. The index required to interpret the files is stored in
  memory and is specific for each node. The DiskPageStore at this point
  doesn't support session replication (thus no back button for
  replicated session). However, a support for replicated DiskPageStore
  is planned soon after 1.3 is out.
 
  -Matej
 
  On Nov 30, 2007 7:32 PM, mfs [EMAIL PROTECTED] wrote:
 
  Since i want to give a centralized disk-store for all the clustered
  nodes.
 
  As for the file-param constructor, i think it would certainly be helpful.
 
  Farhan.
 
 
 
 
  Johan Compagner wrote:
  
   First why do you want to change the default file location?
  
   Also i thing we should improve the javadoc a bit so that the defaults
   are mentioned and i am thinking here to add a File param only
   constructor so that you can change the location easier without knowing
   the rest of those defaults
  
   On 11/29/07, mfs [EMAIL PROTECTED] wrote:
  
   Thanks, btw as of now what is the default value set for the remaining
   three
   fields..maxSizePerPageMap,maxSizePerSession and
  fileChannelPoolCapacity ?
  
   Farhan.
  
   Eelco Hillenius wrote:
   
 Use the different constructor your self:
   
*public* DiskPageStore(File fileStoreFolder, *int*
  maxSizePerPagemap,
*int*maxSizePerSession,
*int* fileChannelPoolCapacity)
   
I don't know how I missed that constructor. Looked with my butt it
   seems.
   
Eelco
   
   
  -
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   
   
   
  
   --
   View this message in context:
  
  http://www.nabble.com/Serialized-pages-location-on-the-disk---tf4895129.html#a14031923
   Sent from the Wicket - User mailing list archive at Nabble.com.
  
  
   -
   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]
  
  
  
 
  --
  View this message in context:
  http://www.nabble.com/Serialized-pages-location-on-the-disk---tf4895129.html#a14087791
 
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
  -
  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]
 
 
 

 --
 View this message in context: 
 http://www.nabble.com/Serialized-pages-location-on-the-disk---tf4895129.html#a14101527

 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 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: WicketTester, FormTester and submit after validation failure

2007-12-01 Thread Neil Green

Per Newgro wrote:

but isn't this cheating? Hmm. I never saw the FeedbackMessageClearing.
I always assumed that my test has to simulate the browser behavior. So i used 
the request cycle. If you get an error prone page (with messages) the browser 
will not reset the messages simply, or? If i'm not completely wrong you will 
stay on the page if you get errors. So you have to assign valid values to 
form components and send the page again. Then the appropriate attributes 
(error messages and so on) have to be reseted by the framework. If you do it 
manually it isn't testing as expected or?
  
I don't think I'm cheating. I think it's some cheating causing the 
problem: it seems to be caused by the method


   public void setAutomaticallyClearFeedbackMessages(boolean 
automaticallyClearFeedbackMessages)

   {
   // FIXME This method is a quick fix for a unit testing problem that
   // should not exist
   this.automaticallyClearFeedbackMessages = 
automaticallyClearFeedbackMessages;

   }


in RequestCycle. I haven't examined the source in detail (yet), but I 
assume that is there so that the error messages are available in the 
tester for assertions, i.e. in a normal runtime the messages are cleared 
after the page is rendered but they are not cleared in testing.


Kind regards
Neil

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



Re: Gzip filter and resource problem

2007-12-01 Thread Artur W.

Hi!


Matej Knopp-2 wrote:
 
 Yes. Your filter should check if the resource is already compressed.
 Wicket compress javascripts and css files already. Your filter
 probably compresses it again.
 
 
You are right! But how can I check it?

I thought that better idea than compress it be myself is to force wicket to
compress everything not only resources? Is is possible?


Thanks,
Artur

-- 
View this message in context: 
http://www.nabble.com/Gzip-filter-and-resource-problem-tf4914410.html#a14104145
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: WicketTester, FormTester and submit after validation failure

2007-12-01 Thread Per Newgro
PlinkPlink. The coin has reached the bottom. Then it makes sense. I have to 
check my testcases for this behavior.

Thanks
Per

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



Dynamic Page Redirection

2007-12-01 Thread Franklin Antony

Dear All,
   I have three pages. Page A,Page B,Page C. The use case is as follows

When I click the onSubmit of Page A(has a form) I setResponse to Page B.
Page B already has forms and buttons and many other components in it. Now on
Page B i want to dynamically redirect to Page C under certain situations. To
make the whole story short, I want to bypass Page B(it shouldnt render) and
go to Page C.

I tried out RequestCyle.redirectTo and also call setResponsePage but didnt
work. Could someone please help?

Thanks,
Franklin.
-- 
View this message in context: 
http://www.nabble.com/Dynamic-Page-Redirection-tf4928005.html#a14104658
Sent from the Wicket - User mailing list archive at Nabble.com.


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



[offtop] need help with eclipse and m2eclipse

2007-12-01 Thread Oleg Taranenko




Helloall,

Sorry for bothering, may be somebody could help. I'm developing web apps under Eclipse. Early I'm using the mvn eclipse:eclipse + jetty launcher plugn. Now i try to use m2eclipse plugin and webapp is started using m2's goal mvn jetty:run. The application works, but when I want to trace through the wicket core code (in wicket.jar) the debug window shows (for example):

Source not found for WebRequestCycle(RequestCycle).steps() line: 1248

I see Eclipse log:
!ENTRY org.eclipse.debug.ui 4 0 2007-11-30 23:47:48.546
!MESSAGE Problem detected with part org.eclipse.debug.ui.NoSourceFoundEditor (class = org.eclipse.debug.internal.ui.views.launch.SourceNotFoundEditor): Editor is not firing a PROP_INPUT event in response to IReusableEditor.setInput(...)
!SESSION 2007-12-01 07:39:24.265 ---
eclipse.buildId=M20071023-1652
java.version=1.6.0_03
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=ru_RU
Command-line arguments: -os win32 -ws win32 -arch x86 -clean


This is very strange, while if i walking the tree in project explorer, i can see the java code as usually.
Could anyhas the same effects? Should I ask a m2 commutity?

Eclipse SDK
Version: 3.3.1.1
Build id: I20070503-1400
Java 1.6.0.3

m2 version 0.0.12.20071107-2300

Thanks for any tips.

--
Bestregards,
Oleg




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



Re: [offtop] need help with eclipse and m2eclipse

2007-12-01 Thread Martijn Dashorst
You don't need the jetty launcher plugin, in fact I'd recommend using the
embedded jetty starter we provide with the quickstarts.
Right click the start class, select debug as application and go...

Also the mvn jetty:run plugin is not really useful for development in my
opinion. It is a nice maven plugin to quickly run a project from source, but
as a development option I find it cumbersome.

Martijn


On Dec 1, 2007 3:32 PM, Oleg Taranenko [EMAIL PROTECTED] wrote:

  Hello all,


 Sorry for bothering, may be somebody could help. I'm developing web apps
 under Eclipse. Early I'm using the mvn eclipse:eclipse + jetty launcher
 plugn. Now i try to use m2eclipse plugin and webapp is started using m2's
 goal mvn jetty:run. The application works, but when I want to trace through
 the wicket core code (in wicket.jar) the debug window shows (for example):


 Source not found for WebRequestCycle(RequestCycle).steps() line: 1248


 I see Eclipse log:

 !ENTRY org.eclipse.debug.ui 4 0 2007-11-30 23:47:48.546

 !MESSAGE Problem detected with part
 org.eclipse.debug.ui.NoSourceFoundEditor (class =
 org.eclipse.debug.internal.ui.views.launch.SourceNotFoundEditor): Editor
 is not firing a PROP_INPUT event in response to IReusableEditor.setInput
 (...)

 !SESSION 2007-12-01 
 07:39:24.265---

 eclipse.buildId=M20071023-1652

 java.version=1.6.0_03

 java.vendor=Sun Microsystems Inc.

 BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=ru_RU

 Command-line arguments:  -os win32 -ws win32 -arch x86 -clean



 This is very strange, while if i walking the tree in project explorer, i
 can see the java code as usually.

 Could any has the same effects? Should I ask a m2 commutity?


 Eclipse SDK

 Version: 3.3.1.1

 Build id: I20070503-1400

 Java 1.6.0.3


 m2 version 0.0.12.20071107-2300


 Thanks for any tips.


 --

 Best regards,

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




-- 
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.0-rc1 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-rc1/


Re: Dynamic Page Redirection

2007-12-01 Thread Franklin Antony

Thanks.
Perfect and working fine.


Regards,
Franklin.



Franklin Antony wrote:
 
 Dear All,
I have three pages. Page A,Page B,Page C. The use case is as follows
 
 When I click the onSubmit of Page A(has a form) I setResponse to Page B.
 Page B already has forms and buttons and many other components in it. Now
 on Page B i want to dynamically redirect to Page C under certain
 situations. To make the whole story short, I want to bypass Page B(it
 shouldnt render) and go to Page C.
 
 I tried out RequestCyle.redirectTo and also call setResponsePage but didnt
 work. Could someone please help?
 
 Thanks,
 Franklin.
 

-- 
View this message in context: 
http://www.nabble.com/Dynamic-Page-Redirection-tf4928005.html#a14105934
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]: [offtop] need help with eclipse and m2eclipse

2007-12-01 Thread Oleg Taranenko




Hello Martijn,

Jetty launcher has some advantages though, i.e. it allows to set up different context path/port for the projects without changing source code. Thus i can simultaneously run and debug its. If not this annoying bug, i found development with m2eclipse more convenient. I hope the m2 community will resolve this.

Anyway thank you for answer.

Cheers, Oleg.


Youdon'tneedthejettylauncherplugin,infactI'drecommendusingthe
embeddedjettystarterweprovidewiththequickstarts.
Rightclickthestartclass,selectdebugasapplicationandgo...

Alsothemvnjetty:runpluginisnotreallyusefulfordevelopmentinmy
opinion.Itisanicemavenplugintoquicklyrunaprojectfromsource,but
asadevelopmentoptionIfinditcumbersome.

Martijn


OnDec1,20073:32PM,OlegTaranenko[EMAIL PROTECTED]wrote:

Helloall,


Sorryforbothering,maybesomebodycouldhelp.I'mdevelopingwebapps
underEclipse.EarlyI'musingthemvneclipse:eclipse+jettylauncher
plugn.Nowitrytousem2eclipsepluginandwebappisstartedusingm2's
goalmvnjetty:run.Theapplicationworks,butwhenIwanttotracethrough
thewicketcorecode(inwicket.jar)thedebugwindowshows(forexample):


SourcenotfoundforWebRequestCycle(RequestCycle).steps()line:1248


IseeEclipselog:

!ENTRYorg.eclipse.debug.ui402007-11-3023:47:48.546

!MESSAGEProblemdetectedwithpart
org.eclipse.debug.ui.NoSourceFoundEditor(class=
org.eclipse.debug.internal.ui.views.launch.SourceNotFoundEditor):Editor
isnotfiringaPROP_INPUTeventinresponsetoIReusableEditor.setInput
(...)

!SESSION2007-12-01
07:39:24.265---

eclipse.buildId=M20071023-1652

java.version=1.6.0_03

java.vendor=SunMicrosystemsInc.

BootLoaderconstants:OS=win32,ARCH=x86,WS=win32,NL=ru_RU

Command-linearguments:-oswin32-wswin32-archx86-clean



Thisisverystrange,whileifiwalkingthetreeinprojectexplorer,i
canseethejavacodeasusually.

Couldanyhasthesameeffects?ShouldIaskam2commutity?


EclipseSDK

Version:3.3.1.1

Buildid:I20070503-1400

Java1.6.0.3


m2version0.0.12.20071107-2300


Thanksforanytips.


--

Bestregards,

Oleg

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








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



Re: adding wicket palette buttons

2007-12-01 Thread Igor Vaynberg
add an rfe into jira

-igor


On Dec 1, 2007 11:06 AM, Jason Anderson [EMAIL PROTECTED] wrote:
 roger,

 ill take a look and see what i can come up with

 think it would be possible to add this to the default palette markup?
 generally in most desktop type apps i've ever seen this with this
 style of data manipulation these buttons were present


 On Dec 1, 2007 10:15 AM, Igor Vaynberg [EMAIL PROTECTED] wrote:
  subclass the palette and add the buttons into markup.afaik these dont
  need to be on serverside because they are pure js buttons.
 
  -igor
 
 
 
  On Dec 1, 2007 8:53 AM, Jason Anderson [EMAIL PROTECTED] wrote:
   Hi All,
  
   What would be the proper way to add a pair of add all / remove all
   buttons to a wicket palette component?
  
   Thanks,
   Jason
  
   -
   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]
 
 

 -
 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: cannot render a menubar using menu2 package

2007-12-01 Thread Doug Leeper

Rik,

Here is what I have done to utilize the MenuBar.  (Unfortunatley...this is
not available to the public so I can't direct you to a public URL)

In foo.html:

link rel=stylesheet type=text/css href=/member/css/topNavMenu.css /

Menu Bar


In my foo.java:

YuiMenuBar menuBar = new YuiMenuBar( menuBar, topNavMenuBar );

menuBar.addMenu( new PageAction( new Model(Home), MemberHome.class ));

etc.

In my topNavMenu.css:

.topNavMenuBar .yuimenubar {
  text-decoration: none;
  color: #FF;
  background: #3C76B2;
  font: 12px Arial,Helvetica,sans-serif;
  padding:1px;
}

.topNavMenuBar .yuimenubaritem a.selected {
  background: #4D99E6;
}

.topNavMenuBar .yuimenu .yuimenubaritem a.selected {
  background: #3C76B2;
}

.topNavMenuBar .yuimenu {
  text-decoration: none;
  color: #FF;
  background: #4D99E6;
  font: 12px Arial,Helvetica,sans-serif;
  padding:1px;
}

.topNavMenuBar .yuimenubaritem {
  text-decoration: none;
  color: #FF;
  background: #3C76B2;
  font: 12px Arial,Helvetica,sans-serif;
  padding:1px;
}

.topNavMenuBar .yuimenubaritemlabel {
  padding-right: 14px;
  padding-left: 14px;
}

.topNavMenuBar .yuimenuitemlabel  {
  padding-right: 12px;
  padding-left: 12px;
}

.topNavMenuBar .yuimenu ul {
  padding-top: 5px;
  padding-bottom: 5px;
}

.topNavMenuBar .yuimenubar li a {
  zoom:1;
  color: #FF;
  text-decoration:none;
}
.topNavMenuBar .yuimenu li.yuimenuitem {
  color: #FF;
}
.topNavMenuBar .yuimenu li.selected a.selected,
  .yuimenubar li.selected a.selected{
  background: #3C76B2;
}


As you can see, I did not add any YUI menu files directly in the HTML.  I
let the framework add the needed YUI files.  The only specific menu file was
the css to adjust to my sites look/feel.

Let me know if you have any other problems.

- Doug


-- 
View this message in context: 
http://www.nabble.com/wicket-success-stories-tf4877640.html#a14109176
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: Gzip filter and resource problem

2007-12-01 Thread Artur W.



Matej Knopp-2 wrote:
 
 Check the response headers.
 

Sorry for the stupid question but how can i do that?

There is no getHeader method in the HttpServletResponse.


Thanks,
Artur

-- 
View this message in context: 
http://www.nabble.com/Gzip-filter-and-resource-problem-tf4914410.html#a14109779
Sent from the Wicket - User mailing list archive at Nabble.com.


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



[ANN] Wicket Web Beans 1.0-rc2 Released

2007-12-01 Thread Dan Syrstad
Wicket Web Beans 1.0-rc2 has been released. Wicket Web Beans (WWB) is an
Apache Wicket component toolkit for displaying and editing POJOs that
conform to the JavaBeans specification. Web pages are automatically
generated based on bean properties and certain conventions. If necessary,
the layout, editability, and actions of these pages can be customized on an
exception basis. In other words, the toolkit normally does what you'd
expect, but when it doesn't, you can override its behavior.

Major inclusions in this release are a Java metadata API, annotations, and
18+ new features. Support for Wicket 1.3.0-rc1 was also added.

Enjoy!
-Dan

---

Version: wicketwebbeans-1.0-rc2

The SVN trunk now supports Wicket 1.3.0-rc1. There is also a
wicket-1.2.6 branch that
supports the current Wicket release.

Most significant in this version is the introduction of a Java-based metadata
API and annotations that can be used in place of, or in addition to,
beanprops. In all,
18 new features were introduced in this release. You'll want to take a
look at the
latest Getting Started doc at http://wicketwebbeans.sourceforge.net to see the
new features.

In addition, a snapshot release of support for Databinder
(http://databinder.net) is
available.

Feature Requests

[1794729] Add Java API as alternative to beanprops
Annotations can now be placed in multiple places: on the Page component, the
bean, and/or a metadata class. You also always have the ability to use
different WWB contexts to implement different layouts with either beanprops
or annotations. Also, a straight Java API based on the annotation
interfaces was added.
In the model.api package there is JBeans, JBean, ... See the doc
for more info.

[1838268]  Rename packages
Rename packages from wicket.contrib.webbeans to
net.sourceforge.wicketwebbeans

[1809050] Maven Integration
Maven is now used for builds. Release builds are in the Maven
central repository under
net.sourceforge.wicketwebbeans. Snapshot builds are available from
the repository located
at: http://wicketwebbeans.sourceforge.net/snapshotRepository

[1796306] Support AbstractDetachableModel in place of bean
Actually any type of IModel is now optionally supported in place
of a bean in the
constructor to BeanForm and BeanGridPanel. Models containing
Serializable or Non-Serializable beans can
be attached and detached by Wicket. Even after detach()/attach(), BeanForm
will remain a PropertyChangeListener of the model's bean.

[1833724] Allow bean and tab labels to be resolved from properties
Similar to how property labels are derived from properties files,
allow bean and
tab labels to be derived from there too.

For beans, the property key would be:

{SimpleBeanName}.label = ...

For tabs, the property key would be:

{SimpleBeanName}.tab.{tabId}.label = ...
tab.{tabId}.label = ...

[1826995] Mark required fields
Visually mark fields that have the required parameter set true.
bean.css also contains
an example of how to mark the fields.

[1817052] Create a Vertical Layout container
VerticalLayoutBeanPanel is another layout that can be used in
BeanForm in place of
BeanGridPanel. This layout places labels on the left and fields on
the right in a vertical fashion. The labels and fields should form columns
that are evenly aligned.

[1807122] Support multiple parameter values on a custom parameter
Multi-valued parameters are now supported on beans and elements in
beanprops and annotations. This is primarily for custom parameters that
need multiple values.

[1806424] Use Set as well as List
Display and Sorting of any kind of java.util.Collection is supported.

[1803004] Add support for IDataProvider, ISortStateLocator
Enable BeanTablePanel and BeanDataTable in particular for IDataProvider
(for table rows) and ISortStateLocator (for sorting).
IDataProvider would be more
efficient than a List based model as the model data can be
detached as part of the RequestCycle.

[1799074] Allow customization of DateTimeField format
Allows date format to be set for DateTimeField via a format
parameter. If not set there, the
format is derived from
DateTimeField.{date|time|datetime|datetimetz}.format in Page's
localizer.

[1798465] Use JPA/Hibernate and JDO annotations
JDO and JPA @Column attributes are supported JDO Support:
@javax.jdo.annotations.Column:
  -length - maximum length for Strings
  -allowsNull - if false, field is required, else it's not.
  -defaultValue - if non-null, the field will default to this value.

Additional Note JPA @Column is @javax.persistence.Column.

For annotations to be detected, they annotation classes MUST be in the
classpath.

JPA Support:

@Column(
  -length (for Strings)
  -nullable - equates to required true/false
  - if insertable and updatable are both false, property is viewOnly
)

 

Re: Thx everybody that attended the user group meeting in The Netherlands

2007-12-01 Thread Eelco Hillenius
 I loved the talks and enjoyed talking to all of you!

 Until next year!

If it would be around ApacheCon next year (April), I'd have an extra
reason to fly over, and others maybe an extra reason to go to
ApacheCon!

Eelco

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



Re: getObject() still called for Models in a wicket:enclosure when the content of the enclosure is not rendered?

2007-12-01 Thread Eelco Hillenius
That is very strange. It shouldn't be called, as the model object is
only requested when a component that is rendering requests it. Are you
really sure? Can you create a test case for this, or a quickstart
project that shows the problem and attach it to a JIRA issue please?

Eelco

On Nov 29, 2007 1:22 PM, Edvin Syse [EMAIL PROTECTED] wrote:
 I'm wondering if this is expected behaviour:

 Create a wicket:enclosure element around to Labels, and let one of them be 
 the child= referenced in the enclosure tag. Let that Label
 return false on isVisible(). Even though the other Label isn't rendered, the 
 getObject() method of it's model is still called. Do I need to
 override isVisible() on all components inside an enclosure to avoid this, or 
 am I missing something?

 Markup:

 wicket:enclosure child=label1
 span wicket:id=label1Label 1/span
 span wicket:id=label2Label 2/span
 /wicket:enclosure


 Java:

 add(new Label(label1) {
 @Override
 public boolean isVisible() {
 return false;
 }
 });

 add(new Label(label2, new Model() {
 @Override
 public Object getObject() {
 System.out.println(Getting object of model 2);
 return MODEL2 OBJECT;
 }

 }));

 Everytime the page is loaded, I get the output to stdout from the getObject() 
 method of label2. If I add a isVisible() to label2 which
 returns false, everything is ofcourse dandy.

 Sincerely,
 Edvin Syse

 -
 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: Gzip filter and resource problem

2007-12-01 Thread Matej Knopp
use httpservletresponsewrapper and intercept setHeader.

-Matej

On Dec 1, 2007 10:47 PM, Artur W. [EMAIL PROTECTED] wrote:



 Matej Knopp-2 wrote:
 
  Check the response headers.
 

 Sorry for the stupid question but how can i do that?

 There is no getHeader method in the HttpServletResponse.


 Thanks,
 Artur

 --
 View this message in context: 
 http://www.nabble.com/Gzip-filter-and-resource-problem-tf4914410.html#a14109779

 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 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]