RE: form action

2008-05-09 Thread Andrew Broderick
You could just have the forms be two different classes (or instances) and have 
them bound via PropertyModels to different objects, in order to keep separate 
states. Why do you want URL query strings (and hence GET requests) with forms 
anyway?

-Original Message-
From: Joel Halbert [mailto:[EMAIL PROTECTED]
Sent: Friday, May 09, 2008 9:04 AM
To: users@wicket.apache.org
Subject: form action

Hi,

Does anyone know if there is an easy way of appending page parameters to the 
action query string of a stateless form without overriding 
Page.getPageParameters() ?

The reason I would want to do this is if I had two forms on the page and I 
wanted to hold different state in each form.
(I would like to do this without using hidden fields - so as parameters tagged 
on to the forms action string)

Thanks,
joel

___

The  information in this email or in any file attached
hereto is intended only for the personal and confiden-
tial  use  of  the individual or entity to which it is
addressed and may contain information that is  propri-
etary  and  confidential.  If you are not the intended
recipient of this message you are hereby notified that
any  review, dissemination, distribution or copying of
this message is strictly prohibited.  This  communica-
tion  is  for information purposes only and should not
be regarded as an offer to sell or as  a  solicitation
of an offer to buy any financial product. Email trans-
mission cannot be guaranteed to be  secure  or  error-
free. P6070214

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



RE: DropDownChoice.onSelectionChanged() and model updating

2008-05-08 Thread Andrew Broderick
Thanks for the reply. Calling clearInput() on the form components works. It has 
to be done on each individual component though, it seems. Is there a way to do 
it on the entire form, or a way to group fields on the form and do it on the 
group?

Thanks

-Original Message-
From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 07, 2008 10:28 PM
To: users@wicket.apache.org
Subject: Re: DropDownChoice.onSelectionChanged() and model updating

when you submit a form the fields remember their raw values. if in
onselectionchanged() of the ddc you change something that will change
values of these other form components and you want that reflected you
need to call clearInput() or modelUpdated() on those form components.

-igor


On Wed, May 7, 2008 at 1:46 PM, Andrew Broderick
[EMAIL PROTECTED] wrote:
 Hi,

  I have a form that I want to repopulate when a drop down list is changed. If 
 I change the underlying domain object in the onSelectionChanged(), the form 
 fields are not updated to reflect the changes (yes, they do use a dynamic 
 model). However, if I have a button next to the drop down list and the user 
 clicks it, the exact same processing happens, and the form is updated. Why is 
 this, and how can I get onSelectionChanged() to behave the same way?

  Thanks



  ___

  The  information in this email or in any file attached
  hereto is intended only for the personal and confiden-
  tial  use  of  the individual or entity to which it is
  addressed and may contain information that is  propri-
  etary  and  confidential.  If you are not the intended
  recipient of this message you are hereby notified that
  any  review, dissemination, distribution or copying of
  this message is strictly prohibited.  This  communica-
  tion  is  for information purposes only and should not
  be regarded as an offer to sell or as  a  solicitation
  of an offer to buy any financial product. Email trans-
  mission cannot be guaranteed to be  secure  or  error-
  free. P6070214


-
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-05-07 Thread Andrew Broderick
Tried that, and it didn't make any difference 
(getRequestCycle().setRedirect(false)).

The page is called via a BookmarkablePageLink. Debugging reveals that the 
constructor, below, is called every time the link is clicked, so it isn't an 
issue of the code not being called. I also tried calling it via a wicket:link 
as well - no dice.

Earlier, someone mentioned something about pushing to the HttpServletResponse 
object. What does this mean, exactly?

Thanks

-Original Message-
From: Johan Compagner [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 07, 2008 2:24 AM
To: users@wicket.apache.org
Subject: Re: forcing cookies to expire

how is that page called/created?

if you do this:

   public SignOut()
   {
   clearCookie(Register.REMEMBER_ME_COOKIE);
   getSession().invalidate();
   getRequestCycle().setRedirct(false)
}

what then

On Tue, May 6, 2008 at 4:16 PM, Andrew Broderick 
[EMAIL PROTECTED] wrote:

 Hi,

 clearCookie() is called in the constructor of a page called SignOut. The
 entire constructor is:

public SignOut()
{
clearCookie(Register.REMEMBER_ME_COOKIE);
getSession().invalidate();
}

 As I mentioned the cookie is never cleared. Is there something else I need
 to do?

 Thanks

 -Original Message-
 From: Johan Compagner [mailto:[EMAIL PROTECTED]
 Sent: Monday, May 05, 2008 5:58 PM
 To: users@wicket.apache.org
 Subject: Re: forcing cookies to expire

 When is that clear cookie called?
 Can you follow that call a bit more, is it pushed to the
 httpservletresponse object?

 On 5/5/08, Andrew Broderick [EMAIL PROTECTED] wrote:
  Hi,
 
  I am trying to manage cookies in Wicket. I can create them and read them
 no
  problem, but forcing expiry by setting maxAge=0 does not seem to be
 working.
  Here is the code:
 
  Set cookie:
 
public void setRememberMeCookie(String username)
{
  Cookie cookie = new Cookie(REMEMBER_ME_COOKIE, username);
  cookie.setMaxAge(-1);
  cookie.setPath(/);
  getWebRequestCycle().getWebResponse().addCookie(cookie);
}
 
  Clear cookie:
 
private void clearCookie(String name)
{
  Cookie cookie =
  getWebRequestCycle().getWebRequest().getCookie(name);
  cookie.setMaxAge(0);
  getWebRequestCycle().getWebResponse().addCookie(cookie);
}
 
  The code is definitely called. However, the cookie remains. What am I
 doing
  wrong?
 
  Thanks
 
  ___
 
  The  information in this email or in any file attached
  hereto is intended only for the personal and confiden-
  tial  use  of  the individual or entity to which it is
  addressed and may contain information that is  propri-
  etary  and  confidential.  If you are not the intended
  recipient of this message you are hereby notified that
  any  review, dissemination, distribution or copying of
  this message is strictly prohibited.  This  communica-
  tion  is  for information purposes only and should not
  be regarded as an offer to sell or as  a  solicitation
  of an offer to buy any financial product. Email trans-
  mission cannot be guaranteed to be  secure  or  error-
  free. P6070214
 

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



DropDownChoice.onSelectionChanged() and model updating

2008-05-07 Thread Andrew Broderick
Hi,

I have a form that I want to repopulate when a drop down list is changed. If I 
change the underlying domain object in the onSelectionChanged(), the form 
fields are not updated to reflect the changes (yes, they do use a dynamic 
model). However, if I have a button next to the drop down list and the user 
clicks it, the exact same processing happens, and the form is updated. Why is 
this, and how can I get onSelectionChanged() to behave the same way?

Thanks



___

The  information in this email or in any file attached
hereto is intended only for the personal and confiden-
tial  use  of  the individual or entity to which it is
addressed and may contain information that is  propri-
etary  and  confidential.  If you are not the intended
recipient of this message you are hereby notified that
any  review, dissemination, distribution or copying of
this message is strictly prohibited.  This  communica-
tion  is  for information purposes only and should not
be regarded as an offer to sell or as  a  solicitation
of an offer to buy any financial product. Email trans-
mission cannot be guaranteed to be  secure  or  error-
free. P6070214


RE: forcing cookies to expire

2008-05-06 Thread Andrew Broderick
Hi,

clearCookie() is called in the constructor of a page called SignOut. The entire 
constructor is:

public SignOut()
{
clearCookie(Register.REMEMBER_ME_COOKIE);
getSession().invalidate();
}

As I mentioned the cookie is never cleared. Is there something else I need to 
do?

Thanks

-Original Message-
From: Johan Compagner [mailto:[EMAIL PROTECTED]
Sent: Monday, May 05, 2008 5:58 PM
To: users@wicket.apache.org
Subject: Re: forcing cookies to expire

When is that clear cookie called?
Can you follow that call a bit more, is it pushed to the
httpservletresponse object?

On 5/5/08, Andrew Broderick [EMAIL PROTECTED] wrote:
 Hi,

 I am trying to manage cookies in Wicket. I can create them and read them no
 problem, but forcing expiry by setting maxAge=0 does not seem to be working.
 Here is the code:

 Set cookie:

   public void setRememberMeCookie(String username)
   {
 Cookie cookie = new Cookie(REMEMBER_ME_COOKIE, username);
 cookie.setMaxAge(-1);
 cookie.setPath(/);
 getWebRequestCycle().getWebResponse().addCookie(cookie);
   }

 Clear cookie:

   private void clearCookie(String name)
   {
 Cookie cookie =
 getWebRequestCycle().getWebRequest().getCookie(name);
 cookie.setMaxAge(0);
 getWebRequestCycle().getWebResponse().addCookie(cookie);
   }

 The code is definitely called. However, the cookie remains. What am I doing
 wrong?

 Thanks

 ___

 The  information in this email or in any file attached
 hereto is intended only for the personal and confiden-
 tial  use  of  the individual or entity to which it is
 addressed and may contain information that is  propri-
 etary  and  confidential.  If you are not the intended
 recipient of this message you are hereby notified that
 any  review, dissemination, distribution or copying of
 this message is strictly prohibited.  This  communica-
 tion  is  for information purposes only and should not
 be regarded as an offer to sell or as  a  solicitation
 of an offer to buy any financial product. Email trans-
 mission cannot be guaranteed to be  secure  or  error-
 free. P6070214


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



forcing cookies to expire

2008-05-05 Thread Andrew Broderick
Hi,

I am trying to manage cookies in Wicket. I can create them and read them no 
problem, but forcing expiry by setting maxAge=0 does not seem to be working. 
Here is the code:

Set cookie:

  public void setRememberMeCookie(String username)
  {
Cookie cookie = new Cookie(REMEMBER_ME_COOKIE, username);
cookie.setMaxAge(-1);
cookie.setPath(/);
getWebRequestCycle().getWebResponse().addCookie(cookie);
  }

Clear cookie:

  private void clearCookie(String name)
  {
Cookie cookie = 
getWebRequestCycle().getWebRequest().getCookie(name);
cookie.setMaxAge(0);
getWebRequestCycle().getWebResponse().addCookie(cookie);
  }

The code is definitely called. However, the cookie remains. What am I doing 
wrong?

Thanks

___

The  information in this email or in any file attached
hereto is intended only for the personal and confiden-
tial  use  of  the individual or entity to which it is
addressed and may contain information that is  propri-
etary  and  confidential.  If you are not the intended
recipient of this message you are hereby notified that
any  review, dissemination, distribution or copying of
this message is strictly prohibited.  This  communica-
tion  is  for information purposes only and should not
be regarded as an offer to sell or as  a  solicitation
of an offer to buy any financial product. Email trans-
mission cannot be guaranteed to be  secure  or  error-
free. P6070214


RE: RTFM messages

2008-05-02 Thread Andrew Broderick
Maybe that is the problem - 10% of the people give 90% of the answers. This 
means they have less time to explain stuff in detail. However, you are right - 
the answers are fast (within minutes) and, even if not complete, usually give 
enough information to find the right place to dig.

I do in fact search all the sources I can find before asking the list, 
including: wicketstuff.org, Google (Nabble has excellent Wicket stuff), the 
list archives, and Wicket In Action.

As for explaining it to new users myself, I would if I knew the answer! I am 
still a newbie, although if I have anything to say about it, we will be using 
Wicket for a long time to come, so I will eventually become expert at it. The 
code is of extremely high quality, and one taste of using it is enough to make 
me never want to touch another front-end framework again. Good work all.

-Andrew

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jeremy Thomerson
Sent: Thursday, May 01, 2008 2:26 PM
To: users@wicket.apache.org
Subject: Re: RTFM messages

I have to add here that I have asked quite a few questions on this list, and
always received a plethora of helpful information - 90% of the time from
core contributors.  This list is the best open source mailing list I have
ever subscribed to or asked questions on.  Many times I have sent emails to
other user lists, even active ones, with questions I could not find the
answer to, and never received a response - at all.

The entire Wicket community is very friendly and helpful.  And, honestly, if
I asked a question for which there were an answer in the javadoc - I would
appreciate Martijn's answer - it would remind me to look for it myself
(which we sometimes get so busy we forget) - and it has much better longterm
benefit than giving a direct answer, or even copy-and-paste the javadoc.

Of course, Andrew, you always have the option of explaining it to the new
user, too - that might help with the wide spread adoption.  I see from your
message history that you love Wicket like the rest of it, and have received
many fine answers from the same core committers that you criticize here.
Just saying - it goes both ways.

THANK YOU WONDERFUL WICKET COMMUNITY AND ESPECIALLY THE CORE COMMITTERS
(Igor, Martijn, Johan, and everyone)

My 2 cents

On Thu, May 1, 2008 at 2:13 PM, C. Bergström [EMAIL PROTECTED]
wrote:


 On Thu, 2008-05-01 at 21:01 +0200, Martijn Dashorst wrote:
  On 5/1/08, Andrew Broderick [EMAIL PROTECTED] wrote:
   The guy asked a simple question.
 
  And I answered it is a simple manner: read the javadoc, if that
  doesn't help you, tell us what is wrong. All condensed in a single
  question. You chose to read it as a RTFM. Did you ever read [1]?
 

 commentary
 I've worked with Martijn a bit and overall I really appreciate his
 concise and clear answers.  On first read of his post you can surely
 feel a defensive tone, but really this is more an example of how
 passionate Wicket devs are about quality not only in code but
 documentation.

 Tact sold separately
 /commentary

 ./C

 
  [1] 
  http://www.catb.org/~esr/faqs/smart-questions.htmlhttp://www.catb.org/%7Eesr/faqs/smart-questions.html


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



___

The  information in this email or in any file attached
hereto is intended only for the personal and confiden-
tial  use  of  the individual or entity to which it is
addressed and may contain information that is  propri-
etary  and  confidential.  If you are not the intended
recipient of this message you are hereby notified that
any  review, dissemination, distribution or copying of
this message is strictly prohibited.  This  communica-
tion  is  for information purposes only and should not
be regarded as an offer to sell or as  a  solicitation
of an offer to buy any financial product. Email trans-
mission cannot be guaranteed to be  secure  or  error-
free. P6070214

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



RE: WicketStuff.org Is Down

2008-05-02 Thread Andrew Broderick
Also see http://www.wicket-library.com/wicket-examples/

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ryan Gravener
Sent: Friday, May 02, 2008 2:58 PM
To: users@wicket.apache.org
Subject: Re: WicketStuff.org Is Down

I have the examples running on http://wmwm.us/wicket-examples .  The session
doesn't expire for 55 minutes also.  Enjoy.

On Fri, May 2, 2008 at 3:34 PM, Hoover, William [EMAIL PROTECTED] wrote:

 okay... thanks for the info

 -Original Message-
 From: Martijn Dashorst [mailto:[EMAIL PROTECTED]
 Sent: Friday, May 02, 2008 3:31 PM
 To: users@wicket.apache.org
 Subject: Re: WicketStuff.org Is Down

 No. bamboo is doing its upgrade stuff. and has been doing that for about
 3 hours.

 If you are looking for the examples, install them on your own box.
 They're only a download away.

 Martijn

 On 5/2/08, Hoover, William [EMAIL PROTECTED] wrote:
  Does anyone have an ETA when wicketstuff.org will be back up?
 
 
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
 
 


 --
 Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.3 is
 released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.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]




--
Ryan Gravener
http://wmwm.us/wmwm-date

___

The  information in this email or in any file attached
hereto is intended only for the personal and confiden-
tial  use  of  the individual or entity to which it is
addressed and may contain information that is  propri-
etary  and  confidential.  If you are not the intended
recipient of this message you are hereby notified that
any  review, dissemination, distribution or copying of
this message is strictly prohibited.  This  communica-
tion  is  for information purposes only and should not
be regarded as an offer to sell or as  a  solicitation
of an offer to buy any financial product. Email trans-
mission cannot be guaranteed to be  secure  or  error-
free. P6070214


RE: 答复: What is the Wicket way to redirect?

2008-05-01 Thread Andrew Broderick
If there's one fault with this otherwise great mailing list, it's the attitude 
that the old-timers have towards the newbies. The guy asked a simple question.

FYI, what's wrong with the Javadoc is that for RestartResponseException, it 
says:

 Causes wicket to interrupt current request processing and immediately respond 
with the specified page.

And for RestartResponseAtInterceptPageException, it says:

 Causes Wicket to interrupt current request processing and immediately 
redirect to an intercept page.
Similar to calling redirectToInteceptPage(Page) with the difference that this 
exception will interrupt processing of the current request.

This says nothing about what the differences between the two are. So, guys, if 
you want Wicket to attain widespread adoption, please don't shoot back at 
anyone who asks a question with a response of RTFM. Take the time to explain 
stuff. (This also contributes to the Wicket knowledge base, as it remains in 
the list archives, and hence shows up in Google searches).

-Andrew


-Original Message-
From: Martijn Dashorst [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 01, 2008 9:14 AM
To: users@wicket.apache.org
Subject: Re: 答复: What is the Wicket way to redirect?

What is wrong with the javadoc?

Martijn

On 5/1/08, Jay [EMAIL PROTECTED] wrote:
 Hi, Igor

  What's the difference between RestartResponseException and
  RestartResponseAtInterceptPageException? Thx


  Regards,
  Jay

  -邮件原件-
  发件人: Igor Vaynberg [mailto:[EMAIL PROTECTED]
  发送时间: 2008年2月21日 7:03
  收件人: users@wicket.apache.org
  主题: Re: What is the Wicket way to redirect?


  s/error/session.error/
  s/setresponsepage/throw new restartresponseexception

  -igor


  On Wed, Feb 20, 2008 at 2:54 PM, MYoung [EMAIL PROTECTED] wrote:
  
In my Checkout page if there is nothing to checkout, I want to bounce to
  the
ShowCatalog page with an error message.  I did it this way:
  
class Checkout extends WebPage {
   public Checkout() {
   if (thereIsNothingToCheckout()) {
   error(You have nothing to checkout);
   setResponsePage(ShowCatalog.class);
   return;
   }
  
   // continue to checkout
  
   }
}
  
Is this the right way?
--
View this message in context:
  http://www.nabble.com/What-is-the-Wicket-way-to-redirect--tp15600869p1560086
  9.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]


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




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

___

The  information in this email or in any file attached
hereto is intended only for the personal and confiden-
tial  use  of  the individual or entity to which it is
addressed and may contain information that is  propri-
etary  and  confidential.  If you are not the intended
recipient of this message you are hereby notified that
any  review, dissemination, distribution or copying of
this message is strictly prohibited.  This  communica-
tion  is  for information purposes only and should not
be regarded as an offer to sell or as  a  solicitation
of an offer to buy any financial product. Email trans-
mission cannot be guaranteed to be  secure  or  error-
free. P6070214


finding out user's original destination

2008-04-30 Thread Andrew Broderick
Hi,

In the onSubmit() of my SignInPanel, I have the following:

if (!continueToOriginalDestination())
{
  
setResponsePage(getApplication().getSessionSettings().getPageFactory().newPage(
  getApplication().getHomePage(), 
(PageParameters)null));
}

What I want to do is find out where the user is heading at this point, so I can 
conditionally either allow them to go there or send them to the home page. 
Note, this is not for authorization purposes; I just want to be able to control 
the page flow.

Thanks

___

The  information in this email or in any file attached
hereto is intended only for the personal and confiden-
tial  use  of  the individual or entity to which it is
addressed and may contain information that is  propri-
etary  and  confidential.  If you are not the intended
recipient of this message you are hereby notified that
any  review, dissemination, distribution or copying of
this message is strictly prohibited.  This  communica-
tion  is  for information purposes only and should not
be regarded as an offer to sell or as  a  solicitation
of an offer to buy any financial product. Email trans-
mission cannot be guaranteed to be  secure  or  error-
free. P6070214


RE: getter called multiple times on PropertyModel with ListView

2008-04-30 Thread Andrew Broderick
Thanks. It does work, and the load() method only gets called once when the view 
renders. However, I am still confused as to why it works. In other words, why 
LoadableDetachableModel only gets called once, whereas PropertyModel gets 
called multiple times on rendering the ListView. For instance, the JavaDocs for 
this class say:  LoadableDetachableModel holds a temporary, transient model 
object. If anything, it seems like that would get called MORE than 
PropertyModel, not less, in case the temporary, transient model object gets 
changed. Just struggling to really understand how models work, because they 
seem so key to understanding Wicket.

Thanks


-Original Message-
From: Hoover, William [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 29, 2008 3:09 PM
To: users@wicket.apache.org
Subject: RE: getter called multiple times on PropertyModel with ListView

// It solves your problem because the call to load will be made each
time your view renders
final LoadableDetachableModel articlesLoadableModel = new
LoadableDetachableModel() {
private static final long serialVersionUID = 1L;

/**
 * [EMAIL PROTECTED]
 */
@Override
protected final Object load() {
return new PropertyModel(YourPage.this, articles);
}
};
final ListView newsDetails = new ListView(newsDetails,
articlesLoadableModel){
private static final long serialVersionUID = 1L;

/**
 * [EMAIL PROTECTED]
 */
@Override
  protected final void populateItem(final ListItem item) {
...
  }
};
add(newsDetails);

-Original Message-
From: Andrew Broderick [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 29, 2008 2:19 PM
To: 'users@wicket.apache.org'
Subject: RE: getter called multiple times on PropertyModel with ListView

Cannot instantiate LoadableDetachableModel directly .. it is abstract.
Besides, how does it help solve the problem?

Thanks

-Original Message-
From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 29, 2008 12:49 PM
To: users@wicket.apache.org
Subject: Re: getter called multiple times on PropertyModel with ListView

 ListView newsDetails = new ListView(newsDetails, new
LoadableDetachableModel(new PropertyModel(this, articles)))

-igor

On Tue, Apr 29, 2008 at 10:46 AM, Andrew Broderick
[EMAIL PROTECTED] wrote:
 Hi,

  I have a page where I am using a PropertyModel to populate a
ListView, so it will change when the underlying contents change:

 ListView newsDetails = new ListView(newsDetails, new
PropertyModel(this, articles))
 {
   protected void populateItem(ListItem item)
   {

 final NewsDetails nd = (NewsDetails)
item.getModelObject();
 item.add(new Label(articleDate,
nd.getArticleDate()));
 item.add(new Label(articleTime,
nd.getArticleTime()));
 item.add(new Label(newsShortDesc,
nd.getNewsShortDesc()));
 newsUrlLink.add(new Label(newsTitle,
nd.getNewsTitle()));
 item.add(newsUrlLink);
   }
 };
 add(newsDetails);

  The page class, obviously, has a getter named getArticles():


   public ListNewsDetails getArticles()
   {
 
  }

  However, this seems to get called multiple times when the listview is
being populated, not just once at the beginning of each time the page is
displayer. Why is this happening? It results in many more hits to the
database than are necessary.

  Thanks,

  Andrew B

  ___

  The  information in this email or in any file attached  hereto is
 intended only for the personal and confiden-  tial  use  of  the
 individual or entity to which it is  addressed and may contain
 information that is  propri-  etary  and  confidential.  If you are
 not the intended  recipient of this message you are hereby notified
 that  any  review, dissemination, distribution or copying of  this
 message is strictly prohibited.  This  communica-  tion  is  for
 information purposes only and should not  be regarded as an offer to
 sell or as  a  solicitation  of an offer to buy any financial product.

 Email trans-  mission cannot be guaranteed to be  secure  or  error-
 free. P6070214


-
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

getter called multiple times on PropertyModel with ListView

2008-04-29 Thread Andrew Broderick
Hi,

I have a page where I am using a PropertyModel to populate a ListView, so it 
will change when the underlying contents change:

ListView newsDetails = new ListView(newsDetails, new 
PropertyModel(this, articles))
{
  protected void populateItem(ListItem item)
  {

final NewsDetails nd = (NewsDetails) 
item.getModelObject();
item.add(new Label(articleDate, nd.getArticleDate()));
item.add(new Label(articleTime, nd.getArticleTime()));
item.add(new Label(newsShortDesc, 
nd.getNewsShortDesc()));
newsUrlLink.add(new Label(newsTitle, 
nd.getNewsTitle()));
item.add(newsUrlLink);
  }
};
add(newsDetails);

The page class, obviously, has a getter named getArticles():


  public ListNewsDetails getArticles()
  {

}

However, this seems to get called multiple times when the listview is being 
populated, not just once at the beginning of each time the page is displayer. 
Why is this happening? It results in many more hits to the database than are 
necessary.

Thanks,

Andrew B

___

The  information in this email or in any file attached
hereto is intended only for the personal and confiden-
tial  use  of  the individual or entity to which it is
addressed and may contain information that is  propri-
etary  and  confidential.  If you are not the intended
recipient of this message you are hereby notified that
any  review, dissemination, distribution or copying of
this message is strictly prohibited.  This  communica-
tion  is  for information purposes only and should not
be regarded as an offer to sell or as  a  solicitation
of an offer to buy any financial product. Email trans-
mission cannot be guaranteed to be  secure  or  error-
free. P6070214


RE: getter called multiple times on PropertyModel with ListView

2008-04-29 Thread Andrew Broderick
Cannot instantiate LoadableDetachableModel directly .. it is abstract. Besides, 
how does it help solve the problem?

Thanks

-Original Message-
From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 29, 2008 12:49 PM
To: users@wicket.apache.org
Subject: Re: getter called multiple times on PropertyModel with ListView

 ListView newsDetails = new ListView(newsDetails, new
LoadableDetachableModel(new PropertyModel(this, articles)))

-igor

On Tue, Apr 29, 2008 at 10:46 AM, Andrew Broderick
[EMAIL PROTECTED] wrote:
 Hi,

  I have a page where I am using a PropertyModel to populate a ListView, so it 
 will change when the underlying contents change:

 ListView newsDetails = new ListView(newsDetails, new 
 PropertyModel(this, articles))
 {
   protected void populateItem(ListItem item)
   {

 final NewsDetails nd = (NewsDetails) 
 item.getModelObject();
 item.add(new Label(articleDate, 
 nd.getArticleDate()));
 item.add(new Label(articleTime, 
 nd.getArticleTime()));
 item.add(new Label(newsShortDesc, 
 nd.getNewsShortDesc()));
 newsUrlLink.add(new Label(newsTitle, 
 nd.getNewsTitle()));
 item.add(newsUrlLink);
   }
 };
 add(newsDetails);

  The page class, obviously, has a getter named getArticles():


   public ListNewsDetails getArticles()
   {
 
  }

  However, this seems to get called multiple times when the listview is being 
 populated, not just once at the beginning of each time the page is displayer. 
 Why is this happening? It results in many more hits to the database than are 
 necessary.

  Thanks,

  Andrew B

  ___

  The  information in this email or in any file attached
  hereto is intended only for the personal and confiden-
  tial  use  of  the individual or entity to which it is
  addressed and may contain information that is  propri-
  etary  and  confidential.  If you are not the intended
  recipient of this message you are hereby notified that
  any  review, dissemination, distribution or copying of
  this message is strictly prohibited.  This  communica-
  tion  is  for information purposes only and should not
  be regarded as an offer to sell or as  a  solicitation
  of an offer to buy any financial product. Email trans-
  mission cannot be guaranteed to be  secure  or  error-
  free. P6070214


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



DropDownChoice problem

2008-04-17 Thread Andrew Broderick
Hi,

I have a DropDownChoice in a form, with markup:

select wicket:id=authors /

In my Form class, I add it like this:

  add(new DropDownChoice(authors, new 
PropertyModel(this.article, articleAuthorId),
  acService.getAuthors(), new 
ChoiceRenderer(authorDisplayName, articleAuthorId)));

this.article refers to a class that has a property of articleAuthorId:

  public long getArticleAuthorId() {
return articleAuthorId;
  }

  public void setArticleAuthorId(long articleAuthorId) {
this.articleAuthorId = articleAuthorId;
  }

The acService.getAuthors() call gets a list of Author objects:

public class Author implements Serializable {

  private long articleAuthorId;
  private String authorFirstName;
  private String authorMiddleName;
  private String authorLastName;
  private String authorDisplayName;


  public String getAuthorFirstName() {
return authorFirstName;
  }
  public void setAuthorFirstName(String authorFirstName) {
this.authorFirstName = authorFirstName;
  }
  public String getAuthorMiddleName() {
return authorMiddleName;
  }
  public void setAuthorMiddleName(String authorMiddleName) {
this.authorMiddleName = authorMiddleName;
  }
  public String getAuthorLastName() {
return authorLastName;
  }
  public void setAuthorLastName(String authorLastName) {
this.authorLastName = authorLastName;
  }
  public String getAuthorDisplayName() {
return authorDisplayName;
  }
  public void setAuthorDisplayName(String authorDisplayName) {
this.authorDisplayName = authorDisplayName;
  }
  public Long getId()
  {
return new Long(getArticleAuthorId());
  }
  public long getArticleAuthorId() {
return articleAuthorId;
  }
  public void setArticleAuthorId(long articleAuthorId) {
this.articleAuthorId = articleAuthorId;
  }
}

The error I get when I try to render the page is:

WicketMessage: No get method defined for class: class java.lang.Long 
expression: articleAuthorId

I don't understand this, as the class used for the choices is Author, not 
java.lang.Long 

Any help appreciated!

Thanks




___

The  information in this email or in any file attached
hereto is intended only for the personal and confiden-
tial  use  of  the individual or entity to which it is
addressed and may contain information that is  propri-
etary  and  confidential.  If you are not the intended
recipient of this message you are hereby notified that
any  review, dissemination, distribution or copying of
this message is strictly prohibited.  This  communica-
tion  is  for information purposes only and should not
be regarded as an offer to sell or as  a  solicitation
of an offer to buy any financial product. Email trans-
mission cannot be guaranteed to be  secure  or  error-
free. P6070214


RE: DropDownChoice problem

2008-04-17 Thread Andrew Broderick
I tried changing both the property being set by the DropDownChoice and the 
property used in the Author class to Long, and it didn't make any 
difference any help appreciated!

Thanks

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ryan Gravener
Sent: Thursday, April 17, 2008 4:23 PM
To: users@wicket.apache.org
Subject: Re: DropDownChoice problem

Use Long instead of long

On Thu, Apr 17, 2008 at 5:05 PM, Andrew Broderick
[EMAIL PROTECTED] wrote:
 Hi,

  I have a DropDownChoice in a form, with markup:

  select wicket:id=authors /

  In my Form class, I add it like this:

   add(new DropDownChoice(authors, new 
 PropertyModel(this.article, articleAuthorId),
   acService.getAuthors(), new 
 ChoiceRenderer(authorDisplayName, articleAuthorId)));

  this.article refers to a class that has a property of articleAuthorId:

   public long getArticleAuthorId() {
 return articleAuthorId;
   }

   public void setArticleAuthorId(long articleAuthorId) {
 this.articleAuthorId = articleAuthorId;
   }

  The acService.getAuthors() call gets a list of Author objects:

  public class Author implements Serializable {

   private long articleAuthorId;
   private String authorFirstName;
   private String authorMiddleName;
   private String authorLastName;
   private String authorDisplayName;


   public String getAuthorFirstName() {
 return authorFirstName;
   }
   public void setAuthorFirstName(String authorFirstName) {
 this.authorFirstName = authorFirstName;
   }
   public String getAuthorMiddleName() {
 return authorMiddleName;
   }
   public void setAuthorMiddleName(String authorMiddleName) {
 this.authorMiddleName = authorMiddleName;
   }
   public String getAuthorLastName() {
 return authorLastName;
   }
   public void setAuthorLastName(String authorLastName) {
 this.authorLastName = authorLastName;
   }
   public String getAuthorDisplayName() {
 return authorDisplayName;
   }
   public void setAuthorDisplayName(String authorDisplayName) {
 this.authorDisplayName = authorDisplayName;
   }
   public Long getId()
   {
 return new Long(getArticleAuthorId());
   }
   public long getArticleAuthorId() {
 return articleAuthorId;
   }
   public void setArticleAuthorId(long articleAuthorId) {
 this.articleAuthorId = articleAuthorId;
   }
  }

  The error I get when I try to render the page is:

  WicketMessage: No get method defined for class: class java.lang.Long 
 expression: articleAuthorId

  I don't understand this, as the class used for the choices is Author, not 
 java.lang.Long 

  Any help appreciated!

  Thanks




  ___

  The  information in this email or in any file attached
  hereto is intended only for the personal and confiden-
  tial  use  of  the individual or entity to which it is
  addressed and may contain information that is  propri-
  etary  and  confidential.  If you are not the intended
  recipient of this message you are hereby notified that
  any  review, dissemination, distribution or copying of
  this message is strictly prohibited.  This  communica-
  tion  is  for information purposes only and should not
  be regarded as an offer to sell or as  a  solicitation
  of an offer to buy any financial product. Email trans-
  mission cannot be guaranteed to be  secure  or  error-
  free. P6070214




--
Ryan Gravener
http://ryangravener.com

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



Wicket is the state into which all web frameworks will eventually evolve

2008-04-15 Thread Andrew Broderick
Hi,

Just wanted to take time to say I LOVE WICKET! It is a completely different 
approach from the other MVC frameworks. For modularity, stability, ease of use, 
and separation of concerns, it blows them out of the water.

We have been using Wicket 1.3 intensively for a month now. We are building a 
major public website (it has to stay under wraps until after its official 
launch on May 1st). Learning Wicket has not been without teething troubles - 
after all, no framework is perfect. But, the inherent ease of splitting things 
up into components, and the inherent encapsulation that comes with this, has 
shrunk our development time markedly. It also gives us a high level of 
confidence in what we've built, because once you get something working in 
isolation, it keeps working wherever you eventually put it. This is, I think, 
the single biggest benefit it gives us.

We've thrown our site together quickly and under great time pressure, and 
Wicket has delivered. The inherent type safety you get from building the site 
from Java classes helps hugely. It means very few run-time bugs. The separation 
of markup means our web designer can work in the same codebase as our Java guys 
too, so no duplication of effort. In fact, what we have done wouldn't be 
possible in such a short time frame with any other framework.

So, a huge thank you to the Wicket development team. Keep up the good work!

___

The  information in this email or in any file attached
hereto is intended only for the personal and confiden-
tial  use  of  the individual or entity to which it is
addressed and may contain information that is  propri-
etary  and  confidential.  If you are not the intended
recipient of this message you are hereby notified that
any  review, dissemination, distribution or copying of
this message is strictly prohibited.  This  communica-
tion  is  for information purposes only and should not
be regarded as an offer to sell or as  a  solicitation
of an offer to buy any financial product. Email trans-
mission cannot be guaranteed to be  secure  or  error-
free. P6070214


Consuming a portlet in Wicket?

2008-04-14 Thread Andrew Broderick
Hi,

I am trying to seamlessly integrate JForum into my Wicket application. Problem 
is, JForum is an entirely separate web application (running under the same 
domain however).

JForum has a JSR-168 portlet bridge available, to allow it to run as a portlet. 
However, can a portlet be consumed by Wicket? Or, are there any other ways 
anyone can think of to achieve this (preferably without using an iframe).

Thanks

___

The  information in this email or in any file attached
hereto is intended only for the personal and confiden-
tial  use  of  the individual or entity to which it is
addressed and may contain information that is  propri-
etary  and  confidential.  If you are not the intended
recipient of this message you are hereby notified that
any  review, dissemination, distribution or copying of
this message is strictly prohibited.  This  communica-
tion  is  for information purposes only and should not
be regarded as an offer to sell or as  a  solicitation
of an offer to buy any financial product. Email trans-
mission cannot be guaranteed to be  secure  or  error-
free. P6070214


form-specific feedback

2008-04-10 Thread Andrew Broderick
Hi,

I have two forms on the same page, that are two different classes. Each uses a 
FeedbackPanel. The problem is, if one of them is submitted, and error(blah) 
is called somewhere in the onSubmit(), they both display the message! How can I 
make each form only display its own messages?

Thanks

___

The  information in this email or in any file attached
hereto is intended only for the personal and confiden-
tial  use  of  the individual or entity to which it is
addressed and may contain information that is  propri-
etary  and  confidential.  If you are not the intended
recipient of this message you are hereby notified that
any  review, dissemination, distribution or copying of
this message is strictly prohibited.  This  communica-
tion  is  for information purposes only and should not
be regarded as an offer to sell or as  a  solicitation
of an offer to buy any financial product. Email trans-
mission cannot be guaranteed to be  secure  or  error-
free. P6070214


Wicket Extensions

2008-04-09 Thread Andrew Broderick
Hi,

Is Wicket Extensions 1.2.7 compatible with Wicket 1.3? I downloaded it, but I 
can't find any mention of Wicket versions in the documentation

Thanks

___

The  information in this email or in any file attached
hereto is intended only for the personal and confiden-
tial  use  of  the individual or entity to which it is
addressed and may contain information that is  propri-
etary  and  confidential.  If you are not the intended
recipient of this message you are hereby notified that
any  review, dissemination, distribution or copying of
this message is strictly prohibited.  This  communica-
tion  is  for information purposes only and should not
be regarded as an offer to sell or as  a  solicitation
of an offer to buy any financial product. Email trans-
mission cannot be guaranteed to be  secure  or  error-
free. P6070214


RE: Wicket Extensions

2008-04-09 Thread Andrew Broderick
Oops! Didn't realize it was in the distribution blush

Thanks

-Original Message-
From: Martijn Dashorst [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 09, 2008 2:17 PM
To: users@wicket.apache.org
Subject: Re: Wicket Extensions

No. You need all versions to be equal for all projects. We release all
projects concurrently under the same version number. Why did you
download wicket extensions when it is in the distribution? Or why
didn't you just add it to your pom?

Martijn

On 4/9/08, Andrew Broderick [EMAIL PROTECTED] wrote:
 Hi,

  Is Wicket Extensions 1.2.7 compatible with Wicket 1.3? I downloaded it, but 
 I can't find any mention of Wicket versions in the documentation

  Thanks

  ___

  The  information in this email or in any file attached
  hereto is intended only for the personal and confiden-
  tial  use  of  the individual or entity to which it is
  addressed and may contain information that is  propri-
  etary  and  confidential.  If you are not the intended
  recipient of this message you are hereby notified that
  any  review, dissemination, distribution or copying of
  this message is strictly prohibited.  This  communica-
  tion  is  for information purposes only and should not
  be regarded as an offer to sell or as  a  solicitation
  of an offer to buy any financial product. Email trans-
  mission cannot be guaranteed to be  secure  or  error-
  free. P6070214



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

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



customize SignInPanel look and feel

2008-04-09 Thread Andrew Broderick
Hi,

How do I customize the markup for the stock SignInPanel?

Thanks

___

The  information in this email or in any file attached
hereto is intended only for the personal and confiden-
tial  use  of  the individual or entity to which it is
addressed and may contain information that is  propri-
etary  and  confidential.  If you are not the intended
recipient of this message you are hereby notified that
any  review, dissemination, distribution or copying of
this message is strictly prohibited.  This  communica-
tion  is  for information purposes only and should not
be regarded as an offer to sell or as  a  solicitation
of an offer to buy any financial product. Email trans-
mission cannot be guaranteed to be  secure  or  error-
free. P6070214


Simplest way to do name-value pairs in DropDownChoice

2008-04-01 Thread Andrew Broderick
Hi,

I have looked around at several examples of using DropDownChoice. I see it is a 
very flexible component, with models, IChoiceRenderers and so on. But, I just 
want to pass it simple name/value pairs to use, with a minimum of fuss. Surely 
there must be an easy way to do this, since this is probably the main use case 
for this component. My pairs are just:

  option value=All DayAll Day/option
  option value=77:00AM/option
  option value=88:00AM/option
  option value=99:00AM/option
  option value=1010:00AM/option
  option value=:00AM/option
  option value=1212:00PM/option
  option value=131:00PM/option
  option value=142:00PM/option
  option value=153:00PM/option
  option value=164:00PM/option
  option value=175:00PM/option
  option value=186:00PM/option

In HTML. What is the simplest possible way to use these with DropDownChoice?

Thanks.


___

The  information in this email or in any file attached
hereto is intended only for the personal and confiden-
tial  use  of  the individual or entity to which it is
addressed and may contain information that is  propri-
etary  and  confidential.  If you are not the intended
recipient of this message you are hereby notified that
any  review, dissemination, distribution or copying of
this message is strictly prohibited.  This  communica-
tion  is  for information purposes only and should not
be regarded as an offer to sell or as  a  solicitation
of an offer to buy any financial product. Email trans-
mission cannot be guaranteed to be  secure  or  error-
free. P6070214


RE: Simplest way to do name-value pairs in DropDownChoice

2008-04-01 Thread Andrew Broderick
I am using Wicket 1.3. Has Wicket Extensions been updated to 1.3? I got the 
latest Extensions, but seem to be getting errors.

Thanks

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jeremy Levy
Sent: Tuesday, April 01, 2008 11:17 AM
To: users@wicket.apache.org
Subject: Re: Simplest way to do name-value pairs in DropDownChoice

I think you are going to have to use a ChoiceRenderer. It's really not that
complicated. Check out

http://people.apache.org/~tobrien/wicket/apidocs/org/apache/wicket/extensions/markup/html/form/select/SelectOption.html

Jeremy

On Tue, Apr 1, 2008 at 12:02 PM, Andrew Broderick [EMAIL PROTECTED]
wrote:

 Hi,

 I have looked around at several examples of using DropDownChoice. I see it
 is a very flexible component, with models, IChoiceRenderers and so on. But,
 I just want to pass it simple name/value pairs to use, with a minimum of
 fuss. Surely there must be an easy way to do this, since this is probably
 the main use case for this component. My pairs are just:

  option value=All DayAll Day/option
  option value=77:00AM/option
  option value=88:00AM/option
  option value=99:00AM/option
  option value=1010:00AM/option
  option value=:00AM/option
  option value=1212:00PM/option
  option value=131:00PM/option
  option value=142:00PM/option
  option value=153:00PM/option
  option value=164:00PM/option
  option value=175:00PM/option
  option value=186:00PM/option

 In HTML. What is the simplest possible way to use these with
 DropDownChoice?

 Thanks.


 ___

 The  information in this email or in any file attached
 hereto is intended only for the personal and confiden-
 tial  use  of  the individual or entity to which it is
 addressed and may contain information that is  propri-
 etary  and  confidential.  If you are not the intended
 recipient of this message you are hereby notified that
 any  review, dissemination, distribution or copying of
 this message is strictly prohibited.  This  communica-
 tion  is  for information purposes only and should not
 be regarded as an offer to sell or as  a  solicitation
 of an offer to buy any financial product. Email trans-
 mission cannot be guaranteed to be  secure  or  error-
 free. P6070214


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



RE: Simplest way to do name-value pairs in DropDownChoice

2008-04-01 Thread Andrew Broderick
Wicket 1.3 does not have a class called SelectOption. I downloade Wicket 
Extension to obtain it, but found it to be incompatible with Wicket 1.3.

-Andrew

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jeremy Levy
Sent: Tuesday, April 01, 2008 12:26 PM
To: users@wicket.apache.org
Subject: Re: Simplest way to do name-value pairs in DropDownChoice

Its just a class with a get/set Value and Id

j

On Tue, Apr 1, 2008 at 12:50 PM, Andrew Broderick [EMAIL PROTECTED]
wrote:

 I am using Wicket 1.3. Has Wicket Extensions been updated to 1.3? I got
 the latest Extensions, but seem to be getting errors.

 Thanks

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jeremy Levy
 Sent: Tuesday, April 01, 2008 11:17 AM
 To: users@wicket.apache.org
 Subject: Re: Simplest way to do name-value pairs in DropDownChoice

 I think you are going to have to use a ChoiceRenderer. It's really not
 that
 complicated. Check out


 http://people.apache.org/~tobrien/wicket/apidocs/org/apache/wicket/extensions/markup/html/form/select/SelectOption.htmlhttp://people.apache.org/%7Etobrien/wicket/apidocs/org/apache/wicket/extensions/markup/html/form/select/SelectOption.html

 Jeremy

 On Tue, Apr 1, 2008 at 12:02 PM, Andrew Broderick [EMAIL PROTECTED]
 wrote:

  Hi,
 
  I have looked around at several examples of using DropDownChoice. I see
 it
  is a very flexible component, with models, IChoiceRenderers and so on.
 But,
  I just want to pass it simple name/value pairs to use, with a minimum of
  fuss. Surely there must be an easy way to do this, since this is
 probably
  the main use case for this component. My pairs are just:
 
   option value=All DayAll Day/option
   option value=77:00AM/option
   option value=88:00AM/option
   option value=99:00AM/option
   option value=1010:00AM/option
   option value=:00AM/option
   option value=1212:00PM/option
   option value=131:00PM/option
   option value=142:00PM/option
   option value=153:00PM/option
   option value=164:00PM/option
   option value=175:00PM/option
   option value=186:00PM/option
 
  In HTML. What is the simplest possible way to use these with
  DropDownChoice?
 
  Thanks.
 
 
  ___
 
  The  information in this email or in any file attached
  hereto is intended only for the personal and confiden-
  tial  use  of  the individual or entity to which it is
  addressed and may contain information that is  propri-
  etary  and  confidential.  If you are not the intended
  recipient of this message you are hereby notified that
  any  review, dissemination, distribution or copying of
  this message is strictly prohibited.  This  communica-
  tion  is  for information purposes only and should not
  be regarded as an offer to sell or as  a  solicitation
  of an offer to buy any financial product. Email trans-
  mission cannot be guaranteed to be  secure  or  error-
  free. P6070214
 

 -
 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: Simplest way to do name-value pairs in DropDownChoice

2008-04-01 Thread Andrew Broderick
Since it wasn't there, I extended DropDownChoice to encapsulate the whole 
name/value pair thing:

package ...helper.ui;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import org.apache.wicket.markup.html.form.ChoiceRenderer;
import org.apache.wicket.markup.html.form.DropDownChoice;
import org.apache.wicket.model.AbstractPropertyModel;

public class EasyDropDownChoice extends DropDownChoice
{
public EasyDropDownChoice(String componentId, AbstractPropertyModel 
model, String[][] options)
{
this(componentId, model, toList(options));
}

public EasyDropDownChoice(String componentId, AbstractPropertyModel 
model, Map options)
{
this(componentId, model, toList(options));
}

public EasyDropDownChoice(String componentId, AbstractPropertyModel 
model, ListNameValuePair options)
{
super(componentId, model, options, new ChoiceRenderer(value, 
id));
}

private static ListNameValuePair toList(String[][] choices)
{
ArrayListNameValuePair options = new 
ArrayListNameValuePair();

for (int n = 0; n  choices.length; n++)
{
options.add(new NameValuePair(choices[n][0], 
choices[n][1]));
}

return options;
}

private static ListNameValuePair toList(MapString, String choices)
{
ArrayListNameValuePair options = new 
ArrayListNameValuePair();

for (String key: choices.keySet())
{
options.add(new NameValuePair(key, choices.get(key)));
}

return options;
}
}

Which depends on:

package ***.*..helper.ui;

import java.io.Serializable;

public class NameValuePair implements Serializable
{
private String id;
private String value;

public NameValuePair(String id, String value)
{
this.id = id;
this.value = value;
}

public String getId()
{
return id;
}

public void setId(String id)
{
this.id = id;
}

public String getValue()
{
return value;
}

public void setValue(String value)
{
this.value = value;
}

}

To initialize it with an array of choices, you now just have to do this:

String[][] eventTimes = new String[][] { {7:00:00, 7:00 AM},

 {8:00:00, 8:00 AM},

 {9:00:00, 9:00 AM},

 {10:00:00, 10:00 AM},

 {11:00:00, 11:00 AM},

 {12:00:00, 12:00 PM},

 {13:00:00, 1:00 PM},

 {14:00:00, 2:00 PM},

 {15:00:00, 3:00 PM},

 {16:00:00, 4:00 PM},

 {17:00:00, 5:00 PM},

 {18:00:00, 6:00 PM} };

add(new EasyDropDownChoice(eventTime, new PropertyModel(this, eventTime), 
eventTimes));

You can construct it with either a nested string array or a Map. Just have to 
make sure the property it's bound to is of type NameValuePair.

-Andrew

___

The  information in this email or in any file attached
hereto is intended only for the personal and confiden-
tial  use  of  the individual or entity to which it is
addressed and may contain information that is  propri-
etary  and  confidential.  If you are not the intended
recipient of this message you are hereby notified that
any  review, dissemination, distribution or copying of
this message is strictly prohibited.  This  communica-
tion  is  for information purposes only and should not
be regarded as an offer to sell or as  a  solicitation
of an offer to buy any financial product. Email trans-
mission 

refreshing page

2008-04-01 Thread Andrew Broderick
Hi,

I'm sure this is a basic newbie lack of knowledge showing here, but when I save 
some data to my DB from my wicket page (adding an object), my master (list) 
page is not updated. Okay, I thought, maybe I just need to modify the model at 
the same time as saving it. So I did that, and the new row still does not 
appear. How do I tell Wicket to do a deep refresh of the page, and not just 
redisplay the existing contents?

Thanks

___

The  information in this email or in any file attached
hereto is intended only for the personal and confiden-
tial  use  of  the individual or entity to which it is
addressed and may contain information that is  propri-
etary  and  confidential.  If you are not the intended
recipient of this message you are hereby notified that
any  review, dissemination, distribution or copying of
this message is strictly prohibited.  This  communica-
tion  is  for information purposes only and should not
be regarded as an offer to sell or as  a  solicitation
of an offer to buy any financial product. Email trans-
mission cannot be guaranteed to be  secure  or  error-
free. P6070214


RE: refreshing page

2008-04-01 Thread Andrew Broderick
All I want to know is how you tell a page that its data is dirty and it should 
reload.

Thanks

-Original Message-
From: Maurice Marrink [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 01, 2008 3:49 PM
To: users@wicket.apache.org
Subject: Re: refreshing page

It really does not hurt to google before asking you know :(
http://www.theserverside.com/tt/articles/content/IntroducingApacheWicket/article.html

Maurice

On Tue, Apr 1, 2008 at 10:39 PM, Andrew Broderick [EMAIL PROTECTED] wrote:
 Hi,

  I'm sure this is a basic newbie lack of knowledge showing here, but when I 
 save some data to my DB from my wicket page (adding an object), my master 
 (list) page is not updated. Okay, I thought, maybe I just need to modify the 
 model at the same time as saving it. So I did that, and the new row still 
 does not appear. How do I tell Wicket to do a deep refresh of the page, and 
 not just redisplay the existing contents?

  Thanks

  ___

  The  information in this email or in any file attached
  hereto is intended only for the personal and confiden-
  tial  use  of  the individual or entity to which it is
  addressed and may contain information that is  propri-
  etary  and  confidential.  If you are not the intended
  recipient of this message you are hereby notified that
  any  review, dissemination, distribution or copying of
  this message is strictly prohibited.  This  communica-
  tion  is  for information purposes only and should not
  be regarded as an offer to sell or as  a  solicitation
  of an offer to buy any financial product. Email trans-
  mission cannot be guaranteed to be  secure  or  error-
  free. P6070214


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



newbie title attribute question

2008-03-28 Thread Andrew Broderick
Hi,

I want to put a title attribute in a td tag. However, my markup would then look 
like this:

td title=span wicket:id=title /  blah blah  /td

Now, I know I could output the td with a label and set escaping to false, 
thus passing the markup through to the browser. However, that would mean that 
everything inside it would also have to be in the label, and I want to keep 
markup out of my code. There must be a more elegant, Wicket-ish way to do this 


Thanks in advance

Andrew

___

The  information in this email or in any file attached
hereto is intended only for the personal and confiden-
tial  use  of  the individual or entity to which it is
addressed and may contain information that is  propri-
etary  and  confidential.  If you are not the intended
recipient of this message you are hereby notified that
any  review, dissemination, distribution or copying of
this message is strictly prohibited.  This  communica-
tion  is  for information purposes only and should not
be regarded as an offer to sell or as  a  solicitation
of an offer to buy any financial product. Email trans-
mission cannot be guaranteed to be  secure  or  error-
free. P6070214


RE: newbie title attribute question

2008-03-28 Thread Andrew Broderick
Thanks, but what does 'tag' in oncomponenttag(tag) refer to? My markup looks 
like this:

wicket:fragment wicket:id=dayEventsCell
td
strongspan wicket:id=event1 //strong
/td
/wicket:fragment

And the fragment class looks like this:

public class DayEventsCell extends Fragment
{
private Day day;
public DayEventsCell(String id, String markupId,
MarkupContainer container, Day day)
{
super(id, markupId, container);
this.day = day;
add(new Label(event1, day.getEvent()));
}
}

The td is where I want to set the title. Where would I put your line of code? 
Before the add(new(Label()  ?

Thanks

-Original Message-
From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
Sent: Friday, March 28, 2008 3:42 PM
To: users@wicket.apache.org
Subject: Re: newbie title attribute question

td wicket:id=td

add(new webmarkupcontainer(td) { oncomponenttag(tag) {
tag.getattributes().put(title,foo); }}

-igor


On Fri, Mar 28, 2008 at 1:14 PM, Andrew Broderick [EMAIL PROTECTED] wrote:
 Hi,

  I want to put a title attribute in a td tag. However, my markup would then 
 look like this:

  td title=span wicket:id=title /  blah blah  /td

  Now, I know I could output the td with a label and set escaping to false, 
 thus passing the markup through to the browser. However, that would mean that 
 everything inside it would also have to be in the label, and I want to keep 
 markup out of my code. There must be a more elegant, Wicket-ish way to do 
 this 

  Thanks in advance

  Andrew

  ___

  The  information in this email or in any file attached
  hereto is intended only for the personal and confiden-
  tial  use  of  the individual or entity to which it is
  addressed and may contain information that is  propri-
  etary  and  confidential.  If you are not the intended
  recipient of this message you are hereby notified that
  any  review, dissemination, distribution or copying of
  this message is strictly prohibited.  This  communica-
  tion  is  for information purposes only and should not
  be regarded as an offer to sell or as  a  solicitation
  of an offer to buy any financial product. Email trans-
  mission cannot be guaranteed to be  secure  or  error-
  free. P6070214


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



optional components in markup

2008-03-20 Thread Andrew Broderick
Hi,

Is there a way to mark a component in markup as optional, so it renders it if 
it's there, but leaves it out if not? Or, if I don't want a certain component 
to appear (decided by logic at runtime), do I just have to insert a 
placeholder component, such as an empty label?

Thanks

___

The  information in this email or in any file attached
hereto is intended only for the personal and confiden-
tial  use  of  the individual or entity to which it is
addressed and may contain information that is  propri-
etary  and  confidential.  If you are not the intended
recipient of this message you are hereby notified that
any  review, dissemination, distribution or copying of
this message is strictly prohibited.  This  communica-
tion  is  for information purposes only and should not
be regarded as an offer to sell or as  a  solicitation
of an offer to buy any financial product. Email trans-
mission cannot be guaranteed to be  secure  or  error-
free. P6070214


downloading Wicket examples

2008-03-13 Thread Andrew Broderick
Hi,

I found many useful Wicket examples at:

http://wicketstuff.org/wicket13/

You can browse the source code, but not all classes are there (e.g 
WicketExampleApplication). Where can I download jar or zip files of the sources 
for these examples?

Thanks

___

The  information in this email or in any file attached
hereto is intended only for the personal and confiden-
tial  use  of  the individual or entity to which it is
addressed and may contain information that is  propri-
etary  and  confidential.  If you are not the intended
recipient of this message you are hereby notified that
any  review, dissemination, distribution or copying of
this message is strictly prohibited.  This  communica-
tion  is  for information purposes only and should not
be regarded as an offer to sell or as  a  solicitation
of an offer to buy any financial product. Email trans-
mission cannot be guaranteed to be  secure  or  error-
free. P6070214


RE: downloading Wicket examples

2008-03-13 Thread Andrew Broderick
Not all of the examples on wicketstuff.org are in the distribution. Thanks 
anyway.

-Original Message-
From: Martijn Dashorst [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 13, 2008 9:48 AM
To: users@wicket.apache.org
Subject: Re: downloading Wicket examples

http://www.apache.org/dyn/closer.cgi/wicket/1.3.1

Download the distribution, read the readme, look in lib/ for wicket-examples.war

Martijn

On 3/13/08, Andrew Broderick [EMAIL PROTECTED] wrote:
 Hi,

  I found many useful Wicket examples at:

  http://wicketstuff.org/wicket13/

  You can browse the source code, but not all classes are there (e.g 
 WicketExampleApplication). Where can I download jar or zip files of the 
 sources for these examples?

  Thanks

  ___

  The  information in this email or in any file attached
  hereto is intended only for the personal and confiden-
  tial  use  of  the individual or entity to which it is
  addressed and may contain information that is  propri-
  etary  and  confidential.  If you are not the intended
  recipient of this message you are hereby notified that
  any  review, dissemination, distribution or copying of
  this message is strictly prohibited.  This  communica-
  tion  is  for information purposes only and should not
  be regarded as an offer to sell or as  a  solicitation
  of an offer to buy any financial product. Email trans-
  mission cannot be guaranteed to be  secure  or  error-
  free. P6070214



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

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



help with Signin2 example

2008-03-12 Thread Andrew Broderick
Hi,

I am new to Wicket, and trying to get the Signin2 (user authorization) example 
working.

I am using Wicket 1.3 and JBoss 4.5. The problem is that after I sign in, it 
doesn't redirect to the home page. It tries to redirect to 
http://localhost:8080/index.jsp (which is presumably just a default). How is 
the redirect mechanism supposed to work?

Thanks,

Andrew B



___

The  information in this email or in any file attached
hereto is intended only for the personal and confiden-
tial  use  of  the individual or entity to which it is
addressed and may contain information that is  propri-
etary  and  confidential.  If you are not the intended
recipient of this message you are hereby notified that
any  review, dissemination, distribution or copying of
this message is strictly prohibited.  This  communica-
tion  is  for information purposes only and should not
be regarded as an offer to sell or as  a  solicitation
of an offer to buy any financial product. Email trans-
mission cannot be guaranteed to be  secure  or  error-
free. P6070214


span wicket:id=mainNavigation/

2008-03-12 Thread Andrew Broderick
Hi,

The Signin2 example uses span wicket:id=mainNavigation/ in the page. This 
doesn't correspond to any components added by the page's Java class, and throws 
an error:


WicketMessage: Unable to find component with id 'mainNavigation' in [Page class 
= com.company.page.auth.SignIn, id = 0, version = 0]. This means that you 
declared wicket:id=mainNavigation in your markup, but that you either did not 
add the component to your page at all, or that the hierarchy does not match.

[markup = 
file:/C:/jboss-4.2.2.GA/server/default/deploy/optionsnews.war/WEB-INF/classes/com/company/page/auth/SignIn.html

The page's Java constructor just does the following:

add(new SignInPanel(signInPanel)
{
  public boolean signIn(String username, String password)
  {
return ((SignInSession) 
getSession()).authenticate(username,
password);
  }
});

Thanks in advance,

Andrew

___

The  information in this email or in any file attached
hereto is intended only for the personal and confiden-
tial  use  of  the individual or entity to which it is
addressed and may contain information that is  propri-
etary  and  confidential.  If you are not the intended
recipient of this message you are hereby notified that
any  review, dissemination, distribution or copying of
this message is strictly prohibited.  This  communica-
tion  is  for information purposes only and should not
be regarded as an offer to sell or as  a  solicitation
of an offer to buy any financial product. Email trans-
mission cannot be guaranteed to be  secure  or  error-
free. P6070214


RE: span wicket:id=mainNavigation/

2008-03-12 Thread Andrew Broderick
Yes, of course. So it does. That solves that problem. But, WicketExamplePage 
just seems to add a standard header that outputs the page name. So, omitting 
this should not cause the redirect from the signin page to the home page to 
fail, should it? (See my earlier message about problems with the Signin2 
example).

Thanks

-Original Message-
From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 12, 2008 1:51 PM
To: users@wicket.apache.org
Subject: Re: span wicket:id=mainNavigation/

i believe mainnavigation comes from WicketExamplePage which signin2
page extends...

-igor


On Wed, Mar 12, 2008 at 11:38 AM, Andrew Broderick [EMAIL PROTECTED] wrote:
 Hi,

  The Signin2 example uses span wicket:id=mainNavigation/ in the page. 
 This doesn't correspond to any components added by the page's Java class, and 
 throws an error:


  WicketMessage: Unable to find component with id 'mainNavigation' in [Page 
 class = com.company.page.auth.SignIn, id = 0, version = 0]. This means that 
 you declared wicket:id=mainNavigation in your markup, but that you either did 
 not add the component to your page at all, or that the hierarchy does not 
 match.

  [markup = 
 file:/C:/jboss-4.2.2.GA/server/default/deploy/optionsnews.war/WEB-INF/classes/com/company/page/auth/SignIn.html

  The page's Java constructor just does the following:

 add(new SignInPanel(signInPanel)
 {
   public boolean signIn(String username, String password)
   {
 return ((SignInSession) 
 getSession()).authenticate(username,
 password);
   }
 });

  Thanks in advance,

  Andrew

  ___

  The  information in this email or in any file attached
  hereto is intended only for the personal and confiden-
  tial  use  of  the individual or entity to which it is
  addressed and may contain information that is  propri-
  etary  and  confidential.  If you are not the intended
  recipient of this message you are hereby notified that
  any  review, dissemination, distribution or copying of
  this message is strictly prohibited.  This  communica-
  tion  is  for information purposes only and should not
  be regarded as an offer to sell or as  a  solicitation
  of an offer to buy any financial product. Email trans-
  mission cannot be guaranteed to be  secure  or  error-
  free. P6070214


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