Re: wicket 1.4 release

2008-10-02 Thread Johan Compagner
yes we should make a 1.3.5 and a 1.4m4 asap, there are a lot of changes
I think i will make some time this weekend to look over jira issues and also
merge back a lot of changes i already did in 1.3.5

igor did also a lot of stuff already so for me within 1 or 2 weeks we could
do both releases

johan


On Thu, Oct 2, 2008 at 8:15 AM, Stefan Lindner [EMAIL PROTECTED] wrote:

 It's clear that it's not possible to estimate the release of 1.4 final. But
 can anybody tell us whether a new snapshot (1.4M4) is in sight?

 Stefan

 -Ursprüngliche Nachricht-
 Von: Timo Rantalaiho [mailto:[EMAIL PROTECTED]
 Gesendet: Donnerstag, 2. Oktober 2008 05:37
 An: users@wicket.apache.org
 Betreff: Re: wicket 1.4 release

 On Wed, 01 Oct 2008, lesterburlap wrote:
  I've searched everywhere and can't find an answer.  I know this is kind
 of a
  crappy question to ask the developers...
 
  Is there an estimate for a Wicket 1.4 GA release?  Will it possibly be by
  January 2009?

 I think that it's impossible to estimate the releases of a
 volunteer-based open source projects in any meaningful way,
 unfortunately. If others know better, please pipe in.

 You can always follow the number of open issues


 https://issues.apache.org/jira/secure/IssueNavigator.jspa?reset=truepid=12310561fixfor=12313295resolution=-1sorter/field=issuekeysorter/order=DESC

  ( http://tinurl.us/a2b895 )

 but there might be some new ones coming in as well. Also
 work continues on 1.3.5 at the same time (fortunately, many
 of the issues can probably be fixed to both at the same time).

 Your good patches to the issues are bound to make the
 release happen earlier ;)

  I need to make a decision about whether or not to upgrade to 1.4-m3 from
  1.3. while intending to upgrade to 1.4 GA prior to my product release
 in
  January.  I need some stuff that's in 1.4, but I can't release our
 product
  with beta libraries included.

 Fortunately, there is not a lot of special testing for the
 releases, so a milestone is nearly good enough ;) What's more
 problematic with releasing with a milestone dependency are
 the possible API breaks.

 Best wishes,
 Timo

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

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


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




Re: Pure client side validation

2008-10-02 Thread harrypitt

Thanks for that solution,

To summarize that:
- Extend a normal Validator
- Add the IValidatorAddListener Interface
- Implement the onAdded method 
- In this method: add a Custom Behavior to the component
- In the custom Behavior: Integrate the js like described here:
http://cwiki.apache.org/WICKET/creating-a-behavior-to-use-a-javascript-library.html

But I think there are two weak points in that implementation (correct me if
I'm wrong):
- I have to rewrite the whole logic für the validator in Javascript (ok,
that's no surprise)
- In case the validator gets an error, I have to do an ajax request to
trigger the wicket feedback message system (a js only feedback would be a
problem, because js validation would produce duplicate messages after a
submit with errors). So in general I only avoid the ajax request if the js
validator finds no errors.

I have some additional questions about this topic:
- Are there any example implementations for such client side validations? 
- There is also a Wicket-Stuff project fvalidate: Has this project a
different concept?
- Is there a plan to integrate pure client side validation in the wicket
framework soon?  

Harry


igor.vaynberg wrote:
 
 it is possible, just not there out of the box. can look like something
 like this
 
 class rangejsvalidator extends rangevalidator implements
 IValidatorAddListener {
   void onAdded(Component component) { // add some behavior to output
 javascript validation }
 }
 
 -igor
 
 
-- 
View this message in context: 
http://www.nabble.com/Pure-client-side-validation-tp19737383p19774599.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



AW: wicket 1.4 release

2008-10-02 Thread Stefan Lindner
Sounds great! Thank you!

Stefan

-Ursprüngliche Nachricht-
Von: Johan Compagner [mailto:[EMAIL PROTECTED] 
Gesendet: Donnerstag, 2. Oktober 2008 09:26
An: users@wicket.apache.org
Betreff: Re: wicket 1.4 release

yes we should make a 1.3.5 and a 1.4m4 asap, there are a lot of changes
I think i will make some time this weekend to look over jira issues and also
merge back a lot of changes i already did in 1.3.5

igor did also a lot of stuff already so for me within 1 or 2 weeks we could
do both releases

johan


On Thu, Oct 2, 2008 at 8:15 AM, Stefan Lindner [EMAIL PROTECTED] wrote:

 It's clear that it's not possible to estimate the release of 1.4 final. But
 can anybody tell us whether a new snapshot (1.4M4) is in sight?

 Stefan

 -Ursprüngliche Nachricht-
 Von: Timo Rantalaiho [mailto:[EMAIL PROTECTED]
 Gesendet: Donnerstag, 2. Oktober 2008 05:37
 An: users@wicket.apache.org
 Betreff: Re: wicket 1.4 release

 On Wed, 01 Oct 2008, lesterburlap wrote:
  I've searched everywhere and can't find an answer.  I know this is kind
 of a
  crappy question to ask the developers...
 
  Is there an estimate for a Wicket 1.4 GA release?  Will it possibly be by
  January 2009?

 I think that it's impossible to estimate the releases of a
 volunteer-based open source projects in any meaningful way,
 unfortunately. If others know better, please pipe in.

 You can always follow the number of open issues


 https://issues.apache.org/jira/secure/IssueNavigator.jspa?reset=truepid=12310561fixfor=12313295resolution=-1sorter/field=issuekeysorter/order=DESC

  ( http://tinurl.us/a2b895 )

 but there might be some new ones coming in as well. Also
 work continues on 1.3.5 at the same time (fortunately, many
 of the issues can probably be fixed to both at the same time).

 Your good patches to the issues are bound to make the
 release happen earlier ;)

  I need to make a decision about whether or not to upgrade to 1.4-m3 from
  1.3. while intending to upgrade to 1.4 GA prior to my product release
 in
  January.  I need some stuff that's in 1.4, but I can't release our
 product
  with beta libraries included.

 Fortunately, there is not a lot of special testing for the
 releases, so a milestone is nearly good enough ;) What's more
 problematic with releasing with a milestone dependency are
 the possible API breaks.

 Best wishes,
 Timo

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

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


 -
 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: DefaultDataTable with date column

2008-10-02 Thread Edgar Merino
Or simply use an AbstractColumn for that, you can even create a reusable 
DateColumn:


public class DateColumn extends AbstractColumn {
   private String datePattern; //you can have a Pattern instead

   //You can overload the constructor, to have default date patterns 
for example

   public DateColumn(IModel columnName, String datePattern) {
  super(columnName);
  this.datePattern = datePattern;
   }

   public void populateItem(Item cellItem, String componentId, IModel 
model) {

  Document doc = (Document) model.getModelObject();
 
  SimpleDateFormat df = (SimpleDateFormat) DateFormat.getInstance();

  df.applyPattern(datePattern);
  cellItem.add(new Label(componentId, 
df.format(doc.getDeliveryDate(;

   }
}

Then just use this class as you would with any other column, along with 
a pattern to apply to the format:


ListIColumn columns = new ArrayListIColumn();
columns.add(new DateColumn(new Model(Delivery date), dd MMM  '@' 
hh:mm a));



Regards,
Edgar Merino




Jeremy Thomerson escribió:

The default java.util.Date converter within Wicket has varied between
releases.  I suggest adding this to the init method of your application
class and controlling the date format yourself if you need a specific
format:

((ConverterLocator) getConverterLocator()).set(Date.class, new
IConverterDate() {
private static final long serialVersionUID = 1L;
private final DateFormat mFormat = new
SimpleDateFormat(MM/dd/yy hh:mm:ss.SSS);
public Date convertToObject(String value, Locale locale) {
try {
return mFormat.parse(value);
} catch (ParseException e) {
e.printStackTrace();
}
return null;
}

public String convertToString(Date value, Locale locale) {
return mFormat.format(value);
}

});

  



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



Re: Having Wicket append #someanchor

2008-10-02 Thread Nino Saturnino Martinez Vazquez Wael
I would probably just do a simple javascript and make a 
headercontribution... But I guess it's not really the standard way when 
it comes to anchors...


Craig Tataryn wrote:

*bump*

On Wed, Oct 1, 2008 at 2:04 PM, Craig Tataryn [EMAIL PROTECTED] wrote:

  

I was wondering if there is a way to have Wicket append some anchor
information to a response page?

So if I were on: MyPage.html, then they click a submit button and the
server side codes does a setResponsePage(MyPage.class) I would want the
actual page to be MyPage.html#someanchor

A suggestion on ##wicket was to do a redirect through httpServletResponse
and rewrite the url myself, but I wanted to know if Wicket supported this a
bit more out of the box

Thanks!

Craig.

--
Craig Tataryn
site: http://www.basementcoders.com/
podcast:http://feeds.feedburner.com/TheBasementCoders
irc: ThaDon on freenode #basementcoders, ##wicket, #papernapkin
im: [EMAIL PROTECTED], skype: craig.tataryn






  


--
-Wicket for love

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


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



Re: linking to a text ResourceReference

2008-10-02 Thread Ryan McKinley

thanks!

I knew it was one line.  You guys are great!


On Sep 30, 2008, at 10:39 PM, Igor Vaynberg wrote:


call urlfor(resourcereference)

-igor

On Tue, Sep 30, 2008 at 6:08 PM, Ryan McKinley [EMAIL PROTECTED]  
wrote:

Hello-

I know I have seen an example of this somewhere, so i'm feeling  
kinda silly

as I ask for help

I am trying to integrate Open Flash Charts (OFC) with wicket.  You  
pass OFC

a url containing json to draw a chart.  Something like:

script type=text/javascript
var so = new SWFObject(/open-flash-chart.swf, chart, 500,  
300, 9,

#FF);
so.addVariable(data-file, ${TODO -- need to have link to data} );
so.addParam(allowScriptAccess, sameDomain);
so.write(my_chart);
/script

I know I can use a global mount point, but I'm looking to do  
something

similar to how JFreeChart works
http://cwiki.apache.org/WICKET/jfreechart-and-wicket-example.html

Where you have a Chart object in the Component scope and various  
actions can

manipulate it.

I can create a WebResource -- but how would I pass the URL to  
javascript?


Any pointers would be great!
thanks
ryan


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



CFP ApacheCon EU 2009

2008-10-02 Thread Martijn Dashorst
If you only have thirty seconds:

The Call for Papers for ApacheCon Europe 2009, to be held in
Amsterdam, from 23rd to 27th March, is now open! Submit your proposals
at http://eu.apachecon.com/c/aceu2009/cfp/ before 24th October.

Remember that early bird prices for ApacheCon US 2008, to be held in
New Orleans, from 3rd to 7th November, will go up this Friday, at
midnight Eastern time!

Sponsorship opportunities for ApacheCon US 2008 and ApacheCon EU 2009
are still available. If you or your company are interested in becoming
a sponsor, please contact Delia Frees at [EMAIL PROTECTED] for
details.

***

If you want all the details:

ApacheCon Europe 2009 - Leading the Wave of Open Source
Amsterdam, The Netherlands
23rd to 27th March, 2009

Call for Papers Opens for ApacheCon Europe 2009

The Apache Software Foundation (ASF) invites submissions to its
official conference, ApacheCon Europe 2009. To be held 23rd to 27th
March, 2009 at the Mövenpick Hotel Amsterdam City Centre, ApacheCon
serves as a forum for showcasing the ASF's latest developments,
including its projects, membership, and community. ApacheCon offers
unparalleled educational opportunities, with dedicated presentations,
hands-on trainings, and sessions that address core technology,
development, business/marketing, and licensing issues in Open Source.

ApacheCon's wide range of activities are designed to promote the
exchange of ideas amongst ASF Members, innovators, developers,
vendors, and users interested in the future of Open Source technology.
The conference program includes competitively selected presentations,
trainings/workshops, and a small number of invited speakers. All
sessions undergo a peer review process by the ApacheCon Conference
Planning team. The following information provides presentation
category descriptions, and information about how to submit your
proposal.

Conference Themes and Topics

APACHECON 2009 - LEADING THE WAVE OF OPEN SOURCE

Building on the success of the last two years, we are excited to
return to Amsterdam in 2009. We'll be continuing to offer our very
popular two-day trainings, including certifications of completion for
those who fulfill all the requirements of these trainings.

The ASF comprises some of the most active and recognized developers in
the Open Source community. By bringing together the pioneers,
developers, and users of flagship Open Source technologies, ApacheCon
provides an influential platform for dialogue, between the speaker and
the audience, between project contributors and the community at large,
traversing a wide range of ideas, expertise, and personalities.

ApacheCon welcomes submissions from like-minded delegates across many
fields, geographic locations, and areas of development. The breadth
and loosely-structured nature of the Apache community lends itself to
conference content that is also somewhat loosely-structured. Common
themes of interest address groundbreaking technologies and emerging
trends, successful practices (from development to deployment), and
lessons learned (tips, tools, and tricks). In addition to technical
content, ApacheCon invites Business Track submissions that address
Open Source business, marketing, and legal/licensing issues.

Topics appropriate for submission to this conference are manifold, and
may include but are not restricted to:

- Apache HTTP server topics such as installation, configuration, and migration
- ASF-wide projects such as Lucene, SpamAssassin, Jackrabbit, and Maven
- Scripting languages and dynamic content such as Java, Perl, Python,
Ruby, XSL, and PHP
- Security and e-commerce
- Performance tuning, load balancing and high availability
- New technologies and broader initiatives such as Web Services and Web 2.0
- ASF-Incubated projects such as Sling, UIMA, and Shindig


Submission Guidelines
Submissions must include
- Title
- Speaker name, with affiliation and email address
- Speaker bio (100 words or less)
- Short description (50 words or less)
- Full description including abstract and objectives (200 words or
less)
- Expertise level (beginner to advanced)
- Format and duration (trainings vs. general presentation; half-,
full- or two-day workshop, etc.)
- Intended audience and maximum number of participants (trainings only)
- Background knowledge expected of the participants (trainings only)


Types of Presentations

- Trainings/Workshops
- General Sessions
- Case Studies/Industry Profiles
- Invited Keynotes/Panels/Speakers
- Corporate Showcases  Demonstrations

BoF sessions and Fast Feather Track talks will be selected separately

Pre Conference Trainings/Workshops
Held on the first and second day of the conference – 2008-03-23 and
2008-03-24, Trainings require a registration fee beyond the regular
conference fee. Proposals may be submitted for half-day (3 hours),
full-day (6 hours), or two-day (12 hours) training sessions, aimed at
providing in-depth, hands-on development experience or related
continuing education. Training 

Re: Pure client side validation

2008-10-02 Thread Nino Saturnino Martinez Vazquez Wael



harrypitt wrote:

Thanks for that solution,

To summarize that:
- Extend a normal Validator
- Add the IValidatorAddListener Interface
- Implement the onAdded method 
- In this method: add a Custom Behavior to the component

- In the custom Behavior: Integrate the js like described here:
http://cwiki.apache.org/WICKET/creating-a-behavior-to-use-a-javascript-library.html

But I think there are two weak points in that implementation (correct me if
I'm wrong):
- I have to rewrite the whole logic für the validator in Javascript (ok,
that's no surprise)
- In case the validator gets an error, I have to do an ajax request to
trigger the wicket feedback message system (a js only feedback would be a
problem, because js validation would produce duplicate messages after a
submit with errors). So in general I only avoid the ajax request if the js
validator finds no errors.

I have some additional questions about this topic:
- Are there any example implementations for such client side validations? 
- There is also a Wicket-Stuff project fvalidate: Has this project a

different concept?
- Is there a plan to integrate pure client side validation in the wicket
framework soon?

I wont be doing pure client side validation, as it is unsafe..


Harry


igor.vaynberg wrote:
  

it is possible, just not there out of the box. can look like something
like this

class rangejsvalidator extends rangevalidator implements
IValidatorAddListener {
  void onAdded(Component component) { // add some behavior to output
javascript validation }
}

-igor





--
-Wicket for love

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


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



Re: How to get rid of wicket:id in XML output

2008-10-02 Thread Martijn Dashorst
Why mocking with that setter. Put wicket in deployment mode. That way
you can't mess up the order of setting things. Read chapter 14 of
Wicket in Action on configuring Wicket—it will tell you to call
super.init() first before doing anything yourself. It also instructs
you to *NEVER* deploy your web app with development mode to a
production system.

Martijn

On Wed, Oct 1, 2008 at 2:24 PM, Stefan Lindner [EMAIL PROTECTED] wrote:
 I'm trying to build a dynamic site map according to Michael Sparers
 article
 http://cwiki.apache.org/WICKET/seo-search-engine-optimization.html
 Instead of an HTML page a XML page is used with XML markup looking like

?xml version=1.0 encoding=UTF-8?
urlset xmlns=http://www.sitemaps.org/schemas/sitemap/0.9;
   url wicket:id=urlList
loc wicket:id=locNodehttp://www.example.com//loc
lastmod wicket:id=lastmodNode2005-01-01/lastmod
changefreq wicket:id=changefreqNodemonthly/changefreq
priority wicket:id=priorityNode0.8/priority
/url
/urlset

 When I use a ListView for urlList and add Labels for locNode etc.
 the wicket:id properties are included in the XML output.

 How can I get rid of wicket:id? Setting a global
 getMarkupSettings().setStripWicketTags(true) does not work.

 I use Wicket 1.4M3

 Stefan


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





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

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



URL to use with mod_jk

2008-10-02 Thread Piller Sébastien

Hi guys,

in my project, I very often use absolute url, built with 
RequestUtils.toAbsolutePath. It works just fine, all my ressources are 
available.


I recently installed Apache and mod_jk.

Are the url valid to be served through apache/mod_jk?

Because they have a form like 
http://domain/foo/bar/resources/org.apache.wicket.Application//path/to/my/file.png


and I was wondering if an url like above will be served through apache 
or through tomcat? (my goal is to serve static files through apache, 
like everybody ;))


thank you

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



Re: Pure client side validation

2008-10-02 Thread harrypitt

Ok, my question was not clear enough.

With Pure client side validation i mean a javascript validation which
needs no ajax requests. Of course there should be always a server side
validation and the whole default Wicket form-handling AFTER the submit. It
would be really stupid to just rely on javascript validation. 


Nino.Martinez wrote:
 
 I wont be doing pure client side validation, as it is unsafe..
 

-- 
View this message in context: 
http://www.nabble.com/Pure-client-side-validation-tp19737383p19777140.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: DefaultDataTable with date column

2008-10-02 Thread Pablo S.

Great!
this is just what I need

Thanks
Pablo


--
From: Edgar Merino [EMAIL PROTECTED]
Sent: Thursday, October 02, 2008 5:19 AM
To: users@wicket.apache.org
Subject: Re: DefaultDataTable with date column

Or simply use an AbstractColumn for that, you can even create a reusable 
DateColumn:


public class DateColumn extends AbstractColumn {
   private String datePattern; //you can have a Pattern instead

   //You can overload the constructor, to have default date patterns for 
example

   public DateColumn(IModel columnName, String datePattern) {
  super(columnName);
  this.datePattern = datePattern;
   }

   public void populateItem(Item cellItem, String componentId, IModel 
model) {

  Document doc = (Document) model.getModelObject();
 SimpleDateFormat df = (SimpleDateFormat) DateFormat.getInstance();
  df.applyPattern(datePattern);
  cellItem.add(new Label(componentId, 
df.format(doc.getDeliveryDate(;

   }
}

Then just use this class as you would with any other column, along with a 
pattern to apply to the format:


ListIColumn columns = new ArrayListIColumn();
columns.add(new DateColumn(new Model(Delivery date), dd MMM  '@' 
hh:mm a));



Regards,
Edgar Merino




Jeremy Thomerson escribió:

The default java.util.Date converter within Wicket has varied between
releases.  I suggest adding this to the init method of your application
class and controlling the date format yourself if you need a specific
format:

((ConverterLocator) getConverterLocator()).set(Date.class, new
IConverterDate() {
private static final long serialVersionUID = 1L;
private final DateFormat mFormat = new
SimpleDateFormat(MM/dd/yy hh:mm:ss.SSS);
public Date convertToObject(String value, Locale locale) {
try {
return mFormat.parse(value);
} catch (ParseException e) {
e.printStackTrace();
}
return null;
}

public String convertToString(Date value, Locale locale) {
return mFormat.format(value);
}

});





-
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 1.4 release

2008-10-02 Thread Kristof Jozsa
totally out of topic and excuse me for my curiosity, but do you use
subversion to the heavy lifting with such branching/merging there or
use some distributed version control system behind the scenes?

K

On Thu, Oct 2, 2008 at 9:25 AM, Johan Compagner [EMAIL PROTECTED] wrote:
 yes we should make a 1.3.5 and a 1.4m4 asap, there are a lot of changes
 I think i will make some time this weekend to look over jira issues and also
 merge back a lot of changes i already did in 1.3.5

 igor did also a lot of stuff already so for me within 1 or 2 weeks we could
 do both releases

 johan


 On Thu, Oct 2, 2008 at 8:15 AM, Stefan Lindner [EMAIL PROTECTED] wrote:

 It's clear that it's not possible to estimate the release of 1.4 final. But
 can anybody tell us whether a new snapshot (1.4M4) is in sight?

 Stefan

 -Ursprüngliche Nachricht-
 Von: Timo Rantalaiho [mailto:[EMAIL PROTECTED]
 Gesendet: Donnerstag, 2. Oktober 2008 05:37
 An: users@wicket.apache.org
 Betreff: Re: wicket 1.4 release

 On Wed, 01 Oct 2008, lesterburlap wrote:
  I've searched everywhere and can't find an answer.  I know this is kind
 of a
  crappy question to ask the developers...
 
  Is there an estimate for a Wicket 1.4 GA release?  Will it possibly be by
  January 2009?

 I think that it's impossible to estimate the releases of a
 volunteer-based open source projects in any meaningful way,
 unfortunately. If others know better, please pipe in.

 You can always follow the number of open issues


 https://issues.apache.org/jira/secure/IssueNavigator.jspa?reset=truepid=12310561fixfor=12313295resolution=-1sorter/field=issuekeysorter/order=DESC

  ( http://tinurl.us/a2b895 )

 but there might be some new ones coming in as well. Also
 work continues on 1.3.5 at the same time (fortunately, many
 of the issues can probably be fixed to both at the same time).

 Your good patches to the issues are bound to make the
 release happen earlier ;)

  I need to make a decision about whether or not to upgrade to 1.4-m3 from
  1.3. while intending to upgrade to 1.4 GA prior to my product release
 in
  January.  I need some stuff that's in 1.4, but I can't release our
 product
  with beta libraries included.

 Fortunately, there is not a lot of special testing for the
 releases, so a milestone is nearly good enough ;) What's more
 problematic with releasing with a milestone dependency are
 the possible API breaks.

 Best wishes,
 Timo

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

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


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





Re: wicket 1.4 release

2008-10-02 Thread James Carman
Apache projects have to do things transparently, so most of the work
is (or should be) done in Subversion.  Apache is all about the
community.

On Thu, Oct 2, 2008 at 8:44 AM, Kristof Jozsa [EMAIL PROTECTED] wrote:
 totally out of topic and excuse me for my curiosity, but do you use
 subversion to the heavy lifting with such branching/merging there or
 use some distributed version control system behind the scenes?

 K

 On Thu, Oct 2, 2008 at 9:25 AM, Johan Compagner [EMAIL PROTECTED] wrote:
 yes we should make a 1.3.5 and a 1.4m4 asap, there are a lot of changes
 I think i will make some time this weekend to look over jira issues and also
 merge back a lot of changes i already did in 1.3.5

 igor did also a lot of stuff already so for me within 1 or 2 weeks we could
 do both releases

 johan


 On Thu, Oct 2, 2008 at 8:15 AM, Stefan Lindner [EMAIL PROTECTED] wrote:

 It's clear that it's not possible to estimate the release of 1.4 final. But
 can anybody tell us whether a new snapshot (1.4M4) is in sight?

 Stefan

 -Ursprüngliche Nachricht-
 Von: Timo Rantalaiho [mailto:[EMAIL PROTECTED]
 Gesendet: Donnerstag, 2. Oktober 2008 05:37
 An: users@wicket.apache.org
 Betreff: Re: wicket 1.4 release

 On Wed, 01 Oct 2008, lesterburlap wrote:
  I've searched everywhere and can't find an answer.  I know this is kind
 of a
  crappy question to ask the developers...
 
  Is there an estimate for a Wicket 1.4 GA release?  Will it possibly be by
  January 2009?

 I think that it's impossible to estimate the releases of a
 volunteer-based open source projects in any meaningful way,
 unfortunately. If others know better, please pipe in.

 You can always follow the number of open issues


 https://issues.apache.org/jira/secure/IssueNavigator.jspa?reset=truepid=12310561fixfor=12313295resolution=-1sorter/field=issuekeysorter/order=DESC

  ( http://tinurl.us/a2b895 )

 but there might be some new ones coming in as well. Also
 work continues on 1.3.5 at the same time (fortunately, many
 of the issues can probably be fixed to both at the same time).

 Your good patches to the issues are bound to make the
 release happen earlier ;)

  I need to make a decision about whether or not to upgrade to 1.4-m3 from
  1.3. while intending to upgrade to 1.4 GA prior to my product release
 in
  January.  I need some stuff that's in 1.4, but I can't release our
 product
  with beta libraries included.

 Fortunately, there is not a lot of special testing for the
 releases, so a milestone is nearly good enough ;) What's more
 problematic with releasing with a milestone dependency are
 the possible API breaks.

 Best wishes,
 Timo

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

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


 -
 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 1.4 release

2008-10-02 Thread Johan Compagner
we use subversion.

I hope that apache will upgrade all the servers to the latest subversion
version (1.5.x)
or did they already do that?

Because there merging is a bit simpler, i still want to test there real
merge client they now have
but pity is that that is an sub thing of there Collab desktop (that wants to
have mylyn and so on)
instead of the where it should be just in the subclipse plugin

johan


On Thu, Oct 2, 2008 at 2:44 PM, Kristof Jozsa [EMAIL PROTECTED]wrote:

 totally out of topic and excuse me for my curiosity, but do you use
 subversion to the heavy lifting with such branching/merging there or
 use some distributed version control system behind the scenes?

 K

 On Thu, Oct 2, 2008 at 9:25 AM, Johan Compagner [EMAIL PROTECTED]
 wrote:
  yes we should make a 1.3.5 and a 1.4m4 asap, there are a lot of changes
  I think i will make some time this weekend to look over jira issues and
 also
  merge back a lot of changes i already did in 1.3.5
 
  igor did also a lot of stuff already so for me within 1 or 2 weeks we
 could
  do both releases
 
  johan
 
 
  On Thu, Oct 2, 2008 at 8:15 AM, Stefan Lindner [EMAIL PROTECTED]
 wrote:
 
  It's clear that it's not possible to estimate the release of 1.4 final.
 But
  can anybody tell us whether a new snapshot (1.4M4) is in sight?
 
  Stefan
 
  -Ursprüngliche Nachricht-
  Von: Timo Rantalaiho [mailto:[EMAIL PROTECTED]
  Gesendet: Donnerstag, 2. Oktober 2008 05:37
  An: users@wicket.apache.org
  Betreff: Re: wicket 1.4 release
 
  On Wed, 01 Oct 2008, lesterburlap wrote:
   I've searched everywhere and can't find an answer.  I know this is
 kind
  of a
   crappy question to ask the developers...
  
   Is there an estimate for a Wicket 1.4 GA release?  Will it possibly be
 by
   January 2009?
 
  I think that it's impossible to estimate the releases of a
  volunteer-based open source projects in any meaningful way,
  unfortunately. If others know better, please pipe in.
 
  You can always follow the number of open issues
 
 
 
 https://issues.apache.org/jira/secure/IssueNavigator.jspa?reset=truepid=12310561fixfor=12313295resolution=-1sorter/field=issuekeysorter/order=DESC
 
   ( http://tinurl.us/a2b895 )
 
  but there might be some new ones coming in as well. Also
  work continues on 1.3.5 at the same time (fortunately, many
  of the issues can probably be fixed to both at the same time).
 
  Your good patches to the issues are bound to make the
  release happen earlier ;)
 
   I need to make a decision about whether or not to upgrade to 1.4-m3
 from
   1.3. while intending to upgrade to 1.4 GA prior to my product
 release
  in
   January.  I need some stuff that's in 1.4, but I can't release our
  product
   with beta libraries included.
 
  Fortunately, there is not a lot of special testing for the
  releases, so a milestone is nearly good enough ;) What's more
  problematic with releasing with a milestone dependency are
  the possible API breaks.
 
  Best wishes,
  Timo
 
  --
  Timo Rantalaiho
  Reaktor Innovations OyURL: http://www.ri.fi/ 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 



Re: wicket 1.4 release

2008-10-02 Thread lesterburlap

 re: 1.4m4

Do milestone releases come before beta releases?  (or do you just go
straight to final from milestone?)

LBB


-- 
View this message in context: 
http://www.nabble.com/wicket-1.4-release-tp19772502p19779596.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Inmethod Grid with wicket 1.3

2008-10-02 Thread lesterburlap


Jim Pinkham wrote:
 
 I'm getting this error at runtime I don't understand:
 
 NoSuchMethodError: org.apache.wicket.MetaDataKey: method init()V not
 found
 at
 com.inmethod.grid.common.AbstractGrid$4.init(AbstractGrid.java:908)
 at
 com.inmethod.grid.common.AbstractGrid.clinit(AbstractGrid.java:907)
 at org.firstuucolumbus.CatalogPage.init(CatalogPage.java:43)
 

I think you're using the head release of the inmethod grid for Wicket 1.4,
rather than the grid-BETA2.jar that is compatible with Wicket 1.3.  However,
the grid-BETA2.jar has some minor problems in FireFox 3 (column widths
sometime don't adjust themselves on resize).  I'm trying to figure out how
to upgrade my application to Wicket 1.4 specifically for this (excellent)
library.

LBB


-- 
View this message in context: 
http://www.nabble.com/Inmethod-Grid-with-wicket-1.3-tp19731013p19779992.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Form GET doesn't call onSubmit method

2008-10-02 Thread eyalbenamram

Hi,
I have a form that overrides the method:

protected String getMethod() {
   
   return Form.METHOD_GET;
 }

When the form is submitted, the onSubmit method is never called and I
am routed to the home page instead of the location I specified. Any
suggestions??

Thanks, Eyal.
-- 
View this message in context: 
http://www.nabble.com/Form-GET-doesn%27t-call-onSubmit-method-tp19780009p19780009.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Inmethod Grid with wicket 1.3

2008-10-02 Thread lesterburlap

Damn it, for some reason nabble 2 didn't show all the other responses to
Jim's question.  Sorry to answer it needlessly.

LBB
-- 
View this message in context: 
http://www.nabble.com/Inmethod-Grid-with-wicket-1.3-tp19731013p19780036.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



using Prototype.js and Scriptaculous with latest version of wicket

2008-10-02 Thread ilanfox

Hello,

I am considering starting a new project (web app) with Wicket.
This project will be based heavily on JavaScript with Prototype and
Scriptaculous.
Most of the UI will be generated via JavaScript and the also the new CANVAS
tag will be used.
I really need to know if I'm going the right direction. is it safe to
combine the Prototype lib with Wicket?
Do I need to fully understand how Wicket works before trying to combine it?
my prior expropriate is mostly with struts1.

Thanks in advance. 
Ilan F


-- 
View this message in context: 
http://www.nabble.com/using-Prototype.js-and-Scriptaculous-with-latest-version-of-wicket-tp19781402p19781402.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Form submit to bookmarkable page

2008-10-02 Thread Stefan Lindner
Is it possible to submit a form to a bookmarkable page (with form input
as page parameters)?
What I want is a form with a submit button/link that leads to a page
with e.g. URl

 http://mysite.com/myapp/targetPage/param1/value1/param2/value2

Of course I mount the submit link#s target page class in
Application.init() { mountBookmarkablePage (targetPage,
MyTargetPage.class); }

Any hint?

Stefan

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



Re: Pure client side validation

2008-10-02 Thread Igor Vaynberg
On Thu, Oct 2, 2008 at 12:33 AM, harrypitt [EMAIL PROTECTED] wrote:

 Thanks for that solution,

 To summarize that:
 - Extend a normal Validator
 - Add the IValidatorAddListener Interface
 - Implement the onAdded method
 - In this method: add a Custom Behavior to the component
 - In the custom Behavior: Integrate the js like described here:
 http://cwiki.apache.org/WICKET/creating-a-behavior-to-use-a-javascript-library.html

dont know about your last point. it should just output some javascript
that does the validation test and integrates the results into some
javascript error reporting framework you have - simplest of which
would be alert('field foo does not validate');

 But I think there are two weak points in that implementation (correct me if
 I'm wrong):
 - I have to rewrite the whole logic für the validator in Javascript (ok,
 that's no surprise)

this is what ajax helps you not to do, but you said you dont want that
so this is the price to pay.

 - In case the validator gets an error, I have to do an ajax request to
 trigger the wicket feedback message system (a js only feedback would be a
 problem, because js validation would produce duplicate messages after a
 submit with errors). So in general I only avoid the ajax request if the js
 validator finds no errors.

dont really follow you. if there is a validation error you do not
submit the form...your validators can output something like this:

addevent(form, 'onsubmit', function() { if (!test()) { return false; }});

this way if validation fails the onsubmit returns false and the form
is not submitted. addevent() depends on your favorite javascript
library.

 I have some additional questions about this topic:
 - Are there any example implementations for such client side validations?

dont think so, maybe you can create one

 - There is also a Wicket-Stuff project fvalidate: Has this project a
 different concept?

i think that project is defunct, fvalidate has been for a while at least.

 - Is there a plan to integrate pure client side validation in the wicket
 framework soon?

no, not soon. it is something we can consider for 1.5 but first we
need to end of life 1.3 and release 1.4.

-igor


 Harry


 igor.vaynberg wrote:

 it is possible, just not there out of the box. can look like something
 like this

 class rangejsvalidator extends rangevalidator implements
 IValidatorAddListener {
   void onAdded(Component component) { // add some behavior to output
 javascript validation }
 }

 -igor


 --
 View this message in context: 
 http://www.nabble.com/Pure-client-side-validation-tp19737383p19774599.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: wicket 1.4 release

2008-10-02 Thread Igor Vaynberg
milestones-rcs-release was the plan this time around i believe.

-igor

On Thu, Oct 2, 2008 at 6:46 AM, lesterburlap [EMAIL PROTECTED] wrote:

 re: 1.4m4

 Do milestone releases come before beta releases?  (or do you just go
 straight to final from milestone?)

 LBB


 --
 View this message in context: 
 http://www.nabble.com/wicket-1.4-release-tp19772502p19779596.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: wicket 1.4 release

2008-10-02 Thread Igor Vaynberg
promises promises!

-igor

On Thu, Oct 2, 2008 at 12:25 AM, Johan Compagner [EMAIL PROTECTED] wrote:
 yes we should make a 1.3.5 and a 1.4m4 asap, there are a lot of changes
 I think i will make some time this weekend to look over jira issues and also
 merge back a lot of changes i already did in 1.3.5

 igor did also a lot of stuff already so for me within 1 or 2 weeks we could
 do both releases

 johan


 On Thu, Oct 2, 2008 at 8:15 AM, Stefan Lindner [EMAIL PROTECTED] wrote:

 It's clear that it's not possible to estimate the release of 1.4 final. But
 can anybody tell us whether a new snapshot (1.4M4) is in sight?

 Stefan

 -Ursprüngliche Nachricht-
 Von: Timo Rantalaiho [mailto:[EMAIL PROTECTED]
 Gesendet: Donnerstag, 2. Oktober 2008 05:37
 An: users@wicket.apache.org
 Betreff: Re: wicket 1.4 release

 On Wed, 01 Oct 2008, lesterburlap wrote:
  I've searched everywhere and can't find an answer.  I know this is kind
 of a
  crappy question to ask the developers...
 
  Is there an estimate for a Wicket 1.4 GA release?  Will it possibly be by
  January 2009?

 I think that it's impossible to estimate the releases of a
 volunteer-based open source projects in any meaningful way,
 unfortunately. If others know better, please pipe in.

 You can always follow the number of open issues


 https://issues.apache.org/jira/secure/IssueNavigator.jspa?reset=truepid=12310561fixfor=12313295resolution=-1sorter/field=issuekeysorter/order=DESC

  ( http://tinurl.us/a2b895 )

 but there might be some new ones coming in as well. Also
 work continues on 1.3.5 at the same time (fortunately, many
 of the issues can probably be fixed to both at the same time).

 Your good patches to the issues are bound to make the
 release happen earlier ;)

  I need to make a decision about whether or not to upgrade to 1.4-m3 from
  1.3. while intending to upgrade to 1.4 GA prior to my product release
 in
  January.  I need some stuff that's in 1.4, but I can't release our
 product
  with beta libraries included.

 Fortunately, there is not a lot of special testing for the
 releases, so a milestone is nearly good enough ;) What's more
 problematic with releasing with a milestone dependency are
 the possible API breaks.

 Best wishes,
 Timo

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

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


 -
 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: using Prototype.js and Scriptaculous with latest version of wicket

2008-10-02 Thread Igor Vaynberg
there shouldnt be any problems using prototype with wicket.

however, if you are looking to generate your ui purely in javascript
you will not be able to take advantage of a lot of wicket components

-igor

On Thu, Oct 2, 2008 at 8:18 AM, ilanfox [EMAIL PROTECTED] wrote:

 Hello,

 I am considering starting a new project (web app) with Wicket.
 This project will be based heavily on JavaScript with Prototype and
 Scriptaculous.
 Most of the UI will be generated via JavaScript and the also the new CANVAS
 tag will be used.
 I really need to know if I'm going the right direction. is it safe to
 combine the Prototype lib with Wicket?
 Do I need to fully understand how Wicket works before trying to combine it?
 my prior expropriate is mostly with struts1.

 Thanks in advance.
 Ilan F


 --
 View this message in context: 
 http://www.nabble.com/using-Prototype.js-and-Scriptaculous-with-latest-version-of-wicket-tp19781402p19781402.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Problem understanding LoadableDetachableModel and ListViews

2008-10-02 Thread Jürgen Lind

Hi there,

I have been struggling for some time now to understand how
LoadableDetachableModel and a ListView work together. The starting point
was Chapter 5.5.2 of Wicket in Action where it is recommended to provide
your own ItemModel if the underlying list changes frequently. To try out
how Wicket behaves without such a custom ItemModel, I wrote the following
Test:

body
  em wicket:id=listview
span wicket:id=label/spana wicket:id=deletedelete/a
  /em
/body


LoadableDetachableModel model = new LoadableDetachableModel() {

  @Override
  protected Object load() {
System.out.println(load);
return Arrays.asList(new TestItem[] {
new TestItem(a + Math.random()),
new TestItem(b + Math.random()),
new TestItem(c + Math.random()) });
  }

  protected void onDetach() {
System.out.println(detach);
  }

};

ListView listview = new ListView(listview, model) {
  protected void populateItem(ListItem item) {
final TestItem itemModel = (TestItem) item.getModelObject();
item.add(new Label(label, itemModel.toString()));
item.add(new Link(delete) {

  @Override
  public void onClick() {
System.out.println(Delete  + itemModel);
  }
});
  }
};

add(listview);


Now, I would expect that when I hit the delete link, Wicket would call the
load Method of the LoadableDetachableModel before printing Delete... as the
default implementation will use the index and the list to determine the item to
delete. To my surprise, however, the Delete... message is printed with the
correct item and the load Method is called afterwards. In my understanding,
this contradicts the idea of the LoadableDetachableModel since Wicket seems to
have a copy of the original list somewhere so that it can determine the list
item on which the action was invoked before loading the underlying list.

Can someone spot my mistake?

Thanks,

J.

--
Dr. Jürgen Lind
iteratec GmbHFon: +49 (0)89 614551-44
Inselkammerstrasse 4 Fax: +49 (0)89 614551-10
82008 Unterhaching   Web: www.iteratec.de

Sitz und Registergericht der iteratec GmbH: München HRB 113 519
Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel


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



Re: Form submit to bookmarkable page

2008-10-02 Thread Igor Vaynberg
you can override form's oncomponenttag() and call super then
tag.put(action, urlfor(yourpage.class));

i believe that should work

-igor

On Thu, Oct 2, 2008 at 8:41 AM, Stefan Lindner [EMAIL PROTECTED] wrote:
 Is it possible to submit a form to a bookmarkable page (with form input
 as page parameters)?
 What I want is a form with a submit button/link that leads to a page
 with e.g. URl

 http://mysite.com/myapp/targetPage/param1/value1/param2/value2

 Of course I mount the submit link#s target page class in
 Application.init() { mountBookmarkablePage (targetPage,
 MyTargetPage.class); }

 Any hint?

 Stefan

 -
 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: Form GET doesn't call onSubmit method

2008-10-02 Thread Igor Vaynberg
create a quickstart and attach it to a jira issue

-igor

On Thu, Oct 2, 2008 at 7:09 AM, eyalbenamram [EMAIL PROTECTED] wrote:

 Hi,
 I have a form that overrides the method:

protected String getMethod() {

   return Form.METHOD_GET;
 }

 When the form is submitted, the onSubmit method is never called and I
 am routed to the home page instead of the location I specified. Any
 suggestions??

 Thanks, Eyal.
 --
 View this message in context: 
 http://www.nabble.com/Form-GET-doesn%27t-call-onSubmit-method-tp19780009p19780009.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: Problem understanding LoadableDetachableModel and ListViews

2008-10-02 Thread Igor Vaynberg
your link works on the object and not on the model, instead

add(new link(delete, item.getmodel()) { onclick() {
delete(getmodelobject()); }});

-igor

On Thu, Oct 2, 2008 at 9:04 AM, Jürgen Lind [EMAIL PROTECTED] wrote:
 Hi there,

 I have been struggling for some time now to understand how
 LoadableDetachableModel and a ListView work together. The starting point
 was Chapter 5.5.2 of Wicket in Action where it is recommended to provide
 your own ItemModel if the underlying list changes frequently. To try out
 how Wicket behaves without such a custom ItemModel, I wrote the following
 Test:

 body
  em wicket:id=listview
span wicket:id=label/spana wicket:id=deletedelete/a
  /em
 /body


 LoadableDetachableModel model = new LoadableDetachableModel() {

  @Override
  protected Object load() {
System.out.println(load);
return Arrays.asList(new TestItem[] {
new TestItem(a + Math.random()),
new TestItem(b + Math.random()),
new TestItem(c + Math.random()) });
  }

  protected void onDetach() {
System.out.println(detach);
  }

 };

 ListView listview = new ListView(listview, model) {
  protected void populateItem(ListItem item) {
final TestItem itemModel = (TestItem) item.getModelObject();
item.add(new Label(label, itemModel.toString()));
item.add(new Link(delete) {

  @Override
  public void onClick() {
System.out.println(Delete  + itemModel);
  }
});
  }
 };

 add(listview);


 Now, I would expect that when I hit the delete link, Wicket would call the
 load Method of the LoadableDetachableModel before printing Delete... as
 the
 default implementation will use the index and the list to determine the item
 to
 delete. To my surprise, however, the Delete... message is printed with the
 correct item and the load Method is called afterwards. In my
 understanding,
 this contradicts the idea of the LoadableDetachableModel since Wicket seems
 to
 have a copy of the original list somewhere so that it can determine the list
 item on which the action was invoked before loading the underlying list.

 Can someone spot my mistake?

 Thanks,

 J.

 --
 Dr. Jürgen Lind
 iteratec GmbHFon: +49 (0)89 614551-44
 Inselkammerstrasse 4 Fax: +49 (0)89 614551-10
 82008 Unterhaching   Web: www.iteratec.de

 Sitz und Registergericht der iteratec GmbH: München HRB 113 519
 Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel


 -
 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: Form GET doesn't call onSubmit method

2008-10-02 Thread eyalbenamram

Hi
How? what is a quickstart? 
I am using wicket 1.3.4  is it still not fixed there?



igor.vaynberg wrote:
 
 create a quickstart and attach it to a jira issue
 
 -igor
 
 On Thu, Oct 2, 2008 at 7:09 AM, eyalbenamram [EMAIL PROTECTED]
 wrote:

 Hi,
 I have a form that overrides the method:

protected String getMethod() {

   return Form.METHOD_GET;
 }

 When the form is submitted, the onSubmit method is never called and I
 am routed to the home page instead of the location I specified. Any
 suggestions??

 Thanks, Eyal.
 --
 View this message in context:
 http://www.nabble.com/Form-GET-doesn%27t-call-onSubmit-method-tp19780009p19780009.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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


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

-- 
View this message in context: 
http://www.nabble.com/Form-GET-doesn%27t-call-onSubmit-method-tp19780009p19782690.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: How to get rid of wicket:id in XML output

2008-10-02 Thread Jonathan Locke


btw, shouldn't we fail init if super isn't called in this case like those
other protections we built in?


Martijn Dashorst wrote:
 
 Why mocking with that setter. Put wicket in deployment mode. That way
 you can't mess up the order of setting things. Read chapter 14 of
 Wicket in Action on configuring Wicket—it will tell you to call
 super.init() first before doing anything yourself. It also instructs
 you to *NEVER* deploy your web app with development mode to a
 production system.
 
 Martijn
 
 On Wed, Oct 1, 2008 at 2:24 PM, Stefan Lindner [EMAIL PROTECTED]
 wrote:
 I'm trying to build a dynamic site map according to Michael Sparers
 article
 http://cwiki.apache.org/WICKET/seo-search-engine-optimization.html
 Instead of an HTML page a XML page is used with XML markup looking like

?xml version=1.0 encoding=UTF-8?
urlset xmlns=http://www.sitemaps.org/schemas/sitemap/0.9;
   url wicket:id=urlList
loc wicket:id=locNodehttp://www.example.com//loc
lastmod wicket:id=lastmodNode2005-01-01/lastmod
changefreq wicket:id=changefreqNodemonthly/changefreq
priority wicket:id=priorityNode0.8/priority
/url
/urlset

 When I use a ListView for urlList and add Labels for locNode etc.
 the wicket:id properties are included in the XML output.

 How can I get rid of wicket:id? Setting a global
 getMarkupSettings().setStripWicketTags(true) does not work.

 I use Wicket 1.4M3

 Stefan


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


 
 
 
 -- 
 Become a Wicket expert, learn from the best: http://wicketinaction.com
 Apache Wicket 1.3.4 is released
 Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Wicket-Community-Meetup-in-South-Florida--tp19758680p19782931.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: wicket 1.4 release

2008-10-02 Thread Johan Compagner
keep reminding me!

On Thu, Oct 2, 2008 at 6:00 PM, Igor Vaynberg [EMAIL PROTECTED]wrote:

 promises promises!

 -igor

 On Thu, Oct 2, 2008 at 12:25 AM, Johan Compagner [EMAIL PROTECTED]
 wrote:
  yes we should make a 1.3.5 and a 1.4m4 asap, there are a lot of changes
  I think i will make some time this weekend to look over jira issues and
 also
  merge back a lot of changes i already did in 1.3.5
 
  igor did also a lot of stuff already so for me within 1 or 2 weeks we
 could
  do both releases
 
  johan
 
 
  On Thu, Oct 2, 2008 at 8:15 AM, Stefan Lindner [EMAIL PROTECTED]
 wrote:
 
  It's clear that it's not possible to estimate the release of 1.4 final.
 But
  can anybody tell us whether a new snapshot (1.4M4) is in sight?
 
  Stefan
 
  -Ursprüngliche Nachricht-
  Von: Timo Rantalaiho [mailto:[EMAIL PROTECTED]
  Gesendet: Donnerstag, 2. Oktober 2008 05:37
  An: users@wicket.apache.org
  Betreff: Re: wicket 1.4 release
 
  On Wed, 01 Oct 2008, lesterburlap wrote:
   I've searched everywhere and can't find an answer.  I know this is
 kind
  of a
   crappy question to ask the developers...
  
   Is there an estimate for a Wicket 1.4 GA release?  Will it possibly be
 by
   January 2009?
 
  I think that it's impossible to estimate the releases of a
  volunteer-based open source projects in any meaningful way,
  unfortunately. If others know better, please pipe in.
 
  You can always follow the number of open issues
 
 
 
 https://issues.apache.org/jira/secure/IssueNavigator.jspa?reset=truepid=12310561fixfor=12313295resolution=-1sorter/field=issuekeysorter/order=DESC
 
   ( http://tinurl.us/a2b895 )
 
  but there might be some new ones coming in as well. Also
  work continues on 1.3.5 at the same time (fortunately, many
  of the issues can probably be fixed to both at the same time).
 
  Your good patches to the issues are bound to make the
  release happen earlier ;)
 
   I need to make a decision about whether or not to upgrade to 1.4-m3
 from
   1.3. while intending to upgrade to 1.4 GA prior to my product
 release
  in
   January.  I need some stuff that's in 1.4, but I can't release our
  product
   with beta libraries included.
 
  Fortunately, there is not a lot of special testing for the
  releases, so a milestone is nearly good enough ;) What's more
  problematic with releasing with a milestone dependency are
  the possible API breaks.
 
  Best wishes,
  Timo
 
  --
  Timo Rantalaiho
  Reaktor Innovations OyURL: http://www.ri.fi/ 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
  -
  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: Problem understanding LoadableDetachableModel and ListViews

2008-10-02 Thread Jürgen Lind

Igor Vaynberg wrote:

your link works on the object and not on the model, instead

add(new link(delete, item.getmodel()) { onclick() {
delete(getmodelobject()); }});



Thank you for your quick reply.

Well the code is roughly the same(?) as in Listing 5.12 of WiA and there
a custom Model is used to illustrate the solution. However, I thought my
test would show me the problem first... Using your code above, the
effect is as expected, i.e. the wrong (new) item is returned to be
deleted.

Now, the question is, what is wrong with my first implementation?
It would seem that the problem that is solved using a custom ItemModel
does not even occur. Or does that code prevent wicket from effectively
detaching model objects and should thus be avoided? What would be the
best practice here?


J.


-igor

On Thu, Oct 2, 2008 at 9:04 AM, Jürgen Lind [EMAIL PROTECTED] wrote:

Hi there,

I have been struggling for some time now to understand how
LoadableDetachableModel and a ListView work together. The starting point
was Chapter 5.5.2 of Wicket in Action where it is recommended to provide
your own ItemModel if the underlying list changes frequently. To try out
how Wicket behaves without such a custom ItemModel, I wrote the following
Test:

body
 em wicket:id=listview
   span wicket:id=label/spana wicket:id=deletedelete/a
 /em
/body


LoadableDetachableModel model = new LoadableDetachableModel() {

 @Override
 protected Object load() {
   System.out.println(load);
   return Arrays.asList(new TestItem[] {
   new TestItem(a + Math.random()),
   new TestItem(b + Math.random()),
   new TestItem(c + Math.random()) });
 }

 protected void onDetach() {
   System.out.println(detach);
 }

};

ListView listview = new ListView(listview, model) {
 protected void populateItem(ListItem item) {
   final TestItem itemModel = (TestItem) item.getModelObject();
   item.add(new Label(label, itemModel.toString()));
   item.add(new Link(delete) {

 @Override
 public void onClick() {
   System.out.println(Delete  + itemModel);
 }
   });
 }
};

add(listview);


Now, I would expect that when I hit the delete link, Wicket would call the
load Method of the LoadableDetachableModel before printing Delete... as
the
default implementation will use the index and the list to determine the item
to
delete. To my surprise, however, the Delete... message is printed with the
correct item and the load Method is called afterwards. In my
understanding,
this contradicts the idea of the LoadableDetachableModel since Wicket seems
to
have a copy of the original list somewhere so that it can determine the list
item on which the action was invoked before loading the underlying list.

Can someone spot my mistake?

Thanks,

J.

--
Dr. Jürgen Lind
iteratec GmbHFon: +49 (0)89 614551-44
Inselkammerstrasse 4 Fax: +49 (0)89 614551-10
82008 Unterhaching   Web: www.iteratec.de

Sitz und Registergericht der iteratec GmbH: München HRB 113 519
Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel


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



--
Dr. Jürgen Lind
iteratec GmbHFon: +49 (0)89 614551-44
Inselkammerstrasse 4 Fax: +49 (0)89 614551-10
82008 Unterhaching   Web: www.iteratec.de

Sitz und Registergericht der iteratec GmbH: München HRB 113 519
Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel


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



Re: Problem understanding LoadableDetachableModel and ListViews

2008-10-02 Thread Igor Vaynberg
final TestItem itemModel = (TestItem) item.getModelObject();

^ on this line you retrieve the object from the model, you then use
this reference inside the onclick() which is called during another
request. since you use the model object reference directly it is not
loaded from the model.

my code, on the other hand, never keeps a direct reference to the
model object, instead it retrieves it from the model inside onclick()

-igor

On Thu, Oct 2, 2008 at 10:10 AM, Jürgen Lind [EMAIL PROTECTED] wrote:
 Igor Vaynberg wrote:

 your link works on the object and not on the model, instead

 add(new link(delete, item.getmodel()) { onclick() {
 delete(getmodelobject()); }});


 Thank you for your quick reply.

 Well the code is roughly the same(?) as in Listing 5.12 of WiA and there
 a custom Model is used to illustrate the solution. However, I thought my
 test would show me the problem first... Using your code above, the
 effect is as expected, i.e. the wrong (new) item is returned to be
 deleted.

 Now, the question is, what is wrong with my first implementation?
 It would seem that the problem that is solved using a custom ItemModel
 does not even occur. Or does that code prevent wicket from effectively
 detaching model objects and should thus be avoided? What would be the
 best practice here?


 J.

 -igor

 On Thu, Oct 2, 2008 at 9:04 AM, Jürgen Lind [EMAIL PROTECTED]
 wrote:

 Hi there,

 I have been struggling for some time now to understand how
 LoadableDetachableModel and a ListView work together. The starting point
 was Chapter 5.5.2 of Wicket in Action where it is recommended to
 provide
 your own ItemModel if the underlying list changes frequently. To try out
 how Wicket behaves without such a custom ItemModel, I wrote the following
 Test:

 body
  em wicket:id=listview
   span wicket:id=label/spana wicket:id=deletedelete/a
  /em
 /body


 LoadableDetachableModel model = new LoadableDetachableModel() {

  @Override
  protected Object load() {
   System.out.println(load);
   return Arrays.asList(new TestItem[] {
   new TestItem(a + Math.random()),
   new TestItem(b + Math.random()),
   new TestItem(c + Math.random()) });
  }

  protected void onDetach() {
   System.out.println(detach);
  }

 };

 ListView listview = new ListView(listview, model) {
  protected void populateItem(ListItem item) {
   final TestItem itemModel = (TestItem) item.getModelObject();
   item.add(new Label(label, itemModel.toString()));
   item.add(new Link(delete) {

 @Override
 public void onClick() {
   System.out.println(Delete  + itemModel);
 }
   });
  }
 };

 add(listview);


 Now, I would expect that when I hit the delete link, Wicket would call
 the
 load Method of the LoadableDetachableModel before printing Delete...
 as
 the
 default implementation will use the index and the list to determine the
 item
 to
 delete. To my surprise, however, the Delete... message is printed with
 the
 correct item and the load Method is called afterwards. In my
 understanding,
 this contradicts the idea of the LoadableDetachableModel since Wicket
 seems
 to
 have a copy of the original list somewhere so that it can determine the
 list
 item on which the action was invoked before loading the underlying list.

 Can someone spot my mistake?

 Thanks,

 J.

 --
 Dr. Jürgen Lind
 iteratec GmbHFon: +49 (0)89 614551-44
 Inselkammerstrasse 4 Fax: +49 (0)89 614551-10
 82008 Unterhaching   Web: www.iteratec.de

 Sitz und Registergericht der iteratec GmbH: München HRB 113 519
 Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel


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


 --
 Dr. Jürgen Lind
 iteratec GmbHFon: +49 (0)89 614551-44
 Inselkammerstrasse 4 Fax: +49 (0)89 614551-10
 82008 Unterhaching   Web: www.iteratec.de

 Sitz und Registergericht der iteratec GmbH: München HRB 113 519
 Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel


 -
 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: Pure client side validation

2008-10-02 Thread Nino Saturnino Martinez Vazquez Wael
Ahh ok, I get you. So I guess IVisitor would be very good to use here.. 
Visit every component and put according js validation in there depending 
on which validator etc... Could be something I would look into at some 
point..


Maybe the way would be to upgrade the fvalidate integration to current 
wicket version?


harrypitt wrote:

Ok, my question was not clear enough.

With Pure client side validation i mean a javascript validation which
needs no ajax requests. Of course there should be always a server side
validation and the whole default Wicket form-handling AFTER the submit. It
would be really stupid to just rely on javascript validation. 



Nino.Martinez wrote:
  

I wont be doing pure client side validation, as it is unsafe..




  


--
-Wicket for love

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


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



Re: Problem understanding LoadableDetachableModel and ListViews

2008-10-02 Thread Jürgen Lind


Thanks for the explanation. Still, one questions remains: is there
a fundamental problem with the first approach or is it ok to use
the object directly?

J.

Igor Vaynberg wrote:

final TestItem itemModel = (TestItem) item.getModelObject();

^ on this line you retrieve the object from the model, you then use
this reference inside the onclick() which is called during another
request. since you use the model object reference directly it is not
loaded from the model.

my code, on the other hand, never keeps a direct reference to the
model object, instead it retrieves it from the model inside onclick()

-igor

On Thu, Oct 2, 2008 at 10:10 AM, Jürgen Lind [EMAIL PROTECTED] wrote:

Igor Vaynberg wrote:

your link works on the object and not on the model, instead

add(new link(delete, item.getmodel()) { onclick() {
delete(getmodelobject()); }});


Thank you for your quick reply.

Well the code is roughly the same(?) as in Listing 5.12 of WiA and there
a custom Model is used to illustrate the solution. However, I thought my
test would show me the problem first... Using your code above, the
effect is as expected, i.e. the wrong (new) item is returned to be
deleted.

Now, the question is, what is wrong with my first implementation?
It would seem that the problem that is solved using a custom ItemModel
does not even occur. Or does that code prevent wicket from effectively
detaching model objects and should thus be avoided? What would be the
best practice here?


J.


-igor

On Thu, Oct 2, 2008 at 9:04 AM, Jürgen Lind [EMAIL PROTECTED]
wrote:

Hi there,

I have been struggling for some time now to understand how
LoadableDetachableModel and a ListView work together. The starting point
was Chapter 5.5.2 of Wicket in Action where it is recommended to
provide
your own ItemModel if the underlying list changes frequently. To try out
how Wicket behaves without such a custom ItemModel, I wrote the following
Test:

body
 em wicket:id=listview
  span wicket:id=label/spana wicket:id=deletedelete/a
 /em
/body


LoadableDetachableModel model = new LoadableDetachableModel() {

 @Override
 protected Object load() {
  System.out.println(load);
  return Arrays.asList(new TestItem[] {
  new TestItem(a + Math.random()),
  new TestItem(b + Math.random()),
  new TestItem(c + Math.random()) });
 }

 protected void onDetach() {
  System.out.println(detach);
 }

};

ListView listview = new ListView(listview, model) {
 protected void populateItem(ListItem item) {
  final TestItem itemModel = (TestItem) item.getModelObject();
  item.add(new Label(label, itemModel.toString()));
  item.add(new Link(delete) {

@Override
public void onClick() {
  System.out.println(Delete  + itemModel);
}
  });
 }
};

add(listview);


Now, I would expect that when I hit the delete link, Wicket would call
the
load Method of the LoadableDetachableModel before printing Delete...
as
the
default implementation will use the index and the list to determine the
item
to
delete. To my surprise, however, the Delete... message is printed with
the
correct item and the load Method is called afterwards. In my
understanding,
this contradicts the idea of the LoadableDetachableModel since Wicket
seems
to
have a copy of the original list somewhere so that it can determine the
list
item on which the action was invoked before loading the underlying list.

Can someone spot my mistake?

Thanks,

J.

--
Dr. Jürgen Lind
iteratec GmbHFon: +49 (0)89 614551-44
Inselkammerstrasse 4 Fax: +49 (0)89 614551-10
82008 Unterhaching   Web: www.iteratec.de

Sitz und Registergericht der iteratec GmbH: München HRB 113 519
Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel


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


--
Dr. Jürgen Lind
iteratec GmbHFon: +49 (0)89 614551-44
Inselkammerstrasse 4 Fax: +49 (0)89 614551-10
82008 Unterhaching   Web: www.iteratec.de

Sitz und Registergericht der iteratec GmbH: München HRB 113 519
Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel


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




--
Dr. Jürgen Lind
iteratec GmbHFon: +49 (0)89 614551-44
Inselkammerstrasse 4 Fax: +49 (0)89 614551-10
82008 Unterhaching   Web: www.iteratec.de

Sitz und Registergericht der iteratec GmbH: München HRB 113 519
Geschäftsführer: Klaus Eberhardt, Mark 

Re: Problem understanding LoadableDetachableModel and ListViews

2008-10-02 Thread Igor Vaynberg
yes, there is a huge fundamental problem with your approach: you keep
the object reference which means the object is serialized instead of
being retrieved through a loadable detachable model.

-igor

On Thu, Oct 2, 2008 at 10:54 AM, Jürgen Lind [EMAIL PROTECTED] wrote:

 Thanks for the explanation. Still, one questions remains: is there
 a fundamental problem with the first approach or is it ok to use
 the object directly?

 J.

 Igor Vaynberg wrote:

 final TestItem itemModel = (TestItem) item.getModelObject();

 ^ on this line you retrieve the object from the model, you then use
 this reference inside the onclick() which is called during another
 request. since you use the model object reference directly it is not
 loaded from the model.

 my code, on the other hand, never keeps a direct reference to the
 model object, instead it retrieves it from the model inside onclick()

 -igor

 On Thu, Oct 2, 2008 at 10:10 AM, Jürgen Lind [EMAIL PROTECTED]
 wrote:

 Igor Vaynberg wrote:

 your link works on the object and not on the model, instead

 add(new link(delete, item.getmodel()) { onclick() {
 delete(getmodelobject()); }});

 Thank you for your quick reply.

 Well the code is roughly the same(?) as in Listing 5.12 of WiA and there
 a custom Model is used to illustrate the solution. However, I thought my
 test would show me the problem first... Using your code above, the
 effect is as expected, i.e. the wrong (new) item is returned to be
 deleted.

 Now, the question is, what is wrong with my first implementation?
 It would seem that the problem that is solved using a custom ItemModel
 does not even occur. Or does that code prevent wicket from effectively
 detaching model objects and should thus be avoided? What would be the
 best practice here?


 J.

 -igor

 On Thu, Oct 2, 2008 at 9:04 AM, Jürgen Lind [EMAIL PROTECTED]
 wrote:

 Hi there,

 I have been struggling for some time now to understand how
 LoadableDetachableModel and a ListView work together. The starting
 point
 was Chapter 5.5.2 of Wicket in Action where it is recommended to
 provide
 your own ItemModel if the underlying list changes frequently. To try
 out
 how Wicket behaves without such a custom ItemModel, I wrote the
 following
 Test:

 body
  em wicket:id=listview
  span wicket:id=label/spana wicket:id=deletedelete/a
  /em
 /body


 LoadableDetachableModel model = new LoadableDetachableModel() {

  @Override
  protected Object load() {
  System.out.println(load);
  return Arrays.asList(new TestItem[] {
  new TestItem(a + Math.random()),
  new TestItem(b + Math.random()),
  new TestItem(c + Math.random()) });
  }

  protected void onDetach() {
  System.out.println(detach);
  }

 };

 ListView listview = new ListView(listview, model) {
  protected void populateItem(ListItem item) {
  final TestItem itemModel = (TestItem) item.getModelObject();
  item.add(new Label(label, itemModel.toString()));
  item.add(new Link(delete) {

@Override
public void onClick() {
  System.out.println(Delete  + itemModel);
}
  });
  }
 };

 add(listview);


 Now, I would expect that when I hit the delete link, Wicket would
 call
 the
 load Method of the LoadableDetachableModel before printing
 Delete...
 as
 the
 default implementation will use the index and the list to determine the
 item
 to
 delete. To my surprise, however, the Delete... message is printed
 with
 the
 correct item and the load Method is called afterwards. In my
 understanding,
 this contradicts the idea of the LoadableDetachableModel since Wicket
 seems
 to
 have a copy of the original list somewhere so that it can determine the
 list
 item on which the action was invoked before loading the underlying
 list.

 Can someone spot my mistake?

 Thanks,

 J.

 --
 Dr. Jürgen Lind
 iteratec GmbHFon: +49 (0)89 614551-44
 Inselkammerstrasse 4 Fax: +49 (0)89 614551-10
 82008 Unterhaching   Web: www.iteratec.de

 Sitz und Registergericht der iteratec GmbH: München HRB 113 519
 Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf
 Menzel


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

 --
 Dr. Jürgen Lind
 iteratec GmbHFon: +49 (0)89 614551-44
 Inselkammerstrasse 4 Fax: +49 (0)89 614551-10
 82008 Unterhaching   Web: www.iteratec.de

 Sitz und Registergericht der iteratec GmbH: München HRB 113 519
 Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel


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



 -
 To 

Re: Pure client side validation

2008-10-02 Thread Nino Saturnino Martinez Vazquez Wael

saw this lib:

http://yav.sourceforge.net/ maybe it fits better?

Nino Saturnino Martinez Vazquez Wael wrote:
Ahh ok, I get you. So I guess IVisitor would be very good to use 
here.. Visit every component and put according js validation in there 
depending on which validator etc... Could be something I would look 
into at some point..


Maybe the way would be to upgrade the fvalidate integration to current 
wicket version?


harrypitt wrote:

Ok, my question was not clear enough.

With Pure client side validation i mean a javascript validation which
needs no ajax requests. Of course there should be always a server side
validation and the whole default Wicket form-handling AFTER the 
submit. It

would be really stupid to just rely on javascript validation.

Nino.Martinez wrote:
 

I wont be doing pure client side validation, as it is unsafe..




  




--
-Wicket for love

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


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



Re: Problem understanding LoadableDetachableModel and ListViews

2008-10-02 Thread Jürgen Lind

I see. So for a small application with few users, the approach might be
ok if I can live with a higher memory consumption. For larger
applications, using a loadable detachable model would be preferable.

Thank you for the clarification.

J.


Igor Vaynberg wrote:

yes, there is a huge fundamental problem with your approach: you keep
the object reference which means the object is serialized instead of
being retrieved through a loadable detachable model.

-igor

On Thu, Oct 2, 2008 at 10:54 AM, Jürgen Lind [EMAIL PROTECTED] wrote:

Thanks for the explanation. Still, one questions remains: is there
a fundamental problem with the first approach or is it ok to use
the object directly?

J.

Igor Vaynberg wrote:

final TestItem itemModel = (TestItem) item.getModelObject();

^ on this line you retrieve the object from the model, you then use
this reference inside the onclick() which is called during another
request. since you use the model object reference directly it is not
loaded from the model.

my code, on the other hand, never keeps a direct reference to the
model object, instead it retrieves it from the model inside onclick()

-igor

On Thu, Oct 2, 2008 at 10:10 AM, Jürgen Lind [EMAIL PROTECTED]
wrote:

Igor Vaynberg wrote:

your link works on the object and not on the model, instead

add(new link(delete, item.getmodel()) { onclick() {
delete(getmodelobject()); }});


Thank you for your quick reply.

Well the code is roughly the same(?) as in Listing 5.12 of WiA and there
a custom Model is used to illustrate the solution. However, I thought my
test would show me the problem first... Using your code above, the
effect is as expected, i.e. the wrong (new) item is returned to be
deleted.

Now, the question is, what is wrong with my first implementation?
It would seem that the problem that is solved using a custom ItemModel
does not even occur. Or does that code prevent wicket from effectively
detaching model objects and should thus be avoided? What would be the
best practice here?


J.


-igor

On Thu, Oct 2, 2008 at 9:04 AM, Jürgen Lind [EMAIL PROTECTED]
wrote:

Hi there,

I have been struggling for some time now to understand how
LoadableDetachableModel and a ListView work together. The starting
point
was Chapter 5.5.2 of Wicket in Action where it is recommended to
provide
your own ItemModel if the underlying list changes frequently. To try
out
how Wicket behaves without such a custom ItemModel, I wrote the
following
Test:

body
 em wicket:id=listview
 span wicket:id=label/spana wicket:id=deletedelete/a
 /em
/body


LoadableDetachableModel model = new LoadableDetachableModel() {

 @Override
 protected Object load() {
 System.out.println(load);
 return Arrays.asList(new TestItem[] {
 new TestItem(a + Math.random()),
 new TestItem(b + Math.random()),
 new TestItem(c + Math.random()) });
 }

 protected void onDetach() {
 System.out.println(detach);
 }

};

ListView listview = new ListView(listview, model) {
 protected void populateItem(ListItem item) {
 final TestItem itemModel = (TestItem) item.getModelObject();
 item.add(new Label(label, itemModel.toString()));
 item.add(new Link(delete) {

   @Override
   public void onClick() {
 System.out.println(Delete  + itemModel);
   }
 });
 }
};

add(listview);


Now, I would expect that when I hit the delete link, Wicket would
call
the
load Method of the LoadableDetachableModel before printing
Delete...
as
the
default implementation will use the index and the list to determine the
item
to
delete. To my surprise, however, the Delete... message is printed
with
the
correct item and the load Method is called afterwards. In my
understanding,
this contradicts the idea of the LoadableDetachableModel since Wicket
seems
to
have a copy of the original list somewhere so that it can determine the
list
item on which the action was invoked before loading the underlying
list.

Can someone spot my mistake?

Thanks,

J.

--
Dr. Jürgen Lind
iteratec GmbHFon: +49 (0)89 614551-44
Inselkammerstrasse 4 Fax: +49 (0)89 614551-10
82008 Unterhaching   Web: www.iteratec.de

Sitz und Registergericht der iteratec GmbH: München HRB 113 519
Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf
Menzel


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


--
Dr. Jürgen Lind
iteratec GmbHFon: +49 (0)89 614551-44
Inselkammerstrasse 4 Fax: +49 (0)89 614551-10
82008 Unterhaching   Web: www.iteratec.de

Sitz und Registergericht der iteratec GmbH: München HRB 113 519
Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel


-
To unsubscribe, e-mail: [EMAIL 

Re: Problem understanding LoadableDetachableModel and ListViews

2008-10-02 Thread Igor Vaynberg
using an LDM is best practice, big or small...

-igor

On Thu, Oct 2, 2008 at 11:09 AM, Jürgen Lind [EMAIL PROTECTED] wrote:
 I see. So for a small application with few users, the approach might be
 ok if I can live with a higher memory consumption. For larger
 applications, using a loadable detachable model would be preferable.

 Thank you for the clarification.

 J.


 Igor Vaynberg wrote:

 yes, there is a huge fundamental problem with your approach: you keep
 the object reference which means the object is serialized instead of
 being retrieved through a loadable detachable model.

 -igor

 On Thu, Oct 2, 2008 at 10:54 AM, Jürgen Lind [EMAIL PROTECTED]
 wrote:

 Thanks for the explanation. Still, one questions remains: is there
 a fundamental problem with the first approach or is it ok to use
 the object directly?

 J.

 Igor Vaynberg wrote:

 final TestItem itemModel = (TestItem) item.getModelObject();

 ^ on this line you retrieve the object from the model, you then use
 this reference inside the onclick() which is called during another
 request. since you use the model object reference directly it is not
 loaded from the model.

 my code, on the other hand, never keeps a direct reference to the
 model object, instead it retrieves it from the model inside onclick()

 -igor

 On Thu, Oct 2, 2008 at 10:10 AM, Jürgen Lind [EMAIL PROTECTED]
 wrote:

 Igor Vaynberg wrote:

 your link works on the object and not on the model, instead

 add(new link(delete, item.getmodel()) { onclick() {
 delete(getmodelobject()); }});

 Thank you for your quick reply.

 Well the code is roughly the same(?) as in Listing 5.12 of WiA and
 there
 a custom Model is used to illustrate the solution. However, I thought
 my
 test would show me the problem first... Using your code above, the
 effect is as expected, i.e. the wrong (new) item is returned to be
 deleted.

 Now, the question is, what is wrong with my first implementation?
 It would seem that the problem that is solved using a custom ItemModel
 does not even occur. Or does that code prevent wicket from effectively
 detaching model objects and should thus be avoided? What would be the
 best practice here?


 J.

 -igor

 On Thu, Oct 2, 2008 at 9:04 AM, Jürgen Lind [EMAIL PROTECTED]
 wrote:

 Hi there,

 I have been struggling for some time now to understand how
 LoadableDetachableModel and a ListView work together. The starting
 point
 was Chapter 5.5.2 of Wicket in Action where it is recommended to
 provide
 your own ItemModel if the underlying list changes frequently. To try
 out
 how Wicket behaves without such a custom ItemModel, I wrote the
 following
 Test:

 body
  em wicket:id=listview
  span wicket:id=label/spana wicket:id=deletedelete/a
  /em
 /body


 LoadableDetachableModel model = new LoadableDetachableModel() {

  @Override
  protected Object load() {
  System.out.println(load);
  return Arrays.asList(new TestItem[] {
 new TestItem(a + Math.random()),
 new TestItem(b + Math.random()),
 new TestItem(c + Math.random()) });
  }

  protected void onDetach() {
  System.out.println(detach);
  }

 };

 ListView listview = new ListView(listview, model) {
  protected void populateItem(ListItem item) {
  final TestItem itemModel = (TestItem) item.getModelObject();
  item.add(new Label(label, itemModel.toString()));
  item.add(new Link(delete) {

   @Override
   public void onClick() {
 System.out.println(Delete  + itemModel);
   }
  });
  }
 };

 add(listview);


 Now, I would expect that when I hit the delete link, Wicket would
 call
 the
 load Method of the LoadableDetachableModel before printing
 Delete...
 as
 the
 default implementation will use the index and the list to determine
 the
 item
 to
 delete. To my surprise, however, the Delete... message is printed
 with
 the
 correct item and the load Method is called afterwards. In my
 understanding,
 this contradicts the idea of the LoadableDetachableModel since Wicket
 seems
 to
 have a copy of the original list somewhere so that it can determine
 the
 list
 item on which the action was invoked before loading the underlying
 list.

 Can someone spot my mistake?

 Thanks,

 J.

 --
 Dr. Jürgen Lind
 iteratec GmbHFon: +49 (0)89 614551-44
 Inselkammerstrasse 4 Fax: +49 (0)89 614551-10
 82008 Unterhaching   Web: www.iteratec.de

 Sitz und Registergericht der iteratec GmbH: München HRB 113 519
 Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf
 Menzel


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

 --
 Dr. Jürgen Lind
 iteratec GmbHFon: +49 (0)89 614551-44
 Inselkammerstrasse 4 Fax: +49 (0)89 614551-10
 82008 Unterhaching   Web: 

Re: Form GET doesn't call onSubmit method

2008-10-02 Thread Erik van Oosten

Hi Eyal,

Let me translate Igor's reponse (which I agree is somewhat short for the 
uninitiated ;)  )


Quickstart is the optimum way to start with Wicket. For more info see 
http://wicket.apache.org/quickstart.html.


A quickstart is an as small as possible Wicket application that 
demonstrates a bug and was created with Quickstart.


Igor's question also indicates he thinks there is a bug. You can file 
the bug by creating an issue in Wicket's bug tracking system at: 
https://issues.apache.org/jira/browse/WICKET. The quickstart should be 
attached to the created issue.


Regards,
   Erik.


eyalbenamram wrote:

Hi
How? what is a quickstart? 
I am using wicket 1.3.4  is it still not fixed there?




igor.vaynberg wrote:
  

create a quickstart and attach it to a jira issue

-igor

On Thu, Oct 2, 2008 at 7:09 AM, eyalbenamram [EMAIL PROTECTED]
wrote:


Hi,
I have a form that overrides the method:

   protected String getMethod() {

  return Form.METHOD_GET;
}

When the form is submitted, the onSubmit method is never called and I
am routed to the home page instead of the location I specified. Any
suggestions??

Thanks, Eyal.
--
View this message in context:
http://www.nabble.com/Form-GET-doesn%27t-call-onSubmit-method-tp19780009p19780009.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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


  

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






  



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


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



Inmethod grid with more edit controls

2008-10-02 Thread Jim Pinkham
I'm just getting started with inmethod grid and loving what it does so far.

Now I'd like some to use other input controls such as checkbox, radiobutton,
datepicker, or ChoiceList.

I see EditablePropertyColumn has newCellPanel I could override to return
Panels with various input component types in edit mode.

Before I embark on this, does anyone have other ideas about how to approach
this?

Panels could benefit from the way TextFieldPanel puts feedback into title,
which suggests to me a new class such as AbstractEditablePropertyColumn
where this could be moved.  I also notice that CheckBoxColumn has the
concern of being a row-selector that could be separated into
RowSelectingCheckBoxColumn, for example (leaving the name CheckBoxColumn
available as the obvious choice for editing any boolean column).

I also like the idea of the light-weight propertycolumn (currently newCell
just puts value into response) to use these same corresponding panels in
disabled mode - maybe for radio and checkbox render the corresponding
control markup as disabled (display-only) to retain the light-weightness but
also have a richer display.

I know that's a lot to ask, but it seems a reasonable target to aim for...
Thoughts?

Thanks,
-- Jim.


RE: Form submit to bookmarkable page

2008-10-02 Thread Stefan Lindner
Wow! Seems to be a good starting point. I'm using wicket for 2 years now but 
still got a lot to learn. Sigh!
Now I have a form with a simple submit button. In the Form's onComponentTag I 
have

 tag.put(action, urlFor(TargetPage.class, parameters));

The URL now looks like

 http://mysite.com/myapp/TargetPage

That's a great leap forward. But is there any trick to have the Form's input 
fields as parameters in the URL? If the Form e.g. has an InputField called 
parameter the URL should look like

 http://mysite.com/myapp/TargetPage/parameter/value

or somethind similar? I have tried several URL encodings but all oft hem led 
tot he result

 http://mysite.com/myapp/TargetPage

Stefan

-Ursprüngliche Nachricht-
Von: Igor Vaynberg [mailto:[EMAIL PROTECTED] 
Gesendet: Donnerstag, 2. Oktober 2008 18:06
An: users@wicket.apache.org
Betreff: Re: Form submit to bookmarkable page

you can override form's oncomponenttag() and call super then
tag.put(action, urlfor(yourpage.class));

i believe that should work

-igor

On Thu, Oct 2, 2008 at 8:41 AM, Stefan Lindner [EMAIL PROTECTED] wrote:
 Is it possible to submit a form to a bookmarkable page (with form input
 as page parameters)?
 What I want is a form with a submit button/link that leads to a page
 with e.g. URl

 http://mysite.com/myapp/targetPage/param1/value1/param2/value2

 Of course I mount the submit link#s target page class in
 Application.init() { mountBookmarkablePage (targetPage,
 MyTargetPage.class); }

 Any hint?

 Stefan

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



wicket 1.3.4 - setDefaultFormProcessing(true) not solving the GoAndClearFilter problem

2008-10-02 Thread jchappelle

I have looked at the other posts people have made about this problem and each
says that the solution is to call setDefaultFormProcessing(true) on the
clear button. I have done that and it doesn't solve my problem. I started
with wicket 1.3.2 but I saw where a bug fix for this was in 1.3.3 so now I
am using 1.3.4. I am doing this in a modal window but I don't know if that
has anything to do with the problem. Here is my code: 

new FilteredAbstractColumn(new Model()) 
{ 
private static final long
serialVersionUID = 1L; 

public void populateItem(Item
cellItem, String componentId, IModel rowModel) 
{ 
cellItem.add(new
WebMarkupContainer(componentId, new Model())); 
} 

public Component getFilter(String
id, FilterForm form) 
{ 
GoAndClearFilter filter =
new GoAndClearFilter(id, form) 
{ 
private static final
long serialVersionUID = 1L; 

@Override 
protected Button
getClearButton() 
{ 
Button
result = super.getClearButton(); 
   
result.setDefaultFormProcessing(true); 
return
result; 
} 
}; 
return filter; 
} 

} 
}; 

Thanks
-- 
View this message in context: 
http://www.nabble.com/wicket-1.3.4---setDefaultFormProcessing%28true%29-not-solving-the-GoAndClearFilter-problem-tp19786310p19786310.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



How to update ListChoice after form submission?

2008-10-02 Thread Seven Corners

I have a page with a ListChoice of user names that is populated with a call
to our server (loadUserNames()).  The page also contains a number of
TextFields corresponding to the user's other attributes.  When you modify
those text fields so the user name doesn't correspond to anything in the
list, the Add AjaxFallbackButton enables.  Click this, and you make a call
to the server which creates the new user.

The new user does not show up in the ListChoice.  If you refresh the page,
it does, so we know it's created, and we know that loadUserNames() will
return the correct list if it were called and its values were used..  I want
the new user name to show up in the ListChoice after submission, and I'd
like to be able to set the selection in the ListChoice to the new user. 
I've tried giving the ListChoice a LoadableDetachableModel, I've tried
giving it an ArrayList model with a call to loadUserNames() and setChoices()
on the ListChoice after submission, I've tried a
AjaxFormComponentUpdatingBehavior( onsubmit ), hoping this might fire
after submission, I've tried using a call to
getRequestCycleSettings().setRenderStrategy(IRequestCycleSettings.ONE_PASS_RENDER)
in my application class's init() method, I've tried a ton of things and I
can't figure this out.

Any ideas?
-- 
View this message in context: 
http://www.nabble.com/How-to-update-ListChoice-after-form-submission--tp19786374p19786374.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: [XHTML validation] Rootless AbstractTree outputs empty table table .../table

2008-10-02 Thread Kaspar Fischer

I have filed a JIRA improvement ticket for this:

  https://issues.apache.org/jira/browse/WICKET-1856

Kaspar

On 17.09.2008, at 11:12, Kaspar Fischer wrote:


I have a rootless BaseTree and see it output

 table style=display:none id=tree1f_0/tabletable  
class=wicket-tree-content id=tree1f_1tr...


which according to http://validator.w3.org is invalid strict XHTML.  
Looking at the
comment in the code, AbstractTree.onRender(), it appears that the  
indention there is

to output a div and not a table, which would validate:

 div style=display:none id=tree1f_0/divtable class=wicket- 
tree-content id=tree1f_1tr...


Or was there a particular reason to fetch the tagName from the  
markupStream in the

code, instead of just hardcoding it to div?

Thanks,
Kaspar


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



Re: Form submit to bookmarkable page

2008-10-02 Thread Igor Vaynberg
if anything you can change the form.getmethod() to return GET, but
even then it is the browser that will be doing the encoding and
construcing the final url.

if you really want a clean url like that you will have to use a
regular form and in onsubmit construct the url and redirect to it.

-igor

On Thu, Oct 2, 2008 at 12:27 PM, Stefan Lindner [EMAIL PROTECTED] wrote:
 Wow! Seems to be a good starting point. I'm using wicket for 2 years now but 
 still got a lot to learn. Sigh!
 Now I have a form with a simple submit button. In the Form's onComponentTag I 
 have

 tag.put(action, urlFor(TargetPage.class, parameters));

 The URL now looks like

 http://mysite.com/myapp/TargetPage

 That's a great leap forward. But is there any trick to have the Form's input 
 fields as parameters in the URL? If the Form e.g. has an InputField called 
 parameter the URL should look like

 http://mysite.com/myapp/TargetPage/parameter/value

 or somethind similar? I have tried several URL encodings but all oft hem led 
 tot he result

 http://mysite.com/myapp/TargetPage

 Stefan

 -Ursprüngliche Nachricht-
 Von: Igor Vaynberg [mailto:[EMAIL PROTECTED]
 Gesendet: Donnerstag, 2. Oktober 2008 18:06
 An: users@wicket.apache.org
 Betreff: Re: Form submit to bookmarkable page

 you can override form's oncomponenttag() and call super then
 tag.put(action, urlfor(yourpage.class));

 i believe that should work

 -igor

 On Thu, Oct 2, 2008 at 8:41 AM, Stefan Lindner [EMAIL PROTECTED] wrote:
 Is it possible to submit a form to a bookmarkable page (with form input
 as page parameters)?
 What I want is a form with a submit button/link that leads to a page
 with e.g. URl

 http://mysite.com/myapp/targetPage/param1/value1/param2/value2

 Of course I mount the submit link#s target page class in
 Application.init() { mountBookmarkablePage (targetPage,
 MyTargetPage.class); }

 Any hint?

 Stefan

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



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


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



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



Re: How to update ListChoice after form submission?

2008-10-02 Thread Igor Vaynberg
inside the onclick of your ajaxfallbackbutton you have to add the
listchoice to the target so wicket rerenders it

-igor

On Thu, Oct 2, 2008 at 12:49 PM, Seven Corners [EMAIL PROTECTED] wrote:

 I have a page with a ListChoice of user names that is populated with a call
 to our server (loadUserNames()).  The page also contains a number of
 TextFields corresponding to the user's other attributes.  When you modify
 those text fields so the user name doesn't correspond to anything in the
 list, the Add AjaxFallbackButton enables.  Click this, and you make a call
 to the server which creates the new user.

 The new user does not show up in the ListChoice.  If you refresh the page,
 it does, so we know it's created, and we know that loadUserNames() will
 return the correct list if it were called and its values were used..  I want
 the new user name to show up in the ListChoice after submission, and I'd
 like to be able to set the selection in the ListChoice to the new user.
 I've tried giving the ListChoice a LoadableDetachableModel, I've tried
 giving it an ArrayList model with a call to loadUserNames() and setChoices()
 on the ListChoice after submission, I've tried a
 AjaxFormComponentUpdatingBehavior( onsubmit ), hoping this might fire
 after submission, I've tried using a call to
 getRequestCycleSettings().setRenderStrategy(IRequestCycleSettings.ONE_PASS_RENDER)
 in my application class's init() method, I've tried a ton of things and I
 can't figure this out.

 Any ideas?
 --
 View this message in context: 
 http://www.nabble.com/How-to-update-ListChoice-after-form-submission--tp19786374p19786374.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



RE: Form submit to bookmarkable page

2008-10-02 Thread Stefan Lindner
OK. But how to 

 and in onsubmit construct the url and redirect to it.

The only methods for redirects I know are the redirectToInterceptPage method or 
the setResponsePage methods. An each method needs a page class as parameter an 
not a self constructed url. I did not find a auitable method in the requestCyle.

How can I set the URL for the response?

Stefan

-Ursprüngliche Nachricht-
Von: Igor Vaynberg [mailto:[EMAIL PROTECTED] 
Gesendet: Donnerstag, 2. Oktober 2008 22:40
An: users@wicket.apache.org
Betreff: Re: Form submit to bookmarkable page

if anything you can change the form.getmethod() to return GET, but
even then it is the browser that will be doing the encoding and
construcing the final url.

if you really want a clean url like that you will have to use a
regular form and in onsubmit construct the url and redirect to it.

-igor

On Thu, Oct 2, 2008 at 12:27 PM, Stefan Lindner [EMAIL PROTECTED] wrote:
 Wow! Seems to be a good starting point. I'm using wicket for 2 years now but 
 still got a lot to learn. Sigh!
 Now I have a form with a simple submit button. In the Form's onComponentTag I 
 have

 tag.put(action, urlFor(TargetPage.class, parameters));

 The URL now looks like

 http://mysite.com/myapp/TargetPage

 That's a great leap forward. But is there any trick to have the Form's input 
 fields as parameters in the URL? If the Form e.g. has an InputField called 
 parameter the URL should look like

 http://mysite.com/myapp/TargetPage/parameter/value

 or somethind similar? I have tried several URL encodings but all oft hem led 
 tot he result

 http://mysite.com/myapp/TargetPage

 Stefan

 -Ursprüngliche Nachricht-
 Von: Igor Vaynberg [mailto:[EMAIL PROTECTED]
 Gesendet: Donnerstag, 2. Oktober 2008 18:06
 An: users@wicket.apache.org
 Betreff: Re: Form submit to bookmarkable page

 you can override form's oncomponenttag() and call super then
 tag.put(action, urlfor(yourpage.class));

 i believe that should work

 -igor

 On Thu, Oct 2, 2008 at 8:41 AM, Stefan Lindner [EMAIL PROTECTED] wrote:
 Is it possible to submit a form to a bookmarkable page (with form input
 as page parameters)?
 What I want is a form with a submit button/link that leads to a page
 with e.g. URl

 http://mysite.com/myapp/targetPage/param1/value1/param2/value2

 Of course I mount the submit link#s target page class in
 Application.init() { mountBookmarkablePage (targetPage,
 MyTargetPage.class); }

 Any hint?

 Stefan

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


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



Re: Form submit to bookmarkable page

2008-10-02 Thread Igor Vaynberg
onsubmit() {
getRequestCycle().setRequestTarget(new RedirectRequestTarget(myurl));
}

-igor

On Thu, Oct 2, 2008 at 2:12 PM, Stefan Lindner [EMAIL PROTECTED] wrote:
 OK. But how to

  and in onsubmit construct the url and redirect to it.

 The only methods for redirects I know are the redirectToInterceptPage method 
 or the setResponsePage methods. An each method needs a page class as 
 parameter an not a self constructed url. I did not find a auitable method in 
 the requestCyle.

 How can I set the URL for the response?

 Stefan

 -Ursprüngliche Nachricht-
 Von: Igor Vaynberg [mailto:[EMAIL PROTECTED]
 Gesendet: Donnerstag, 2. Oktober 2008 22:40
 An: users@wicket.apache.org
 Betreff: Re: Form submit to bookmarkable page

 if anything you can change the form.getmethod() to return GET, but
 even then it is the browser that will be doing the encoding and
 construcing the final url.

 if you really want a clean url like that you will have to use a
 regular form and in onsubmit construct the url and redirect to it.

 -igor

 On Thu, Oct 2, 2008 at 12:27 PM, Stefan Lindner [EMAIL PROTECTED] wrote:
 Wow! Seems to be a good starting point. I'm using wicket for 2 years now but 
 still got a lot to learn. Sigh!
 Now I have a form with a simple submit button. In the Form's onComponentTag 
 I have

 tag.put(action, urlFor(TargetPage.class, parameters));

 The URL now looks like

 http://mysite.com/myapp/TargetPage

 That's a great leap forward. But is there any trick to have the Form's input 
 fields as parameters in the URL? If the Form e.g. has an InputField called 
 parameter the URL should look like

 http://mysite.com/myapp/TargetPage/parameter/value

 or somethind similar? I have tried several URL encodings but all oft hem led 
 tot he result

 http://mysite.com/myapp/TargetPage

 Stefan

 -Ursprüngliche Nachricht-
 Von: Igor Vaynberg [mailto:[EMAIL PROTECTED]
 Gesendet: Donnerstag, 2. Oktober 2008 18:06
 An: users@wicket.apache.org
 Betreff: Re: Form submit to bookmarkable page

 you can override form's oncomponenttag() and call super then
 tag.put(action, urlfor(yourpage.class));

 i believe that should work

 -igor

 On Thu, Oct 2, 2008 at 8:41 AM, Stefan Lindner [EMAIL PROTECTED] wrote:
 Is it possible to submit a form to a bookmarkable page (with form input
 as page parameters)?
 What I want is a form with a submit button/link that leads to a page
 with e.g. URl

 http://mysite.com/myapp/targetPage/param1/value1/param2/value2

 Of course I mount the submit link#s target page class in
 Application.init() { mountBookmarkablePage (targetPage,
 MyTargetPage.class); }

 Any hint?

 Stefan

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


 -
 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: Form submit to bookmarkable page

2008-10-02 Thread Stefan Lindner
The solution, if anybody else should encounter this problem ist to put
the following into the onSubmitMethod

PageParameters p = new PageParameters();
p.add(myParameterName, getModelObjectOfFormComponent());
getResponse().redirect(urlFor(MyTargetPage.class,
p).toString());
getRequestCycle().setRedirect(false);

and mount the page as bookmarkable page in Application.init().
Then the resulting URL is

http://myApp/MyTargetPage/myParameterName/value

Stefan

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



RE: Form submit to bookmarkable page

2008-10-02 Thread Stefan Lindner
Thank you Igor for your patience and your code fragments.

Stefan

-Ursprüngliche Nachricht-
Von: Igor Vaynberg [mailto:[EMAIL PROTECTED] 
Gesendet: Donnerstag, 2. Oktober 2008 23:20
An: users@wicket.apache.org
Betreff: Re: Form submit to bookmarkable page

onsubmit() {
getRequestCycle().setRequestTarget(new RedirectRequestTarget(myurl));
}

-igor

On Thu, Oct 2, 2008 at 2:12 PM, Stefan Lindner [EMAIL PROTECTED] wrote:
 OK. But how to

  and in onsubmit construct the url and redirect to it.

 The only methods for redirects I know are the redirectToInterceptPage method 
 or the setResponsePage methods. An each method needs a page class as 
 parameter an not a self constructed url. I did not find a auitable method in 
 the requestCyle.

 How can I set the URL for the response?

 Stefan

 -Ursprüngliche Nachricht-
 Von: Igor Vaynberg [mailto:[EMAIL PROTECTED]
 Gesendet: Donnerstag, 2. Oktober 2008 22:40
 An: users@wicket.apache.org
 Betreff: Re: Form submit to bookmarkable page

 if anything you can change the form.getmethod() to return GET, but
 even then it is the browser that will be doing the encoding and
 construcing the final url.

 if you really want a clean url like that you will have to use a
 regular form and in onsubmit construct the url and redirect to it.

 -igor

 On Thu, Oct 2, 2008 at 12:27 PM, Stefan Lindner [EMAIL PROTECTED] wrote:
 Wow! Seems to be a good starting point. I'm using wicket for 2 years now but 
 still got a lot to learn. Sigh!
 Now I have a form with a simple submit button. In the Form's onComponentTag 
 I have

 tag.put(action, urlFor(TargetPage.class, parameters));

 The URL now looks like

 http://mysite.com/myapp/TargetPage

 That's a great leap forward. But is there any trick to have the Form's input 
 fields as parameters in the URL? If the Form e.g. has an InputField called 
 parameter the URL should look like

 http://mysite.com/myapp/TargetPage/parameter/value

 or somethind similar? I have tried several URL encodings but all oft hem led 
 tot he result

 http://mysite.com/myapp/TargetPage

 Stefan

 -Ursprüngliche Nachricht-
 Von: Igor Vaynberg [mailto:[EMAIL PROTECTED]
 Gesendet: Donnerstag, 2. Oktober 2008 18:06
 An: users@wicket.apache.org
 Betreff: Re: Form submit to bookmarkable page

 you can override form's oncomponenttag() and call super then
 tag.put(action, urlfor(yourpage.class));

 i believe that should work

 -igor

 On Thu, Oct 2, 2008 at 8:41 AM, Stefan Lindner [EMAIL PROTECTED] wrote:
 Is it possible to submit a form to a bookmarkable page (with form input
 as page parameters)?
 What I want is a form with a submit button/link that leads to a page
 with e.g. URl

 http://mysite.com/myapp/targetPage/param1/value1/param2/value2

 Of course I mount the submit link#s target page class in
 Application.init() { mountBookmarkablePage (targetPage,
 MyTargetPage.class); }

 Any hint?

 Stefan

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


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



URL to fetch one component

2008-10-02 Thread metalotus

Hi,

I would like to return the markup of a rendered wicket component when
accessing a certain URL. I do not want to return a page, only one single
component in that page (like how AJAX works, kinda).

Here is my plan:  
- Handle the Request
  - Create a new component
  - Add it to the page
  - Call component.renderComponent();
  - Somehow get a stream from MarkupContainer.getMarkupStream()
- Use Response.write(InputStream) to return the component markup.

Will that work in your experience?
-- 
View this message in context: 
http://www.nabble.com/URL-to-fetch-one-component-tp19790610p19790610.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: URL to fetch one component

2008-10-02 Thread Igor Vaynberg
much easier to create a generic page that can contain any component,
add it to there, and render the page

-igor

On Thu, Oct 2, 2008 at 6:11 PM, metalotus [EMAIL PROTECTED] wrote:

 Hi,

 I would like to return the markup of a rendered wicket component when
 accessing a certain URL. I do not want to return a page, only one single
 component in that page (like how AJAX works, kinda).

 Here is my plan:
 - Handle the Request
  - Create a new component
  - Add it to the page
  - Call component.renderComponent();
  - Somehow get a stream from MarkupContainer.getMarkupStream()
 - Use Response.write(InputStream) to return the component markup.

 Will that work in your experience?
 --
 View this message in context: 
 http://www.nabble.com/URL-to-fetch-one-component-tp19790610p19790610.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: URL to fetch one component

2008-10-02 Thread metalotus

ok, thanks for the tip


igor.vaynberg wrote:
 
 much easier to create a generic page that can contain any component,
 add it to there, and render the page
 
 -igor
 
 On Thu, Oct 2, 2008 at 6:11 PM, metalotus [EMAIL PROTECTED] wrote:

 Hi,

 I would like to return the markup of a rendered wicket component when
 accessing a certain URL. I do not want to return a page, only one single
 component in that page (like how AJAX works, kinda).

 Here is my plan:
 - Handle the Request
  - Create a new component
  - Add it to the page
  - Call component.renderComponent();
  - Somehow get a stream from MarkupContainer.getMarkupStream()
 - Use Response.write(InputStream) to return the component markup.

 Will that work in your experience?
 --
 View this message in context:
 http://www.nabble.com/URL-to-fetch-one-component-tp19790610p19790610.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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


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

-- 
View this message in context: 
http://www.nabble.com/URL-to-fetch-one-component-tp19790610p19790766.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: wicket and hibernate

2008-10-02 Thread Flavius


You said you were using annotations.  Just read chapter 1 of the hibernate
annotations docs

http://www.hibernate.org/hib_docs/annotations/reference/en/html_single/#setup-configuration

create a class called HibernateUtil.class (or you can call it Fluffy.class,
but that's not as descriptive)
and add a static SessionFactory.

public static final SessionFactory sessionFactory;


Then add an initialize method to add your annotated classes with this:

AnnotationConfiguration cfg = new AnnotationConfiguration();
cfg.configure();
sessionFactory = cfg
.setInterceptor(new AuditInterceptor())
.addAnnotatedClass(User.class)
//others as needed
.buildSessionFactory();

The WebApplication object for your project has an init() method.
You can call the above method from there.  When wicket starts
up, it will call that init() method first, so you can do things like
setup your app.

Or just wrap the above in a static block and you don't have to worry 
about it.  The first time you access the HibernateUtil, the class loader
will run the static block.

Then in your methods you can just get a connection from the pool.

Session session = HibernateUtil.sessionFactory.openSession();

I do this a little differently than hibernate examples.  In the service, I
open the connection, get all the data I need and close the connection
at the end of the method.  The way Hibernate works is when your working
thread gets a connection, hibernate attaches that connection to the thread.
So throughout the lifecycle you can make references to related objects and
hibernate will go fetch them for you.  I don't like that technique,
personally.

HTH




-- 
View this message in context: 
http://www.nabble.com/wicket-and-hibernate-tp19767474p19791416.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Client side validation behaviors - already started?

2008-10-02 Thread Jeremy Thomerson
I've been thinking of trying to create some behaviors that combine the
standard server-side validation with client-side validation.  I just wanted
to check to see if anyone knew of something like this already started.  I
don't want to duplicate work already done.

Thanks,

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


DefaultDataTable attached to a model in a form

2008-10-02 Thread Pablo S.
Hi, I have a form with some fields attached to some properties of a model, 
so when I change the model all the fields also changes. Up to that 
everything goes perfect, the problem I'm having is that I need to maintain a 
DefaultDataTable in the form with the data of a list that the model has. I 
don't know how to fill that table with the list property of the model.


Here I paste the code:

public InvoiceForm(String name, InvoiceModel model){
   super(name, new CompoundPropertyModelInvoiceModel(model));
   TextFieldString orderNumber = new TextFieldString(number, new 
PropertyModelString(model, number));

   add(orderNumber);
   TextFieldString customerTxt = new TextFieldString(customerStr, 
new PropertyModelString(model, customerStr));

   add(customerTxt);
   TextFieldString totalTxt = new TextFieldString(total, new 
PropertyModelString(model, total));

   add(totalTxt);

   ListIColumn? columns = new ArrayListIColumn?();
   columns.add(new PropertyColumn(new ModelString(Name), name));columns.add(new DateColumn(new 
ModelString(Upload Date), uploadDate, uploadDate));
   columns.add(new PropertyColumn(new ModelString(Quote), quote, 
quote));

   ListDocument docs = model.getDocuments();
   DefaultDataTable table = new DefaultDataTable(items, columns, new 
SortableDocumentDataProvider(docs), 8);

   add(table);
}

The way I'm linking the table with the form is wrong, I would like to know 
how I can solved this


Thanks
Pablo 



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