Re: Convert a null Model to a custom string rather than ""

2009-01-27 Thread nate roe
ecial keyword for display. On Tue, Jan 27, 2009 at 11:46 AM, nate roe wrote: > Excellent, thanks for writing that one up! > > > On Tue, Jan 27, 2009 at 11:41 AM, Jeremy Thomerson < > jer...@wickettraining.com> wrote: > >> This has come up quite a bit here on the user list.

Re: Convert a null Model to a custom string rather than ""

2009-01-27 Thread nate roe
6/wicket-the-power-of-nested-models/ > > > -- > Jeremy Thomerson > http://www.wickettraining.com > > On Tue, Jan 27, 2009 at 1:38 PM, nate roe wrote: > > > I'm using Wicket v1.3.4. > > > > I would like to create a kind of TextField that converts a n

Convert a null Model to a custom string rather than ""

2009-01-27 Thread nate roe
ed to return "" when the model is null. Is there some way I can overcome this without modifying the Wicket source? Thanks, Nate Roe

Re: How to style Form feedback?

2008-10-21 Thread nate roe
Never mind. The answer is to use Component.setEscapeModelStrings(boolean). On Tue, Oct 21, 2008 at 4:02 PM, nate roe <[EMAIL PROTECTED]> wrote: > I have a Form with a FeedbackPanel. When there is a problem in a validator > (subclass of AbstractFormValidator), the validator

How to style Form feedback?

2008-10-21 Thread nate roe
bold). How can this be accomplished? Thanks, Nate Roe

Re: Session creation

2008-08-25 Thread nate roe
ctor (though if your application at some point does create a > session, someone will find out and there you are...), and improve > scalability—having no session means not having to distribute that data > across the cluster. > > Martijn > > On Sun, Aug 24, 2008 at 11:14 PM, nate roe

Re: Session creation

2008-08-24 Thread nate roe
The use of Session.bind() has resolved my problem. If I have a bookmarkable login page, then, I suppose I should bind the session before storing the user's data to the session? On Sat, Aug 23, 2008 at 9:15 PM, brian.diekelman <[EMAIL PROTECTED]> wrote: > > It depends on the situation and your log

Re: Session creation

2008-08-23 Thread nate roe
I would get errors or at least warnings in that case though, yes? On Sat, Aug 23, 2008 at 3:31 PM, brian.diekelman <[EMAIL PROTECTED]> wrote: > > Something I just saw... make sure Account implements java.io.Serializable > > If it doesn't the session won't be persisted, so it would try to re-create

Re: Session creation

2008-08-23 Thread nate roe
I've tried this with both IE and Firefox, both with cookies on and no exceptions, but it looks like my app is not writing a jsessionid cookie. Maybe I've misconfigured tomcat? On Sat, Aug 23, 2008 at 12:27 PM, brian.diekelman <[EMAIL PROTECTED]> wrote: > > > Are you running another server/service

Re: Session creation

2008-08-23 Thread nate roe
or any page that > requests it ([EMAIL PROTECTED]). don't you? you mean > newSession is called several times during the app's lifecycle? > > francisco > > > On Sat, Aug 23, 2008 at 7:48 PM, nate roe <[EMAIL PROTECTED]> wrote: >> I've created a new Wicket

Session creation

2008-08-23 Thread nate roe
I've created a new Wicket application following the session creation pattern illustrated in Wicket in Action, but for reasons not obvious to me, every web request returns an entirely new session. This is my application: public class MyApplication extends WebApplication { Logger logger = L

Re: YUI DatePicker: JavaScript errors if parent container is not visible

2008-07-29 Thread nate roe
ira issue > and attach a quickstart. > > -igor > > On Mon, Jul 28, 2008 at 4:32 PM, nate roe <[EMAIL PROTECTED]> wrote: >> I'm using Wicket 1.3.3. >> >> If I add a DatePicker to a DateTextField that I in turn add to a >> WebMarkupContainer, and that WebM

YUI DatePicker: JavaScript errors if parent container is not visible

2008-07-28 Thread nate roe
I'm using Wicket 1.3.3. If I add a DatePicker to a DateTextField that I in turn add to a WebMarkupContainer, and that WebMarkupContainer is hidden, a JavaScript error occurs. It looks like the header contributor for the DatePicker is still rendered to the page despite the fact that its markup is

Re: A question about cookie value loading

2008-06-30 Thread nate roe
hy the ListView has no children at this point, or how to make sure that it has children. On Wed, Jun 11, 2008 at 11:40 AM, Timo Rantalaiho <[EMAIL PROTECTED]> wrote: > On Wed, 11 Jun 2008, nate roe wrote: > > When exactly are ListView children created (or reused)? > > Use th

How can I override how a WebPage behaves in response to the Wicket-Ajax header?

2008-06-18 Thread nate roe
I'm using Wicket 1.2. I gather than Wicket Ajax JavaScript GETs add the header Wicket-Ajax: true Then the response includes the header: Ajax-Location: How does Wicket know to add the header? Is that in the JavaScript as I suspect? What is the header for? How does it work? If I use Wicke

Re: Directions for Stateless Ajax

2008-06-17 Thread nate roe
I've written a stateless auto-complete TextField by adapting Wicket's own JavaScript and using a servlet for the back end. I don't like the servlet and I would like to instead use Wicket to serve the auto-complete suggestions list, but I'm not sure how. It must take a GET param (the text to compl

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

Re: A question about cookie value loading

2008-06-10 Thread nate roe
<[EMAIL PROTECTED]> wrote: > Form.loadPersisitentFormComponentValues() > > -igor > > On Tue, Jun 10, 2008 at 4:23 PM, nate roe <[EMAIL PROTECTED]> wrote: > > I'm sorry, which method do you mean? > > > > On Tue, Jun 10, 2008 at 4:02 PM, Igor Va

Re: A question about cookie value loading

2008-06-10 Thread nate roe
I'm sorry, which method do you mean? On Tue, Jun 10, 2008 at 4:02 PM, Igor Vaynberg <[EMAIL PROTECTED]> wrote: > what calls that method? call hieararchy for it is empty in > eclipse...which is pretty strange... > > -igor > > On Tue, Jun 10, 2008 at 2:40 PM, nate

Re: A question about cookie value loading

2008-06-10 Thread nate roe
onents inside listview are visited. > > -igor > > On Tue, Jun 10, 2008 at 1:40 PM, nate roe <[EMAIL PROTECTED]> wrote: > > I believe it's because a ListView is not a FormComponent, and the Form > only > > visits its direct children. Does this sound plausible? How can

Re: A question about cookie value loading

2008-06-10 Thread nate roe
I believe it's because a ListView is not a FormComponent, and the Form only visits its direct children. Does this sound plausible? How can I work around this to cause a Form's ListView's children to also be visited? On Tue, Jun 10, 2008 at 1:37 PM, nate roe <[EMAIL PROTECTED

Re: A question about cookie value loading

2008-06-10 Thread nate roe
o roll your own solution for this usecase. > > -igor > > On Tue, Jun 10, 2008 at 12:00 PM, nate roe <[EMAIL PROTECTED]> wrote: > > Yes, I have. > > > > On Tue, Jun 10, 2008 at 11:48 AM, Timo Rantalaiho <[EMAIL PROTECTED] > > > > wrote: > > &

Re: A question about cookie value loading

2008-06-10 Thread nate roe
Yes, I have. On Tue, Jun 10, 2008 at 11:48 AM, Timo Rantalaiho <[EMAIL PROTECTED]> wrote: > On Tue, 10 Jun 2008, nate roe wrote: > > I have a form with several components. Some components are within a > > ListView. Cookie value persistence does not appear to be

Re: Stateless AutoComplete

2008-06-10 Thread nate roe
]> wrote: > On Thu, Jun 5, 2008 at 1:53 PM, nate roe <[EMAIL PROTECTED]> wrote: > > I'm using Wicket 1.2, and it appears that when a user's session times > out, > > my implementation of AbstractAutoCompleteTextRenderer stops working. I > > assume that when t

A question about cookie value loading

2008-06-10 Thread nate roe
I'm using Wicket 1.2. I have a form with several components. Some components are within a ListView. Cookie value persistence does not appear to be loading values for components in the ListView. I have a breakpoint in Form.loadPersistentFormComponentValues(...) at line 261: if (

Stateless AutoComplete

2008-06-05 Thread nate roe
I'm using Wicket 1.2, and it appears that when a user's session times out, my implementation of AbstractAutoCompleteTextRenderer stops working. I assume that when the session times out, the server returns errors and the partial page update fails. I would like to know if there is a good way to mak

Re: Formatting a DatePickerSettings

2008-05-22 Thread nate roe
To answer my own question, what's needed is to override DatePickerSettings.toScript(...) and specify "%y" where it specifies "%Y". On Thu, May 22, 2008 at 10:39 AM, nate roe <[EMAIL PROTECTED]> wrote: > > Hrm, I think that StyleDateConverter is new to W

Re: Formatting a DatePickerSettings

2008-05-22 Thread nate roe
Hope this helps! > > Regards, > Wen Tong-- > The only constant in life is change. > > > - Original Message > From: nate roe <[EMAIL PROTECTED]> > To: users@wicket.apache.org > Sent: Wednesday, May 21, 2008 3:38:00 PM > Subject: Formatting a DatePickerS

Formatting a DatePickerSettings

2008-05-21 Thread nate roe
I'm using Wicket 1.2, and WicketExtensions 1.2. I have a DateTextField that is formatted with the String, "MM/dd/yy" This field has a corresponding DatePickerSettings, but the DatePickerSettings doesn't follow this format (it adds dates with four-digit years, "MM/dd/".) How can I change this

Set request in WicketTester

2008-05-19 Thread nate roe
I'm using Wicket 1.2. I'm using WicketTester, but my Page requires certain request headers. What is the appropriate way to add headers to the MockHttpServletRequest (via addHeaders(...) I assume) before the Page is rendered? I tried: tester.getServletRequest().addHeader("host", "www.myho

Re: A question about IHeaderContributor

2008-05-14 Thread nate roe
Well I made a new behavior, extending AbstractBehavior implementing IHeaderContributor. I gave this behavior a reference to the Form that might have errors, and I added the behavior to the Page on which the Form lives. In this case, the behavior's renderHead(...) is called as expected. I'm not go

Re: A question about IHeaderContributor

2008-05-13 Thread nate roe
in 1.2 you can only use this interface for > behaviors. Am I right Matej/ others? Nate, can you try adding what you > want as a behavior to the form? > > Eelco > > On Tue, May 13, 2008 at 4:33 PM, nate roe <[EMAIL PROTECTED]> wrote: > > I'm using Wicket 1.2. > >

A question about IHeaderContributor

2008-05-13 Thread nate roe
I'm using Wicket 1.2. I have a Form that implements IHeaderContributor. My intent is to use renderHead(Response) to write some JavaScript to the response. The Form is added to the Page. However, renderHead(...) on my Form is never called. Am I using this interface incorrectly? Thanks, Nate

Re: How to implement hint text in a TextField?

2008-05-13 Thread nate roe
Is there a more elegant place that I've overlooked? Thanks, Nate On Fri, May 9, 2008 at 5:22 PM, nate roe <[EMAIL PROTECTED]> wrote: > > Oh, yeah I see IBehavior.rendered(Component) that is called when the > component has been rendered. > > Great, thanks a lot! > Nate

Re: How to implement hint text in a TextField?

2008-05-09 Thread nate roe
afterrender() ? > > somewhere so you can do > getcomponent().getresponse().write("..."); > > -igor > > > On Fri, May 9, 2008 at 5:02 PM, nate roe <[EMAIL PROTECTED]> wrote: > > In Component, do you mean? I see onRender(MarkupStream) .. do I need to > > find the

Re: How to implement hint text in a TextField?

2008-05-09 Thread nate roe
component and do it there > > -igor > > > On Fri, May 9, 2008 at 4:50 PM, nate roe <[EMAIL PROTECTED]> wrote: > > Hrm. The IHeaderResponse interface is new in 1.3 but for a little while > > longer I must use Wicket 1.2. How does one accomplish > > respons

Re: How to implement hint text in a TextField?

2008-05-09 Thread nate roe
ect()+"';e.style['color']='gray';"); > } > > oncomponenttag(tag) { > tag.put("onfocus", "if (this.value='"+hint.getobject()+"') { > this.value=''; this.style['color']='black;'}")

How to implement hint text in a TextField?

2008-05-09 Thread nate roe
How would one implement "hint text" on a text field in Wicket? By hint text I mean an empty TextField has greyed out text in it to indicate its purpose, and gets cleared onFocus?) Thanks, Nate Roe

Re: A question about partial form updates with AJAX

2008-05-08 Thread nate roe
t; On Thu, May 8, 2008 at 1:22 AM, nate roe <[EMAIL PROTECTED]> wrote: > > > I have a form with several items. About half of the form is wrapped in a > > named div attached to a WebMarkupContainer. When a drop-down value > > changes, > > the div is updated

A question about partial form updates with AJAX

2008-05-07 Thread nate roe
ge is refreshed.) How can I prevent a form reset? Thanks, Nate Roe

Re: How to show a bottom-of-the-page feedback panel?

2008-05-02 Thread nate roe
esponse r) { >if (form.hasError()) { >r.renderOnLoadJavascript("location.hash='YOUR-ANCHOR'"); > } >} > > } > > On Thu, May 1, 2008 at 4:08 PM, nate roe <[EMAIL PROTECTED]> wrote: > > > If I have a feedback p

How to show a bottom-of-the-page feedback panel?

2008-05-01 Thread nate roe
? Thanks, Nate Roe