RE: How to personalise HTML content with Wicket ?

2009-02-02 Thread cmoulliard
); Or in JAVA if (user=='admin'= add(new Label(content, (Admin part)); else if (user == 'anonymous') add(new Label(content, (Anonymous part)); -Ursprüngliche Nachricht- Von: cmoulliard [mailto:cmoulli...@gmail.com] Gesendet: Montag, 2. Februar 2009 11:10 An: users

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') H2Admin partH2/ if

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/) ?

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

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

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: DropDownChoice with Java Enum

2009-09-10 Thread cmoulliard
value of the DropDownChoice. you could also just use or extend ChoiceRenderer which might already do what you want... For example new ChoiceRenderer(description, value) Matt cmoulliard wrote: You mean create something like this : add(new DropDownChoice(requestStatus, Arrays.asList

Re: DropDownChoice with Java Enum

2009-09-11 Thread cmoulliard
= 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 at 12:39 PM, cmoulliard cmoulli...@gmail.com wrote

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

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

2009-09-17 Thread cmoulliard
. link = new Link(linkRequest) { public void onClick() { setResponsePage(new RequestPage(requestFormModel)); } } item.add(link); if (case1) { link.add(whatever); ... } else { link.add(whatever for case 2); link.setEnabled(false); } cmoulliard wrote: You

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

2009-09-18 Thread cmoulliard
: 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 in different page. The way proposes by Wicket to code it is Page Request item.add

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

2009-09-21 Thread cmoulliard
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 repeat the creation

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

2009-09-25 Thread cmoulliard
( ModelClass, title )); } Is it right what I create ? Joseph Pachod wrote: cmoulliard wrote: What I have done to avoid to repeat the creation of the labels is to define and use static method private Label labelTitle; public static Label getLabelTitle(String title) { return

Re: Best way to work with the iterator of IDataProvider

2009-09-28 Thread cmoulliard
I have found the error. List Result = new ArrayListPlatformDTO(); 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

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.util.JCLLogger 85 | started