Re: How to NOT cause a hot redeploy with Jetty when HTML files change

2007-10-05 Thread Martijn Dashorst
I think most developers have given up on using the eclipse jetty
plugin, and use an embedded container instead. That one doesn't
hot-deploy (or at least not in our configurations). To get changes in
classes we run the application in the eclipse debugger. See [1] for a
starter class.

If you want structural changes happening automatically, then you can
try using the reloading filter (search the list for that one).

Martijn

[1] 
http://svn.apache.org/repos/asf/wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/src/test/java/Start.java

On 10/5/07, Jason Mihalick [EMAIL PROTECTED] wrote:

 I have been successfully developing a Wicket application with Eclipse, Maven,
 and the Maven Jetty plugin with hot redeploy enabled.  However, I don't want
 Jetty to do a hot redeploy of the application when I make a change to my
 HTML files.  I assume that Wicket will pick up these changes automatically
 when running in Development mode, so there should be no need to reload the
 whole app.

 I have both Eclipse and Maven compiling classes to the same directory
 (target/classes) so that when I make a change to a class in eclipse, Jetty
 picks up the change and does a hot redeploy.  This is a good thing. Since my
 HTML files are located along side my classes, my HTML files are also
 automatically copied by eclipse into my target/classes dir structure.  This
 should be a good thing too, but read on...

 The problem is that whenever an HTML file changes and eclipse copies it to
 my target/classes dir, jetty picks this up and reploys the application.
 I've tried adding a ScanTargetPatterns section to my jetty plugin
 configuration, but it doesn't work.  Here is what I added:

   scanTargetPatterns
 scanTargetPattern
   directorytarget/classes/directory
   excludes
 exclude**/*.html/exclude
   /excludes
 /scanTargetPattern
   /scanTargetPatterns

 Has anyone else got this to work, and if so, how?  Your help is much
 appreciated.

 --
 Jason
 --
 View this message in context: 
 http://www.nabble.com/How-to-NOT-cause-a-hot-redeploy-with-Jetty-when-HTML-files-change-tf4571849.html#a13049928
 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-beta3 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta3/

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



Re: How to NOT cause a hot redeploy with Jetty when HTML files change

2007-10-05 Thread Eelco Hillenius
 I think most developers have given up on using the eclipse jetty
 plugin, and use an embedded container instead.

Jason uses the Maven Eclipse plugin, which is a completely different
bird, and which actually is used by quite a few developers from what I
hear.

Eelco

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



Re: Adding to response header (filename)?

2007-10-05 Thread Eelco Hillenius
What do you use for the export? You probably should use a resource.
For instance:

public class DiscountsExport extends WebResource {

  public static class Initializer implements IInitializer {

public void init(Application application) {
  SharedResources res = application.getSharedResources();
  res.add(discounts, new DiscountsExport());
}
  }

  public DiscountsExport() {

setCacheable(false);
  }

  @Override
  public IResourceStream getResourceStream() {
CharSequence discounts = DataBase.getInstance().exportDiscounts();
return new StringResourceStream(discounts, text/plain);
  }

  @Override
  protected void setHeaders(WebResponse response) {
super.setHeaders(response);
response.setAttachmentHeader(discounts.csv);
  }
}


Eelco

On 10/4/07, Stanczak Group [EMAIL PROTECTED] wrote:
 This works:

 getWebRequestCycle().getWebResponse().setContentType(text/csv);

 getWebRequestCycle().getWebResponse().setHeader(Content-Disposition,
 attachment;filename=\export_ +
 formatFile.format(Calendar.getInstance().getTime()) + .csv\);
 OutputStream cout =
 getWebRequestCycle().getWebResponse().getOutputStream();
 cout.write(out.toString().getBytes());
 cout.flush();
 cout.close();

 But I get this in the logs. How can I do this better?

 16:31:45,391 ERROR WebResponse:190 - Unable to redirect to:
 ?wicket:interface=:2, HTTP Response has already been committed.


 Stanczak Group wrote:
  This maybe? Should I be using getWebRequestCycle().getWebResponse()
  instead of getResponse().?
  getWebRequestCycle().getWebResponse().setHeader()
 
  Stanczak Group wrote:
  How can I do this in Wicket? I'm writing a csv generated file to the
  output, but I don't know how to tell the client what file name to
  use. This is what I was using before, is there another way?
 
  getResponse().setHeader(Content-Disposition,
  attachment;filename=\export_ +
  formatFile.format(Calendar.getInstance().getTime()) + .csv\);
 
  Code##
 
 getResponse().setContentType(text/csv);
 
  getResponse().setHeader(Content-Disposition,
  attachment;filename=\export_ +
  formatFile.format(Calendar.getInstance().getTime()) + .csv\);
 OutputStream cout =
  getResponse().getOutputStream();
 cout.write(out.toString().getBytes());
 cout.flush();
 cout.close();
 
 

 --
 Justin Stanczak
 Stanczak Group
 812-735-3600

 All that is necessary for the triumph of evil is that good men do nothing.
 Edmund Burke


 -
 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: Adding to response header (filename)?

2007-10-05 Thread Eelco Hillenius
On 10/5/07, Eelco Hillenius [EMAIL PROTECTED] wrote:
 What do you use for the export? You probably should use a resource.
 For instance:

 public class DiscountsExport extends WebResource {

   public static class Initializer implements IInitializer {

 public void init(Application application) {
   SharedResources res = application.getSharedResources();
   res.add(discounts, new DiscountsExport());
 }
   }

   public DiscountsExport() {

 setCacheable(false);
   }

   @Override
   public IResourceStream getResourceStream() {
 CharSequence discounts = DataBase.getInstance().exportDiscounts();
 return new StringResourceStream(discounts, text/plain);
   }

   @Override
   protected void setHeaders(WebResponse response) {
 super.setHeaders(response);
 response.setAttachmentHeader(discounts.csv);
   }
 }


Sorry, this might be easier to understand:

WebResource export = new WebResource() {

  @Override
  public IResourceStream getResourceStream() {
CharSequence discounts = DataBase.getInstance()
.exportDiscounts();
return new StringResourceStream(discounts, text/csv);
  }

  @Override
  protected void setHeaders(WebResponse response) {
super.setHeaders(response);
response.setAttachmentHeader(discounts.csv);
  }
};
export.setCacheable(false);

add(new ResourceLink(exportLink, export));


Eelco

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



RE: Wicket Meetup Amsterdam: a proposal

2007-10-05 Thread Maeder Thomas
Just and idea

I used to work on Eclipse, and one cool thing (in my opinion) we did at
conferences were the so called plugin clinics. Basically, there would
be a couple of commiters on hand in some conference room for about 2
hours in the evening and you could bring your sick plugin and we would
help you with whatever trouble you had. It was fun for the committers
because you could see what people were doing with your stuff and it was
great for the plugin developers because you could get great advice for
your concrete problems straight from the horses mouth. 

Thomas

 -Original Message-
 From: Erik van Oosten [mailto:[EMAIL PROTECTED] 
 Sent: Freitag, 5. Oktober 2007 00:46
 To: users@wicket.apache.org
 Subject: Re: Wicket Meetup Amsterdam: a proposal
 
 Excellent! That is only 4 blocks from where I work :)
 
 Also, all those dates are fine by me.
 
 Just an opinion: I do not expect any presentations; just a 
 get together for a couple of hours is nice.
 
  Erik.
 

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



hot redeploy of java classes

2007-10-05 Thread Artur W.

Hi!

I know that Wicket in development mode does hot redeploy of html templates.
Is it possible to configure it to does a hot redeploy of java classes too?
It would boost the development time!!

Thanks,
Artur

-- 
View this message in context: 
http://www.nabble.com/hot-redeploy-of-java-classes-tf4573767.html#a13055319
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: Wicket Meetup Amsterdam: a proposal

2007-10-05 Thread Maurice Marrink
I Like that idea, especially for all those wicket stuff projects out there.
If anyone has any questions / problems about / with wasp or swarm they
can not / will not ask on the mailing list, they are free to ask me on
the conference and I'll do my best assist them. If they bring there
projects with them it will be even easier to do so.

Maurice


On 10/5/07, Maeder Thomas [EMAIL PROTECTED] wrote:
 Just and idea

 I used to work on Eclipse, and one cool thing (in my opinion) we did at
 conferences were the so called plugin clinics. Basically, there would
 be a couple of commiters on hand in some conference room for about 2
 hours in the evening and you could bring your sick plugin and we would
 help you with whatever trouble you had. It was fun for the committers
 because you could see what people were doing with your stuff and it was
 great for the plugin developers because you could get great advice for
 your concrete problems straight from the horses mouth.

 Thomas

  -Original Message-
  From: Erik van Oosten [mailto:[EMAIL PROTECTED]
  Sent: Freitag, 5. Oktober 2007 00:46
  To: users@wicket.apache.org
  Subject: Re: Wicket Meetup Amsterdam: a proposal
 
  Excellent! That is only 4 blocks from where I work :)
 
  Also, all those dates are fine by me.
 
  Just an opinion: I do not expect any presentations; just a
  get together for a couple of hours is nice.
 
   Erik.
 

 -
 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: hot redeploy of java classes

2007-10-05 Thread Maurice Marrink
Hot reloading of classes is already supported in the jvm. it just
requires a debug connection if i understand it all correctly. for
instance we use the sysdeo tomcat plugin in eclipse which starts
tomcat in debug mode every time we change some code tomcat
automatically uses the new class. Well up till a certain point some
changes cannot be hot swapped. I think the same is true for jetty if
you run it in debug mode.

Maurice

On 10/5/07, Artur W. [EMAIL PROTECTED] wrote:

 Hi!

 I know that Wicket in development mode does hot redeploy of html templates.
 Is it possible to configure it to does a hot redeploy of java classes too?
 It would boost the development time!!

 Thanks,
 Artur

 --
 View this message in context: 
 http://www.nabble.com/hot-redeploy-of-java-classes-tf4573767.html#a13055319
 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: hot redeploy of java classes

2007-10-05 Thread Gwyn Evans
On Friday, October 5, 2007, 9:18:22 AM, Artur [EMAIL PROTECTED] wrote:

 I know that Wicket in development mode does hot redeploy of html templates.
 Is it possible to configure it to does a hot redeploy of java classes too?
 It would boost the development time!!

As far as I'm aware, that's a function of the servlet container that
you're using.  The Wicket code loads the templates, but the servlet
container loads the Wicket code!

/Gwyn


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



RE: Wicket Meetup Amsterdam: a proposal

2007-10-05 Thread Arje Cahn
Excellent idea! I've added it to the Wiki page...:
http://cwiki.apache.org/WICKET/community-meetups.html

Would be nice if we could add more ideas to the list.

Personally, I would be very interested in discussing Wicket plugin 
architectures, including (but definitely not limited to) OSGi.

- Arjé Cahn

 -Original Message-
 From: Maurice Marrink [mailto:[EMAIL PROTECTED] 
 Sent: vrijdag 5 oktober 2007 11:09
 To: users@wicket.apache.org
 Subject: Re: Wicket Meetup Amsterdam: a proposal
 
 I Like that idea, especially for all those wicket stuff 
 projects out there.
 If anyone has any questions / problems about / with wasp or 
 swarm they can not / will not ask on the mailing list, they 
 are free to ask me on the conference and I'll do my best 
 assist them. If they bring there projects with them it will 
 be even easier to do so.
 
 Maurice
 
 
 On 10/5/07, Maeder Thomas [EMAIL PROTECTED] wrote:
  Just and idea
 
  I used to work on Eclipse, and one cool thing (in my 
 opinion) we did 
  at conferences were the so called plugin clinics. 
 Basically, there 
  would be a couple of commiters on hand in some conference room for 
  about 2 hours in the evening and you could bring your sick plugin 
  and we would help you with whatever trouble you had. It was fun for 
  the committers because you could see what people were doing 
 with your 
  stuff and it was great for the plugin developers because 
 you could get 
  great advice for your concrete problems straight from the 
 horses mouth.
 
  Thomas
 
   -Original Message-
   From: Erik van Oosten [mailto:[EMAIL PROTECTED]
   Sent: Freitag, 5. Oktober 2007 00:46
   To: users@wicket.apache.org
   Subject: Re: Wicket Meetup Amsterdam: a proposal
  
   Excellent! That is only 4 blocks from where I work :)
  
   Also, all those dates are fine by me.
  
   Just an opinion: I do not expect any presentations; just a get 
   together for a couple of hours is nice.
  
Erik.
  
 
  
 -
  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: hot redeploy of java classes

2007-10-05 Thread Uwe Schäfer

Gwyn Evans schrieb:

On Friday, October 5, 2007, 9:18:22 AM, Artur [EMAIL PROTECTED] wrote:


I know that Wicket in development mode does hot redeploy of html templates.
Is it possible to configure it to does a hot redeploy of java classes too?
It would boost the development time!!


works fine in jetty from within mvn. just add the path, your templates 
are loaded from as a scanTarget. example:


plugin
 groupIdorg.mortbay.jetty/groupId
 artifactIdmaven-jetty-plugin/artifactId
 configuration
  scanIntervalSeconds2/scanIntervalSeconds
  contextPath//contextPath
  connectors
   connector 
implementation=org.mortbay.jetty.nio.SelectChannelConnector

port80/port
maxIdleTime6/maxIdleTime
   /connector
  /connectors
  scanTargetPatterns
   scanTargetPattern
directorysrc/main/webapp/WEB-INF//directory
includes
 include**/*.html/include
 include**/*.properties/include
/includes
   /scanTargetPattern
  /scanTargetPatterns
 /configuration
/plugin

when changeing classes, jetty redeploys the application (blazing fast).

excellent for prototyping.

cu uwe



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



Re: CompoundPropertyModel stops working when form validation fails.

2007-10-05 Thread Kent Tong


Fabio Fioretti wrote:
 
 This is what I do, basically:
 1) Select a choice from the ListChoice;
 2) The form automatically fills with the data of the selected
 recommendation instance;
 3) Modify the data in the form so that validation will fail;
 4) Submit data -- validation fails;
 5) Select another choice from the ListChoice;
 6) The form doesn't get updated anymore (and keeps showing old data of
 the recommendation instance that failed validation)
 

I suppose you're using wantOnSelectionChangedNotifications() to trigger
the refresh? In that case it won't refresh any input entered by the user.
Validation plays no role here because such a form refresh does NOT invoke
the validation logic.

In order to refresh the data and erase what the user has entered, call
clearInput() on the form:

ListChoice recommendation = new ListChoice(recommendation, ...) {
protected boolean wantOnSelectionChangedNotifications() {
return true;
}
protected void onSelectionChanged(Object newSelection) {
recommendationForm.clearInput();
}
};

--
Kent Tong
Wicket tutorials freely available at http://www.agileskills2.org/EWDW
-- 
View this message in context: 
http://www.nabble.com/CompoundPropertyModel-stops-working-when-form-validation-fails.-tf4562483.html#a13057990
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: How to NOT cause a hot redeploy with Jetty when HTML files change

2007-10-05 Thread Martijn Dashorst
Not recommended per se, but it works for me. However, it will not
reload structural changes, you'll need to restart jetty when you add a
property, method, or change the signature of a method, etc.

The debugger can only modify the contents of methods, not add them
(unfortunately). The reloading filter should mitigate that, but I
haven't used it.

Martijn

On 10/5/07, Jason Mihalick [EMAIL PROTECTED] wrote:

 Thanks Eelco.  However, I am using the Maven Jetty plugin
 (http://www.mortbay.org/maven-plugin/index.html) for jetty usage under
 Maven.  Perhaps that is what you meant.  I am also using the Maven2 eclipse
 plugin (http://m2eclipse.codehaus.org/) for dependency management within
 eclipse, but that plugin is not affecting this problem.

 So is using Martin's suggestion the preferred way to develop with Wicket
 under Eclipse and it will avoid my reloading issues?

 Thanks for the replies.  I'm really enjoying development with Wicket.

 --
 Jason


 Eelco Hillenius wrote:
 
  I think most developers have given up on using the eclipse jetty
  plugin, and use an embedded container instead.
 
  Jason uses the Maven Eclipse plugin, which is a completely different
  bird, and which actually is used by quite a few developers from what I
  hear.
 
  Eelco
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

 --
 View this message in context: 
 http://www.nabble.com/How-to-NOT-cause-a-hot-redeploy-with-Jetty-when-HTML-files-change-tf4571849.html#a13057239
 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-beta3 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta3/

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



Re: Page.detachModels() not working like it used to

2007-10-05 Thread Kent Tong


Dan Syrstad-2 wrote:
 
 Actually, Page.detach() is not callable from a JUnit test that uses
 WicketTester in 1.3.0beta3. It throws an exception:
 

I used your code and the test passed. Here is my test page:


html
body
test
/body
/html
public class Test extends WebPage {
public Test() {
ListView listView = new ListView(listView, Arrays
.asList(new String[] { a, b })) {

protected void populateItem(final ListItem item) {
item.add(new Label(labelWithDetachableModel, 
new
LoadableDetachableModel() {
protected Object load() {
return item.getModelObject();
}
}));
}

};
add(listView);
}
}


However, I really think your test case is broken. After startPage() returns,
the page has been detached. Why it passes on my computer is because
of your call to debugComponentTrees(). Therefore, you should really be
testing if the model is now detached. That's it. By checking the output 
you can be sure that the model was once attached.

--
Kent Tong
Wicket tutorials freely available at http://www.agileskills2.org/EWDW
-- 
View this message in context: 
http://www.nabble.com/Page.detachModels%28%29-not-working-like-it-used-to-tf4549247.html#a13057290
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: How to NOT cause a hot redeploy with Jetty when HTML files change

2007-10-05 Thread Jason Mihalick

Thanks Eelco.  However, I am using the Maven Jetty plugin
(http://www.mortbay.org/maven-plugin/index.html) for jetty usage under
Maven.  Perhaps that is what you meant.  I am also using the Maven2 eclipse
plugin (http://m2eclipse.codehaus.org/) for dependency management within
eclipse, but that plugin is not affecting this problem.

So is using Martin's suggestion the preferred way to develop with Wicket
under Eclipse and it will avoid my reloading issues?

Thanks for the replies.  I'm really enjoying development with Wicket.

--
Jason


Eelco Hillenius wrote:
 
 I think most developers have given up on using the eclipse jetty
 plugin, and use an embedded container instead.
 
 Jason uses the Maven Eclipse plugin, which is a completely different
 bird, and which actually is used by quite a few developers from what I
 hear.
 
 Eelco
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/How-to-NOT-cause-a-hot-redeploy-with-Jetty-when-HTML-files-change-tf4571849.html#a13057239
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: hot redeploy of java classes

2007-10-05 Thread Artur W.


Gwyn wrote:
 
 On Friday, October 5, 2007, 9:18:22 AM, Artur [EMAIL PROTECTED] wrote:
 
 I know that Wicket in development mode does hot redeploy of html
 templates.
 Is it possible to configure it to does a hot redeploy of java classes
 too?
 It would boost the development time!!
 
 AFAIK Wicket you some cutom class loarder so I thought that 
 As far as I'm aware, that's a function of the servlet container that
 you're using.  The Wicket code loads the templates, but the servlet
 container loads the Wicket code!
 

AFAIK Wicket you some custom class loader so I thought that it can re-load
the class if needed aside from servlet container. What do you think about
it?

-- 
View this message in context: 
http://www.nabble.com/hot-redeploy-of-java-classes-tf4573767.html#a13057227
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: Wicket Meetup Amsterdam: a proposal

2007-10-05 Thread Martijn Dashorst
Perhaps make a difference between whole day, after lunch and after cup-a-soup?

On 10/5/07, Arje Cahn [EMAIL PROTECTED] wrote:
 BTW; I just added the proposed dates to the Wiki page. Please check which 
 dates have your preference in the big table!
 Also, please state whether you prefer an evening session, a day in the 
 weekend or whether you'd be able to attend during daytime (as in; skip work 
 ;-) )
 Hopefully, that will help setting a real date..

 Thanks

 Arjé

  -Original Message-
  From: Arje Cahn [mailto:[EMAIL PROTECTED]
  Sent: vrijdag 5 oktober 2007 11:29
  To: users@wicket.apache.org
  Subject: RE: Wicket Meetup Amsterdam: a proposal
 
  Excellent idea! I've added it to the Wiki page...:
  http://cwiki.apache.org/WICKET/community-meetups.html
 
  Would be nice if we could add more ideas to the list.
 
  Personally, I would be very interested in discussing Wicket
  plugin architectures, including (but definitely not limited to) OSGi.
 
  - Arjé Cahn
 
   -Original Message-
   From: Maurice Marrink [mailto:[EMAIL PROTECTED]
   Sent: vrijdag 5 oktober 2007 11:09
   To: users@wicket.apache.org
   Subject: Re: Wicket Meetup Amsterdam: a proposal
  
   I Like that idea, especially for all those wicket stuff
  projects out
   there.
   If anyone has any questions / problems about / with wasp or
  swarm they
   can not / will not ask on the mailing list, they are free
  to ask me on
   the conference and I'll do my best assist them. If they bring there
   projects with them it will be even easier to do so.
  
   Maurice
  
  
   On 10/5/07, Maeder Thomas [EMAIL PROTECTED] wrote:
Just and idea
   
I used to work on Eclipse, and one cool thing (in my
   opinion) we did
at conferences were the so called plugin clinics.
   Basically, there
would be a couple of commiters on hand in some conference
  room for
about 2 hours in the evening and you could bring your
  sick plugin
and we would help you with whatever trouble you had. It
  was fun for
the committers because you could see what people were doing
   with your
stuff and it was great for the plugin developers because
   you could get
great advice for your concrete problems straight from the
   horses mouth.
   
Thomas
   
 -Original Message-
 From: Erik van Oosten [mailto:[EMAIL PROTECTED]
 Sent: Freitag, 5. Oktober 2007 00:46
 To: users@wicket.apache.org
 Subject: Re: Wicket Meetup Amsterdam: a proposal

 Excellent! That is only 4 blocks from where I work :)

 Also, all those dates are fine by me.

 Just an opinion: I do not expect any presentations; just a get
 together for a couple of hours is nice.

  Erik.

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




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

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



Re: ModalWindow.close() results in ERROR: Exception evaluating javascript: TypeError: window.parent.setTimeout is not a function

2007-10-05 Thread skatz

More information.  It works as expected in IE7.  The problem occurs with
Firefox 2.0.0.7

skatz wrote:
 
 I am trying to use the ModalWindow as a confirmation dialog and it works
 fine on one page but the same code on a different page produces the above
 error.
 
 Closing the ModalWindow with the X in the corner work fine.  The error
 occurs when the AjaxCallbackLink onClick handler calls
 ModalWindow.close();  On the page that isn't working the following code is
 called as the last thing in the page constructor.
 
 // The delete dialog
 ModalWindow deleteDialog = new ModalWindow(deleteDialog);
 mConfirmationPanel = new
 ConfirmationPanel(deleteDialog.getContentId(), new
 WUIResourceModel(CampaignManagerPage.class, deleteDialogQuestion), this,
 deleteDialog);
 deleteDialog.setContent(mConfirmationPanel);
 deleteDialog.setInitialWidth(260);
 deleteDialog.setInitialHeight(80);
 deleteDialog.setResizable(false);
 deleteDialog.setTitle(Delete Campaign(s) Confirmation);
 deleteDialog.setWindowClosedCallback(
 new ModalWindow.WindowClosedCallback() {
 private static final long serialVersionUID = 1L;
 public void onClose(AjaxRequestTarget pRequestTarget) {
  ...
 }
 }
 }
 }
 );
 add(deleteDialog);
 
 Any ideas?
 

-- 
View this message in context: 
http://www.nabble.com/ModalWindow.close%28%29-results-in-ERROR%3A-Exception-evaluating-javascript%3A-TypeError%3A-window.parent.setTimeout-is-not-a-function-tf4573096.html#a13058356
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: Adding to response header (filename)?

2007-10-05 Thread Stanczak Group
Ya, I like that. I'll give all these a shot. Here's what I setup thus 
far, before reading these posts. But what you have is much simpler. Thanks.



   mount(new URIRequestTargetUrlCodingStrategy(/cvs) {

   @Override
   public IRequestTarget decode(RequestParameters param) {
   return new CVSRequestTarget();
   }
   });

class CVSRequestTarget implements IRequestTarget {

   public CVSRequestTarget() {
   }

   public void respond(RequestCycle requestCycle) {
   WebResponse response = (WebResponse) requestCycle.getResponse();
   boolean includeArchived = 
Boolean.getBoolean(requestCycle.getRequest().getParameter(includeArchived));
   Long divisionId = 
Long.getLong(requestCycle.getRequest().getParameter(divisionId));

   Logger.getLogger(getClass()).error(includeArchived + \n\n);
   Logger.getLogger(getClass()).error(divisionId + \n\n);
   Session session = ((RequestCycleImpl) 
requestCycle).getHibernateSession();

   Transaction tx = session.beginTransaction();
   try {
   StringBuilder out = new StringBuilder();
   SimpleDateFormat format = new SimpleDateFormat(MM/dd/);
   List divisions = session.createCriteria(Division.class).list();
   out.append(Address,City,Country,Email,First 
Name,Key,Identification,Last Name,Middle Name,Phone,Special 
Needs,State,Zip,Division,Major,Visit Date\n);

   for (Object object : divisions) {
   Division div = (Division) object;
   for (Major major : div.getMajors()) {
   for (VisitDate visitDate : major.getVisitDates()) {
   if (visitDate.isArchived()  !includeArchived) {
   break;
   }
   for (Student student : visitDate.getStudents()) {
   out.append(student.getAddress());
   out.append(,);
   out.append(student.getCity());
   out.append(,);
   out.append(student.getCountry());
   out.append(,);
   out.append(student.getEmail());
   out.append(,);
   out.append(student.getFname());
   out.append(,);
   out.append(student.getId());
   out.append(,);
   out.append(student.getIdentification());
   out.append(,);
   out.append(student.getLname());
   out.append(,);
   out.append(student.getMname());
   out.append(,);
   out.append(student.getPhone());
   out.append(,);
   out.append(student.getSpecial());
   out.append(,);
   out.append(student.getState());
   out.append(,);
   out.append(student.getZip());
   out.append(,);
   out.append(div.getName());
   out.append(,);
   out.append(major.getName());
   out.append(,);
   out.append(format.format(visitDate.getDate()));
   out.append(\n);
   }
   }
   }
   }
   tx.commit();
   SimpleDateFormat formatFile = new 
SimpleDateFormat(MM-dd--HH-MM);

   response.setContentType(text/csv);
   response.setHeader(Content-Disposition, 
attachment;filename=\export_ + 
formatFile.format(Calendar.getInstance().getTime()) + .csv\);

   OutputStream cout = response.getOutputStream();
   cout.write(out.toString().getBytes());
   cout.flush();
   cout.close();
   } catch (IOException e) {
   Logger.getLogger(getClass()).error(e);
   }
   }

   public void detach(RequestCycle requestCycle) {
   }


Johan Compagner wrote:

or something like this:

new Link()
{
onclick()
{
CharSequence discounts = DataBase.getInstance()
   .exportDiscounts();


ResourceStreamRequestTarget rsrt = new ResourceStreamRequestTarget(new
StringResourceStream(discounts, text/csv));
rsrt.setFileName(name);
setRequestTarget(rsrt)
}
}

Maybe we should give ResourceStreanRequestTarget 1 extra constructor with
the file name..

 setRequestTarget(new ResourceStreamRequestTarget(new
StringResourceStream(discounts, text/csv,name)))


On 10/5/07, Eelco Hillenius [EMAIL PROTECTED] wrote:
  

On 10/5/07, 

Ajax dropdownchoice doesn't work after submit

2007-10-05 Thread Larva

Hi !! I have this hierarchy:
Panel
   Form
 DropDownChoice (A and B)

I have these two DropDownChoices (A and B) and I am
refreshing the choices in B through Ajax when the
selection in A changes. I use this dorpdownchoices to
define a filter for my dataview. 
That works fine, when I submit the form the selected
properties in each dropdown are used to filter the
rows of the dataview. I refresh the page with the
method page.render()
The problem is that after sumbit and render the page
the dropdownchoices doesn't work anymore. In fact, the
link to the Ajax debug console disappeared and if I
view the source of the html, there is no reference to
the wicket-event.js and wicket-ajax.js
Any help?
Thanks in advance
Pablo.

-- 
View this message in context: 
http://www.nabble.com/Ajax-dropdownchoice-doesn%27t-work-after-submit-tf4574920.html#a13058549
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: hot redeploy of java classes

2007-10-05 Thread Gwyn Evans
On Friday, October 5, 2007, 11:56:41 AM, Artur [EMAIL PROTECTED] wrote:

 Gwyn wrote:
 
 On Friday, October 5, 2007, 9:18:22 AM, Artur [EMAIL PROTECTED] wrote:
 
 I know that Wicket in development mode does hot redeploy of html
 templates.
 Is it possible to configure it to does a hot redeploy of java classes
 too?
 It would boost the development time!!
 
 AFAIK Wicket you some cutom class loarder so I thought that 
 As far as I'm aware, that's a function of the servlet container that
 you're using.  The Wicket code loads the templates, but the servlet
 container loads the Wicket code!
 

 AFAIK Wicket you some custom class loader so I thought that it can re-load
 the class if needed aside from servlet container. What do you think about
 it?

Good point, I'd overlooked that. I'm afraid I've not tried it though.

/Gwyn


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



Re: CompoundPropertyModel stops working when form validation fails.

2007-10-05 Thread Fabio Fioretti
On 10/5/07, Kent Tong [EMAIL PROTECTED] wrote:

Hello, thanks for your reply.

 I suppose you're using wantOnSelectionChangedNotifications() to trigger
 the refresh?

No, I'm not.

The ListChoice uses the same AbstractModel on which the panel inside
the form builds its CompoundPropertyModel (see my previous posts):
when user's selection changes, the AbstractModel correctly replaces
its object with the newly selected instance and the form gets
refreshed by an AjaxFormComponentUpdatingBehavior (attached to
ListChoice's onclick event) to display the new instance (read from
the same AbstractModel).

Everything works really smooth: the user selects a recommendation from
the list, he edits it, saves it, then he clicks on another
recommendation from the list and edits this other one, and so on.

*BUT*, when the user edits one of the recommendations making errors,
tries to save it and form validation fails, the panel's
CompoundPropertyModel seems to detach from the underlying
AbstractModel and, if the user selects another choice on the
ListChoice, the form is refreshed but it keeps showing data of the
recommendation instance that failed validation.

Any suggestion would be really appreciated, because maybe I'm missing
something about the inner mechanisms of Wicket.


Thank you all for any help,

Fabio Fioretti - WindoM

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



Re: hot redeploy of java classes

2007-10-05 Thread Gohan

It's also possible to hotswap classes using a java agent. And if you're using
java6 it's even possible to start an agent without specifying anything at
the command line (the trick is that you need to get the java process id). 


Mr Mean wrote:
 
 Hot reloading of classes is already supported in the jvm. it just
 requires a debug connection if i understand it all correctly. for
 instance we use the sysdeo tomcat plugin in eclipse which starts
 tomcat in debug mode every time we change some code tomcat
 automatically uses the new class. Well up till a certain point some
 changes cannot be hot swapped. I think the same is true for jetty if
 you run it in debug mode.
 
 Maurice
 
 On 10/5/07, Artur W. [EMAIL PROTECTED] wrote:

 Hi!

 I know that Wicket in development mode does hot redeploy of html
 templates.
 Is it possible to configure it to does a hot redeploy of java classes
 too?
 It would boost the development time!!

 Thanks,
 Artur

 --
 View this message in context:
 http://www.nabble.com/hot-redeploy-of-java-classes-tf4573767.html#a13055319
 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/hot-redeploy-of-java-classes-tf4573767.html#a13059962
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: Adding to response header (filename)?

2007-10-05 Thread Stanczak Group
Instead of setRequestTarget(rsrt) I use this 
rsrt.respond(getRequestCycle());, is that correct? It does work, but I 
get this in the logs 08:53:03,277 ERROR WebResponse:190 - Unable to 
redirect to: ?wicket:interface=:2, HTTP Response has already been 
committed.. It works, but I wouldn't mind fixing that error, just to 
keep things clean.



Johan Compagner wrote:

or something like this:

new Link()
{
onclick()
{
CharSequence discounts = DataBase.getInstance()
   .exportDiscounts();


ResourceStreamRequestTarget rsrt = new ResourceStreamRequestTarget(new
StringResourceStream(discounts, text/csv));
rsrt.setFileName(name);
setRequestTarget(rsrt)
}
}

Maybe we should give ResourceStreanRequestTarget 1 extra constructor with
the file name..

 setRequestTarget(new ResourceStreamRequestTarget(new
StringResourceStream(discounts, text/csv,name)))


On 10/5/07, Eelco Hillenius [EMAIL PROTECTED] wrote:
  

On 10/5/07, Eelco Hillenius [EMAIL PROTECTED] wrote:


What do you use for the export? You probably should use a resource.
For instance:

public class DiscountsExport extends WebResource {

  public static class Initializer implements IInitializer {

public void init(Application application) {
  SharedResources res = application.getSharedResources();
  res.add(discounts, new DiscountsExport());
}
  }

  public DiscountsExport() {

setCacheable(false);
  }

  @Override
  public IResourceStream getResourceStream() {
CharSequence discounts = DataBase.getInstance().exportDiscounts();
return new StringResourceStream(discounts, text/plain);
  }

  @Override
  protected void setHeaders(WebResponse response) {
super.setHeaders(response);
response.setAttachmentHeader(discounts.csv);
  }
}
  

Sorry, this might be easier to understand:

   WebResource export = new WebResource() {

 @Override
 public IResourceStream getResourceStream() {
   CharSequence discounts = DataBase.getInstance()
   .exportDiscounts();
   return new StringResourceStream(discounts, text/csv);
 }

 @Override
 protected void setHeaders(WebResponse response) {
   super.setHeaders(response);
   response.setAttachmentHeader(discounts.csv);
 }
   };
   export.setCacheable(false);

   add(new ResourceLink(exportLink, export));


Eelco

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





  


--
Justin Stanczak
Stanczak Group
812-735-3600

All that is necessary for the triumph of evil is that good men do nothing.
Edmund Burke


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



AJAX and Form Fields

2007-10-05 Thread Michael Laccetti

Is there a way to retain contents of a form when the fields are repainted by 
AJAX (to hide/unhide new fields, etc/.)?

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



Re: AJAX and Form Fields

2007-10-05 Thread Sam Hough

I think it pretty much does this by default. It largely depends on what
IModel you are using... I think the components will hold dirty values for
you (doesn't pass validation) but then the model should store the state of
the fields.



Michael Laccetti-2 wrote:
 
 Is there a way to retain contents of a form when the fields are repainted
 by AJAX (to hide/unhide new fields, etc/.)?
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/AJAX-and-Form-Fields-tf4575968.html#a13062037
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: hot redeploy of java classes

2007-10-05 Thread Eelco Hillenius
Additionally, you can take a look at ReloadingWicketFilter that is
shipped with the core project.

Eelco

On 10/5/07, Maurice Marrink [EMAIL PROTECTED] wrote:
 Hot reloading of classes is already supported in the jvm. it just
 requires a debug connection if i understand it all correctly. for
 instance we use the sysdeo tomcat plugin in eclipse which starts
 tomcat in debug mode every time we change some code tomcat
 automatically uses the new class. Well up till a certain point some
 changes cannot be hot swapped. I think the same is true for jetty if
 you run it in debug mode.

 Maurice

 On 10/5/07, Artur W. [EMAIL PROTECTED] wrote:
 
  Hi!
 
  I know that Wicket in development mode does hot redeploy of html templates.
  Is it possible to configure it to does a hot redeploy of java classes too?
  It would boost the development time!!
 
  Thanks,
  Artur
 
  --
  View this message in context: 
  http://www.nabble.com/hot-redeploy-of-java-classes-tf4573767.html#a13055319
  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]



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



Re: CompoundPropertyModel stops working when form validation fails.

2007-10-05 Thread Eelco Hillenius
 *BUT*, when the user edits one of the recommendations making errors,
 tries to save it and form validation fails, the panel's
 CompoundPropertyModel seems to detach from the underlying
 AbstractModel and, if the user selects another choice on the
 ListChoice, the form is refreshed but it keeps showing data of the
 recommendation instance that failed validation.

Not sure what this could be. Would you be able to create a test case
or quickstart project that shows the bug?

Eelco

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



Re: How to NOT cause a hot redeploy with Jetty when HTML files change

2007-10-05 Thread Eelco Hillenius
On 10/5/07, Martijn Dashorst [EMAIL PROTECTED] wrote:
 Not recommended per se, but it works for me. However, it will not
 reload structural changes, you'll need to restart jetty when you add a
 property, method, or change the signature of a method, etc.

 The debugger can only modify the contents of methods, not add them
 (unfortunately). The reloading filter should mitigate that, but I
 haven't used it.

Works for me too. Though any of the IDE plugins should work fine as well.

Eelco

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



Re: Custom label for number and currency formatting?

2007-10-05 Thread Eelco Hillenius
 Label dbl = new Label(dbllbl,+x){

Why pass in a string? Better is to do new Label(foo, new Model(x));

 @Override
 protected void onComponentTagBody(final MarkupStream 
 markupStream, final
 ComponentTag openTag)
 {
 Object val = 
 getConverter().convert(getModelObjectAsString(),

If you are merely displaying the value, you don't need to convert.
What this line above does - if you'd pass in a model that produces a
number) is convert from a number to a string (using the converter,
this is in getModelObjectAsString) and back again. You can just do
Object val = getModelObject().

Alternatives:
1) Wrap the model (decorator pattern) so that it returns the formatted value.
2) Use a custom converter like:

  new Label(foo, new Model(x)) {
public IConverter getConverter(Class type) {
  return new AbstractNumberConverter() {
public NumberFormat getNumberFormat(Locale locale) {
  return NumberFormat.getCurrencyInstance();
}
  }
}
  }


Eelco

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



Re: Page.detachModels() not working like it used to

2007-10-05 Thread Kent Tong


Dan Syrstad-2 wrote:
 
 Your page code is almost exactly the same as mine. However, your HTML does
 not look correct - it has no tag with a wicket:id in it. So maybe your
 component never rendered.
 

No, your mail client has stripped the code. Let me show you the code again:

lt;htmlgt;
lt;bodygt;
lt;span wicket:id=\quot;listView\quot;gt;lt;span
wicket:id=\quot;labelWithDetachableModel\quot;gt;testlt;/spangt;lt;/spangt;
lt;/bodygt;
lt;/htmlgt;

public class Test extends WebPage {
public Test() {
ListView listView = new ListView(listView, Arrays
.asList(new String[] { a, b })) {

protected void populateItem(final ListItem item) {
item.add(new Label(labelWithDetachableModel, 
new
LoadableDetachableModel() {
protected Object load() {
return item.getModelObject();
}
}));
}

};
add(listView);
}
}

Run the test case and it will pass (although for the wrong reason).


-- 
View this message in context: 
http://www.nabble.com/Page.detachModels%28%29-not-working-like-it-used-to-tf4549247.html#a13063392
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: Ajax dropdownchoice doesn't work after submit

2007-10-05 Thread Igor Vaynberg
you shouldnt call page.render()


-igor


On 10/5/07, Larva [EMAIL PROTECTED] wrote:

 Hi !! I have this hierarchy:
 Panel
Form
  DropDownChoice (A and B)

 I have these two DropDownChoices (A and B) and I am
 refreshing the choices in B through Ajax when the
 selection in A changes. I use this dorpdownchoices to
 define a filter for my dataview.
 That works fine, when I submit the form the selected
 properties in each dropdown are used to filter the
 rows of the dataview. I refresh the page with the
 method page.render()
 The problem is that after sumbit and render the page
 the dropdownchoices doesn't work anymore. In fact, the
 link to the Ajax debug console disappeared and if I
 view the source of the html, there is no reference to
 the wicket-event.js and wicket-ajax.js
 Any help?
 Thanks in advance
 Pablo.

 --
 View this message in context: 
 http://www.nabble.com/Ajax-dropdownchoice-doesn%27t-work-after-submit-tf4574920.html#a13058549
 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: Ajax dropdownchoice doesn't work after submit

2007-10-05 Thread Larva

Thanks Igor for your quick answer.
I call the page.render() method because in the submit I set properties in
the page that use to filter my custom dataview.
Then, if a don't invoke the page render the dataview isn't update.
I tried invoking only the render method of my dataview but I got the same
issue.

This is my code:

DropDownChoice A

private DropDownChoice getTipoDelegacionDDC(final FiltroEmbarqueForm 
form)
{
DropDownChoice ddcTipoDel = new DropDownChoice(tipoDelegacion, new
PropertyModel(this, tipoDelegacion),
Arrays.asList(TipoDelegacion.values()));
ddcTipoDel.add(new AjaxFormComponentUpdatingBehavior(onchange) {
protected void onUpdate(AjaxRequestTarget target) {
getDelegaciones().clear();
DropDownChoice delegDDC = form.delegacionDDC; 
   
delegDDC.setChoices(getDelegacionesPorTipo(getTipoDelegacion()));
target.addComponent(delegDDC);
}
});
return ddcTipoDel;
}

DropDownChoice B

private DropDownChoice getDelegacionDDC(FiltroEmbarqueForm form) {

List list = Collections.EMPTY_LIST;
String tipoDelagacion = form.tipoDelegacion;
if (tipoDelagacion != null) {
list = getDelegacionesPorTipo(getTipoDelegacion());
}
DropDownChoice delegacionDDC = new DropDownChoice(delegacion, new
PropertyModel(this, delegacion), list);
delegacionDDC.setOutputMarkupId(true);  // Needed for Ajax to update
it
delegacionDDC.setNullValid(true);
return delegacionDDC;
}

Redefined onSubmit method
public final void onSubmit()
{
SiconaraBasePage page = (SiconaraBasePage)getPage();
List pageFilters = page.getFilterProperties();

if (pageFilters != null)
pageFilters.clear();

ParFiltro f1 = new ParFiltro(afiliado.delegacion.tipo,
getTipoDelegacion());
ParFiltro f2 = new ParFiltro(afiliado.delegacion.alias,
getDelegacion());
if (f1.getValue() != null  !f1.getValue().equals())
pageFilters.add(f1);
if (f2.getValue() != null  !f2.getValue().equals())
pageFilters.add(f2);
page.render();
}

The ParFiltro class is a utility class wich contains a pair property-value
used in the page to filter data.
That's because I need to invoke the page.render() method.
I'm doing something wrong? There is another way to do it?

Thanks in advance.
Pablo.




igor.vaynberg wrote:
 
 you shouldnt call page.render()
 
 
 -igor
 
 
 On 10/5/07, Larva [EMAIL PROTECTED] wrote:

 Hi !! I have this hierarchy:
 Panel
Form
  DropDownChoice (A and B)

 I have these two DropDownChoices (A and B) and I am
 refreshing the choices in B through Ajax when the
 selection in A changes. I use this dorpdownchoices to
 define a filter for my dataview.
 That works fine, when I submit the form the selected
 properties in each dropdown are used to filter the
 rows of the dataview. I refresh the page with the
 method page.render()
 The problem is that after sumbit and render the page
 the dropdownchoices doesn't work anymore. In fact, the
 link to the Ajax debug console disappeared and if I
 view the source of the html, there is no reference to
 the wicket-event.js and wicket-ajax.js
 Any help?
 Thanks in advance
 Pablo.

 --
 View this message in context:
 http://www.nabble.com/Ajax-dropdownchoice-doesn%27t-work-after-submit-tf4574920.html#a13058549
 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/Ajax-dropdownchoice-doesn%27t-work-after-submit-tf4574920.html#a13064454
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: Best approach to localization

2007-10-05 Thread Eelco Hillenius
 Thanks so much, Eelco :-). I can't find the new example, however... Where
 did you commit it? It doesn't show at the examples page
 (http://wicketstuff.org/wicket13/). I've also tried an URL similar to pub,
 but it isn't there.

You'll have to get it from our subversion repo:
https://svn.apache.org/repos/asf/wicket/trunk/jdk-1.5/wicket-examples

Eelco

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



Re: Best approach to localization

2007-10-05 Thread Gwyn Evans
On Friday, October 5, 2007, 6:53:51 PM, Eelco [EMAIL PROTECTED] wrote:

 Thanks so much, Eelco :-). I can't find the new example, however... Where
 did you commit it? It doesn't show at the examples page
 (http://wicketstuff.org/wicket13/). I've also tried an URL similar to pub,
 but it isn't there.

 You'll have to get it from our subversion repo:
 https://svn.apache.org/repos/asf/wicket/trunk/jdk-1.5/wicket-examples

NB: http for non-committer/anonymous access!

Specifically 
http://svn.apache.org/repos/asf/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/pub2/

/Gwyn


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



Re: Best approach to localization

2007-10-05 Thread Eelco Hillenius
 NB: http for non-committer/anonymous access!

You can read from it as far as I know. Just not commit :-) But indeed,
you probably want http instead.

Eelco

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



Re: Ajax dropdownchoice doesn't work after submit

2007-10-05 Thread Igor Vaynberg
instead of pushing the right values when things change you should make
everything pull, that way updates happen on the fly... see the ajax
dropdown example in wicket examples.

-igor


On 10/5/07, Larva [EMAIL PROTECTED] wrote:

 Thanks Igor for your quick answer.
 I call the page.render() method because in the submit I set properties in
 the page that use to filter my custom dataview.
 Then, if a don't invoke the page render the dataview isn't update.
 I tried invoking only the render method of my dataview but I got the same
 issue.

 This is my code:

 DropDownChoice A

 private DropDownChoice getTipoDelegacionDDC(final FiltroEmbarqueForm 
 form)
 {
 DropDownChoice ddcTipoDel = new DropDownChoice(tipoDelegacion, new
 PropertyModel(this, tipoDelegacion),
 Arrays.asList(TipoDelegacion.values()));
 ddcTipoDel.add(new AjaxFormComponentUpdatingBehavior(onchange) {
 protected void onUpdate(AjaxRequestTarget target) {
 getDelegaciones().clear();
 DropDownChoice delegDDC = form.delegacionDDC;

 delegDDC.setChoices(getDelegacionesPorTipo(getTipoDelegacion()));
 target.addComponent(delegDDC);
 }
 });
 return ddcTipoDel;
 }

 DropDownChoice B

 private DropDownChoice getDelegacionDDC(FiltroEmbarqueForm form) {

 List list = Collections.EMPTY_LIST;
 String tipoDelagacion = form.tipoDelegacion;
 if (tipoDelagacion != null) {
 list = getDelegacionesPorTipo(getTipoDelegacion());
 }
 DropDownChoice delegacionDDC = new DropDownChoice(delegacion, new
 PropertyModel(this, delegacion), list);
 delegacionDDC.setOutputMarkupId(true);  // Needed for Ajax to update
 it
 delegacionDDC.setNullValid(true);
 return delegacionDDC;
 }

 Redefined onSubmit method
 public final void onSubmit()
 {
 SiconaraBasePage page = (SiconaraBasePage)getPage();
 List pageFilters = page.getFilterProperties();

 if (pageFilters != null)
 pageFilters.clear();

 ParFiltro f1 = new ParFiltro(afiliado.delegacion.tipo,
 getTipoDelegacion());
 ParFiltro f2 = new ParFiltro(afiliado.delegacion.alias,
 getDelegacion());
 if (f1.getValue() != null  !f1.getValue().equals())
 pageFilters.add(f1);
 if (f2.getValue() != null  !f2.getValue().equals())
 pageFilters.add(f2);
 page.render();
 }

 The ParFiltro class is a utility class wich contains a pair property-value
 used in the page to filter data.
 That's because I need to invoke the page.render() method.
 I'm doing something wrong? There is another way to do it?

 Thanks in advance.
 Pablo.




 igor.vaynberg wrote:
 
  you shouldnt call page.render()
 
 
  -igor
 
 
  On 10/5/07, Larva [EMAIL PROTECTED] wrote:
 
  Hi !! I have this hierarchy:
  Panel
 Form
   DropDownChoice (A and B)
 
  I have these two DropDownChoices (A and B) and I am
  refreshing the choices in B through Ajax when the
  selection in A changes. I use this dorpdownchoices to
  define a filter for my dataview.
  That works fine, when I submit the form the selected
  properties in each dropdown are used to filter the
  rows of the dataview. I refresh the page with the
  method page.render()
  The problem is that after sumbit and render the page
  the dropdownchoices doesn't work anymore. In fact, the
  link to the Ajax debug console disappeared and if I
  view the source of the html, there is no reference to
  the wicket-event.js and wicket-ajax.js
  Any help?
  Thanks in advance
  Pablo.
 
  --
  View this message in context:
  http://www.nabble.com/Ajax-dropdownchoice-doesn%27t-work-after-submit-tf4574920.html#a13058549
  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/Ajax-dropdownchoice-doesn%27t-work-after-submit-tf4574920.html#a13064454
 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: Ajax dropdownchoice doesn't work after submit

2007-10-05 Thread Larva

The first time the page is render the dropdownchoices works fine. I took the
example from the wicket examples.
The problem is after the submit. When I submit the form and the page is
render again the data of the dataview is filtered ok but the dropdownchoices
aren't working and there is no ajax scripts in the html.

Thanks !!
Pablo.



igor.vaynberg wrote:
 
 instead of pushing the right values when things change you should make
 everything pull, that way updates happen on the fly... see the ajax
 dropdown example in wicket examples.
 
 -igor
 
 
 On 10/5/07, Larva [EMAIL PROTECTED] wrote:

 Thanks Igor for your quick answer.
 I call the page.render() method because in the submit I set properties in
 the page that use to filter my custom dataview.
 Then, if a don't invoke the page render the dataview isn't update.
 I tried invoking only the render method of my dataview but I got the same
 issue.

 This is my code:

 DropDownChoice A

 private DropDownChoice getTipoDelegacionDDC(final
 FiltroEmbarqueForm form)
 {
 DropDownChoice ddcTipoDel = new DropDownChoice(tipoDelegacion,
 new
 PropertyModel(this, tipoDelegacion),
 Arrays.asList(TipoDelegacion.values()));
 ddcTipoDel.add(new AjaxFormComponentUpdatingBehavior(onchange)
 {
 protected void onUpdate(AjaxRequestTarget target) {
 getDelegaciones().clear();
 DropDownChoice delegDDC = form.delegacionDDC;

 delegDDC.setChoices(getDelegacionesPorTipo(getTipoDelegacion()));
 target.addComponent(delegDDC);
 }
 });
 return ddcTipoDel;
 }

 DropDownChoice B

 private DropDownChoice getDelegacionDDC(FiltroEmbarqueForm form)
 {

 List list = Collections.EMPTY_LIST;
 String tipoDelagacion = form.tipoDelegacion;
 if (tipoDelagacion != null) {
 list = getDelegacionesPorTipo(getTipoDelegacion());
 }
 DropDownChoice delegacionDDC = new DropDownChoice(delegacion,
 new
 PropertyModel(this, delegacion), list);
 delegacionDDC.setOutputMarkupId(true);  // Needed for Ajax to
 update
 it
 delegacionDDC.setNullValid(true);
 return delegacionDDC;
 }

 Redefined onSubmit method
 public final void onSubmit()
 {
 SiconaraBasePage page = (SiconaraBasePage)getPage();
 List pageFilters = page.getFilterProperties();

 if (pageFilters != null)
 pageFilters.clear();

 ParFiltro f1 = new ParFiltro(afiliado.delegacion.tipo,
 getTipoDelegacion());
 ParFiltro f2 = new ParFiltro(afiliado.delegacion.alias,
 getDelegacion());
 if (f1.getValue() != null  !f1.getValue().equals())
 pageFilters.add(f1);
 if (f2.getValue() != null  !f2.getValue().equals())
 pageFilters.add(f2);
 page.render();
 }

 The ParFiltro class is a utility class wich contains a pair
 property-value
 used in the page to filter data.
 That's because I need to invoke the page.render() method.
 I'm doing something wrong? There is another way to do it?

 Thanks in advance.
 Pablo.




 igor.vaynberg wrote:
 
  you shouldnt call page.render()
 
 
  -igor
 
 
  On 10/5/07, Larva [EMAIL PROTECTED] wrote:
 
  Hi !! I have this hierarchy:
  Panel
 Form
   DropDownChoice (A and B)
 
  I have these two DropDownChoices (A and B) and I am
  refreshing the choices in B through Ajax when the
  selection in A changes. I use this dorpdownchoices to
  define a filter for my dataview.
  That works fine, when I submit the form the selected
  properties in each dropdown are used to filter the
  rows of the dataview. I refresh the page with the
  method page.render()
  The problem is that after sumbit and render the page
  the dropdownchoices doesn't work anymore. In fact, the
  link to the Ajax debug console disappeared and if I
  view the source of the html, there is no reference to
  the wicket-event.js and wicket-ajax.js
  Any help?
  Thanks in advance
  Pablo.
 
  --
  View this message in context:
 
 http://www.nabble.com/Ajax-dropdownchoice-doesn%27t-work-after-submit-tf4574920.html#a13058549
  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/Ajax-dropdownchoice-doesn%27t-work-after-submit-tf4574920.html#a13064454
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL 

Re: Ajax dropdownchoice doesn't work after submit

2007-10-05 Thread Igor Vaynberg
provide a working quickstart and i will take a look

-igor

On 10/5/07, Larva [EMAIL PROTECTED] wrote:

 The first time the page is render the dropdownchoices works fine. I took the
 example from the wicket examples.
 The problem is after the submit. When I submit the form and the page is
 render again the data of the dataview is filtered ok but the dropdownchoices
 aren't working and there is no ajax scripts in the html.

 Thanks !!
 Pablo.



 igor.vaynberg wrote:
 
  instead of pushing the right values when things change you should make
  everything pull, that way updates happen on the fly... see the ajax
  dropdown example in wicket examples.
 
  -igor
 
 
  On 10/5/07, Larva [EMAIL PROTECTED] wrote:
 
  Thanks Igor for your quick answer.
  I call the page.render() method because in the submit I set properties in
  the page that use to filter my custom dataview.
  Then, if a don't invoke the page render the dataview isn't update.
  I tried invoking only the render method of my dataview but I got the same
  issue.
 
  This is my code:
 
  DropDownChoice A
 
  private DropDownChoice getTipoDelegacionDDC(final
  FiltroEmbarqueForm form)
  {
  DropDownChoice ddcTipoDel = new DropDownChoice(tipoDelegacion,
  new
  PropertyModel(this, tipoDelegacion),
  Arrays.asList(TipoDelegacion.values()));
  ddcTipoDel.add(new AjaxFormComponentUpdatingBehavior(onchange)
  {
  protected void onUpdate(AjaxRequestTarget target) {
  getDelegaciones().clear();
  DropDownChoice delegDDC = form.delegacionDDC;
 
  delegDDC.setChoices(getDelegacionesPorTipo(getTipoDelegacion()));
  target.addComponent(delegDDC);
  }
  });
  return ddcTipoDel;
  }
 
  DropDownChoice B
 
  private DropDownChoice getDelegacionDDC(FiltroEmbarqueForm form)
  {
 
  List list = Collections.EMPTY_LIST;
  String tipoDelagacion = form.tipoDelegacion;
  if (tipoDelagacion != null) {
  list = getDelegacionesPorTipo(getTipoDelegacion());
  }
  DropDownChoice delegacionDDC = new DropDownChoice(delegacion,
  new
  PropertyModel(this, delegacion), list);
  delegacionDDC.setOutputMarkupId(true);  // Needed for Ajax to
  update
  it
  delegacionDDC.setNullValid(true);
  return delegacionDDC;
  }
 
  Redefined onSubmit method
  public final void onSubmit()
  {
  SiconaraBasePage page = (SiconaraBasePage)getPage();
  List pageFilters = page.getFilterProperties();
 
  if (pageFilters != null)
  pageFilters.clear();
 
  ParFiltro f1 = new ParFiltro(afiliado.delegacion.tipo,
  getTipoDelegacion());
  ParFiltro f2 = new ParFiltro(afiliado.delegacion.alias,
  getDelegacion());
  if (f1.getValue() != null  !f1.getValue().equals())
  pageFilters.add(f1);
  if (f2.getValue() != null  !f2.getValue().equals())
  pageFilters.add(f2);
  page.render();
  }
 
  The ParFiltro class is a utility class wich contains a pair
  property-value
  used in the page to filter data.
  That's because I need to invoke the page.render() method.
  I'm doing something wrong? There is another way to do it?
 
  Thanks in advance.
  Pablo.
 
 
 
 
  igor.vaynberg wrote:
  
   you shouldnt call page.render()
  
  
   -igor
  
  
   On 10/5/07, Larva [EMAIL PROTECTED] wrote:
  
   Hi !! I have this hierarchy:
   Panel
  Form
DropDownChoice (A and B)
  
   I have these two DropDownChoices (A and B) and I am
   refreshing the choices in B through Ajax when the
   selection in A changes. I use this dorpdownchoices to
   define a filter for my dataview.
   That works fine, when I submit the form the selected
   properties in each dropdown are used to filter the
   rows of the dataview. I refresh the page with the
   method page.render()
   The problem is that after sumbit and render the page
   the dropdownchoices doesn't work anymore. In fact, the
   link to the Ajax debug console disappeared and if I
   view the source of the html, there is no reference to
   the wicket-event.js and wicket-ajax.js
   Any help?
   Thanks in advance
   Pablo.
  
   --
   View this message in context:
  
  http://www.nabble.com/Ajax-dropdownchoice-doesn%27t-work-after-submit-tf4574920.html#a13058549
   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:
  

Feedback messages and setResponsePage

2007-10-05 Thread dkarnows

Greetings,

I've noticed when I do:
  info(blah blah blah);
  setResponsePage(...);
that whether or not the feedback displays seems to be dependent on which
version of setResponsePage() I call. If I call this version:
  setResponsePage(Page page)  (e.g. setResponsePage(new FooPage());)
I see the feedback, but if I call this version:
  setResponsePage(java.lang.Class cls)   (e.g.
setResponsePage(FooPage.class);)
I don't see the feedback.

I'm new to Wicket (using 1.3 beta) so grateful for any help. Is this
expected?

thanks,
David

-- 
View this message in context: 
http://www.nabble.com/Feedback-messages-and-setResponsePage-tf4576987.html#a13065185
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: Feedback messages and setResponsePage

2007-10-05 Thread Igor Vaynberg
getsession().info/error/warn will work across pages

-igor


On 10/5/07, dkarnows [EMAIL PROTECTED] wrote:

 Greetings,

 I've noticed when I do:
   info(blah blah blah);
   setResponsePage(...);
 that whether or not the feedback displays seems to be dependent on which
 version of setResponsePage() I call. If I call this version:
   setResponsePage(Page page)  (e.g. setResponsePage(new FooPage());)
 I see the feedback, but if I call this version:
   setResponsePage(java.lang.Class cls)   (e.g.
 setResponsePage(FooPage.class);)
 I don't see the feedback.

 I'm new to Wicket (using 1.3 beta) so grateful for any help. Is this
 expected?

 thanks,
 David

 --
 View this message in context: 
 http://www.nabble.com/Feedback-messages-and-setResponsePage-tf4576987.html#a13065185
 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[2]: RequestCycle?

2007-10-05 Thread Oleg Taranenko




HelloChuckDeal,

databinder.net is down for a while... :((

C:\opensource\net\databinder\trunkping www.databinder.net

Pinging databinder.net [66.108.186.60] with 32 bytes of data:

Request timed out.
Request timed out.
Request timed out.
Request timed out.

Ping statistics for 66.108.186.60:
  Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),





Thursday,October4,2007,10:09:57PM,youwrote:


CIdon'tknowthat1.1hasatar.Myprojectusesmaven,soitwasasnapto
CaddtheDatabinderbitstoourpom.

CHereisthepagethatgivesthedatabindersnapshotrepoinfo:
Chttp://databinder.net/site/show/faq#updates

CIfyoudon'tusemaven,Icouldalwayssenda1.1-SNAPSHOTdirectlyto
Cyou...

CFYI,Thedatabindersitehassomeexamplesthathelpwithlearninghowto
Cuseandadaptthecodetoyourownproject.

CChuck


CStanczakGroupwrote:

Probablynot.I'llprobablyuseitwhenIgetachance.Ijust
downloadedthe1.0tarandsawit'susing1.2Wicket.Shotmethelink
andI'llseeifIcangiveitashottonight.

ChuckDealwrote:
StanczakGroupwrote:

I'mnotforsurewhattouse.ItriedtooverridethenewRequestCycle()
butIhadtroubleunderstandingit.I'mdoingsomethinglikewhat
DataBinderdoes,butwith1.3.DataBinderseemstobe1.2.Eitherway
I'dratherusemyown.Doesanyonehaveanexampleofprovidingmyown
requestcycle,oristhereaneasierway?

SamHoughwrote:

IthinkitissetupwithThreadLocalsoyoucangetiteasilywith
RequestCycle.get().Youcanalsoprovideyourownversionfrom
Application.newRequestCyclewhichmightbemorewhatyouneedtohook
in
start/endevents.



StanczakGroupwrote:


HowcanIaccesstherequestcyclesoIcanopenandcloseaHibernate
sessiononeachrequest?

--
JustinStanczak
StanczakGroup
812-735-3600


DataBinder(1.1-SNAPSHOT)definitelyworkswith1.3.Databinderalso
doesa
prettygoodjobofintegratingHibernateintotheWicketmodels.Is
therea
usecaseforwhichDatabinderdoesnotworkforyou?

Chuck


--
JustinStanczak
StanczakGroup
812-735-3600

"Allthatisnecessaryforthetriumphofevilisthatgoodmendo
nothing."
EdmundBurke


-
Tounsubscribe,e-mail:[EMAIL PROTECTED]
Foradditionalcommands,e-mail:[EMAIL PROTECTED]







--
Bestregards,
Olegmailto:[EMAIL PROTECTED]




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



Re: Re[2]: RequestCycle?

2007-10-05 Thread Martijn Dashorst
Works for me... Apparently Nathan (or his ISP) has shut down the
pingd. The website is still alive!

Martijn

Result of the page in my browser:

Toolkit overview
Databinder is a Java programming toolkit for data–driven Web
applications. It's based upon the Wicket Web component framework and
Hibernate object-relational mapping service. Generally preferring
creativity over convention, Databinder's aim is to facilitate database
programming for the Web that is straightforward, pleasant, and
flexible.
How it works
Databinder provides you with Wicket models that populate themselves
using a lightly managed Hibernate session, and a collection of view
components that bind to them automatically. In your application,
instances of annotated data classes rest in these models, rendering
(and updating) through a view component tree and plain HTML templates.
Screencasts

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

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



Re[4]: RequestCycle?

2007-10-05 Thread Oleg Taranenko




Yeah web server is alive... what about svn server? I can not update sources :(


C:\opensource\net\databinder\trunksvn update
svn: Can't connect to host 'databinder.net': A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

svn checkout svn://databinder.net/databinder/trunk does not respond too.



MDWorksforme...ApparentlyNathan(orhisISP)hasshutdownthe
MDpingd.Thewebsiteisstillalive!

MDMartijn

MDResultofthepageinmybrowser:

MDToolkitoverview
MDDatabinderisaJavaprogrammingtoolkitfordatadrivenWeb
MDapplications.It'sbasedupontheWicketWebcomponentframeworkand
MDHibernateobject-relationalmappingservice.Generallypreferring
MDcreativityoverconvention,Databinder'saimistofacilitatedatabase
MDprogrammingfortheWebthatisstraightforward,pleasant,and
MDflexible.
MDHowitworks
MDDatabinderprovidesyouwithWicketmodelsthatpopulatethemselves
MDusingalightlymanagedHibernatesession,andacollectionofview
MDcomponentsthatbindtothemautomatically.Inyourapplication,
MDinstancesofannotateddataclassesrestinthesemodels,rendering
MD(andupdating)throughaviewcomponenttreeandplainHTMLtemplates.
MDScreencasts




--
Bestregards,
Olegmailto:[EMAIL PROTECTED]




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



Customizing RadioChoice

2007-10-05 Thread Clay Lehman
I am trying to customize RadioChoice so that it puts the options into a
nice table.  I found setPrefix and setSuffix, but I cant just do
setSuffix(nbsp;) because I want to have a differenct prefix  suffix
based on the index (for example create a new row in a table for every
4th option).

 

getPrefix and getSuffix are final methods, so I can't override them.
Does anyone know of a way that I can accomplish this task using
RadioChoice? Or will I have to go with a RadioGroup ...I'd rather have
the list of options generated dynamically than from the HTML, if
possible.

 

Thanks for any help!

-Clay

 



Re: Customizing RadioChoice

2007-10-05 Thread Martijn Dashorst
I'd say go with RadioGroup, that is what it is intended for.

The RadioChoice is intended for quick solutions, do you want more
possibilities, use the Group.

And you can just use a RepeatingView inside the Group to dynamically
generate the Radio's

Martijn

On 10/5/07, Clay Lehman [EMAIL PROTECTED] wrote:
 I am trying to customize RadioChoice so that it puts the options into a
 nice table.  I found setPrefix and setSuffix, but I cant just do
 setSuffix(nbsp;) because I want to have a differenct prefix  suffix
 based on the index (for example create a new row in a table for every
 4th option).



 getPrefix and getSuffix are final methods, so I can't override them.
 Does anyone know of a way that I can accomplish this task using
 RadioChoice? Or will I have to go with a RadioGroup ...I'd rather have
 the list of options generated dynamically than from the HTML, if
 possible.



 Thanks for any help!

 -Clay






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

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



Re: Customizing RadioChoice

2007-10-05 Thread Martijn Dashorst
/me goes back to writing about RadioGroup

On 10/5/07, Martijn Dashorst [EMAIL PROTECTED] wrote:
 I'd say go with RadioGroup, that is what it is intended for.

 The RadioChoice is intended for quick solutions, do you want more
 possibilities, use the Group.

 And you can just use a RepeatingView inside the Group to dynamically
 generate the Radio's

 Martijn

 On 10/5/07, Clay Lehman [EMAIL PROTECTED] wrote:
  I am trying to customize RadioChoice so that it puts the options into a
  nice table.  I found setPrefix and setSuffix, but I cant just do
  setSuffix(nbsp;) because I want to have a differenct prefix  suffix
  based on the index (for example create a new row in a table for every
  4th option).
 
 
 
  getPrefix and getSuffix are final methods, so I can't override them.
  Does anyone know of a way that I can accomplish this task using
  RadioChoice? Or will I have to go with a RadioGroup ...I'd rather have
  the list of options generated dynamically than from the HTML, if
  possible.
 
 
 
  Thanks for any help!
 
  -Clay
 
 
 
 


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



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

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



Re: Customizing RadioChoice

2007-10-05 Thread Martijn Dashorst
Hmm,

Opening up the get*fix methods doesn't seem risky, but I'm not sure
what we are going to do with the change recording. That is the only
thing I can tell why the methods are final.

Your usecase is interesting though. In this case opening the get*fix
methods doesn't seem to open a can of worms, other than limiting the
backbutton versioning. But in your case the set*fix method wouldn't be
called in the first place.

I'm +1 on removing final from the get*fix methods on the RadioChoice
component. Anyone else reading along and objecting?

Martijn

On 10/5/07, Clay Lehman [EMAIL PROTECTED] wrote:
 I am trying to customize RadioChoice so that it puts the options into a
 nice table.  I found setPrefix and setSuffix, but I cant just do
 setSuffix(nbsp;) because I want to have a differenct prefix  suffix
 based on the index (for example create a new row in a table for every
 4th option).



 getPrefix and getSuffix are final methods, so I can't override them.
 Does anyone know of a way that I can accomplish this task using
 RadioChoice? Or will I have to go with a RadioGroup ...I'd rather have
 the list of options generated dynamically than from the HTML, if
 possible.



 Thanks for any help!

 -Clay






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

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



Re: Adding a Link for a Whole ListItem

2007-10-05 Thread Christopher Gardner
I'm continuing to experiment with making a click of a row do a page
refresh.  I coded up a class called LinkableListView that uses a
LinkableListItem, which implements ILinkListener.  When the
LinkableListItem's onLinkedClick() is called, LinkableListItem
delegates back to LinkableListView.onClick().

Here is the what my LinkableListView generates for the 2 tr's.

!-- for row zero --
...
 tr 
onclick=window.location.href='?wicket:interface=:0:plan:0:::ILinkListener::';return
false;
...
!-- for row one --
tr 
onclick=window.location.href='?wicket:interface=:0:plan:1:::ILinkListener::';return
false;

To use this component, I created a very simple page with two tables.

One table contains a list of objects fetched from memory.  These
objects are fetched only once (at WebPage construction time).  Now
when I click on a row, I want the data from the LinkableListItem in
the selected row to be popped over to the second table which is
designed to hold only a single row.

In this simple page, EVERY time I click on a row in table 1, I get the
page expired message.  I'm new to Wicket, so please forgive and blot
out my ignorance.


On 10/4/07, swaroop belur [EMAIL PROTECTED] wrote:


 Look up how requesttargets work in wicket. In particular
 look up ListenerInterfaceRequestTarget for this use case.
 It just knows how to call ur component(link for example)
 in ur page object. Call will land in onLinkClicked.

 -swaroop






 Christopher Gardner-2 wrote:
 
  Thank you.  I got this to work.  Now I'm wondering how the
  ILinkListener gets registered to pick up the event.  Does anything
  that happens to implement that interface automatically get registered?
 
  On 10/3/07, Martijn Dashorst [EMAIL PROTECTED] wrote:
  Yes, but odds are you already had to do that, to override populateItem().
 
  Martijn
 
  On 10/3/07, Christopher Gardner [EMAIL PROTECTED] wrote:
   Do you also have to subclass ListView (overriding newItem()) to create
   an object of the ListItem subclass?
  
   On 10/3/07, Maurice Marrink [EMAIL PROTECTED] wrote:
Yes you can, The trick is to extend ListItem and have it implement
ILinkListener you can then add the onclick behavior through an
attributemodifier or override oncomponenttag. To prevent having to
make a subclass per page you should make the onLinkClicked method in
your listitem redirect to a method in your listview.
   
I could show you our code but it is cluttered with non relevant code,
and the above really says it all.
   
Maurice
   
On 10/3/07, Christopher Gardner [EMAIL PROTECTED] wrote:
 With a ListView is there a way to actually create a Link component
 that encompasses the whole ListItem, such that when you click
  anywhere
 on a row the onClick event is fired?  I know you can do this with
  Ajax
 support, but I'm curious if you can do this using the traditional
  way,
 i.e., with a full page refresh.  I don't want to add a click here
 button to my row.


  -
 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]
  
  
 
 
  --
  Buy Wicket in Action: http://manning.com/dashorst
  Apache Wicket 1.3.0-beta3 is released
  Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta3/
 
  -
  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/Adding-a-Link-for-a-Whole-ListItem-tf4561727.html#a13032210
 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: wicket:container beta3 and post snapshots

2007-10-05 Thread dukehoops

I'm seeing the same problem.

My markup:
wicket:container id=loginInfoContainer
[userName]
!--Hello,
 # 
[userName]
/a--
/wicket:container

Code:

//in page constructor
WebMarkupContainer loginInfoContainer = new
WebMarkupContainer(loginInfoContainer);
Label userNameLabel = new Label(userNameLabel, new
PropertyModel(this.getUserWebState(), userName));
this.loginInfoContainer.add(userNameLabel);

//exception:
org.apache.wicket.markup.MarkupException: Failed to handle:
wicket:container id=loginInfoContainer

BTW, using wicket:enclosure instead works.

-nikita



igor.vaynberg wrote:
 
 works fine for me
 
 WebMarkupContainer container = new WebMarkupContainer(container);
 add(container);
 container.add(new Label(label, hello));
 
 wicket:container wicket:id=containerdiv
 wicket:id=label/div/wicket:container
 
 -igor
 
 On 8/31/07, Evan Chooly [EMAIL PROTECTED] wrote:

 I suddenly started getting errors using wicket:container saying it failed
 to
 handle it.  Is anyone else seeing this or is my env just really busted?

 
 

-- 
View this message in context: 
http://www.nabble.com/wicket%3Acontainer-beta3-and-post-snapshots-tf4360832.html#a13068497
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: wicket:container beta3 and post snapshots

2007-10-05 Thread dukehoops

Duh, my markup was wrong! should have been wicket:container wicket:id




dukehoops wrote:
 
 I'm seeing the same problem.
 
 My markup:
 wicket:container id=loginInfoContainer
 
 __span wicket:id=userNameLabel[userName]/__span  
 
 /wicket:container
 
 

-- 
View this message in context: 
http://www.nabble.com/wicket%3Acontainer-beta3-and-post-snapshots-tf4360832.html#a13068614
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: wicket:container beta3 and post snapshots

2007-10-05 Thread Igor Vaynberg
submit a quickstart and make sure you are trying against trunk

-igor


On 10/5/07, dukehoops [EMAIL PROTECTED] wrote:

 Duh, my markup was wrong! should have been wicket:container wicket:id




 dukehoops wrote:
 
  I'm seeing the same problem.
 
  My markup:
  wicket:container id=loginInfoContainer
 
  __span wicket:id=userNameLabel[userName]/__span
 
  /wicket:container
 
 

 --
 View this message in context: 
 http://www.nabble.com/wicket%3Acontainer-beta3-and-post-snapshots-tf4360832.html#a13068614
 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: wicket:container beta3 and post snapshots

2007-10-05 Thread dukehoops

once I fixed my markup typo everything worked fine - so nothing to fix here.

-nikita


igor.vaynberg wrote:
 
 submit a quickstart and make sure you are trying against trunk
 
 -igor
 
 
 On 10/5/07, dukehoops [EMAIL PROTECTED] wrote:

 Duh, my markup was wrong! should have been wicket:container
 wicket:id




 dukehoops wrote:
 
  I'm seeing the same problem.
 
  My markup:
  wicket:container id=loginInfoContainer
 
  __span wicket:id=userNameLabel[userName]/__span
 
  /wicket:container
 
 

 --
 View this message in context:
 http://www.nabble.com/wicket%3Acontainer-beta3-and-post-snapshots-tf4360832.html#a13068614
 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/wicket%3Acontainer-beta3-and-post-snapshots-tf4360832.html#a13068713
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: Custom label for number and currency formatting?

2007-10-05 Thread Tauren Mills
Thanks for the ideas.  Here is my implementation.  I split it into two
classes since I may want to use the CurrencyConverter separately.  In
my initial testing it works well, but I haven't tested
convertToObject().  Let me know if anyone sees any issues or has
suggested improvements:

public class CurrencyConverter extends AbstractNumberConverter {
private static final long serialVersionUID = 1L;

public CurrencyConverter() {
}

@Override
public NumberFormat getNumberFormat(Locale locale) {
return NumberFormat.getCurrencyInstance(locale);
}

@Override
public Class getTargetType() {
return Double.class;
}

public Object convertToObject(String value, Locale locale) {
// string to double.
try {
return getNumberFormat(locale).parse(value).doubleValue();
} catch (ParseException ex) {
throw new WicketRuntimeException(exception when trying to
parse currency value: + ex.getMessage());
}
}

@Override
public String convertToString(Object value, Locale locale) {
// double to string
return getNumberFormat(locale).format(value);
}

}

public class CurrencyLabel extends Label {
private static final long serialVersionUID = 1L;

public CurrencyLabel(String id) {
this(id,null);
}

public CurrencyLabel(String id, IModel model) {
super(id,model);
}

public IConverter getConverter(Class type) {
return new CurrencyConverter();
}

}

Anyone can feel free to use this or add it to Wicket core.

Tauren



On 10/5/07, Eelco Hillenius [EMAIL PROTECTED] wrote:
  Label dbl = new Label(dbllbl,+x){

 Why pass in a string? Better is to do new Label(foo, new Model(x));

  @Override
  protected void onComponentTagBody(final 
  MarkupStream markupStream, final
  ComponentTag openTag)
  {
  Object val = 
  getConverter().convert(getModelObjectAsString(),

 If you are merely displaying the value, you don't need to convert.
 What this line above does - if you'd pass in a model that produces a
 number) is convert from a number to a string (using the converter,
 this is in getModelObjectAsString) and back again. You can just do
 Object val = getModelObject().

 Alternatives:
 1) Wrap the model (decorator pattern) so that it returns the formatted value.
 2) Use a custom converter like:

   new Label(foo, new Model(x)) {
 public IConverter getConverter(Class type) {
   return new AbstractNumberConverter() {
 public NumberFormat getNumberFormat(Locale locale) {
   return NumberFormat.getCurrencyInstance();
 }
   }
 }
   }


 Eelco

 -
 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-contrib-input-events : keyboard shortcuts for wicket

2007-10-05 Thread Nino Saturnino Martinez Vazquez Wael

Hi

Just wanted to tell that the first working release of input events now 
are in place, although currently only available via wicket stuff svn.


You can bind keys to alot of stuff, form submission, ajax events, 
buttons... The best part its easy;) Just add the behavior and tell which 
key to use, the behavior supports autohooking..


Read more on the wiki:

http://wicketstuff.org/confluence/display/STUFFWIKI/wicket-stuff-contrib-input-events


-regards Nino

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



Re: CompoundPropertyModel stops working when form validation fails.

2007-10-05 Thread Kent Tong


Fabio Fioretti wrote:
 
 The ListChoice uses the same AbstractModel on which the panel inside
 the form builds its CompoundPropertyModel (see my previous posts):
 when user's selection changes, the AbstractModel correctly replaces
 its object with the newly selected instance and the form gets
 refreshed by an AjaxFormComponentUpdatingBehavior (attached to
 ListChoice's onclick event) to display the new instance (read from
 the same AbstractModel).
 

Even though you're not using wantOnSelectionChangedNotifications(),
what I said applies: you need to call clearInput() like:

ListChoice lc = new ListChoice(lc, ...);
lc.add(new OnChangeAjaxBehavior() {
protected void onUpdate(AjaxRequestTarget target) {
recommendationForm.clearInput(); //THIS LINE IS WHAT 
YOU NEED
target.addComponent(recommendationPanel);
}
});


-- 
View this message in context: 
http://www.nabble.com/CompoundPropertyModel-stops-working-when-form-validation-fails.-tf4562483.html#a13069881
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: Form.onComponentTagBody()

2007-10-05 Thread Kent Tong


cblehman wrote:
 
 Does anyone have a suggest for how to insert a table tag as the first
 item before any components that were added to the Form, but after the
 hidden fields that Form adds? I basically want to render the following:
 

Instead of inserting a table, I'd suggest that you use CSS to do the
layout.
See http://www.quirksmode.org/css/forms.html for a simple example.

--
Kent Tong
Free tutorials on Wicket at http://www.agileskills2.org/EWDW
-- 
View this message in context: 
http://www.nabble.com/Form.onComponentTagBody%28%29-tf4575419.html#a13070025
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: hot redeploy of java classes

2007-10-05 Thread Kent Tong


Artur W. wrote:
 
 I tried to do the same in tomcat 5.5. I added autoDeploy=true to the
 host but it doesn't
 work. Anyone has any idea how to force tomcat to do that?
 

You need reloadable in Context, not autoDeploy. There is step-by-step in
my free 
tutorial (see my signature below).

--
Kent Tong
Free tutorials on Wicket at http://www.agileskills2.org/EWDW
-- 
View this message in context: 
http://www.nabble.com/hot-redeploy-of-java-classes-tf4573767.html#a13070054
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: Ajax dropdownchoice doesn't work after submit

2007-10-05 Thread Kent Tong


Larva wrote:
 
   public final void onSubmit()
   {
   SiconaraBasePage page = (SiconaraBasePage)getPage();
   List pageFilters = page.getFilterProperties();
   
   if (pageFilters != null)
   pageFilters.clear();
 
   ParFiltro f1 = new ParFiltro(afiliado.delegacion.tipo,
 getTipoDelegacion());
   ParFiltro f2 = new ParFiltro(afiliado.delegacion.alias,
 getDelegacion());
   if (f1.getValue() != null  !f1.getValue().equals())
   pageFilters.add(f1);
   if (f2.getValue() != null  !f2.getValue().equals())
   pageFilters.add(f2);
   page.render();
   }
 
 The ParFiltro class is a utility class wich contains a pair property-value
 used in the page to filter data.
 That's because I need to invoke the page.render() method.
 I'm doing something wrong? There is another way to do it?
 

Am I missing something here? You should call:

setResponsePage(page);
//page.render();

--
Kent Tong
Free tutorials on Wicket at http://www.agileskills2.org/EWDW

-- 
View this message in context: 
http://www.nabble.com/Ajax-dropdownchoice-doesn%27t-work-after-submit-tf4574920.html#a13070084
Sent from the Wicket - User mailing list archive at Nabble.com.


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