Re: Best way to work with the iterator of IDataProvider

2009-09-28 Thread cmoulliard
I have found the error. List Result = new ArrayList(); must be defined outside of the iterator method and also the answer to my question. When the result is empty or null, then I must return a null iterator T Ames wrote: > > I see several undefined objects: > > result > requestFormModel >

Re: Is it the best way to code a Link depending on a condition

2009-09-25 Thread cmoulliard
c static Label createLabelTitle(String title) { >> return new Label("title",new Model( title )); >> } >> >> --> becomes >> >> private Label labelTitle; >> public static Label createLabelTitle(String title) { >&

Re: Is it the best way to code a Link depending on a condition

2009-09-21 Thread cmoulliard
private Label labelTitle; public static Label createLabelTitle(String title) { return new Label(title,new PropertyModel( ModelClass, title )); } Is it right what I create ? Joseph Pachod wrote: > > cmoulliard wrote: >> What I have done to avoid to r

Re: Is it the best way to code a Link depending on a condition

2009-09-18 Thread cmoulliard
chod wrote: > > cmoulliard wrote: >> (...) >> I think that this is a general remark that some users make about Wicket. >> It >> is very difficult to reuse part of the code. >> >> Here is another example : >> >> I have a label called id which is used i

Re: Is it the best way to code a Link depending on a condition

2009-09-17 Thread cmoulliard
gt; public Object getObject() { > return String.valueOf(audit.getRequest().getId()); > } > })); > > On Thu, Sep 17, 2009 at 8:23 AM, cmoulliard wrote: > >> >> Mattias, >> >> OK about what you propose but we repeat the test a second time so the &

Re: Is it the best way to code a Link depending on a condition

2009-09-17 Thread cmoulliard
(case1) { > link.add(whatever); > ... > } else { > link.add(whatever for case 2); > link.setEnabled(false); > } > > > cmoulliard wrote: >> You are right. I don't need the setEnabled(false) in the onClick method >> >&

Re: Is it the best way to code a Link depending on a condition

2009-09-17 Thread cmoulliard
You are right. I don't need the setEnabled(false) in the onClick method I have changed my code : link = new Link("linkRequest") { @Override public void onClick

Re: DropDownChoice with Java Enum

2009-09-10 Thread cmoulliard
equestType = ProcessingStatusType.valueOf( requestType ).getValue(); } Pedro Santos-6 wrote: > > The value on model are on ProcessingStatusType instance. Use > ((ProcessingStatusType)model.getObject()).getValue() to access the value > REJEC > > > On Thu, Sep 10, 2009

Re: DropDownChoice with Java Enum

2009-09-10 Thread cmoulliard
> Be careful though with using index, there are circumstances where no > useful index will be provided (always -1) - That happens when you > externally change the selected value of the DropDownChoice. > > you could also just use or extend ChoiceRenderer which might already do &g

Re: DropDownChoice with Java Enum

2009-09-10 Thread cmoulliard
You mean create something like this : add(new DropDownChoice("requestStatus", Arrays.asList(ProcessingStatusType.values()), new IChoiceRenderer() { public Object getDisplayValue(Object objDispl) { return ProcessingStatusType.valueOf((String

Re: Form and PageParameters

2009-09-07 Thread cmoulliard
LinkedIn: http://www.linkedin.com/in/egolan74 > > P Save a tree. Please don't print this e-mail unless it's really > necessary > > > On Mon, Sep 7, 2009 at 1:58 PM, cmoulliard wrote: > >> >> Thx for the reply. >> >> You are right,

Re: Form and PageParameters

2009-09-07 Thread cmoulliard
and you model object would have all the updated values > > -dipu > > > > > > On Mon, Sep 7, 2009 at 11:58 AM, cmoulliard wrote: >> >> Thx for the reply. >> >> You are right, it is not a must to use PageParameters but as this is my >> first

Re: Form and PageParameters

2009-09-07 Thread cmoulliard
Thx for the reply. You are right, it is not a must to use PageParameters but as this is my first Wicket project, I have started to work with simple things. In the meantime, I have had a look to the formInput example where a CompoundPropertyModel is used. I have adapted the Form to work with it.

Modify class : org.apache.wicket.spring.SpringWebApplicationFactory (possible) ?

2009-04-01 Thread cmoulliard
SOA Architect cmoulliard wrote: > > Hi, > > When I start my Apache Wicket bundle using Apache Service Mix (based on > Felix and Spring DM), I receive the following error : > Quote: > 16:35:58,415 | DEBUG | localShell | jetty | > .service.internal.uti

Re: example application for spring wicket hibernate

2009-02-06 Thread cmoulliard
Another very interesting example is described here in the java world publication : http://www.javaworld.com/javaworld/jw-09-2008/jw-09-wicket3.html This is (from my point of view) the best spring/hibernate implementation see with Wicket (have a look to the code of the example : scramble-spring)

Bug in wicket-stuff phonebook

2009-02-06 Thread cmoulliard
Hi, I would like to mention that there is a bug in the maven pom.xml file of the project phonebook because the properties files located here "wicketstuff-core\phonebook\src\main\java\wicket\contrib\phonebook\web\page" are not at copied in the WAR generated. In consequence, the following error is

wicket-phonebook has been removed from svn ?

2009-02-04 Thread cmoulliard
Hi, Can someone tell me where the project wicket-phonebook is located under svn because the following link mentioned on this page is not correct/accurate (http://wicketstuff.org/confluence/display/STUFFWIKI/wicket-phonebook/) ? https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/

RE: How to personalise HTML content with Wicket ?

2009-02-02 Thread cmoulliard
contenModel.setObject("Anonymous part"); > > > > > > Or in JAVA > if (user=='admin'= >add(new Label("content", ("Admin part")); > else if (user == 'anonymous') >add(new Label("content", ("Anonymo

How to personalise HTML content with Wicket ?

2009-02-02 Thread cmoulliard
Hi, I would like to know how we can personalize the content with Wicket ? With framework like Struts, ... it is possible in a JSP page to display different HTML contents (let's say personalize content) according to conditions (e.g. profile user, ...). if (user == 'admin') Admin part if ( user