Re: Anchors in Wicket?

2008-06-11 Thread Thijs
The component is any wicket component in the same page or next page if 
you know that component.


What you are doing, an anchor in a different page, I've solved by 
writing my own subclass of link where I append the '#rsvp' myself.


Michael Mehrle schreef:

I don't get it - what is the 'component' in the setAnchor() method? If I
set an anchor in a completely different page like this:

a href=#rsvp /

What do I set as the 'component' in the link's setAnchor?

Thanks,

Michael

-Original Message-
From: Thijs Vonk [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 10, 2008 12:39 PM

To: users@wicket.apache.org
Subject: Re: Anchors in Wicket?

Michael Mehrle wrote:
  

How do create a link that jumps to some anchor in a page? Is there a


way
  

to define this in Wicket or do I have to do this manually somehow?

 


Michael


  


yes. use link.setAnchor(Component)

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



beginner question about models when having more than one component of the same type on the same page

2008-06-11 Thread Peter Eriksson
Hello,

I have just begun to use wicket and so far I am very impressed with the
framework.
I have a question about best practice to solve a problem. I have a component
(wicket panel) that contain contact information (like name, address, email,
phone, etc) and on a specific web page I want to have two of the contact
panels. They of course access different model fields. Now to the question:
The labels used for the contact fields are slightly different, so the
question is how to best solve this? Since the labels are not the same for
the two contact panels I cannot use a ResourceModel as it is because then
they would have the same label text. Is the best way to solve this with
inheritence or do you have any other solution?

Best Regards,
/Peter


Re: beginner question about models when having more than one component of the same type on the same page

2008-06-11 Thread Martin Makundi
Can you paste the code for better insight into your problem?

2008/6/11 Peter Eriksson [EMAIL PROTECTED]:
 Hello,

 I have just begun to use wicket and so far I am very impressed with the
 framework.
 I have a question about best practice to solve a problem. I have a component
 (wicket panel) that contain contact information (like name, address, email,
 phone, etc) and on a specific web page I want to have two of the contact
 panels. They of course access different model fields. Now to the question:
 The labels used for the contact fields are slightly different, so the
 question is how to best solve this? Since the labels are not the same for
 the two contact panels I cannot use a ResourceModel as it is because then
 they would have the same label text. Is the best way to solve this with
 inheritence or do you have any other solution?

 Best Regards,
 /Peter


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



Re: beginner question about models when having more than one component of the same type on the same page

2008-06-11 Thread Maurice Marrink
http://cwiki.apache.org/WICKET/newuserguide.html#Newuserguide-LocalizationandSkinningofApplications

Maurice

On Wed, Jun 11, 2008 at 8:49 AM, Martin Makundi
[EMAIL PROTECTED] wrote:
 Can you paste the code for better insight into your problem?

 2008/6/11 Peter Eriksson [EMAIL PROTECTED]:
 Hello,

 I have just begun to use wicket and so far I am very impressed with the
 framework.
 I have a question about best practice to solve a problem. I have a component
 (wicket panel) that contain contact information (like name, address, email,
 phone, etc) and on a specific web page I want to have two of the contact
 panels. They of course access different model fields. Now to the question:
 The labels used for the contact fields are slightly different, so the
 question is how to best solve this? Since the labels are not the same for
 the two contact panels I cannot use a ResourceModel as it is because then
 they would have the same label text. Is the best way to solve this with
 inheritence or do you have any other solution?

 Best Regards,
 /Peter


 -
 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: scriptaculous toaster

2008-06-11 Thread Nino Saturnino Martinez Vazquez Wael



Ryan Sonnek wrote:

if we reach a point where there are several contributed scriptaculous
components, i think it would make sense to create a
wicketstuff-scriptaculous-sandbox project that can house them all.

  

+1, if we get to that...

the sync and queue methods should be moved off of the core Effect interface
and into the AbstractEffect class.  that way, the Effect.multiple doesn't
need to do a no-op.
http://github.com/madrobby/scriptaculous/wikis/core-effects
  

Done.

On Tue, Jun 10, 2008 at 2:05 AM, Nino Saturnino Martinez Vazquez Wael 
[EMAIL PROTECTED] wrote:

  

Ok. But I think that we should be a little carefull splitting up in too
many projects... But it's fine with me, so we should just move all the stuff
from the fx package away from your project right? Since the other stuff(only
the queue part though) I do need to be present or i'll have to build a new
project to depend on.


Ryan Sonnek wrote:



It's a combination of effects(the example effects from scriptaculous),


  

something that fades in shakes and for example squishes.. Did you see the
example?




I still think this would best be served in a separate project.



  

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





  


--
-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 update parent component from a panel?

2008-06-11 Thread freak182

Hello Timo,
I already rip out your patch and run the testcase it worked but how can i
implement/intgerate to my project...do you have a working example project
for that?

Thanks a lot..Cheers :)



Timo Rantalaiho wrote:
 
 On Tue, 10 Jun 2008, freak182 wrote:
 Thats a great patch...it is already been updated in wicket-extensions? so
 i
 can download it?
 
 No, but if you want to play around with it, a standalone
 version is here:
 
  
 http://issues.apache.org/jira/secure/attachment/12375765/Generic_EventBroadcaster.patch
 
 It doesn't change any existing classes, so you can just rip 
 the code and include it in your project. Feedback is welcome :)
 
 Some sort of event mechanism is coming to 1.5.
 
 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]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/How-to-update-parent-component-from-a-panel--tp17748294p17771941.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: beginner question about models when having more than one component of the same type on the same page

2008-06-11 Thread Peter Eriksson
HTML for the panel ((ContactPanel.html):
html xmlns:wicket
wicket:panel
table
tr
tdspan wicket:id=nameLabel/span/td
tdspan wicket:id=name/span/td
/tr
tr
tdspan wicket:id=userNameLabel/span/td
tdspan wicket:id=userName/span/td
/tr
tr
tdspan wicket:id=phoneLabel/span/td
tdspan wicket:id=phone/span/td
/tr
tr
tdspan wicket:id=emailLabel/span/td
tdspan wicket:id=email/span/td
/tr
/table
/wicket:panel
/html

Java code for the panel (ContactPanel.java):
public class ContactPanel extends Panel {
private static final long serialVersionUID = 1L;

public ContactPanel(String id, IModel model) {
super(id, model);
add(new Label(nameLabel, new ResourceModel(nameLabel)));
add(new Label(name));

add(new Label(userNameLabel, new ResourceModel(userNameLabel)));
add(new Label(userName));

add(new Label(phoneLabel, new ResourceModel(phoneLabel)));
add(new Label(phone));

add(new Label(emailLabel, new ResourceModel(emailLabel)));
add(new Label(email));
}
}


HTML for the page using the panel (VacanyPage.html):
--- snip ---
table
tr
tdspan
wicket:id=hrContactPanel/span/td
/tr
tr
tdspan
wicket:id=hiringManagerPanel/span/td
/tr
/table
--- snip ---

Java code for the page (VacanyPage.java):
--- snip ---
Form form = new Form(vacancyForm, new
CompoundPropertyModel(vacancyReq)) {
--- snip ---
Contact hrContact = new Contact();
form.add(new ContactPanel(hrContactPanel, new
CompoundPropertyModel(hrContact)));
Contact hiringManager = new Contact();
form.add(new ContactPanel(hiringManagerPanel, new
CompoundPropertyModel(hiringManager)));
--- snip ---

Properties file for the page (VacancyPage.properties):
vacancyForm.hrContactPanel.nameLabel=HR Contact:
vacancyForm.hrContactPanel.userNameLabel=HR Contact Username:
vacancyForm.hrContactPanel.phoneLabel=Phone:
vacancyForm.hrContactPanel.emailLabel=Email:
vacancyForm.hiringManagerPanel.nameLabel=Hiring Manager:
vacancyForm.hiringManagerPanel.userNameLabel=Hiring Manager Username:
vacancyForm.hiringManagerPanel.phoneLabel=Phone:
vacancyForm.hiringManagerPanel.emailLabel=Email:


As you can see from the code the VacancyPage has two instances of
ContactPanel and these should have different labels. I have tried different
ways to specify this, but Wicket says it cannot find the labels, so I must
be doing something wrong.

Thanks in advance for any help!

Best Regards,
/Peter

2008/6/11 Martin Makundi [EMAIL PROTECTED]:

 Can you paste the code for better insight into your problem?

 2008/6/11 Peter Eriksson [EMAIL PROTECTED]:
  Hello,
 
  I have just begun to use wicket and so far I am very impressed with the
  framework.
  I have a question about best practice to solve a problem. I have a
 component
  (wicket panel) that contain contact information (like name, address,
 email,
  phone, etc) and on a specific web page I want to have two of the contact
  panels. They of course access different model fields. Now to the
 question:
  The labels used for the contact fields are slightly different, so the
  question is how to best solve this? Since the labels are not the same for
  the two contact panels I cannot use a ResourceModel as it is because then
  they would have the same label text. Is the best way to solve this with
  inheritence or do you have any other solution?
 
  Best Regards,
  /Peter
 

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




Re: How to send response without HTML code

2008-06-11 Thread Johan Compagner
See the request targets that set a http status code (cant remember the
exact name)

On 6/11/08, Milan Křápek [EMAIL PROTECTED] wrote:
  Hello, I have newbie question.
   I am working on application that must be able to process two type of
 request. The users requests (send them some html pages in response) and
 server requests that expect only HTTP/1.0 200 OK or something similar with
 different return code.
   In my application I translate the URL called by server to some WebPage
 class. This is wrong because WebPage needs some HTML code on the response.
 And I get this exception : WicketMessage: Markup of type 'html' for
 component 'eu.optimsys.plm.pages.recorder.CreateCallRecord' not found.
   At first I try to find some parent of WebPage that does not need any HTML
 code. But I was not successful. Please can you give me advice how to get
 access to HTTP response and request before it gets to objects from
 wicket.markup package. I need something like wicket.http.Request but I am
 not sure if something like this exists.

 Thanks for any advice

 Milan

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




How to send response without HTML code

2008-06-11 Thread Milan Křápek
 Hello, I have newbie question. 
  I am working on application that must be able to process two type of request. 
The users requests (send them some html pages in response) and server requests 
that expect only HTTP/1.0 200 OK or something similar with different return 
code.
  In my application I translate the URL called by server to some WebPage class. 
This is wrong because WebPage needs some HTML code on the response. And I get 
this exception : WicketMessage: Markup of type 'html' for component 
'eu.optimsys.plm.pages.recorder.CreateCallRecord' not found.
  At first I try to find some parent of WebPage that does not need any HTML 
code. But I was not successful. Please can you give me advice how to get access 
to HTTP response and request before it gets to objects from wicket.markup 
package. I need something like wicket.http.Request but I am  not sure if 
something like this exists.

Thanks for any advice

Milan

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



Re: ComponentPropertyModel

2008-06-11 Thread Matthijs Wensveen

Hi,

CompoundPropertyModel does somewhat of the inverse of what I'm trying to 
accomplish.
CompoundPropertyModel binds some model to an expression that is the id 
of a component, while ComponentPropertyModel binds the model of the 
component that it is used in to some expression. In the first case you 
get to choose the model, in the second case you get to choose the 
expression. But, alas, it does not work. Now I just use normal 
PropertyModels. I could write some ComponentProperyModel as I think it 
should work, but no time for that now, unfortunately... :S


As a side note. I don't like using the wicket id's as property 
expressions. It places a tight coupling between a component's markup and 
the component's model. This may be okay when the model is the component 
itself, but not when the model's object is a domain object (which may 
change at any time during development. not to speak of changing markup).


Regards,
Matthijs

Maurice Marrink wrote:

In all my years i have never used the ComponentPropertyModel. I always
use the CompoundPropertyModel.
public class MyPanel extends Panel {
 public MyPanel(String id, IModel model) {
  super(id, new CompoundPropertyModel(model));

  add(new Label(name));
 }
}

Maurice


On Tue, Jun 10, 2008 at 2:49 PM, Matthijs Wensveen [EMAIL PROTECTED] wrote:
  

Hi,

I'm trying to use ComponentPropertyModel as a replacement of PropertyModel
in some cases. The javadoc leads me to beleave I can do:

public class MyPanel extends Panel {
 public MyPanel(String id, IModel model) {
  super(id, model);

  //add(new Label(label, new PropertyModel(model, name)));
  add(new Label(label, new ComponentPropertyModel(name)));
 }
}

..which would have the advantage that the model that is bound to the
component is taken when needed instead of a hard reference to the model
passed in as an argument to the constructor.  This would allow the label to
still display the correct value even when myPanel.setModel(..) is called
after constructing MyPanel.
Unfortunately the ComponentPropertyModel always throws an
IllegalStateException because the 'wrapped model' should have been used. I
don't know what that means exactly, but the classes where
ComponentPropertyModel is used call :

  super(id);
  setModel(wrap(model));

I'm not very in to wrap music, but it seems ComponentPropertyModel is not
doing what I want. What is the intended usage of ComponentPropertyModel?

Of course, the workaround is to not call myPanel.setModel, but
myPanel.setModelObject, so the reference to the component's model is
preserved. That way PropertyModel can be safely used.

Thanks,
Matthijs

--
Matthijs Wensveen
Func. Internet Integration
W http://www.func.nl
T +31 20 423
F +31 20 4223500

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

  



--
Matthijs Wensveen
Func. Internet Integration
W http://www.func.nl
T +31 20 423
F +31 20 4223500 



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



enclosure around listview

2008-06-11 Thread Matthijs Wensveen

Hi,

Is there a way to hide a listview with an enclosure when there are no 
items to display? One way to get it working is to toggle the visibility 
of the listview based on wheter or not the list is empty or not. I was 
expecting this would work out-of-the-box though...


Thanks,
Matthijs

--
Matthijs Wensveen
Func. Internet Integration
W http://www.func.nl
T +31 20 423
F +31 20 4223500 



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



Re: forcing cookies to expire

2008-06-11 Thread Johan Compagner
Because we cant really just call set path... That is something that
you have to do. Why do you want it on root?

On 6/10/08, jchappelle [EMAIL PROTECTED] wrote:

 Thanks for the quick reply. I finally fixed the problem. What I found was
 that when I was creating my cookie I was calling setPath(/) and when I
 deleted it I was not calling setPath(/). So I guess the equals method saw
 them as two different cookies and it wasn't deleting it. There is actually a
 convenience method on the WebResponse class called clearCookie that I am
 calling. However, that method will not work if you have called setPath(/)
 on your cookie because it doesn't set the path. It just does the following:

   public void clearCookie(final Cookie cookie)
   {
   if (httpServletResponse != null)
   {
   cookie.setMaxAge(0);
   cookie.setValue(null);
   addCookie(cookie);
   }
   }

 Thanks,

 Josh


 richardwilko wrote:

 Ive had the same problem.  to delete a cookie do this:

 Cookie newCookie = new Cookie(my cookie name here!, null);
 newCookie.setMaxAge(0);
 newCookie.setPath(/);
 getWebRequestCycle().getWebResponse().addCookie(newCookie);  

 i dont know why (i didnt really look into it) but u seem to have to create
 a new cookie with the same name and add it.  maybe this is a wicket bug?

 Richard


 --
 View this message in context:
 http://www.nabble.com/forcing-cookies-to-expire-tp17067292p17760587.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: enclosure around listview

2008-06-11 Thread Gwyn Evans
On Wed, Jun 11, 2008 at 10:34 AM, Matthijs Wensveen [EMAIL PROTECTED]
wrote:

 Is there a way to hide a listview with an enclosure when there are no items
 to display? One way to get it working is to toggle the visibility of the
 listview based on wheter or not the list is empty or not.


I think that's the normal way, in that you'd typically have both the list
and a No items found label, then set one or the other as visible...


 I was expecting this would work out-of-the-box though...


JIRA (https://issues.apache.org/jira/browse/WICKET) covers Wishes as well
as Bugs! :-)

/Gwyn


Wasp/Swarm: change LoginContext in Session

2008-06-11 Thread Andrea Jahn
Hi,

in our application the user's rights depend on the location (Munich,
Berlin,...).
There's a drop down choice, where the user can change the location, on which
he wants to work.

So, when he changes the location, also the principals (permissions) have to
be changed.

How can I remove the old principals and add new ones within the same session
?

Is it possible to remove the LoginContext from the session and add a new one
?

Thanks
Andrea



ApplLoginContext:
---

public class ApplLoginContext extends LoginContext
{
 ...
 public final Subject login() throws LoginException
 {
 ...
  DefaultSubject subject = new DefaultSubject ();
  ...
  // grant principals
  subject.addPrincipal(new SimplePrincipal(TEST_ADMIN));

  return subject;
 }
}

Login.java:
--

public class Login extends AppBasePage
{
 ...
 public class LoginForm extends Form
 {
 ...
  public void onSubmit()
  {
   ...
   // add principals of logged in user to the context
   ApplLoginContext context = new ApplLoginContext(loggedInPerson);
   try
   {
 ((WaspSession)getSession()).login(context);
   }
   catch (LoginException e)
   {
...
   }
  }
 }
}


wicket url links

2008-06-11 Thread i ii

wicket 1.2 has component#forUrl(). what to use in 1.3?
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to send response without HTML code

2008-06-11 Thread Milan Křápek
Thanks for response but this is not th exact thing I want. I need to know the 
name of wicket component, where can I get access to request from user and fill 
the response for him. All I need is some parent class of WebPage. But this 
object must return just http code without any HTML. (I was not able to send 
response from WebPage without having any addititonal HTML file ).

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



Re: How to send response without HTML code

2008-06-11 Thread Erik van Oosten

Hi Milan,

I think you should throw the exception AbortWithHttpStatusException.

If you change your mind and want to set the HTTP status code, but 
provide content as well, then call something like 
((WebResponse)getResponse).getHttpServletResponse().setStatus(HttpServletResponse.SC_...) 
in the constructor of your page.


Regards,
   Erik.


Milan Křápek schreef:

Thanks for response but this is not th exact thing I want. I need to know the 
name of wicket component, where can I get access to request from user and fill 
the response for him. All I need is some parent class of WebPage. But this 
object must return just http code without any HTML. (I was not able to send 
response from WebPage without having any addititonal HTML file ).

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



stateless vs. stateful what exactly did I do ?

2008-06-11 Thread Eyal Golan
Hi,
I have built a page that is stateless (bookmarkable) that accepts
PageParameters.
Now, this page inherits from a page that accepts PageParameters AND another
parameter.

public final class UserBrowserPage extends EntityBrowserPage {
  public UserBrowserPage(PageParameters pageParameters) {
super(pageParameters, Const.LOCALIZATION_USER_PREFIX, personId);
...
  }
}

And:
public abstract class EntityBrowserPage extends StyledSecuredBasePage {
  public EntityBrowserPage(PageParameters pageParameters, String
localizationPrefix,
String localizationPostfix) {
 ...
  }
}

Now, the prefix and postfix are not used for class members.
They're used to create a Panel in the constructor and that's all.

To my understanding, the UserBrowserPage is stateless.
I even do in the Application a mounting: mount(new
QueryStringUrlCodingStrategy(/userBrowser, UserBrowserPage.class));
Which implies that it is stateless page.

Am I correct?

what happens if a sub class is a stateless page (has no parameters
constructor or only with PageParameters), but the parent page is stateful
(gets in the constructor parameters and stores them in class members)?

Hope I was clear :)

Thanks

-- 
Eyal Golan
[EMAIL PROTECTED]

Visit: http://jvdrums.sourceforge.net/
LinkedIn: http://www.linkedin.com/in/egolan74


change the mountpath of wicket request

2008-06-11 Thread ywtsang

currently all wicket request at mounted at root,
e.g. /?wicket:interface

can we change it to mount at different place like

/customer/?wicket:interface


-- 
View this message in context: 
http://www.nabble.com/change-the-%22mountpath%22-of-wicket-request-tp17775860p17775860.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: Wasp/Swarm: change LoginContext in Session

2008-06-11 Thread Maurice Marrink
Didn't we use custom actions for those locations?
A user could have global or location permissions, right?

In that case the permissions would be the same for each location. The
only difference would be in the fact that the user has or does not
have a location. which is checked by your securitychecks.

So i don't really see why you would require a new set of permissions.

However if you must :)
By default a logincontext blocks additional logins, but you can change
that (constructor flag), you can then login again using another
logincontext. Your user now has the combined permissions of both
logincontexts, which in your case is not what you want but you can do
a logoff of the first logincontext. As long as there is a logincontext
active the session won't be destroyed.

Maurice

On Wed, Jun 11, 2008 at 12:33 PM, Andrea Jahn
[EMAIL PROTECTED] wrote:
 Hi,

 in our application the user's rights depend on the location (Munich,
 Berlin,...).
 There's a drop down choice, where the user can change the location, on which
 he wants to work.

 So, when he changes the location, also the principals (permissions) have to
 be changed.

 How can I remove the old principals and add new ones within the same session
 ?

 Is it possible to remove the LoginContext from the session and add a new one
 ?

 Thanks
 Andrea



 ApplLoginContext:
 ---

 public class ApplLoginContext extends LoginContext
 {
  ...
  public final Subject login() throws LoginException
  {
 ...
  DefaultSubject subject = new DefaultSubject ();
  ...
  // grant principals
  subject.addPrincipal(new SimplePrincipal(TEST_ADMIN));

  return subject;
  }
 }

 Login.java:
 --

 public class Login extends AppBasePage
 {
  ...
  public class LoginForm extends Form
  {
  ...
  public void onSubmit()
  {
   ...
   // add principals of logged in user to the context
   ApplLoginContext context = new ApplLoginContext(loggedInPerson);
   try
   {
 ((WaspSession)getSession()).login(context);
   }
   catch (LoginException e)
   {
...
   }
  }
  }
 }


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



Re: beginner question about models when having more than one component of the same type on the same page

2008-06-11 Thread Peter Eriksson
I will answer my own post, just in case somebody else is looking for a
solution to the same problem. I have found two ways to get the resource
loading to do exactly what I want (There are probably a lot more out there):

Solution 1 (The easiest one in my opinion):
Do the following changes to ContactPanel.html:

Replace the span wicket:id=nameLabel/span tag with wicket:message
key=nameLabel/wicket:message (and the same for userNameLabel,
phoneLabel and emailLabel).

It works straight away for the nameLabel in the hrContactPanel it picks up
the string HR Contact: from the VacancyPage.properties file and for the
nameLabel in hiringManagerPanel it picks up the string Hiring Manager:
instead, just as it should :-)

Solution 2:
Instead of using the ResourceModel you have to use the StringResourceModel
and supply the component and an empty model. Note that it does not work
unless you supply the component (this) to the ResourceModel. Here is the
updated ContactPanel.java:

public class ContactPanel extends Panel {
private static final long serialVersionUID = 1L;

public ContactPanel(String id, IModel model) {
super(id, model);
add(new Label(nameLabel, new StringResourceModel(nameLabel,
this, null)));
add(new Label(name));

add(new Label(userNameLabel, new
StringResourceModel(userNameLabel, this, null)));
add(new Label(userName));

add(new Label(phoneLabel, new StringResourceModel(phoneLabel,
this, null)));
add(new Label(phone));

add(new Label(emailLabel, new StringResourceModel(emailLabel,
this, null)));
add(new Label(email));
}
}

Best Regards,
/Peter

2008/6/11 Peter Eriksson [EMAIL PROTECTED]:


 HTML for the panel ((ContactPanel.html):
 html xmlns:wicket
 wicket:panel
 table
 tr
 tdspan wicket:id=nameLabel/span/td
 tdspan wicket:id=name/span/td
 /tr
 tr
 tdspan wicket:id=userNameLabel/span/td
 tdspan wicket:id=userName/span/td
 /tr
 tr
 tdspan wicket:id=phoneLabel/span/td
 tdspan wicket:id=phone/span/td
 /tr
 tr
 tdspan wicket:id=emailLabel/span/td
 tdspan wicket:id=email/span/td
 /tr
 /table
 /wicket:panel
 /html

 Java code for the panel (ContactPanel.java):
 public class ContactPanel extends Panel {
 private static final long serialVersionUID = 1L;

 public ContactPanel(String id, IModel model) {
 super(id, model);
 add(new Label(nameLabel, new ResourceModel(nameLabel)));
 add(new Label(name));

 add(new Label(userNameLabel, new
 ResourceModel(userNameLabel)));
 add(new Label(userName));

 add(new Label(phoneLabel, new ResourceModel(phoneLabel)));
 add(new Label(phone));

 add(new Label(emailLabel, new ResourceModel(emailLabel)));
 add(new Label(email));
 }
 }


 HTML for the page using the panel (VacanyPage.html):
 --- snip ---
 table
 tr
 tdspan
 wicket:id=hrContactPanel/span/td
 /tr
 tr
 tdspan
 wicket:id=hiringManagerPanel/span/td
 /tr
 /table
 --- snip ---

 Java code for the page (VacanyPage.java):
 --- snip ---
 Form form = new Form(vacancyForm, new
 CompoundPropertyModel(vacancyReq)) {
 --- snip ---
 Contact hrContact = new Contact();
 form.add(new ContactPanel(hrContactPanel, new
 CompoundPropertyModel(hrContact)));
 Contact hiringManager = new Contact();
 form.add(new ContactPanel(hiringManagerPanel, new
 CompoundPropertyModel(hiringManager)));
 --- snip ---

 Properties file for the page (VacancyPage.properties):
 vacancyForm.hrContactPanel.nameLabel=HR Contact:
 vacancyForm.hrContactPanel.userNameLabel=HR Contact Username:
 vacancyForm.hrContactPanel.phoneLabel=Phone:
 vacancyForm.hrContactPanel.emailLabel=Email:
 vacancyForm.hiringManagerPanel.nameLabel=Hiring Manager:
 vacancyForm.hiringManagerPanel.userNameLabel=Hiring Manager Username:
 vacancyForm.hiringManagerPanel.phoneLabel=Phone:
 vacancyForm.hiringManagerPanel.emailLabel=Email:


 As you can see from the code the VacancyPage has two instances of
 ContactPanel and these should have different labels. I have tried different
 ways to specify this, but Wicket says it cannot find the labels, so I must
 be doing something wrong.

 Thanks in advance for any help!

 Best Regards,
 /Peter

 2008/6/11 Martin Makundi [EMAIL PROTECTED]:

 Can you paste the code for better insight into your problem?

 2008/6/11 Peter Eriksson [EMAIL PROTECTED]:
  Hello,
 
  I have just begun to use wicket and so far I am very impressed with the
  framework.
  I have a question about best practice to solve a problem. I have a
 component
  (wicket panel) that contain contact information (like name, address,
 

Re: How to send response without HTML code

2008-06-11 Thread Peter Ertl

I think this is what AbortWithWebErrorCodeException is for

Am 11.06.2008 um 13:24 schrieb Erik van Oosten:


Hi Milan,

I think you should throw the exception AbortWithHttpStatusException.

If you change your mind and want to set the HTTP status code, but  
provide content as well, then call something like  
((WebResponse 
)getResponse 
).getHttpServletResponse().setStatus(HttpServletResponse.SC_...) in  
the constructor of your page.


Regards,
  Erik.


Milan Křápek schreef:
Thanks for response but this is not th exact thing I want. I need  
to know the name of wicket component, where can I get access to  
request from user and fill the response for him. All I need is some  
parent class of WebPage. But this object must return just http code  
without any HTML. (I was not able to send response from WebPage  
without having any addititonal HTML file ).


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



PageExpiredException when clicking an AjaxLink

2008-06-11 Thread Nili Adoram

Hi all,

I need a clue about a strange problem we're coming across in wicket 1.3.0-rc1.

(I know wicket has made a huge progress since then but our tight schedule dos 
not allow any upgrade at the moment).

I have an AjaxLink which replaces the default onclick behavior  of AjaxLink 
with our own behavior.

When the user clicks the AjaxLink we prompt for some user input via JavaScript.

The user input is concatenated to the Ajax request URL as you can see in the 
generated markup:

a href=# wicket:id=markAsHandled onclick=var handleMsg=prompt('Please enter a message','');if 
(handleMsg!=null) {var 
wcall=wicketAjaxGet('../../?wicket:interface=modal-dialog-pagemap:1:requestNote:requestNote.container:markAsHandled::IBehaviorListener:0:2'
 + 'handleMsg=' + handleMsg,null,null, function() {return Wicket.$$(this)}.bind(this));}return !wcall; 
id=markAsHandled9Mark As Handled/a  

However, sometimes the the Ajax request fails due to a PageExpiredException.

The WebRequestCycleProcessor fails to find the page in the page map and cannot 
resolve the request.

This happens only occasionally which prevents me from proper debugging.

When I tried to raise debug level of wicket, I failed to reproduce the problem.

Can anyone provide me some clue where to start ?

Thanks
Nili


--
Best,
Nili 


===
Nili Adoram
GRM Team, RD, Qlusters Inc.
[EMAIL PROTECTED]
+972-3-6236636




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



Re: PageExpiredException when clicking an AjaxLink

2008-06-11 Thread richardwilko

Ok this may be a longshot but see if this makes sense.  I had a similar
problem, it was caused because i had some image links where the src
attribute was actually pointing at the home page of my application.  So
instead of loading an image it would actually make a get request to the home
page, which puts the home page into page map.  If you have enough of these
dodgy images then your current page gets pushed out of the page map, as it
only holds a limited number of pages, so your ajax fails.

What sort of session store are you using, the default (second level cache
thing) or httpsession page map?



Nili Adoram wrote:
 
 Hi all,
 
 I need a clue about a strange problem we're coming across in wicket
 1.3.0-rc1.
 
 (I know wicket has made a huge progress since then but our tight schedule
 dos not allow any upgrade at the moment).
 
 I have an AjaxLink which replaces the default onclick behavior  of
 AjaxLink with our own behavior.
 
 When the user clicks the AjaxLink we prompt for some user input via
 JavaScript.
 
 The user input is concatenated to the Ajax request URL as you can see in
 the generated markup:
 
  # Mark As Handled
 
 However, sometimes the the Ajax request fails due to a
 PageExpiredException.
 
 The WebRequestCycleProcessor fails to find the page in the page map and
 cannot resolve the request.
 
 This happens only occasionally which prevents me from proper debugging.
 
 When I tried to raise debug level of wicket, I failed to reproduce the
 problem.
 
 Can anyone provide me some clue where to start ?
 
 Thanks
 Nili
 
 
 -- 
 Best,
 Nili 
 
 ===
 Nili Adoram
 GRM Team, RD, Qlusters Inc.
 [EMAIL PROTECTED]
 +972-3-6236636
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/PageExpiredException-when-clicking-an-AjaxLink-tp17776613p1359.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]



setRenderBodyOnly(true) - something more powerful?

2008-06-11 Thread Martin Makundi
Hi!

I have had to tweak some markup. I have complex tables so my markup is
as follows:

table
thead.../
tbody wicket:id=radioGroup1/
tbody wicket:id=radioGroup2/
div wicket:id=rowListView
tr wicket:id=rowspanListView

/// close tags ofcourse

I would very much like to hide the excess div and tbody tags
completely from the markup seen by the browser. However, if I set
setRenderBodyOnly(true) for the specific components, the tags will be
visible as div and tbody.

Only the attributes are not rendered.

Is there some way to hide completely the markup of the excess
elements? Hurts validation. I cannot just set visibility to false
because the elements are nested and I want the content to be visible
:)

**
Martin

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



Re: setRenderBodyOnly(true) - something more powerful?

2008-06-11 Thread Alex Jacoby

Have you tried the wicket:container tag?

On Jun 11, 2008, at 9:29 AM, Martin Makundi wrote:


Hi!

I have had to tweak some markup. I have complex tables so my markup is
as follows:

table
thead.../
tbody wicket:id=radioGroup1/
tbody wicket:id=radioGroup2/
div wicket:id=rowListView
tr wicket:id=rowspanListView

/// close tags ofcourse

I would very much like to hide the excess div and tbody tags
completely from the markup seen by the browser. However, if I set
setRenderBodyOnly(true) for the specific components, the tags will be
visible as div and tbody.

Only the attributes are not rendered.

Is there some way to hide completely the markup of the excess
elements? Hurts validation. I cannot just set visibility to false
because the elements are nested and I want the content to be visible
:)

**
Martin



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



Re: stateless vs. stateful what exactly did I do ?

2008-06-11 Thread Ayodeji Aladejebi
http://www.javaworld.com/javaworld/jw-06-2008/jw-06-wicket1.html?page=1

On 6/11/08, Eyal Golan [EMAIL PROTECTED] wrote:

 Hi,
 I have built a page that is stateless (bookmarkable) that accepts
 PageParameters.
 Now, this page inherits from a page that accepts PageParameters AND another
 parameter.

 public final class UserBrowserPage extends EntityBrowserPage {
   public UserBrowserPage(PageParameters pageParameters) {
 super(pageParameters, Const.LOCALIZATION_USER_PREFIX, personId);
 ...
   }
 }

 And:
 public abstract class EntityBrowserPage extends StyledSecuredBasePage {
   public EntityBrowserPage(PageParameters pageParameters, String
 localizationPrefix,
 String localizationPostfix) {
  ...
   }
 }

 Now, the prefix and postfix are not used for class members.
 They're used to create a Panel in the constructor and that's all.

 To my understanding, the UserBrowserPage is stateless.
 I even do in the Application a mounting: mount(new
 QueryStringUrlCodingStrategy(/userBrowser, UserBrowserPage.class));
 Which implies that it is stateless page.

 Am I correct?

 what happens if a sub class is a stateless page (has no parameters
 constructor or only with PageParameters), but the parent page is stateful
 (gets in the constructor parameters and stores them in class members)?

 Hope I was clear :)

 Thanks


 --
 Eyal Golan
 [EMAIL PROTECTED]

 Visit: http://jvdrums.sourceforge.net/
 LinkedIn: http://www.linkedin.com/in/egolan74




-- 
Aladejebi Ayodeji A.,
DabarObjects Solutions
Phone: +234 9 481 7 156
Mobile: +234 803 589 1780
Email: [EMAIL PROTECTED]
Web: www.dabarobjects.com
Blog: blog.dabarobjects.com


Re: 1.3.4 release

2008-06-11 Thread Frank Bille
Hi,
The 1.3.4 release has been delayed a couple of times for various reasons.
Right now the state is that I need to find the time to look into an issue
that could mean regression from 1.3.3[0]. I just haven't got the time for it
yet.

Frank

[0]: https://issues.apache.org/jira/browse/WICKET-1646


On Tue, Jun 10, 2008 at 3:47 PM, Ricky [EMAIL PROTECTED] wrote:

 Hi,

 I know I have asked this question couple of times now, but is there a
 fixed release date on this yet? sorry if it sounds like a duplicate
 question; but we are being pushed to raise the concern over and over; Using
 a 1.3-SNAPSHOT is not really a great idea, because if something changes at
 wicket end which breaks our stuff it would end up being a bug on our plate
 from users here ... Hopefully someone can give a definitive schedule for
 release date. The original question was raised like a month back and the
 response was that it will be sometime that week itself. apparently each
 time the response has been the same.

 My question is:
 1.) Is it delayed?
 2.) Is it canceled?
 3.) Is it being replaced by 1.4? (in that there will be *NO* 1.3.4 anymore)

 My apologies if i sound obstinate.

 Thnx,
 Rick.



Re: Z-depth problem with AutoCompleteTextField in IE

2008-06-11 Thread Ismael Juma
Michael Mehrle michael.mehrle at ask.com writes:
 In Internet Explorer I am experiencing a strange z-depth problem.
 Meaning that the drop down menu appears *behind* neighboring form fields
 - please take a look at this screenshot:

Perhaps the same as https://issues.apache.org/jira/browse/WICKET-1355 ?

Regards,
Ismael


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



Re: Wasp/Swarm: change LoginContext in Session

2008-06-11 Thread Andrea Jahn
 Yes, I have different permissions for the locations. The user can have
different
roles for each location and each role has different permissions.

Now I made a dummy LoginContext class and for changing the LoginContext
I first add the dummy LoginContext, then delete the old LoginContext,
then add the new LoginContext and after that I delete the dummy
LoginContext.

This works, thank you

I think I could add the DummyLoginContext, when the user is logging in.
When the user is changing the location selection, I only would have to
logoff for the
old ApplLoginContext and login again for the new ApplLoginContext.

 Andrea


// dummy
DummyLoginContext context2 = new DummyLoginContext(loggedInPerson);
((WaspSession)session).login(context2);

// destroy the old context
((WaspSession)session).logoff(new ApplLoginContext());

// add new context to session
ApplLoginContext context = new ApplLoginContext(loggedInPerson);
((WaspSession)session).login(context);

// destroy the dummy context
((WaspSession)session).logoff(new DummyLoginContext());

---
2008/6/11, Maurice Marrink [EMAIL PROTECTED]:

 Didn't we use custom actions for those locations?
 A user could have global or location permissions, right?

 In that case the permissions would be the same for each location. The
 only difference would be in the fact that the user has or does not
 have a location. which is checked by your securitychecks.

 So i don't really see why you would require a new set of permissions.

 However if you must :)
 By default a logincontext blocks additional logins, but you can change
 that (constructor flag), you can then login again using another
 logincontext. Your user now has the combined permissions of both
 logincontexts, which in your case is not what you want but you can do
 a logoff of the first logincontext. As long as there is a logincontext
 active the session won't be destroyed.

 Maurice

 On Wed, Jun 11, 2008 at 12:33 PM, Andrea Jahn
 [EMAIL PROTECTED] wrote:
  Hi,
 
  in our application the user's rights depend on the location (Munich,
  Berlin,...).
  There's a drop down choice, where the user can change the location, on
 which
  he wants to work.
 
  So, when he changes the location, also the principals (permissions) have
 to
  be changed.
 
  How can I remove the old principals and add new ones within the same
 session
  ?
 
  Is it possible to remove the LoginContext from the session and add a new
 one
  ?
 
  Thanks
  Andrea
 
 
 
  ApplLoginContext:
  ---
 
  public class ApplLoginContext extends LoginContext
  {
   ...
   public final Subject login() throws LoginException
   {
  ...
   DefaultSubject subject = new DefaultSubject ();
   ...
   // grant principals
   subject.addPrincipal(new SimplePrincipal(TEST_ADMIN));
 
   return subject;
   }
  }
 
  Login.java:
  --
 
  public class Login extends AppBasePage
  {
   ...
   public class LoginForm extends Form
   {
   ...
   public void onSubmit()
   {
...
// add principals of logged in user to the context
ApplLoginContext context = new ApplLoginContext(loggedInPerson);
try
{
  ((WaspSession)getSession()).login(context);
}
catch (LoginException e)
{
 ...
}
   }
   }
  }
 

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




Re: setRenderBodyOnly(true) - something more powerful?

2008-06-11 Thread Martin Makundi
Tnx! Good point: http://cwiki.apache.org/WICKET/wickets-xhtml-tags.html

I think this page should be strongly cross-referenced from markup
inheritance tutorial ;) There's a lot of useful stuff!

**
Martin

2008/6/11 Alex Jacoby [EMAIL PROTECTED]:
 Have you tried the wicket:container tag?

 On Jun 11, 2008, at 9:29 AM, Martin Makundi wrote:

 Hi!

 I have had to tweak some markup. I have complex tables so my markup is
 as follows:

 table
 thead.../
 tbody wicket:id=radioGroup1/
 tbody wicket:id=radioGroup2/
 div wicket:id=rowListView
 tr wicket:id=rowspanListView
 
 /// close tags ofcourse

 I would very much like to hide the excess div and tbody tags
 completely from the markup seen by the browser. However, if I set
 setRenderBodyOnly(true) for the specific components, the tags will be
 visible as div and tbody.

 Only the attributes are not rendered.

 Is there some way to hide completely the markup of the excess
 elements? Hurts validation. I cannot just set visibility to false
 because the elements are nested and I want the content to be visible
 :)

 **
 Martin


 -
 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: setRenderBodyOnly(true) - something more powerful?

2008-06-11 Thread Igor Vaynberg
it is a wiki

-igor

On Wed, Jun 11, 2008 at 7:00 AM, Martin Makundi
[EMAIL PROTECTED] wrote:
 Tnx! Good point: http://cwiki.apache.org/WICKET/wickets-xhtml-tags.html

 I think this page should be strongly cross-referenced from markup
 inheritance tutorial ;) There's a lot of useful stuff!

 **
 Martin

 2008/6/11 Alex Jacoby [EMAIL PROTECTED]:
 Have you tried the wicket:container tag?

 On Jun 11, 2008, at 9:29 AM, Martin Makundi wrote:

 Hi!

 I have had to tweak some markup. I have complex tables so my markup is
 as follows:

 table
 thead.../
 tbody wicket:id=radioGroup1/
 tbody wicket:id=radioGroup2/
 div wicket:id=rowListView
 tr wicket:id=rowspanListView
 
 /// close tags ofcourse

 I would very much like to hide the excess div and tbody tags
 completely from the markup seen by the browser. However, if I set
 setRenderBodyOnly(true) for the specific components, the tags will be
 visible as div and tbody.

 Only the attributes are not rendered.

 Is there some way to hide completely the markup of the excess
 elements? Hurts validation. I cannot just set visibility to false
 because the elements are nested and I want the content to be visible
 :)

 **
 Martin


 -
 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: Anchors in Wicket?

2008-06-11 Thread Michael Mehrle
Mind sharing that? ;-)

-Original Message-
From: Thijs [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 10, 2008 11:23 PM
To: users@wicket.apache.org
Subject: Re: Anchors in Wicket?

The component is any wicket component in the same page or next page if 
you know that component.

What you are doing, an anchor in a different page, I've solved by 
writing my own subclass of link where I append the '#rsvp' myself.

Michael Mehrle schreef:
 I don't get it - what is the 'component' in the setAnchor() method? If
I
 set an anchor in a completely different page like this:

 a href=#rsvp /

 What do I set as the 'component' in the link's setAnchor?

 Thanks,

 Michael

 -Original Message-
 From: Thijs Vonk [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, June 10, 2008 12:39 PM
 To: users@wicket.apache.org
 Subject: Re: Anchors in Wicket?

 Michael Mehrle wrote:
   
 How do create a link that jumps to some anchor in a page? Is there a
 
 way
   
 to define this in Wicket or do I have to do this manually somehow?

  

 Michael


   
 
 yes. use link.setAnchor(Component)

 -
 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: forcing cookies to expire

2008-06-11 Thread jchappelle

I don't have to have it set on root. In fact now my code doesn't call setPath
at all and it works fine.

This is actually my first time ever using cookies. I've developed
traditional applications in the past. I really only need the cookie to be
visible to my login page but it doesn't really hurt if it is visible to any
other pages because this is the only place(as of now) that we use cookies in
our product.

How would I specify the path so that only my login page would be visible?
Since this is wicket and the URL paths are weird I don't really know how I
would do that. 

Thanks,

Josh

Johan Compagner wrote:
 
 Because we cant really just call set path... That is something that
 you have to do. Why do you want it on root?
 
 On 6/10/08, jchappelle [EMAIL PROTECTED] wrote:

 Thanks for the quick reply. I finally fixed the problem. What I found was
 that when I was creating my cookie I was calling setPath(/) and when I
 deleted it I was not calling setPath(/). So I guess the equals method
 saw
 them as two different cookies and it wasn't deleting it. There is
 actually a
 convenience method on the WebResponse class called clearCookie that I am
 calling. However, that method will not work if you have called
 setPath(/)
 on your cookie because it doesn't set the path. It just does the
 following:

  public void clearCookie(final Cookie cookie)
  {
  if (httpServletResponse != null)
  {
  cookie.setMaxAge(0);
  cookie.setValue(null);
  addCookie(cookie);
  }
  }

 Thanks,

 Josh


 richardwilko wrote:

 Ive had the same problem.  to delete a cookie do this:

 Cookie newCookie = new Cookie(my cookie name here!, null);
 newCookie.setMaxAge(0);
 newCookie.setPath(/);
 getWebRequestCycle().getWebResponse().addCookie(newCookie); 

 i dont know why (i didnt really look into it) but u seem to have to
 create
 a new cookie with the same name and add it.  maybe this is a wicket bug?

 Richard


 --
 View this message in context:
 http://www.nabble.com/forcing-cookies-to-expire-tp17067292p17760587.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/forcing-cookies-to-expire-tp17067292p17780251.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: enclosure around listview

2008-06-11 Thread Matthijs Wensveen

Gwyn Evans wrote:

On Wed, Jun 11, 2008 at 10:34 AM, Matthijs Wensveen [EMAIL PROTECTED]
wrote:

  

Is there a way to hide a listview with an enclosure when there are no items
to display? One way to get it working is to toggle the visibility of the
listview based on wheter or not the list is empty or not.




I think that's the normal way, in that you'd typically have both the list
and a No items found label, then set one or the other as visible...


  

I was expecting this would work out-of-the-box though...




JIRA (https://issues.apache.org/jira/browse/WICKET) covers Wishes as well
as Bugs! :-)

/Gwyn

  

I wish I knew what to wish for exactly... :D
Thanks,
Matthijs

--
Matthijs Wensveen
Func. Internet Integration
W http://www.func.nl
T +31 20 423
F +31 20 4223500 



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



RE: wicket url links

2008-06-11 Thread i ii

no answer?

 From: [EMAIL PROTECTED]
 To: users@wicket.apache.org
 Subject: wicket url links
 Date: Wed, 11 Jun 2008 10:59:22 +


 wicket 1.2 has component#forUrl(). what to use in 1.3?
 -
 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 url links

2008-06-11 Thread Gwyn Evans
Hmm... some (all) of us have jobs to do as well as this...

Anyway, is component#urlFor() what you're looking for?
What 1.2 version were you using, as 1.2.6 has the above but no
component#forUrl()?

/Gwyn

On Wed, Jun 11, 2008 at 4:34 PM, i ii [EMAIL PROTECTED] wrote:


 no answer?

  From: [EMAIL PROTECTED]
  To: users@wicket.apache.org
  Subject: wicket url links
  Date: Wed, 11 Jun 2008 10:59:22 +
 
 
  wicket 1.2 has component#forUrl(). what to use in 1.3?
  -
  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 url links

2008-06-11 Thread i ii

sorry for job, thank you for help. i use 1.3, but cannot find 
component#urlFor(). i only see in 1.2 javadoc

 Date: Wed, 11 Jun 2008 17:04:11 +0100
 From: [EMAIL PROTECTED]
 To: users@wicket.apache.org
 Subject: Re: wicket url links

 Hmm... some (all) of us have jobs to do as well as this...

 Anyway, is component#urlFor() what you're looking for?
 What 1.2 version were you using, as 1.2.6 has the above but no
 component#forUrl()?

 /Gwyn

 On Wed, Jun 11, 2008 at 4:34 PM, i ii  wrote:


 no answer?

 From: [EMAIL PROTECTED]
 To: users@wicket.apache.org
 Subject: wicket url links
 Date: Wed, 11 Jun 2008 10:59:22 +


 wicket 1.2 has component#forUrl(). what to use in 1.3?
 -
 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: setRenderBodyOnly(true) - something more powerful?

2008-06-11 Thread Martin Makundi
Done :)

2008/6/11 Igor Vaynberg [EMAIL PROTECTED]:
 it is a wiki

 -igor

 On Wed, Jun 11, 2008 at 7:00 AM, Martin Makundi
 [EMAIL PROTECTED] wrote:
 Tnx! Good point: http://cwiki.apache.org/WICKET/wickets-xhtml-tags.html

 I think this page should be strongly cross-referenced from markup
 inheritance tutorial ;) There's a lot of useful stuff!

 **
 Martin

 2008/6/11 Alex Jacoby [EMAIL PROTECTED]:
 Have you tried the wicket:container tag?

 On Jun 11, 2008, at 9:29 AM, Martin Makundi wrote:

 Hi!

 I have had to tweak some markup. I have complex tables so my markup is
 as follows:

 table
 thead.../
 tbody wicket:id=radioGroup1/
 tbody wicket:id=radioGroup2/
 div wicket:id=rowListView
 tr wicket:id=rowspanListView
 
 /// close tags ofcourse

 I would very much like to hide the excess div and tbody tags
 completely from the markup seen by the browser. However, if I set
 setRenderBodyOnly(true) for the specific components, the tags will be
 visible as div and tbody.

 Only the attributes are not rendered.

 Is there some way to hide completely the markup of the excess
 elements? Hurts validation. I cannot just set visibility to false
 because the elements are nested and I want the content to be visible
 :)

 **
 Martin


 -
 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: wicket url links

2008-06-11 Thread Eelco Hillenius
 wicket 1.2 has component#forUrl(). what to use in 1.3?

urlFor(Component) (can also be found on RequestCycle).

Eelco

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



Re: A question about cookie value loading

2008-06-11 Thread nate roe
Hrm.  This issue may well be what I've run up against.

When exactly are ListView children created (or reused)?

On Tue, Jun 10, 2008 at 8:04 PM, Timo Rantalaiho [EMAIL PROTECTED]
wrote:

 On Tue, 10 Jun 2008, nate roe wrote:
  Don't forget that I'm using 1.2... this has maybe changed and that's why
  Eclipse isn't showing the call hierarchy?

 Before 1.3.0-beta3 there was trouble visiting repeater
 children before they are rendered, could your problem be
 caused by that?

  http://issues.apache.org/jira/browse/WICKET-627

 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]




Dropdownchoice without default option choose one

2008-06-11 Thread nitinkc

I would like to remove the default choose one option from the
DropDownChoice component.
Does anyone know how to do this. Thanks.
-- 
View this message in context: 
http://www.nabble.com/Dropdownchoice-without-default-option-%22choose-one%22-tp17782776p17782776.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 url links

2008-06-11 Thread i ii

thank you

 Date: Wed, 11 Jun 2008 09:49:01 -0700
 From: [EMAIL PROTECTED]
 To: users@wicket.apache.org
 Subject: Re: wicket url links

 wicket 1.2 has component#forUrl(). what to use in 1.3?

 urlFor(Component) (can also be found on RequestCycle).

 Eelco

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


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



Re: Dropdownchoice without default option choose one

2008-06-11 Thread Michael O'Cleirigh

Hi nitinkc,

Calling setNullValid (false) on the drop down choice should get rid of 
the default choose one text.


If the ddc model should always have a value defined then you could set 
the model object to be for example the first choice.


e.g. ddc.setModelObject (ddc.getChoices().get(0));

Regards,

Mike


I would like to remove the default choose one option from the
DropDownChoice component.
Does anyone know how to do this. Thanks.
  



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



FileUploadField and AjaxButton

2008-06-11 Thread Alexander Landsnes Keül
Hi,

I'm trying to use an AjaxButton along with a FileUploadField, and that produces 
an unfortunate but predictable result. Whenever I call 
_fileUploadField.getFileUpload() it returns null. If I try to replace the 
button with a regular one it works just fine. Am I missing something obvious 
here, or is it an issue?

This is in a function called by the onSubmit() in both cases:


FileUpload upload = _fileUploadField.getFileUpload();

if( upload != null )
{
// some code
} else
{
log.error();
}

I always get to the error bit here. I've solved the issue another place by 
simply using a regular button. However that isn't really an option for me at 
this location. I'd appreciate it if anyone could explain why this acts as it 
does, or even better have a solution for me :)

Alex

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



Re: Dropdownchoice without default option choose one

2008-06-11 Thread nitinkc

I tried setNullValid(false). But this does not get rid of the choose one
option. Note that the choices are a list of Strings. If the choices are a
list of other user defined object types and I use a choicerendrer for
display values, the choose one option is removed(without
setNullValid(false)). Any ideas?


Michael O'Cleirigh wrote:
 
 Hi nitinkc,
 
 Calling setNullValid (false) on the drop down choice should get rid of 
 the default choose one text.
 
 If the ddc model should always have a value defined then you could set 
 the model object to be for example the first choice.
 
 e.g. ddc.setModelObject (ddc.getChoices().get(0));
 
 Regards,
 
 Mike
 
 I would like to remove the default choose one option from the
 DropDownChoice component.
 Does anyone know how to do this. Thanks.
   
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Dropdownchoice-without-default-option-%22choose-one%22-tp17782776p17783862.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 update parent component from a panel?

2008-06-11 Thread Timo Rantalaiho
On Wed, 11 Jun 2008, freak182 wrote:
 I already rip out your patch and run the testcase it worked but how can i
 implement/intgerate to my project...do you have a working example project
 for that?

Unfortunately not, but just copy the classes to a suitable 
package in your project and start using them in the same way 
as in the test cases.

E.g. something along these lines

public class FooSelectionEvent implements Event {
private final IModel foo;
private final AjaxRequestTarget target;

public FooSelectionEvent(IModel foo, AjaxRequestTarget target) {
this.foo = foo;
this.target = target;
}

public Foo getFoo() {
return (Foo) foo.getObject();
}

public void addToTarget(Component c) {
target.addComponent(c);
}
}

public interface FooSelectionReceiver extends EventReceiver {
void onEvent(FooSelectionEvent event);
}

public class SelectedFooLabel extends Label implements FooSelectionReceiver {
...
public void onEvent(FooSelectionEvent event) {
setModelObject(event.getFoo());
event.addToTarget(this);
}
}

public class FooPanel extends Panel {
private EventBroadcaster broadcaster = new EventBroadcaster(this);
...
add(new DropDownChoice(fooSelection, fooSelection, fooList)
.add(new AjaxFormComponentUpdatingBehavior(onchange) {
public void onEvent(AjaxRequestTarget target) {
broadcaster.broadcast(FooSelectionReceiver.class, new
FooSelectionEvent(target, fooSelection));
}
});
...
}


Now SelectedFooLabel receives the events sent from the 
DropDownChoice, provided that both component instances are on 
the same page (you must be careful with repeater items and 
other replaced components here).  

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]



Re: Dropdownchoice without default option choose one

2008-06-11 Thread Martin Makundi
I have noticed that with DropDownChoice, if the currently selected
value is Null, you get this choose one item. And sometimes in a
dynamic situation you get it still.

Try using the analogous ListChoice element, at least it worked for me.

**
Martin

2008/6/11 nitinkc [EMAIL PROTECTED]:

 I tried setNullValid(false). But this does not get rid of the choose one
 option. Note that the choices are a list of Strings. If the choices are a
 list of other user defined object types and I use a choicerendrer for
 display values, the choose one option is removed(without
 setNullValid(false)). Any ideas?


 Michael O'Cleirigh wrote:

 Hi nitinkc,

 Calling setNullValid (false) on the drop down choice should get rid of
 the default choose one text.

 If the ddc model should always have a value defined then you could set
 the model object to be for example the first choice.

 e.g. ddc.setModelObject (ddc.getChoices().get(0));

 Regards,

 Mike

 I would like to remove the default choose one option from the
 DropDownChoice component.
 Does anyone know how to do this. Thanks.



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




 --
 View this message in context: 
 http://www.nabble.com/Dropdownchoice-without-default-option-%22choose-one%22-tp17782776p17783862.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: A question about cookie value loading

2008-06-11 Thread Timo Rantalaiho
On Wed, 11 Jun 2008, nate roe wrote:
 When exactly are ListView children created (or reused)?

Use the source, Luke! onBeforeRender AFAIK.

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]



Re: FileUploadField and AjaxButton

2008-06-11 Thread Timo Rantalaiho
On Wed, 11 Jun 2008, Alexander Landsnes Keül wrote:
 produces an unfortunate but predictable result. Whenever I call
 _fileUploadField.getFileUpload() it returns null. If I try to replace
 the button with a regular one it works just fine. Am I missing
 something obvious here, or is it an issue?

I think that it is an obvious issue :)

   * FILE UPLOADS ARE NOT SUPPORTED BY AJAX. USE GOOGLE TO LEARN MORE
   * ABOUT THIS.

   
http://svn.apache.org/repos/asf/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/upload/FileUploadField.java

It's a great idea to attach Wicket source code to Wicket 
jars in your IDE, then you can easily surf to Wicket code 
which tends to explain itself well, see the javadocs etc.

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]



Re: Dropdownchoice without default option choose one

2008-06-11 Thread Timo Rantalaiho
On Wed, 11 Jun 2008, Martin Makundi wrote:
 I have noticed that with DropDownChoice, if the currently selected
 value is Null, you get this choose one item. And sometimes in a
 dynamic situation you get it still.

Yeah, it's easy to miss setting the currently selected value
for when DropDownChoice is rendered for the first time.
Hence it's always a good idea to supply it in the
constructor. 

It can get tricky if you want to have the default choice in
the UI, but not necessarily update it to the domain object
property that the selection is bound to. If this is
required, you can get around it by a custom model.

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]



ListViews in a form question

2008-06-11 Thread Martin Makundi
Hi!

I have nested listviews which draw a complex tabular form having
variable colspans and rowspans depending on the state of the form.

I have an Add button to add elements into one of the inner listviews.

Problem:
1. If I have setReuseItems true, the HTML table is not rendered
properly (somehow the old table structure remains which should be
restructured).
2. If I have setReuseItems false, the form components loose their
state (unsubmitted entries) whenever I press the button.

So. In my understanding, I need to both a) redraw the html table (at
least update the colspan and rowspan attributes) and still b) preserve
the form component state :) Is there an out-of-the-box solution for
this?

**
Martin

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



Re: Example of wicketstuff-minis' Veil

2008-06-11 Thread nitinkc

Igor,
Any updates on this??
thanks!


nitinkc wrote:
 
 Here is the stack trace:
 Root cause:java.lang.IllegalStateException: This behavior is already bound
 to component. An instance of this behavior cannot be reused between
 components. Bound component: [MarkupContainer [Component id = test, page =
 No Page, path = test.Button]] at
 org.wicketstuff.minis.veil.Veil.bind(Veil.java:64) at
 org.apache.wicket.Component.add(Component.java:922) at
 com.uprr.app.hrw.wicket.page.scheduling.EventDetailsPage.init(EventDetailsPage.java:235)
 
 at java.lang.reflect.Constructor.newInstance(Constructor.java:494) at
 java.lang.Class.newInstance0(Class.java:350) at
 java.lang.Class.newInstance(Class.java:303) at
 org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:58)
 
 at
 org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.newPage(BookmarkablePageRequestTarget.java:262)
 
 at
 org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.getPage(BookmarkablePageRequestTarget.java:283)
 
 at
 org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.processEvents(BookmarkablePageRequestTarget.java:210)
 
 at
 org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:90)
 
 at
 org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1166)
 
 at org.apache.wicket.RequestCycle.step(RequestCycle.java:1241) at
 org.apache.wicket.RequestCycle.steps(RequestCycle.java:1316) at
 org.apache.wicket.RequestCycle.request(RequestCycle.java:493) at
 org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:354)
 at
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:194)  
   
 at
 weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)   
  
 at
 weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3393)
 
 at
 weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
 
 at weblogic.security.service.SecurityManager.runAs(Unknown Source) at
 weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2140)
 
 at
 weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2046)
 
 at
 weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1366)
 
 at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200) at
 weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
 
 I am using: wicketstuff-minis-1.3.0-SNAPSHOT.jar
 
 
 igor.vaynberg wrote:
 
 can you paste the stack trace please? are you using latest trunk?
 
 -igor
 
 On Tue, Jun 3, 2008 at 6:38 AM, nitinkc [EMAIL PROTECTED] wrote:

 I need an example of wicketstuff-minis' veil behavior. I added this to
 one of
 my components but keep getting the error that the behavior is already
 bound
 to another component and cannot be reused.
 All I am doing is:

 Button button = new Button(test);
 button.add(new Veil());
 form.add(button);

 This is the only Veil I am using on my page. Thanks.

 --
 View this message in context:
 http://www.nabble.com/Example-of-wicketstuff-minis%27-Veil-tp17623741p17623741.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/Example-of-wicketstuff-minis%27-Veil-tp17623741p17784653.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: Dropdownchoice without default option choose one

2008-06-11 Thread Martin Makundi
 Yeah, it's easy to miss setting the currently selected value
 for when DropDownChoice is rendered for the first time.
 Hence it's always a good idea to supply it in the
 constructor.

I have noticed the problem when I have a propertymodel attached to the
dropdown, and I have two chained dropdowns ... I haven't studied it
much, could fairly well be a stupid user bug.

**
Martin

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



Re: Dropdownchoice without default option choose one

2008-06-11 Thread Michael O'Cleirigh

Hi nitinkc,

The Choose One option is actually defined in:
public abstract class AbstractSingleSelectChoice extends AbstractChoice
{
   /**
*
*/
   private static final long serialVersionUID = 1L;

   /** String to display when the selected value is null and nullValid 
is false. */

   private static final String CHOOSE_ONE = Choose One;
.
.
.


You should look at overriding this method:

protected CharSequence getDefaultChoice(final Object selected) in 
AbstractSingleSelectionChoice


It looks to me like if you return EMPTY_STRING then no default choice 
will be rendered into the options list.



Mike


I tried setNullValid(false). But this does not get rid of the choose one
option. Note that the choices are a list of Strings. If the choices are a
list of other user defined object types and I use a choicerendrer for
display values, the choose one option is removed(without
setNullValid(false)). Any ideas?


Michael O'Cleirigh wrote:
  

Hi nitinkc,

Calling setNullValid (false) on the drop down choice should get rid of 
the default choose one text.


If the ddc model should always have a value defined then you could set 
the model object to be for example the first choice.


e.g. ddc.setModelObject (ddc.getChoices().get(0));

Regards,

Mike



I would like to remove the default choose one option from the
DropDownChoice component.
Does anyone know how to do this. Thanks.
  
  

-
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: Dropdownchoice without default option choose one

2008-06-11 Thread Martin Makundi
If you use ListChoice this option is not there. ListChoice does not
extend AbstractSingleSelectChoice .

**
Martin

2008/6/11 Michael O'Cleirigh [EMAIL PROTECTED]:
 Hi nitinkc,

 The Choose One option is actually defined in:
 public abstract class AbstractSingleSelectChoice extends AbstractChoice
 {
   /**
*
*/
   private static final long serialVersionUID = 1L;

   /** String to display when the selected value is null and nullValid is
 false. */
   private static final String CHOOSE_ONE = Choose One;
 .
 .
 .


 You should look at overriding this method:

 protected CharSequence getDefaultChoice(final Object selected) in
 AbstractSingleSelectionChoice

 It looks to me like if you return EMPTY_STRING then no default choice will
 be rendered into the options list.


 Mike

 I tried setNullValid(false). But this does not get rid of the choose one
 option. Note that the choices are a list of Strings. If the choices are a
 list of other user defined object types and I use a choicerendrer for
 display values, the choose one option is removed(without
 setNullValid(false)). Any ideas?


 Michael O'Cleirigh wrote:


 Hi nitinkc,

 Calling setNullValid (false) on the drop down choice should get rid of
 the default choose one text.

 If the ddc model should always have a value defined then you could set
 the model object to be for example the first choice.

 e.g. ddc.setModelObject (ddc.getChoices().get(0));

 Regards,

 Mike



 I would like to remove the default choose one option from the
 DropDownChoice component.
 Does anyone know how to do this. Thanks.


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



How to get context path

2008-06-11 Thread Patel, Sanjay
Hi,

my images in the application are in webapp/image folder. How to get
Context Path in wicket so I can prepend this path to display the image.
I am looking for something like this.

getContextPath() + image/icon.gif;

Please suggest how to do that.

Thanks,
Sanjay.


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



Re: How to get context path

2008-06-11 Thread Igor Vaynberg
see ContextImage

-igor

On Wed, Jun 11, 2008 at 12:10 PM, Patel, Sanjay [EMAIL PROTECTED] wrote:
 Hi,

 my images in the application are in webapp/image folder. How to get
 Context Path in wicket so I can prepend this path to display the image.
 I am looking for something like this.

 getContextPath() + image/icon.gif;

 Please suggest how to do that.

 Thanks,
 Sanjay.


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



when to save shopping basket for registered and anonymous users?

2008-06-11 Thread Marcus Mattila
Hi!

We are developing a shopping basket in our Wicket application. We
would like to persist the basket as late as possible, and for
anonymous users only if they sign up to the service. We don't want to
save lots of anonymous Baskets to the database. We use Wicket 1.3.3
and Databinder (as a Hibernate bridge). What would be a good save
point for the Basket-object?

One potential solution is this:
Override Session.detach() and save Basket there, if user is registered
and Basket is dirty..
If user is anonymous, save when user has signed up and the User
-domain object is created.

Possibly in the next version:
For anonymous users, create a cookiebased solution Amazon-style.

Any glaring holes in our solution? Other ways of fulfilling this need?

br,
Marcus

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



Re: ListViews in a form question

2008-06-11 Thread Timo Rantalaiho
On Wed, 11 Jun 2008, Martin Makundi wrote:
 I have nested listviews which draw a complex tabular form having
 variable colspans and rowspans depending on the state of the form.

For some reason, I have often succeeded better with other 
repeaters than ListView (e.g. RefreshingView, DataView) in 
complex situations. 

 1. If I have setReuseItems true, the HTML table is not rendered
 properly (somehow the old table structure remains which should be
 restructured).

If the old Items are left there, the old structure remains, 
so this seems to make sense.

 2. If I have setReuseItems false, the form components loose their
 state (unsubmitted entries) whenever I press the button.

Yeah I think that this is what it always does; new Items
don't have any idea of the input fed to the old Items
(except if they share the same model, and the data was
updated all the way to the model).

 So. In my understanding, I need to both a) redraw the html table (at
 least update the colspan and rowspan attributes) and still b) preserve
 the form component state :) Is there an out-of-the-box solution for
 this?

If you repaint the component via ajax, with HTML that comes
from the server, you must have sent the data to the server
with a suitable ajax behavior so that it can be in the ajax
reponse. 

I think that in a normal submit the same applies -- you have
to store all the data (in models for example) to the server
so that you can display it again when the page is refreshed.
When conversion or validation errors occur, Wicket returns
the original raw input to form components, but also in that
case the data made the trip to the server and back.

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]



Re: when to save shopping basket for registered and anonymous users?

2008-06-11 Thread Martin Makundi
Hi!

Why do you want to save the basket at a specific technical occurrence
such as .detach?

If you want, you can always persist changes for a registered user
and on the other hand never persist them for anonymous users.

Whenever the anonymous user becomes registered - the basket is persisted.

**
Martin

2008/6/11 Marcus Mattila [EMAIL PROTECTED]:
 Hi!

 We are developing a shopping basket in our Wicket application. We
 would like to persist the basket as late as possible, and for
 anonymous users only if they sign up to the service. We don't want to
 save lots of anonymous Baskets to the database. We use Wicket 1.3.3
 and Databinder (as a Hibernate bridge). What would be a good save
 point for the Basket-object?

 One potential solution is this:
 Override Session.detach() and save Basket there, if user is registered
 and Basket is dirty..
 If user is anonymous, save when user has signed up and the User
 -domain object is created.

 Possibly in the next version:
 For anonymous users, create a cookiebased solution Amazon-style.

 Any glaring holes in our solution? Other ways of fulfilling this need?

 br,
 Marcus

 -
 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: Dropdownchoice without default option choose one

2008-06-11 Thread Gwyn Evans
Just to summarise, you need to do two things: set a 'current selection' and
call setNullValid(false).

/Gwyn

On Wed, Jun 11, 2008 at 6:14 PM, nitinkc [EMAIL PROTECTED] wrote:


 I would like to remove the default choose one option from the
 DropDownChoice component.
 Does anyone know how to do this. Thanks.
 --
 View this message in context:
 http://www.nabble.com/Dropdownchoice-without-default-option-%22choose-one%22-tp17782776p17782776.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: Tomcat 5.5.9 isn't running Quickstart

2008-06-11 Thread Frank Silbermann
I downloaded Tomcat 6 this morning, and the QuickStart project runs in
it without the logging conflict I had with Tomcat 5.5.9.  Perhaps a
newer release of Tomcat 5.5 would also work, but I'll just go to Tomcat
6.  However, I have a couple of follow-up questions:



(*) My old Wicket 1.2 application, which ran in Tomcat 5.5.9, doesn't
run in Tomcat 6!  My guess is that Tomcat 6 removed the logging .jar
that was interfering with the logging classes deployed with Wicket 1.3
applications, but now my Wicket 1.2 application on Tomcat 6 is lacking a
logging implementation.  Though I plan to upgrade all my Wicket 1.2
applications to Wicket 1.3, is there a recommended .jar I should add to
the lib directory of my Wicket 1.2 application so it runs in Tomcat 6?
(My Wicket 1.3 QuickStart adds log4j-1.2.14.jar, slf4j-api-1.4.2.jar,
and slf4j-log4j12-1.4.2.jar to the application's lib directory; my
Wicket 1.2 application does not add these.) 



(*) I really like the idea of debugging in Eclipse using in-process
Jetty, even if I do deploy to Tomcat.  Thanks to posts I found in the
archive of this mailing list, I was able to modify the QuickStart
configuration of Jetty to read the J2EE and Jetty configuration .xml
files that configure my data source.  However, I have another problem.
My application uses images much as does in Wicket's images example.  I
have some image files (e.g. image1.png) stored directly inside the
webapp folder, and my application references the images by generating
HTML like so: 

html xmlns=http://www.w3.org/1999/xhtml;
xmlns:wicket=http://wicket.sourceforge.net/; xml:lang=en lang=en 
head/ 
body 
   img wicket:id=picture src=image1.png alt=Picture/  
/body 
/html 

The image appears when I run the application in Tomcat, but not when I
run it in Eclipse with Jetty (following the process described in
http://herebebeasties.com/2007-10-07/wicket-quickstart/).  What do I
need to change to the QuickStart's Jetty configuration so that this HTML
will be able to access the image?



-Original Message-
From: Frank Silbermann [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 06, 2008 3:08 PM
To: users@wicket.apache.org
Subject: RE: Tomcat 5.5.9 isn't running Quickstart

I did a Windows search for files with names containing log4j and came
up with nothing.  I wonder whether it could be bundled into other Tomcat
jars.  I'm using Tomcat 5.5.9, so maybe I should try a fresh install of
Tomcat, version 6, when I get back on Wednesday. 

-Original Message-
From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
Sent: Friday, June 06, 2008 2:57 PM
To: users@wicket.apache.org
Subject: Re: Tomcat 5.5.9 isn't running Quickstart

it doesnt sound right. tomcat itself is writing out logs and i dont
think it uses jdk logging. so there must be at least a log4j jar
somewhere in tomcat install..

we have deployed in 5.5 and 6.0 previously and everything works fine.

-igor

On Fri, Jun 6, 2008 at 9:31 AM, Frank Silbermann
[EMAIL PROTECTED] wrote:
 The lib directory in the QuickStart's WEB-INF contains:

log4j-1.2.14.jar
slf4j-api-1.4.2.jar
slf4j-log4j12-1.4.2.jar

 -Original Message-
 From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
 Sent: Friday, June 06, 2008 11:27 AM
 To: users@wicket.apache.org
 Subject: Re: Tomcat 5.5.9 isn't running Quickstart

 you have to at least also have log4j in there somewhere.
 commons-logging is just the pipeline..

 -igor

 On Fri, Jun 6, 2008 at 9:15 AM, Frank Silbermann 
 [EMAIL PROTECTED] wrote:
 Well, aside from the logging-oriented jars that maven packs into the 
 QuickStart's lib folder, the only logging jar I can see in Tomcat is 
 in Tomcat's bin folder, named

 commons-logging-api.jar

 dated 3/26/2005.

 Do I need to replace that with a more recent version?  Would you 
 recommend moving to the current version of Tomcat to avoid
 side-effects?


 -Original Message-
 From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
 Sent: Friday, June 06, 2008 11:07 AM
 To: users@wicket.apache.org
 Subject: Re: Tomcat 5.5.9 isn't running Quickstart

 well, there you go, something funky with your logger jars

 -igor

 On Fri, Jun 6, 2008 at 9:03 AM, Frank Silbermann 
 [EMAIL PROTECTED] wrote:
 Ah, yes, I thought I had checked those, but I must have missed the 
 right log.  The error messages are:

 The catalina.log file contains:

 INFO: Stopping service Catalina
 Jun 6, 2008 10:58:23 AM org.apache.catalina.loader.WebappClassLoader
 findResourceInternal
 INFO: Illegal access: this web application instance has been stopped

 already.  Could not load commons-logging.properties.  The eventual 
 following stack trace is caused by an error thrown for debugging 
 purposes as well as to attempt to terminate the thread which caused 
 the illegal access, and has no functional impact.
 Jun 6, 2008 10:58:23 AM org.apache.catalina.loader.WebappClassLoader
 findResourceInternal
 INFO: Illegal access: this web application instance has been stopped

 already.  Could not 

Re: ListViews in a form question

2008-06-11 Thread Martin Makundi
 For some reason, I have often succeeded better with other
 repeaters than ListView (e.g. RefreshingView, DataView) in
 complex situations.

I have postponed studying these, I suspect problems with varying
column counts on rows.

 I think that in a normal submit the same applies -- you have
 to store all the data (in models for example) to the server
 so that you can display it again when the page is refreshed.

One solution could probably be to require the form to pass validation
when these buttons are pressed. But the intuitivity of this solution
is not perfect ;)

**
Martin

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



Multiple Layouts using Inheritance

2008-06-11 Thread Kram.V

In Wicket is it possible to inherit from multiple layouts?

What we are trying to do is introduce different skins for the same
application (We could control all of this in CSS and forget about it, but
want to try this first)

Each skin is a different Layout Page/Class in Wicket, how can we switch the
inheriting Page/Class's layout.

For instance:

Class Skin1 extends WebPage
Class Skin2 extends WebPage

abstract BasePage() - Don't know how to design this one yet!

MyPage extends BasePage

and MyPage should use either Skin1 or Skin2 based on some criteria inside of
BasePage.

Is this even doable ?

Thanks




-- 
View this message in context: 
http://www.nabble.com/Multiple-Layouts-using-Inheritance-tp17786400p17786400.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: Wasp/Swarm: change LoginContext in Session

2008-06-11 Thread Maurice Marrink
Why the dummy? it should work with 2 contexts just as well.

Maurice

On Wed, Jun 11, 2008 at 4:11 PM, Andrea Jahn [EMAIL PROTECTED] wrote:
  Yes, I have different permissions for the locations. The user can have
 different
 roles for each location and each role has different permissions.

 Now I made a dummy LoginContext class and for changing the LoginContext
 I first add the dummy LoginContext, then delete the old LoginContext,
 then add the new LoginContext and after that I delete the dummy
 LoginContext.

 This works, thank you

 I think I could add the DummyLoginContext, when the user is logging in.
 When the user is changing the location selection, I only would have to
 logoff for the
 old ApplLoginContext and login again for the new ApplLoginContext.

  Andrea


 // dummy
 DummyLoginContext context2 = new DummyLoginContext(loggedInPerson);
 ((WaspSession)session).login(context2);

 // destroy the old context
 ((WaspSession)session).logoff(new ApplLoginContext());

 // add new context to session
 ApplLoginContext context = new ApplLoginContext(loggedInPerson);
 ((WaspSession)session).login(context);

 // destroy the dummy context
 ((WaspSession)session).logoff(new DummyLoginContext());

 ---
 2008/6/11, Maurice Marrink [EMAIL PROTECTED]:

 Didn't we use custom actions for those locations?
 A user could have global or location permissions, right?

 In that case the permissions would be the same for each location. The
 only difference would be in the fact that the user has or does not
 have a location. which is checked by your securitychecks.

 So i don't really see why you would require a new set of permissions.

 However if you must :)
 By default a logincontext blocks additional logins, but you can change
 that (constructor flag), you can then login again using another
 logincontext. Your user now has the combined permissions of both
 logincontexts, which in your case is not what you want but you can do
 a logoff of the first logincontext. As long as there is a logincontext
 active the session won't be destroyed.

 Maurice

 On Wed, Jun 11, 2008 at 12:33 PM, Andrea Jahn
 [EMAIL PROTECTED] wrote:
  Hi,
 
  in our application the user's rights depend on the location (Munich,
  Berlin,...).
  There's a drop down choice, where the user can change the location, on
 which
  he wants to work.
 
  So, when he changes the location, also the principals (permissions) have
 to
  be changed.
 
  How can I remove the old principals and add new ones within the same
 session
  ?
 
  Is it possible to remove the LoginContext from the session and add a new
 one
  ?
 
  Thanks
  Andrea
 
 
 
  ApplLoginContext:
  ---
 
  public class ApplLoginContext extends LoginContext
  {
   ...
   public final Subject login() throws LoginException
   {
  ...
   DefaultSubject subject = new DefaultSubject ();
   ...
   // grant principals
   subject.addPrincipal(new SimplePrincipal(TEST_ADMIN));
 
   return subject;
   }
  }
 
  Login.java:
  --
 
  public class Login extends AppBasePage
  {
   ...
   public class LoginForm extends Form
   {
   ...
   public void onSubmit()
   {
...
// add principals of logged in user to the context
ApplLoginContext context = new ApplLoginContext(loggedInPerson);
try
{
  ((WaspSession)getSession()).login(context);
}
catch (LoginException e)
{
 ...
}
   }
   }
  }
 

 -
 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: Tomcat 5.5.9 isn't running Quickstart

2008-06-11 Thread Alastair Maw
Argh. Commons logging classloader interactions are legendarily hard to
debug. :-(

IIRC, this fixes it.

In your tomcat directories:
  bin/commons-logging-api.jar
  common/lib/log4j.jar
  common/lib/commons-logging.jar

In your web-app directories:
  Whatever you like.

It's also possible to embed Tomcat in a similar manner to Jetty if you wish
to have something closer to your production environment. If anyone is
interested in how to do that, I can post you some basic code.

Good luck!

Alastair

2008/6/11 Frank Silbermann [EMAIL PROTECTED]:

 I downloaded Tomcat 6 this morning, and the QuickStart project runs in
 it without the logging conflict I had with Tomcat 5.5.9.  Perhaps a
 newer release of Tomcat 5.5 would also work, but I'll just go to Tomcat
 6.  However, I have a couple of follow-up questions:



 (*) My old Wicket 1.2 application, which ran in Tomcat 5.5.9, doesn't
 run in Tomcat 6!  My guess is that Tomcat 6 removed the logging .jar
 that was interfering with the logging classes deployed with Wicket 1.3
 applications, but now my Wicket 1.2 application on Tomcat 6 is lacking a
 logging implementation.  Though I plan to upgrade all my Wicket 1.2
 applications to Wicket 1.3, is there a recommended .jar I should add to
 the lib directory of my Wicket 1.2 application so it runs in Tomcat 6?
 (My Wicket 1.3 QuickStart adds log4j-1.2.14.jar, slf4j-api-1.4.2.jar,
 and slf4j-log4j12-1.4.2.jar to the application's lib directory; my
 Wicket 1.2 application does not add these.)



 (*) I really like the idea of debugging in Eclipse using in-process
 Jetty, even if I do deploy to Tomcat.  Thanks to posts I found in the
 archive of this mailing list, I was able to modify the QuickStart
 configuration of Jetty to read the J2EE and Jetty configuration .xml
 files that configure my data source.  However, I have another problem.
 My application uses images much as does in Wicket's images example.  I
 have some image files (e.g. image1.png) stored directly inside the
 webapp folder, and my application references the images by generating
 HTML like so:

 html xmlns=http://www.w3.org/1999/xhtml;
 xmlns:wicket=http://wicket.sourceforge.net/; xml:lang=en lang=en
 head/
 body
   img wicket:id=picture src=image1.png alt=Picture/ 
 /body
 /html

 The image appears when I run the application in Tomcat, but not when I
 run it in Eclipse with Jetty (following the process described in
 http://herebebeasties.com/2007-10-07/wicket-quickstart/).  What do I
 need to change to the QuickStart's Jetty configuration so that this HTML
 will be able to access the image?



 -Original Message-
 From: Frank Silbermann [mailto:[EMAIL PROTECTED]
 Sent: Friday, June 06, 2008 3:08 PM
 To: users@wicket.apache.org
 Subject: RE: Tomcat 5.5.9 isn't running Quickstart

 I did a Windows search for files with names containing log4j and came
 up with nothing.  I wonder whether it could be bundled into other Tomcat
 jars.  I'm using Tomcat 5.5.9, so maybe I should try a fresh install of
 Tomcat, version 6, when I get back on Wednesday.

 -Original Message-
 From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
 Sent: Friday, June 06, 2008 2:57 PM
 To: users@wicket.apache.org
 Subject: Re: Tomcat 5.5.9 isn't running Quickstart

 it doesnt sound right. tomcat itself is writing out logs and i dont
 think it uses jdk logging. so there must be at least a log4j jar
 somewhere in tomcat install..

 we have deployed in 5.5 and 6.0 previously and everything works fine.

 -igor

 On Fri, Jun 6, 2008 at 9:31 AM, Frank Silbermann
 [EMAIL PROTECTED] wrote:
  The lib directory in the QuickStart's WEB-INF contains:
 
 log4j-1.2.14.jar
 slf4j-api-1.4.2.jar
 slf4j-log4j12-1.4.2.jar
 
  -Original Message-
  From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
  Sent: Friday, June 06, 2008 11:27 AM
  To: users@wicket.apache.org
  Subject: Re: Tomcat 5.5.9 isn't running Quickstart
 
  you have to at least also have log4j in there somewhere.
  commons-logging is just the pipeline..
 
  -igor
 
  On Fri, Jun 6, 2008 at 9:15 AM, Frank Silbermann
  [EMAIL PROTECTED] wrote:
  Well, aside from the logging-oriented jars that maven packs into the
  QuickStart's lib folder, the only logging jar I can see in Tomcat is
  in Tomcat's bin folder, named
 
  commons-logging-api.jar
 
  dated 3/26/2005.
 
  Do I need to replace that with a more recent version?  Would you
  recommend moving to the current version of Tomcat to avoid
  side-effects?
 
 
  -Original Message-
  From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
  Sent: Friday, June 06, 2008 11:07 AM
  To: users@wicket.apache.org
  Subject: Re: Tomcat 5.5.9 isn't running Quickstart
 
  well, there you go, something funky with your logger jars
 
  -igor
 
  On Fri, Jun 6, 2008 at 9:03 AM, Frank Silbermann
  [EMAIL PROTECTED] wrote:
  Ah, yes, I thought I had checked those, but I must have missed the
  right log.  The error messages are:
 
  The catalina.log file contains:
 
  

Re: Multiple Layouts using Inheritance

2008-06-11 Thread James Carman
Have you looked at using styles?

On Wed, Jun 11, 2008 at 4:21 PM, Kram.V [EMAIL PROTECTED] wrote:

 In Wicket is it possible to inherit from multiple layouts?

 What we are trying to do is introduce different skins for the same
 application (We could control all of this in CSS and forget about it, but
 want to try this first)

 Each skin is a different Layout Page/Class in Wicket, how can we switch the
 inheriting Page/Class's layout.

 For instance:

 Class Skin1 extends WebPage
 Class Skin2 extends WebPage

 abstract BasePage() - Don't know how to design this one yet!

 MyPage extends BasePage

 and MyPage should use either Skin1 or Skin2 based on some criteria inside of
 BasePage.

 Is this even doable ?

 Thanks




 --
 View this message in context: 
 http://www.nabble.com/Multiple-Layouts-using-Inheritance-tp17786400p17786400.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: Multiple Layouts using Inheritance

2008-06-11 Thread Kram.V

No, I have not. I am going to start looking. If you have any
links/documentation do let me know.
Thank you for your help.



jwcarman wrote:
 
 Have you looked at using styles?
 
 On Wed, Jun 11, 2008 at 4:21 PM, Kram.V [EMAIL PROTECTED] wrote:

 In Wicket is it possible to inherit from multiple layouts?

 What we are trying to do is introduce different skins for the same
 application (We could control all of this in CSS and forget about it, but
 want to try this first)

 Each skin is a different Layout Page/Class in Wicket, how can we switch
 the
 inheriting Page/Class's layout.

 For instance:

 Class Skin1 extends WebPage
 Class Skin2 extends WebPage

 abstract BasePage() - Don't know how to design this one yet!

 MyPage extends BasePage

 and MyPage should use either Skin1 or Skin2 based on some criteria inside
 of
 BasePage.

 Is this even doable ?

 Thanks




 --
 View this message in context:
 http://www.nabble.com/Multiple-Layouts-using-Inheritance-tp17786400p17786400.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/Multiple-Layouts-using-Inheritance-tp17786400p17786644.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: Multiple Layouts using Inheritance

2008-06-11 Thread Al Maw
It doesn't sound like you're trying to inherit anything, not in the
object-oriented sense of the term. Instead you just want to use different
markup for a page dependent on some criteria.

Wicket already does this for localised versions of a page.
HomePage.html
HomePage_de.html
HomePage_fr.html
etc.

Wicket will select the variation here by default based on the locale of your
session (picked up from the browser's language headers). However, you can
trivially override how this works by overriding the getVariation() method in
your WebPage subclass and returning something else.

Best regards,

Alastair



2008/6/11 Kram.V [EMAIL PROTECTED]:


 In Wicket is it possible to inherit from multiple layouts?

 What we are trying to do is introduce different skins for the same
 application (We could control all of this in CSS and forget about it, but
 want to try this first)

 Each skin is a different Layout Page/Class in Wicket, how can we switch the
 inheriting Page/Class's layout.

 For instance:

 Class Skin1 extends WebPage
 Class Skin2 extends WebPage

 abstract BasePage() - Don't know how to design this one yet!

 MyPage extends BasePage

 and MyPage should use either Skin1 or Skin2 based on some criteria inside
 of
 BasePage.

 Is this even doable ?

 Thanks




 --
 View this message in context:
 http://www.nabble.com/Multiple-Layouts-using-Inheritance-tp17786400p17786400.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: Anchors in Wicket?

2008-06-11 Thread Thijs
 This is a bookmarkable link (the only place I use it with) but you get 
the idea :)


import org.apache.wicket.PageParameters;
import org.apache.wicket.markup.ComponentTag;
import org.apache.wicket.markup.html.link.BookmarkablePageLink;
import org.apache.wicket.model.IModel;

public class AnchoredBookmarkablePageLink extends BookmarkablePageLink {

 private static final long serialVersionUID = 1L;

 private IModel stringAnchor;

 public AnchoredBookmarkablePageLink(String id, Class pageClass, IModel 
anchor) {

   super(id, pageClass);
   this.stringAnchor = anchor;
 }

 public AnchoredBookmarkablePageLink(String id, Class pageClass, 
PageParameters params, IModel anchor) {

   super(id, pageClass, params);
   this.stringAnchor = anchor;
 }

 @Override
 protected CharSequence appendAnchor(ComponentTag tag, CharSequence url) {
   url = url + # + stringAnchor.getObject().toString();
   return url;
 }
 
}


Thijs

Michael Mehrle wrote:

Mind sharing that? ;-)

-Original Message-
From: Thijs [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 10, 2008 11:23 PM

To: users@wicket.apache.org
Subject: Re: Anchors in Wicket?

The component is any wicket component in the same page or next page if 
you know that component.


What you are doing, an anchor in a different page, I've solved by 
writing my own subclass of link where I append the '#rsvp' myself.


Michael Mehrle schreef:

I don't get it - what is the 'component' in the setAnchor() method? If

I

set an anchor in a completely different page like this:

a href=#rsvp /

What do I set as the 'component' in the link's setAnchor?

Thanks,

Michael

-Original Message-
From: Thijs Vonk [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 10, 2008 12:39 PM

To: users@wicket.apache.org
Subject: Re: Anchors in Wicket?

Michael Mehrle wrote:
  

How do create a link that jumps to some anchor in a page? Is there a


way
  

to define this in Wicket or do I have to do this manually somehow?

 


Michael


  


yes. use link.setAnchor(Component)

-
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: ListViews in a form question

2008-06-11 Thread Al Maw
This sort of stuff is definitely possible - people certainly have it working
elsewhere.

If you use setReuseItems(true) you need to call removeAll() if you change
the backing model object.

Timo is probably right that a RepeatingView may be easier to use in this
kind of situation.

Alastair

2008/6/11 Martin Makundi [EMAIL PROTECTED]:

 Hi!

 I have nested listviews which draw a complex tabular form having
 variable colspans and rowspans depending on the state of the form.

 I have an Add button to add elements into one of the inner listviews.

 Problem:
 1. If I have setReuseItems true, the HTML table is not rendered
 properly (somehow the old table structure remains which should be
 restructured).
 2. If I have setReuseItems false, the form components loose their
 state (unsubmitted entries) whenever I press the button.

 So. In my understanding, I need to both a) redraw the html table (at
 least update the colspan and rowspan attributes) and still b) preserve
 the form component state :) Is there an out-of-the-box solution for
 this?

 **
 Martin

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




Re: Dropdownchoice without default option choose one

2008-06-11 Thread nitinkc

Thanks gwyn!
I was not adding the default value to the ddc and that's why it was showing
the choose one option. As you said, it's best to do that in the
constructor.


Gwyn wrote:
 
 Just to summarise, you need to do two things: set a 'current selection'
 and
 call setNullValid(false).
 
 /Gwyn
 
 On Wed, Jun 11, 2008 at 6:14 PM, nitinkc [EMAIL PROTECTED] wrote:
 

 I would like to remove the default choose one option from the
 DropDownChoice component.
 Does anyone know how to do this. Thanks.
 --
 View this message in context:
 http://www.nabble.com/Dropdownchoice-without-default-option-%22choose-one%22-tp17782776p17782776.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]


 
 

-- 
View this message in context: 
http://www.nabble.com/Dropdownchoice-without-default-option-%22choose-one%22-tp17782776p17786956.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: Tomcat 5.5.9 isn't running Quickstart

2008-06-11 Thread Gwyn Evans
On Wed, Jun 11, 2008 at 9:00 PM, Frank Silbermann 
[EMAIL PROTECTED] wrote:

 (My Wicket 1.3 QuickStart adds log4j-1.2.14.jar, slf4j-api-1.4.2.jar,
 and slf4j-log4j12-1.4.2.jar to the application's lib directory; my
 Wicket 1.2 application does not add these.)


If I recall, 1.2 would have been common-logging based, hence the appearance
of the slf4j jars with 1.3...


 My application uses images much as does in Wicket's images example.  I
 have some image files (e.g. image1.png) stored directly inside the
 webapp folder, and my application references the images by generating
 HTML like so:

...

   img wicket:id=picture src=image1.png alt=Picture/ 

 The image appears when I run the application in Tomcat, but not when I
 run it in Eclipse with Jetty

...

That seems odd to me - the same web-app?  I'm probably way off base, but I'd
be double-checking where it's actually serving it from  the HTML in the
rendered pages...

/Gwyn


 ...


Re: Multiple Layouts using Inheritance

2008-06-11 Thread Gwyn Evans
http://wicket.apache.org/docs/wicket-1.3.2/wicket/apidocs/org/apache/wicket/Session.html#setStyle(java.lang.String)

On Wed, Jun 11, 2008 at 9:33 PM, Kram.V [EMAIL PROTECTED] wrote:


 No, I have not. I am going to start looking. If you have any
 links/documentation do let me know.
 Thank you for your help.



 jwcarman wrote:
 
  Have you looked at using styles?
 
  On Wed, Jun 11, 2008 at 4:21 PM, Kram.V [EMAIL PROTECTED] wrote:
 
  In Wicket is it possible to inherit from multiple layouts?
 
  What we are trying to do is introduce different skins for the same
  application (We could control all of this in CSS and forget about it,
 but
  want to try this first)
 
  Each skin is a different Layout Page/Class in Wicket, how can we switch
  the
  inheriting Page/Class's layout.
 
  For instance:
 
  Class Skin1 extends WebPage
  Class Skin2 extends WebPage
 
  abstract BasePage() - Don't know how to design this one yet!
 
  MyPage extends BasePage
 
  and MyPage should use either Skin1 or Skin2 based on some criteria
 inside
  of
  BasePage.
 
  Is this even doable ?
 
  Thanks
 
 
 
 
  --
  View this message in context:
 
 http://www.nabble.com/Multiple-Layouts-using-Inheritance-tp17786400p17786400.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/Multiple-Layouts-using-Inheritance-tp17786400p17786644.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: Websphere Portal 6 + Wicket Portlet Experience

2008-06-11 Thread Danny van Bruggen
Hello all,

We want to get Websphere Portal working with Wicket for the portlets,
has anybody managed to do this by now? The quoted thread in which the
problem is discussed suddenly fell silent :(

Danny

On 1/9/08, fapereira [EMAIL PROTECTED] wrote:

  First of all thanks forthe quicky reply.

  In fact im currently try to make my own implementation/changes for IBM
  Websphere Portal/Application 6.0 (yes both running in 6.0).

  I will update this thread with my feedback about my experimentations in the
  web fear world :)

  Best regards,
  Fernando



  Ate Douma wrote:
  
   Fernando,
  
   I don't use Websphere Portal 6 (mainly Jetspeed-2), but I googled a bit
   for their support of the Apache Bridges SerlvetContextProvider and
   PortletResourceURLFactory functionality.
   It looks like it is now possible to use Websphere and Websphere Portal
   specific APIs to implement these interfaces.
  
   To support the ServletContextProvider, they have just released Fix Pack 13
   for Websphere 6.1 which now provides an implementation [1].
   LOL, finally someone got them to allow using the Struts Bridge I wrote 3
   years ago besides their own Struts Bridge implementation ;)
  
   For the PortletResourceURLFactory, AFAIK there isn't formal (IBM) support
   for yet, but I think it should be possible to write an implementation
   yourself now by
   looking at the new Single Portlet Refresh API in Websphere Portal 6.0.1
   [2]
   It will require some experimenting and coding yourself, but looking at the
   examples given it definitely seems doable.
  
   If you do manage to get this working, please keep us informed.
   Would be very nice to add Websphere Portal 6 (.0.1) to the list of
   supported portals.
  
   NB: As the JSR-286 and the RI at Pluto is nearing its completion [3,4], I
   plan to start working on formal JSR-286 compliant Wicket Portlet support
   real soon.
   Then none of these proprietary interfaces will be needed as JSR-286
   supports these features natively.
  
   Regards,
  
   Ate
  
  
   [1] http://www-1.ibm.com/support/docview.wss?rs=180uid=swg1PK52044
   [2]
   
 http://www.ibm.com/developerworks/websphere/library/techarticles/0712_behl/0712_behl.html?S_TACT=105AGX10S_CMP=LP
   [3] http://hnsp.inf-bb.uni-jena.de/spec/ (temporarily JSR-286 drafts)
   [4]
   http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/
  
   Martijn Dashorst wrote:
   Ate or Janne may be the ones to provide feedback. As it has been a
   vacation
   in the Netherlands, it may take a while for them to catch up.
   Martijn
  
   On Jan 7, 2008 12:13 PM, fapereira [EMAIL PROTECTED] wrote:
  
   Any feedback please?
  
   Thanks!
  
  
   fapereira wrote:
   Hello everyone,
   i'm currently research the best way to use framework that can do clean
   as
   possible development for normal web apps and portlets.
  
   What i understand the way that wicket do that, its using Apache Portals
   Bridges, but that require that the portal server implements the current
   interfaces bellow:
  
   a) Apache Portals Bridges ServletContextProvider interface
   b) Apache Portals Bridges PortletResourceURLFactory interface
  
   My problem here its the fact i use webfear, ops.. websphere
   application/portal 6.0.
   I want to know all kind of feedback related with the experience using
   wicket in this specific portal/version.
  
   Thanks very much for your attention.
   Best Regards,
   Fernando.
  
   --
   View this message in context:
   
 http://www.nabble.com/Websphere-Portal-6-%2B-Wicket-Portlet-Experience-tp14597270p14663144.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/Websphere-Portal-6-%2B-Wicket-Portlet-Experience-tp14597270p14712531.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: Multiple Layouts using Inheritance

2008-06-11 Thread Al Maw
Note that you can also override the style in your Component class (e.g. your
WebPage subclass). The default implementation for getStyle() calls
getVariation(), etc. Best to look at the source to see exactly how it works.

Regards,

Alastair

2008/6/11 Gwyn Evans [EMAIL PROTECTED]:


 http://wicket.apache.org/docs/wicket-1.3.2/wicket/apidocs/org/apache/wicket/Session.html#setStyle(java.lang.String)http://wicket.apache.org/docs/wicket-1.3.2/wicket/apidocs/org/apache/wicket/Session.html#setStyle%28java.lang.String%29

 On Wed, Jun 11, 2008 at 9:33 PM, Kram.V [EMAIL PROTECTED] wrote:

 
  No, I have not. I am going to start looking. If you have any
  links/documentation do let me know.
  Thank you for your help.
 
 
 
  jwcarman wrote:
  
   Have you looked at using styles?
  
   On Wed, Jun 11, 2008 at 4:21 PM, Kram.V [EMAIL PROTECTED] wrote:
  
   In Wicket is it possible to inherit from multiple layouts?
  
   What we are trying to do is introduce different skins for the same
   application (We could control all of this in CSS and forget about it,
  but
   want to try this first)
  
   Each skin is a different Layout Page/Class in Wicket, how can we
 switch
   the
   inheriting Page/Class's layout.
  
   For instance:
  
   Class Skin1 extends WebPage
   Class Skin2 extends WebPage
  
   abstract BasePage() - Don't know how to design this one yet!
  
   MyPage extends BasePage
  
   and MyPage should use either Skin1 or Skin2 based on some criteria
  inside
   of
   BasePage.
  
   Is this even doable ?
  
   Thanks
  
  
  
  
   --
   View this message in context:
  
 
 http://www.nabble.com/Multiple-Layouts-using-Inheritance-tp17786400p17786400.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/Multiple-Layouts-using-Inheritance-tp17786400p17786644.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: Tomcat 5.5.9 isn't running Quickstart

2008-06-11 Thread Frank Silbermann
It's the identical .war file which shows the images when run in Tomcat 6
but not when run in Jetty configured as per the QuickStart application.
The actual HTML in the rendered pages is exactly what I showed you --
Wicket generated it using AttributeModifier, and I copied the generated
HTML by doing show source in my browser.

I'm guessing the Jetty has some default security not done in Tomcat that
is protecting my image files, which I need to override somehow.  Or
maybe it is not automatically recognizing .png files as a MIME-type.  Or
maybe there's something else that must be configured in Jetty to tell it
to look in the webapp folder for static content.  I posted about this on
the jetty-support mailing list last week
(http://www.nabble.com/-Jetty-support--Embedded-jetty-td8400457.html#a17
679320), but no one answered it.

-Original Message-
From: Gwyn Evans [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 11, 2008 3:51 PM
To: users@wicket.apache.org
Subject: Re: Tomcat 5.5.9 isn't running Quickstart

On Wed, Jun 11, 2008 at 9:00 PM, Frank Silbermann 
[EMAIL PROTECTED] wrote:


 My application uses images much as does in Wicket's images example.

 I have some image files (e.g. image1.png) stored directly inside the

 webapp folder, and my application references the images by 
 generating HTML like so:

...

   img wicket:id=picture src=image1.png alt=Picture/ 

 The image appears when I run the application in Tomcat, but not when I

 run it in Eclipse with Jetty

...

That seems odd to me - the same web-app?  I'm probably way off base, but
I'd be double-checking where it's actually serving it from  the HTML in
the rendered pages...

/Gwyn


 ...

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



How to add a TextField in a Dynamically created DefaultDataTable

2008-06-11 Thread galbelli

I am creating a DefaultDataTable dynamically as I only know the number of
columns at runtime. All is working nicely but I now need to have one of the
columns contain a TextField and not a Label. I am receiving the following
error: 

WicketMessage: Component cell must be applied to a tag of type 'input', not
'' (line 0, column 0)

How can I control the markup so I may change the HTML from span to input? 
-- 
View this message in context: 
http://www.nabble.com/How-to-add-a-TextField-in-a-Dynamically-created-DefaultDataTable-tp17788822p17788822.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: Tomcat 5.5.9 isn't running Quickstart

2008-06-11 Thread Frank Silbermann
Searching for some clue as to why my modification of the QuickStart
application is serving images when run in Tomcat but not when running in
embedded Jetty via Eclipse, I found:

http://osdir.com/ml/java.jetty.support/2003-03/msg00045.html -- titled
Re: Re: jetty can't find images: msg#00045

It says, You need the webdefaults file because it sets up the Default
servlet which is what serves static resources like images.  You can also
manually add the Default servlet if you want to avoid
a webdefaults.xml file.

I think this is a clue.  Looking at the console log when running Jetty
in Eclipse I see:

INFO  - log- NO JSP Support for /, did not find
org.apache.jasper.servlet.JspServlet

So what do I need to do to make it set up the Default servlet?  Is there
a line I need to insert into Start.java to make it read the
webdefaults.xml file?  I don't even have a webdefaults.xml file --
unless it's buried somewhere inside one of the Jetty jars. 

Here's the complete console log when debugging Start.java to bring up
Jetty (as demonstrated in
http://herebebeasties.com/2007-10-07/wicket-quickstart/).

INFO  - log- Logging to
org.slf4j.impl.Log4jLoggerAdapter(org.mortbay.log) via
org.mortbay.log.Slf4jLog
 STARTING EMBEDDED JETTY SERVER, PRESS ANY KEY TO STOP
INFO  - log- jetty-6.1.4
INFO  - log- NO JSP Support for /, did not find
org.apache.jasper.servlet.JspServlet
INFO  - log- No Transaction manager found - if
your webapp requires one, please configure one.
INFO  - Application- [TestApplication] init: Wicket core
library initializer
INFO  - RequestListenerInterface   - registered listener interface
[RequestListenerInterface name=IBehaviorListener, method=public abstract
void org.apache.wicket.behavior.IBehaviorListener.onRequest()]
INFO  - RequestListenerInterface   - registered listener interface
[RequestListenerInterface name=IBehaviorListener, method=public abstract
void org.apache.wicket.behavior.IBehaviorListener.onRequest()]
INFO  - RequestListenerInterface   - registered listener interface
[RequestListenerInterface name=IFormSubmitListener, method=public
abstract void
org.apache.wicket.markup.html.form.IFormSubmitListener.onFormSubmitted()
]
INFO  - RequestListenerInterface   - registered listener interface
[RequestListenerInterface name=IFormSubmitListener, method=public
abstract void
org.apache.wicket.markup.html.form.IFormSubmitListener.onFormSubmitted()
]
INFO  - RequestListenerInterface   - registered listener interface
[RequestListenerInterface name=ILinkListener, method=public abstract
void org.apache.wicket.markup.html.link.ILinkListener.onLinkClicked()]
INFO  - RequestListenerInterface   - registered listener interface
[RequestListenerInterface name=ILinkListener, method=public abstract
void org.apache.wicket.markup.html.link.ILinkListener.onLinkClicked()]
INFO  - RequestListenerInterface   - registered listener interface
[RequestListenerInterface name=IOnChangeListener, method=public abstract
void
org.apache.wicket.markup.html.form.IOnChangeListener.onSelectionChanged(
)]
INFO  - RequestListenerInterface   - registered listener interface
[RequestListenerInterface name=IOnChangeListener, method=public abstract
void
org.apache.wicket.markup.html.form.IOnChangeListener.onSelectionChanged(
)]
INFO  - RequestListenerInterface   - registered listener interface
[RequestListenerInterface name=IRedirectListener, method=public abstract
void org.apache.wicket.IRedirectListener.onRedirect()]
INFO  - RequestListenerInterface   - registered listener interface
[RequestListenerInterface name=IRedirectListener, method=public abstract
void org.apache.wicket.IRedirectListener.onRedirect()]
INFO  - RequestListenerInterface   - registered listener interface
[RequestListenerInterface name=IResourceListener, method=public abstract
void org.apache.wicket.IResourceListener.onResourceRequested()]
INFO  - RequestListenerInterface   - registered listener interface
[RequestListenerInterface name=IResourceListener, method=public abstract
void org.apache.wicket.IResourceListener.onResourceRequested()]
INFO  - Application- [TestApplication] init: Wicket
extensions initializer
INFO  - WebApplication - [TestApplication] Started Wicket
version 1.3.3 in development mode

*** WARNING: Wicket is running in DEVELOPMENT mode.  ***
***   ^^^***
*** Do NOT deploy to your live server(s) without changing this.  ***
*** See Application#getConfigurationType() for more information. ***

INFO  - log- Started
[EMAIL PROTECTED]:8080 





-Original Message-
From: Frank Silbermann [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 11, 2008 4:41 PM
To: 

RE: Anchors in Wicket?

2008-06-11 Thread Michael Mehrle
Hey, thanks a lot Thijs! I'll give this a shot.

-Original Message-
From: Thijs [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 11, 2008 1:38 PM
To: users@wicket.apache.org
Subject: Re: Anchors in Wicket?


  This is a bookmarkable link (the only place I use it with) but you get 
the idea :)

import org.apache.wicket.PageParameters;
import org.apache.wicket.markup.ComponentTag;
import org.apache.wicket.markup.html.link.BookmarkablePageLink;
import org.apache.wicket.model.IModel;

public class AnchoredBookmarkablePageLink extends BookmarkablePageLink {

  private static final long serialVersionUID = 1L;
 
  private IModel stringAnchor;
 
  public AnchoredBookmarkablePageLink(String id, Class pageClass, IModel 
anchor) {
super(id, pageClass);
this.stringAnchor = anchor;
  }
 
  public AnchoredBookmarkablePageLink(String id, Class pageClass, 
PageParameters params, IModel anchor) {
super(id, pageClass, params);
this.stringAnchor = anchor;
  }
 
  @Override
  protected CharSequence appendAnchor(ComponentTag tag, CharSequence url) {
url = url + # + stringAnchor.getObject().toString();
return url;
  }
  
}

Thijs

Michael Mehrle wrote:
 Mind sharing that? ;-)

 -Original Message-
 From: Thijs [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, June 10, 2008 11:23 PM
 To: users@wicket.apache.org
 Subject: Re: Anchors in Wicket?

 The component is any wicket component in the same page or next page if 
 you know that component.

 What you are doing, an anchor in a different page, I've solved by 
 writing my own subclass of link where I append the '#rsvp' myself.

 Michael Mehrle schreef:
 I don't get it - what is the 'component' in the setAnchor() method? If
 I
 set an anchor in a completely different page like this:

 a href=#rsvp /

 What do I set as the 'component' in the link's setAnchor?

 Thanks,

 Michael

 -Original Message-
 From: Thijs Vonk [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, June 10, 2008 12:39 PM
 To: users@wicket.apache.org
 Subject: Re: Anchors in Wicket?

 Michael Mehrle wrote:
   
 How do create a link that jumps to some anchor in a page? Is there a
 
 way
   
 to define this in Wicket or do I have to do this manually somehow?

  

 Michael


   
 
 yes. use link.setAnchor(Component)

 -
 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: users, please give us your opinion: what is your take on generics with Wicket

2008-06-11 Thread Philip A. Chapman
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

I vote the same way. with almost the exact same sentiments.

Wouter de Vaal wrote:
 1) Generifying* Wicket
   [x] Can best be done like currently in the 1.4 branch, where models
 and components are both generified. I care most about the improved
 static type checking generified models and components give Wicket.
 
 I had a production quality project with the old 2.0 branch (downgraded it) and
 that worked just fine and very intuitive, I was very bummed at the time
 I had to add all these hideous type casts. I do not understand the fuss about
 generifying everything, I did not have ANY problems using the generics in
 my production project (which consists of about 30 wicket classes) and it
 was not a simple crud app, I did some funky wicket stuff with this
 project (loads
 of panels, fragment, own custom component, ajax) and it all just worked.
 2) How strongly do you feel about your choice above?
   [X] Whatever choice ultimately made, I'll happily convert/ start
 using 1.4 and up.
 
 
 Wouter de Vaal
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


- --
Philip A. Chapman

Desktop and Web Application Development:
Java, .NET, PostgreSQL, MySQL, MSSQL
Linux, Windows 2000, Windows XP

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIUHzDAdpynRSGw3URAkdFAJsFWUKlbu27zE2LidYx3HdJUZt4cQCcDBX/
Ner0sbazi8jh/EllYZVgW1s=
=WPF9
-END PGP SIGNATURE-

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



Re: How to add a TextField in a Dynamically created DefaultDataTable

2008-06-11 Thread Igor Vaynberg
wrap the textfield in a fragment or a panel

-igor

On Wed, Jun 11, 2008 at 3:39 PM, galbelli [EMAIL PROTECTED] wrote:

 I am creating a DefaultDataTable dynamically as I only know the number of
 columns at runtime. All is working nicely but I now need to have one of the
 columns contain a TextField and not a Label. I am receiving the following
 error:

 WicketMessage: Component cell must be applied to a tag of type 'input', not
 '' (line 0, column 0)

 How can I control the markup so I may change the HTML from span to input?
 --
 View this message in context: 
 http://www.nabble.com/How-to-add-a-TextField-in-a-Dynamically-created-DefaultDataTable-tp17788822p17788822.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: How to update parent component from a panel?

2008-06-11 Thread freak182

Hello Timo,
Thanks a lot...i have attach the files for sample webapp for events.you can
play around with if you have time and forgive me if my codes were ugly :) i
just want to test your patch...any feedback after...

Thanks a lot...Cheers

http://www.nabble.com/file/p17791744/events_core.zip events_core.zip br/
http://www.nabble.com/file/p17791744/pages_app.zip pages_app.zip 


Timo Rantalaiho wrote:
 
 On Wed, 11 Jun 2008, freak182 wrote:
 I already rip out your patch and run the testcase it worked but how can i
 implement/intgerate to my project...do you have a working example project
 for that?
 
 Unfortunately not, but just copy the classes to a suitable 
 package in your project and start using them in the same way 
 as in the test cases.
 
 E.g. something along these lines
 
 public class FooSelectionEvent implements Event {
 private final IModel foo;
 private final AjaxRequestTarget target;
 
 public FooSelectionEvent(IModel foo, AjaxRequestTarget target) {
 this.foo = foo;
   this.target = target;
 }
 
 public Foo getFoo() {
 return (Foo) foo.getObject();
 }
 
 public void addToTarget(Component c) {
 target.addComponent(c);
 }
 }
 
 public interface FooSelectionReceiver extends EventReceiver {
 void onEvent(FooSelectionEvent event);
 }
 
 public class SelectedFooLabel extends Label implements
 FooSelectionReceiver {
 ...
 public void onEvent(FooSelectionEvent event) {
 setModelObject(event.getFoo());
   event.addToTarget(this);
 }
 }
 
 public class FooPanel extends Panel {
 private EventBroadcaster broadcaster = new EventBroadcaster(this);
 ...
 add(new DropDownChoice(fooSelection, fooSelection, fooList)
 .add(new AjaxFormComponentUpdatingBehavior(onchange) {
   public void onEvent(AjaxRequestTarget target) {
   broadcaster.broadcast(FooSelectionReceiver.class, new
   FooSelectionEvent(target, fooSelection));
   }
   });
 ...
 }
 
 
 Now SelectedFooLabel receives the events sent from the 
 DropDownChoice, provided that both component instances are on 
 the same page (you must be careful with repeater items and 
 other replaced components here).  
 
 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]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/How-to-update-parent-component-from-a-panel--tp17748294p17791744.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: enclosure around listview

2008-06-11 Thread Jeremy Thomerson
Paste code of what you're looking to do.  Your description seems like the
right way to do it.  If you want that out of the box, just roll your own
NotVisibleIfEmptyListView that overrides isVisible.  Like:

public abstract class NotVisibleIfEmptyListViewT extends ListViewT {

private static final long serialVersionUID = 1L;

public NotVisibleIfEmptyListView(String id, IModelListT model) {
super(id, model);
}

@Override
public boolean isVisible() {
return CollectionUtils.isEmpty(getModelObject()) == false;
}
}

If you have other related markup (like you'll commonly have a UL tag, and
the list view is in your LI tag, just put a wicket enclosure around the
related markup (as you mentioned), and make it depend on the visibility of
the list view.


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

On Wed, Jun 11, 2008 at 10:33 AM, Matthijs Wensveen [EMAIL PROTECTED]
wrote:

 Gwyn Evans wrote:

 On Wed, Jun 11, 2008 at 10:34 AM, Matthijs Wensveen [EMAIL PROTECTED]
 wrote:



 Is there a way to hide a listview with an enclosure when there are no
 items
 to display? One way to get it working is to toggle the visibility of the
 listview based on wheter or not the list is empty or not.




 I think that's the normal way, in that you'd typically have both the list
 and a No items found label, then set one or the other as visible...




 I was expecting this would work out-of-the-box though...




 JIRA (https://issues.apache.org/jira/browse/WICKET) covers Wishes as
 well
 as Bugs! :-)

 /Gwyn



 I wish I knew what to wish for exactly... :D

 Thanks,
 Matthijs

 --
 Matthijs Wensveen
 Func. Internet Integration
 W http://www.func.nl
 T +31 20 423
 F +31 20 4223500

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




Re: Example of wicketstuff-minis' Veil

2008-06-11 Thread Igor Vaynberg
sorry, havent had time to check out the source from svn yet

-igor

On Wed, Jun 11, 2008 at 11:53 AM, nitinkc [EMAIL PROTECTED] wrote:

 Igor,
 Any updates on this??
 thanks!


 nitinkc wrote:

 Here is the stack trace:
 Root cause:java.lang.IllegalStateException: This behavior is already bound
 to component. An instance of this behavior cannot be reused between
 components. Bound component: [MarkupContainer [Component id = test, page =
 No Page, path = test.Button]] at
 org.wicketstuff.minis.veil.Veil.bind(Veil.java:64) at
 org.apache.wicket.Component.add(Component.java:922) at
 com.uprr.app.hrw.wicket.page.scheduling.EventDetailsPage.init(EventDetailsPage.java:235)
 at java.lang.reflect.Constructor.newInstance(Constructor.java:494) at
 java.lang.Class.newInstance0(Class.java:350) at
 java.lang.Class.newInstance(Class.java:303) at
 org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:58)
 at
 org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.newPage(BookmarkablePageRequestTarget.java:262)
 at
 org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.getPage(BookmarkablePageRequestTarget.java:283)
 at
 org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.processEvents(BookmarkablePageRequestTarget.java:210)
 at
 org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:90)
 at
 org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1166)
 at org.apache.wicket.RequestCycle.step(RequestCycle.java:1241) at
 org.apache.wicket.RequestCycle.steps(RequestCycle.java:1316) at
 org.apache.wicket.RequestCycle.request(RequestCycle.java:493) at
 org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:354)
 at
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:194)
 at
 weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
 at
 weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3393)
 at
 weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
 at weblogic.security.service.SecurityManager.runAs(Unknown Source) at
 weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2140)
 at
 weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2046)
 at
 weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1366)
 at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200) at
 weblogic.work.ExecuteThread.run(ExecuteThread.java:172)

 I am using: wicketstuff-minis-1.3.0-SNAPSHOT.jar


 igor.vaynberg wrote:

 can you paste the stack trace please? are you using latest trunk?

 -igor

 On Tue, Jun 3, 2008 at 6:38 AM, nitinkc [EMAIL PROTECTED] wrote:

 I need an example of wicketstuff-minis' veil behavior. I added this to
 one of
 my components but keep getting the error that the behavior is already
 bound
 to another component and cannot be reused.
 All I am doing is:

 Button button = new Button(test);
 button.add(new Veil());
 form.add(button);

 This is the only Veil I am using on my page. Thanks.

 --
 View this message in context:
 http://www.nabble.com/Example-of-wicketstuff-minis%27-Veil-tp17623741p17623741.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/Example-of-wicketstuff-minis%27-Veil-tp17623741p17784653.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: forcing cookies to expire

2008-06-11 Thread Jeremy Thomerson
I know this doesn't relate to your question, and I don't know what your app
is at all, but does this cookie automatically log someone in to your app if
they come back later?  If so, you probably don't want to use the username
for that.  Then I can just pick someone else's username, fake my cookie, and
come to the app and be logged in as them.

You're probably not doing that - maybe you're just using it like Josh was -
to prefill a username field - but I would've felt remiss if I didn't mention
it.  :)

On Wed, Jun 11, 2008 at 10:13 AM, jchappelle [EMAIL PROTECTED] wrote:


 I don't have to have it set on root. In fact now my code doesn't call
 setPath
 at all and it works fine.

 This is actually my first time ever using cookies. I've developed
 traditional applications in the past. I really only need the cookie to be
 visible to my login page but it doesn't really hurt if it is visible to any
 other pages because this is the only place(as of now) that we use cookies
 in
 our product.

 How would I specify the path so that only my login page would be visible?
 Since this is wicket and the URL paths are weird I don't really know how I
 would do that.

 Thanks,

 Josh

 Johan Compagner wrote:
 
  Because we cant really just call set path... That is something that
  you have to do. Why do you want it on root?
 
  On 6/10/08, jchappelle [EMAIL PROTECTED] wrote:
 
  Thanks for the quick reply. I finally fixed the problem. What I found
 was
  that when I was creating my cookie I was calling setPath(/) and when I
  deleted it I was not calling setPath(/). So I guess the equals method
  saw
  them as two different cookies and it wasn't deleting it. There is
  actually a
  convenience method on the WebResponse class called clearCookie that I am
  calling. However, that method will not work if you have called
  setPath(/)
  on your cookie because it doesn't set the path. It just does the
  following:
 
   public void clearCookie(final Cookie cookie)
   {
   if (httpServletResponse != null)
   {
   cookie.setMaxAge(0);
   cookie.setValue(null);
   addCookie(cookie);
   }
   }
 
  Thanks,
 
  Josh
 
 
  richardwilko wrote:
 
  Ive had the same problem.  to delete a cookie do this:
 
  Cookie newCookie = new Cookie(my cookie name here!, null);
  newCookie.setMaxAge(0);
  newCookie.setPath(/);
  getWebRequestCycle().getWebResponse().addCookie(newCookie);
 
  i dont know why (i didnt really look into it) but u seem to have to
  create
  a new cookie with the same name and add it.  maybe this is a wicket
 bug?
 
  Richard
 
 
  --
  View this message in context:
 
 http://www.nabble.com/forcing-cookies-to-expire-tp17067292p17760587.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/forcing-cookies-to-expire-tp17067292p17780251.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]




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


Making Component easier to Generify

2008-06-11 Thread cowwoc


Have you considered moving from subclassing to composition in Wicket using
CallableT?

Currently it is quite common for developers to subclass a component in order
to override isVisible() and other properties. I am proposing that instead
the component classes become final and properties may only be set using
setter methods. The setter methods would take CallableT instead of T, so
for example setVisible(boolean) would become setVisible(CallableBoolean)

The benefit of this approach is that you could introduce static factory
methods to the Wicket components which would make them much easier to use in
their Generic form. You could then introduce various helper classes to
create CallableT for constant values, such as Callable.valueOf(true) would
return a CallableBoolean that always returns true.
-- 
View this message in context: 
http://www.nabble.com/users%2C-please-give-us-your-opinion%3A-what-is-your-take-on-generics-with-Wicket-tp17589984p17792488.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: ListViews in a form question

2008-06-11 Thread Martin Makundi
Hi!

What is the main difference between repeatingView and listView from
this point of view?

I can see ListView has many features I do not use such a s moving the
rows up and down...

**
Martin

2008/6/11 Al Maw [EMAIL PROTECTED]:
 This sort of stuff is definitely possible - people certainly have it working
 elsewhere.

 If you use setReuseItems(true) you need to call removeAll() if you change
 the backing model object.

 Timo is probably right that a RepeatingView may be easier to use in this
 kind of situation.

 Alastair

 2008/6/11 Martin Makundi [EMAIL PROTECTED]:

 Hi!

 I have nested listviews which draw a complex tabular form having
 variable colspans and rowspans depending on the state of the form.

 I have an Add button to add elements into one of the inner listviews.

 Problem:
 1. If I have setReuseItems true, the HTML table is not rendered
 properly (somehow the old table structure remains which should be
 restructured).
 2. If I have setReuseItems false, the form components loose their
 state (unsubmitted entries) whenever I press the button.

 So. In my understanding, I need to both a) redraw the html table (at
 least update the colspan and rowspan attributes) and still b) preserve
 the form component state :) Is there an out-of-the-box solution for
 this?

 **
 Martin

 -
 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: beginner question about models when having more than one component of the same type on the same page

2008-06-11 Thread Peter Eriksson
Thanks Timo for your very helpful suggestion!

Best Regards,
/Peter

2008/6/11 Timo Rantalaiho [EMAIL PROTECTED]:

 On Wed, 11 Jun 2008, Peter Eriksson wrote:
  I will answer my own post, just in case somebody else is looking for a
  solution to the same problem. I have found two ways to get the resource
  loading to do exactly what I want (There are probably a lot more out
 there):

 Thanks for posting that, and cool that you found it out!

  add(new Label(nameLabel, new StringResourceModel(nameLabel,
  this, null)));
  add(new Label(name));

 These Label pairs smell like a custom component to me, e.g.

  public class LabeledText extends WebMarkupContainer {
  public LabeledText(String textId, MarkupContainer parent) {
  super(textId + Container);
  String labelId = textId + Label;
  add(new Label(labelId, new StringResourceModel(labelId, parent,
 null)));
  add(new Label(textId);
  }
  }

 Then in ContactPanel constructor you do

add(new LabeledText(userName, this));
add(new LabeledText(phone, this));
add(new LabeledText(email, this));

 and change the markup accordingly (to something like
 wicket:panel
 table
 tr wicket:id=nameContainer
  tdspan wicket:id=nameLabel/span/td
 tdspan wicket:id=name/span/td
 /tr
   ...
 )

 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]