RE: Hiding table columns in DataViews?

2008-07-14 Thread Michael Mehrle
Okay, I get it - and now I really feel thick - LOL. I was so focused on 
'removing' columns that the concept of not adding them in the first place 
eluded me. The only issue I see is that it's the dataprovider that knows about 
certain data not present. But I think I can address that since it's an inner 
class - probably just set some Boolean. There is no way to disable/remove a 
column if there is no data to be shown?

Thanks,

Michael

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ryan Gravener
Sent: Monday, July 14, 2008 11:52 AM
To: users@wicket.apache.org
Subject: Re: Hiding table columns in DataViews?

Here is the source for adding columns to a table:

   List columns = new ArrayList();

columns.add(new AbstractColumn(new Model("Actions"))
{
public void populateItem(Item cellItem, String componentId,
IModel model)
{
cellItem.add(new ActionPanel(componentId, model));
}
});

columns.add(new PropertyColumn(new Model("ID"), "id")
{
@Override
public String getCssClass()
{
return "numeric";
}
});

columns.add(new PropertyColumn(new Model("First Name"), "firstName",
 "firstName"));

columns.add(new PropertyColumn(new Model("Last Name"), "lastName",
"lastName")
{
@Override
public String getCssClass()
{
return "last-name";
}
});

columns.add(new PropertyColumn(new Model("Home Phone"), "homePhone"
));
columns.add(new PropertyColumn(new Model("Cell Phone"), "cellPhone"
));


You can see that in order to add a column or hide one you would just add it
or omit adding it to the list.  So if I did not want to show Cell Phone, I
would simply not add the PropertyColum(new Model("Cell Phone"), "cellPhone")
to columns.


On Mon, Jul 14, 2008 at 2:31 PM, Michael Mehrle <[EMAIL PROTECTED]>
wrote:

> Not to be thick, but where does this show me how to hide table headers? All
> I see is a regular DataTable example.
>
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ryan
> Gravener
> Sent: Monday, July 14, 2008 11:28 AM
> To: users@wicket.apache.org
> Subject: Re: Hiding table columns in DataViews?
>
>
> http://wicketstuff.org/wicket13/repeater/?wicket:bookmarkablePage=:org.apache.wicket.examples.repeater.DataTablePage
>
> via
>
> http://www.google.com/search?q=wicket+datatable+example
>
>
> On Mon, Jul 14, 2008 at 1:26 PM, Michael Mehrle <[EMAIL PROTECTED]>
> wrote:
>
> > Okay, and look at exactly what? A simple example or URL to an example
> > would have helped...
> >
> > -Original Message-
> > From: Martijn Dashorst [mailto:[EMAIL PROTECTED]
> > Sent: Saturday, July 12, 2008 12:04 AM
> > To: users@wicket.apache.org
> > Subject: Re: Hiding table columns in DataViews?
> >
> > See DataTable and friends.
> >
> > Martijn
> >
> > On Sat, Jul 12, 2008 at 4:19 AM, Michael Mehrle <[EMAIL PROTECTED]>
> > wrote:
> > > I build a table like this:
> > >
> > >
> > >
> > > 
> > >
> > > 
> > >
> > > > > key="dateTitle"/>
> > >
> > > > > key="timeTitle"/>
> > >
> > > > > key="statusTitle"/>
> > >
> > > 
> > >
> > >
> > >
> > >
> > >
> > >[Date]
> > >
> > > > > class="grytop">[Time]
> > >
> > > > > class="grytop">[Status]
> > >
> > > > > class="guestlink"> 
> > >
> > >
> > >
> > > 
> > >
> > >
> > >
> > > Now, there are certain columns I need to hide in certain
> > circumstances.
> > > I have no problem hiding the 'content' of certain columns by setting
> > the
> > > particular value to empty in my dataprovider. However, I would like to
> > > hide the entire column including the header  - how can that be done?
> > >
> > >
> > >
> > > Thanks!
> > >
> > >
> > >
> > > Michael
> > >
> > >
> >
> >
> >
> > --
> > Become a Wicket expert, learn from the best: http://wicketinaction.com
> > Apache Wicket 1.3.4 is released
> > Get it now: http://www.apache.org/dyn/closer.cgi/wicket/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]
> >
> >
>
>
> --
> Ryan Gravener
> http://twitter.com/ryangravener
>



-- 
Ryan Gravener
http://twitter.com/ryangravener


RE: Hiding table columns in DataViews?

2008-07-14 Thread Michael Mehrle
Not to be thick, but where does this show me how to hide table headers? All I 
see is a regular DataTable example.


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ryan Gravener
Sent: Monday, July 14, 2008 11:28 AM
To: users@wicket.apache.org
Subject: Re: Hiding table columns in DataViews?

http://wicketstuff.org/wicket13/repeater/?wicket:bookmarkablePage=:org.apache.wicket.examples.repeater.DataTablePage

via

http://www.google.com/search?q=wicket+datatable+example


On Mon, Jul 14, 2008 at 1:26 PM, Michael Mehrle <[EMAIL PROTECTED]>
wrote:

> Okay, and look at exactly what? A simple example or URL to an example
> would have helped...
>
> -Original Message-
> From: Martijn Dashorst [mailto:[EMAIL PROTECTED]
> Sent: Saturday, July 12, 2008 12:04 AM
> To: users@wicket.apache.org
> Subject: Re: Hiding table columns in DataViews?
>
> See DataTable and friends.
>
> Martijn
>
> On Sat, Jul 12, 2008 at 4:19 AM, Michael Mehrle <[EMAIL PROTECTED]>
> wrote:
> > I build a table like this:
> >
> >
> >
> > 
> >
> > 
> >
> > > key="dateTitle"/>
> >
> > > key="timeTitle"/>
> >
> > > key="statusTitle"/>
> >
> > 
> >
> >
> >
> >
> >
> >[Date]
> >
> > > class="grytop">[Time]
> >
> > > class="grytop">[Status]
> >
> > > class="guestlink"> 
> >
> >
> >
> > 
> >
> >
> >
> > Now, there are certain columns I need to hide in certain
> circumstances.
> > I have no problem hiding the 'content' of certain columns by setting
> the
> > particular value to empty in my dataprovider. However, I would like to
> > hide the entire column including the header  - how can that be done?
> >
> >
> >
> > Thanks!
> >
> >
> >
> > Michael
> >
> >
>
>
>
> --
> Become a Wicket expert, learn from the best: http://wicketinaction.com
> Apache Wicket 1.3.4 is released
> Get it now: http://www.apache.org/dyn/closer.cgi/wicket/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]
>
>


-- 
Ryan Gravener
http://twitter.com/ryangravener


RE: Non breaking spaces in ListView

2008-07-14 Thread Michael Mehrle
Thanks a bunch, Igor :-)

-Original Message-
From: Igor Vaynberg [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 14, 2008 11:09 AM
To: users@wicket.apache.org
Subject: Re: Non breaking spaces in ListView

label.setescapemodelstrings(false) if you are returning " " from
the model string

-igor

On Mon, Jul 14, 2008 at 11:04 AM, Michael Mehrle
<[EMAIL PROTECTED]> wrote:
> I have a ListView which I have populate a table. Now, some columns are
> sometimes empty and I'm trying to set the Label that occupies it with
an
> non-breaking space ( ). However, for some reason the Label prints
> it verbose . If I set the Label to empty the column gets skipped
> altogether, messing up my table's formatting. How do I avoid those
> columns to be skipped?
>
>
>
> Thanks in advance...
>
>
>
> Michael
>
>

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



Non breaking spaces in ListView

2008-07-14 Thread Michael Mehrle
I have a ListView which I have populate a table. Now, some columns are
sometimes empty and I'm trying to set the Label that occupies it with an
non-breaking space ( ). However, for some reason the Label prints
it verbose . If I set the Label to empty the column gets skipped
altogether, messing up my table's formatting. How do I avoid those
columns to be skipped?

 

Thanks in advance...

 

Michael



RE: Hiding table columns in DataViews?

2008-07-14 Thread Michael Mehrle
Okay, and look at exactly what? A simple example or URL to an example
would have helped...

-Original Message-
From: Martijn Dashorst [mailto:[EMAIL PROTECTED] 
Sent: Saturday, July 12, 2008 12:04 AM
To: users@wicket.apache.org
Subject: Re: Hiding table columns in DataViews?

See DataTable and friends.

Martijn

On Sat, Jul 12, 2008 at 4:19 AM, Michael Mehrle <[EMAIL PROTECTED]>
wrote:
> I build a table like this:
>
>
>
> 
>
> 
>
> key="dateTitle"/>
>
> key="timeTitle"/>
>
> key="statusTitle"/>
>
> 
>
>
>
>
>
>[Date]
>
> class="grytop">[Time]
>
> class="grytop">[Status]
>
> class="guestlink"> 
>
>
>
> 
>
>
>
> Now, there are certain columns I need to hide in certain
circumstances.
> I have no problem hiding the 'content' of certain columns by setting
the
> particular value to empty in my dataprovider. However, I would like to
> hide the entire column including the header  - how can that be done?
>
>
>
> Thanks!
>
>
>
> Michael
>
>



-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.4 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/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]



Hiding table columns in DataViews?

2008-07-11 Thread Michael Mehrle
I build a table like this:

 











 





[Date]

[Time]

[Status]

 





 

Now, there are certain columns I need to hide in certain circumstances.
I have no problem hiding the 'content' of certain columns by setting the
particular value to empty in my dataprovider. However, I would like to
hide the entire column including the header  - how can that be done?

 

Thanks!

 

Michael



RE: Enabling compoents based on Wicket URI path?

2008-07-03 Thread Michael Mehrle
Last night I figured this out:

final WebRequestCycle cycle = (WebRequestCycle)RequestCycle.get();
final IRequestTarget target = cycle.getRequestTarget();
String path = urlFor(target).toString(); 

Your way is better.

Igor saves the day again - thanks a lot mate.

Michael

-Original Message-
From: Igor Vaynberg [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 03, 2008 7:32 AM
To: users@wicket.apache.org
Cc: [EMAIL PROTECTED]
Subject: Re: Enabling compoents based on Wicket URI path?

((webrequest)getrequest()).gethttpservletrequest().getrequesturi()

-igor

On Thu, Jul 3, 2008 at 7:13 AM, Michael Mehrle <[EMAIL PROTECTED]>
wrote:
> Not to come across snide but of course I know how to set a component
to
> invisible. I need to know how to get the current page URL/URI as the
> page loads - remember that the navigator is only a panel and can be
> inside of many pages. Is this more clear?
>
> Thanks for trying to help.
>
> Michael
>
> -Original Message-
> From: David Leangen [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, July 02, 2008 6:14 PM
> To: users@wicket.apache.org
> Subject: RE: Enabling compoents based on Wicket URI path?
>
>
>> A little bit confused... perhaps I or you misunderstood. I'm using a
>> textfield in the 'navigator' section of my site. So, if a particular
> URL
>> is being accessed (.../foo or .../bar) then I want to hide the
>> textfield. Otherwise the navigator shows the textfield. Does that
make
>> more sense?
>
> In any case, the way you would show/hide any component is by
overriding
> the isVisible method:
>
> @Override public boolean isVisible()
> {
>// do your test here
> }
>
> So you need some way of testing this. The way to do that is using
> PageParameters with one of the IndexedCodingStrategies.
>
> Make more sense? Or do you need more info?
>
>
> Cheers,
> David
>
>
>
>
> -
> 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: Enabling compoents based on Wicket URI path?

2008-07-03 Thread Michael Mehrle
Not to come across snide but of course I know how to set a component to
invisible. I need to know how to get the current page URL/URI as the
page loads - remember that the navigator is only a panel and can be
inside of many pages. Is this more clear?

Thanks for trying to help.

Michael

-Original Message-
From: David Leangen [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 02, 2008 6:14 PM
To: users@wicket.apache.org
Subject: RE: Enabling compoents based on Wicket URI path?


> A little bit confused... perhaps I or you misunderstood. I'm using a
> textfield in the 'navigator' section of my site. So, if a particular
URL
> is being accessed (.../foo or .../bar) then I want to hide the
> textfield. Otherwise the navigator shows the textfield. Does that make
> more sense?

In any case, the way you would show/hide any component is by overriding
the isVisible method:

@Override public boolean isVisible()
{
// do your test here
}

So you need some way of testing this. The way to do that is using
PageParameters with one of the IndexedCodingStrategies.

Make more sense? Or do you need more info?


Cheers,
David




-
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: Enabling compoents based on Wicket URI path?

2008-07-02 Thread Michael Mehrle
A little bit confused... perhaps I or you misunderstood. I'm using a
textfield in the 'navigator' section of my site. So, if a particular URL
is being accessed (.../foo or .../bar) then I want to hide the
textfield. Otherwise the navigator shows the textfield. Does that make
more sense?

Michael

-Original Message-
From: David Leangen [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 02, 2008 5:41 PM
To: users@wicket.apache.org
Subject: Re: Enabling compoents based on Wicket URI path?


So essentially, you need some variable to hold state and based on the
value of that variable, you show or hide a component, right?

Just use an IndexedParamCodingStrategy.

Does that make sense, or do you need more details?



On Wed, 2008-07-02 at 11:12 -0700, Michael Mehrle wrote:
> I need to hide a textfield based on the URI path of the page that's
> being visited. For instance:
> 
>  
> 
> http://www.mysite.com/app/foo (hide the field)
> 
> http://www.mysite.com/app/bar (hide the field)
> 
>  
> 
> http://www.mysite.com/app/* (any other path, show the field).
> 
>  
> 
> I don't want to use the HTTP URI var since I would have to change that
> everytime I change wicket URI paths. What approach would you guys
> suggest?
> 
>  
> 
> Thanks,
> 
>  
> 
> Michael
> 


-
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: Enabling compoents based on Wicket URI path?

2008-07-02 Thread Michael Mehrle
Anybody? I couldn't find anything digging around in the archives...

-Original Message-
From: Michael Mehrle [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 02, 2008 11:13 AM
To: users@wicket.apache.org
Subject: Enabling compoents based on Wicket URI path?

I need to hide a textfield based on the URI path of the page that's
being visited. For instance:

 

http://www.mysite.com/app/foo (hide the field)

http://www.mysite.com/app/bar (hide the field)

 

http://www.mysite.com/app/* (any other path, show the field).

 

I don't want to use the HTTP URI var since I would have to change that
everytime I change wicket URI paths. What approach would you guys
suggest?

 

Thanks,

 

Michael


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



Enabling compoents based on Wicket URI path?

2008-07-02 Thread Michael Mehrle
I need to hide a textfield based on the URI path of the page that's
being visited. For instance:

 

http://www.mysite.com/app/foo (hide the field)

http://www.mysite.com/app/bar (hide the field)

 

http://www.mysite.com/app/* (any other path, show the field).

 

I don't want to use the HTTP URI var since I would have to change that
everytime I change wicket URI paths. What approach would you guys
suggest?

 

Thanks,

 

Michael



RE: Multipart form throws exception

2008-06-25 Thread Michael Mehrle
Yes, I knew that - the response type was wrong. Problem was figuring out
which JSON response type would work on all three browsers. We finally
fixed it by setting it to text/plain - we previously had it set to
text/javascript which for some reason worked fine for a while. BTW,
text/html is what we started out with back when and that one never
worked.

It's possible that something has changed in the default mime settings on
the server - probably wasn't wicket that broke that.

Thanks for trying to help though...

Cheers,

Michael

-Original Message-
From: Igor Vaynberg [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 25, 2008 4:09 PM
To: users@wicket.apache.org
Subject: Re: Multipart form throws exception

that is because this is a response to a regular request. i do not see
how that could have ever worked. you cant just write text/javascript
into the browser and expect it to do anything, that is the same as
putting foo.com/bar.js link in the address bar, what happens? you just
view the file.

what you need to do is set the response as text/html and spit out html
that in body onload executes some javascript.

-igor

On Wed, Jun 25, 2008 at 3:02 PM, Michael Mehrle <[EMAIL PROTECTED]>
wrote:
> Yes, that's true - it IS using a dynamic iFrame. Again, the
*submition*
> process works just fine and I get the data on the backend. What's
> causing the problem is the data being returned and the IE/Safari for
> some reason not liking 'text/javascript' as a content type anymore.
> Something has changed from 1.3.2 to 1.3.3-SNAPSHOT that causes this.
>
> Michael
>
> -Original Message-
> From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, June 25, 2008 2:10 PM
> To: users@wicket.apache.org
> Subject: Re: Multipart form throws exception
>
> doesnt jquery use an iframe? so it is not submitted via ajax...
>
> -igor
>
> On Wed, Jun 25, 2008 at 1:27 PM, Michael Mehrle
<[EMAIL PROTECTED]>
> wrote:
>> Yeah, remember I build it around jQuery according to that link you
> sent
>> me - not using Wicket for the upload only for bouncing back the
>> response.
>>
>> Thing is that this worked until 1.3.2 and somehow since updating to
>> 1.3.3 it's broken again. The issue seems to be the content type - had
> it
>> working with 'text/javascript' on all three browsers but now it
won't.
>>
>> M.
>>
>> -Original Message-
>> From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
>> Sent: Wednesday, June 25, 2008 1:22 PM
>> To: users@wicket.apache.org
>> Subject: Re: Multipart form throws exception
>>
>> are you submitting the form via ajax?
>>
>> -igor
>>
>> On Wed, Jun 25, 2008 at 12:09 PM, Michael Mehrle
>> <[EMAIL PROTECTED]> wrote:
>>> Just ran into the exception again:
>>>
>>> java.lang.IllegalStateException: ServletRequest does not contain
>>> multipart content
>>>at
>>>
>>
>
org.apache.wicket.protocol.http.servlet.MultipartServletWebRequest.>>>(MultipartServletWebRequest.java:90)
>>>at
>>>
>>
>
com.evite.event.web.create.MainImageUpload.receiveUpload(MainImageUpload
>>> .java:66)
>>>at
>>>
>>
>
com.evite.event.web.create.MainImageUpload.(MainImageUpload.java:3
>>> 8)
>>>
>>>
>>> Sorry, I meant to say 'request'
>>>
>>> MainImageUpload is what the file uploader points to.
>>>
>>> Michael
>>>
>>> -Original Message-
>>> From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
>>> Sent: Wednesday, June 25, 2008 11:34 AM
>>> To: users@wicket.apache.org
>>> Subject: Re: Multipart form throws exception
>>>
>>> response not being multipart? wasnt aware there was such a thing...
>>>
>>> -igor
>>>
>>> On Wed, Jun 25, 2008 at 11:24 AM, Michael Mehrle
>>> <[EMAIL PROTECTED]> wrote:
>>>> I'm on Wicket 1.3.3 and am experiencing problems with multipart
>>> content
>>>> on Safari and IE. The backend page receiving the image processes it
>>> just
>>>> fine and returns a response like this:
>>>>
>>>>
>>>>
>>>> RequestCycle.get().setRequestTarget(new IRequestTarget() {
>>>>
>>>>public void detach(RequestCycle
>>>> requestCycle) {
>>>>
>>>>}
>>>>
>>>>public void respond(RequestCycle
>>>> re

RE: Multipart form throws exception

2008-06-25 Thread Michael Mehrle
Yes, that's true - it IS using a dynamic iFrame. Again, the *submition*
process works just fine and I get the data on the backend. What's
causing the problem is the data being returned and the IE/Safari for
some reason not liking 'text/javascript' as a content type anymore.
Something has changed from 1.3.2 to 1.3.3-SNAPSHOT that causes this.

Michael

-Original Message-
From: Igor Vaynberg [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 25, 2008 2:10 PM
To: users@wicket.apache.org
Subject: Re: Multipart form throws exception

doesnt jquery use an iframe? so it is not submitted via ajax...

-igor

On Wed, Jun 25, 2008 at 1:27 PM, Michael Mehrle <[EMAIL PROTECTED]>
wrote:
> Yeah, remember I build it around jQuery according to that link you
sent
> me - not using Wicket for the upload only for bouncing back the
> response.
>
> Thing is that this worked until 1.3.2 and somehow since updating to
> 1.3.3 it's broken again. The issue seems to be the content type - had
it
> working with 'text/javascript' on all three browsers but now it won't.
>
> M.
>
> -Original Message-
> From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, June 25, 2008 1:22 PM
> To: users@wicket.apache.org
> Subject: Re: Multipart form throws exception
>
> are you submitting the form via ajax?
>
> -igor
>
> On Wed, Jun 25, 2008 at 12:09 PM, Michael Mehrle
> <[EMAIL PROTECTED]> wrote:
>> Just ran into the exception again:
>>
>> java.lang.IllegalStateException: ServletRequest does not contain
>> multipart content
>>at
>>
>
org.apache.wicket.protocol.http.servlet.MultipartServletWebRequest.>>(MultipartServletWebRequest.java:90)
>>at
>>
>
com.evite.event.web.create.MainImageUpload.receiveUpload(MainImageUpload
>> .java:66)
>>at
>>
>
com.evite.event.web.create.MainImageUpload.(MainImageUpload.java:3
>> 8)
>>
>>
>> Sorry, I meant to say 'request'
>>
>> MainImageUpload is what the file uploader points to.
>>
>> Michael
>>
>> -Original Message-
>> From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
>> Sent: Wednesday, June 25, 2008 11:34 AM
>> To: users@wicket.apache.org
>> Subject: Re: Multipart form throws exception
>>
>> response not being multipart? wasnt aware there was such a thing...
>>
>> -igor
>>
>> On Wed, Jun 25, 2008 at 11:24 AM, Michael Mehrle
>> <[EMAIL PROTECTED]> wrote:
>>> I'm on Wicket 1.3.3 and am experiencing problems with multipart
>> content
>>> on Safari and IE. The backend page receiving the image processes it
>> just
>>> fine and returns a response like this:
>>>
>>>
>>>
>>> RequestCycle.get().setRequestTarget(new IRequestTarget() {
>>>
>>>public void detach(RequestCycle
>>> requestCycle) {
>>>
>>>}
>>>
>>>public void respond(RequestCycle
>>> requestCycle) {
>>>
>>>// formulate the JSON
>>> response
>>>
>>>StringBuffer response
> =
>>> new StringBuffer("{\n");
>>>
>>>if (StringUtils.isNotEmpty(error)) {
>>>
>>>response.append("\"error\":
>>> \"").append(getString(error)).append("\"");
>>>
>>>} else {
>>>
>>>response.append("\"msg\":
>>>
>>
>
\"").append(getString("successfulFileUploadNotification")).append("\",\n
>>> ");
>>>
>>>response.append("\"photoId\":
>>> \"").append(photo.getId()).append("\",\n");
>>>
>>>response.append("\"uri\":
>>> \"").append(photoService.getPhotoSrc(photo)).append("\"");
>>>
>>>}
>>>
>>>response.append("\n}");
>>>
>>>Response rep =
>>> requestCycle.getResponse();
>>>
>>>
>>> rep.setContentType("text/javascript");
>>>
>>>rep.write(response);
>>>
>>>}
>>>
>>> 

RE: Multipart form throws exception

2008-06-25 Thread Michael Mehrle
Yeah, remember I build it around jQuery according to that link you sent
me - not using Wicket for the upload only for bouncing back the
response.

Thing is that this worked until 1.3.2 and somehow since updating to
1.3.3 it's broken again. The issue seems to be the content type - had it
working with 'text/javascript' on all three browsers but now it won't.

M.

-Original Message-
From: Igor Vaynberg [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 25, 2008 1:22 PM
To: users@wicket.apache.org
Subject: Re: Multipart form throws exception

are you submitting the form via ajax?

-igor

On Wed, Jun 25, 2008 at 12:09 PM, Michael Mehrle
<[EMAIL PROTECTED]> wrote:
> Just ran into the exception again:
>
> java.lang.IllegalStateException: ServletRequest does not contain
> multipart content
>at
>
org.apache.wicket.protocol.http.servlet.MultipartServletWebRequest.>(MultipartServletWebRequest.java:90)
>at
>
com.evite.event.web.create.MainImageUpload.receiveUpload(MainImageUpload
> .java:66)
>at
>
com.evite.event.web.create.MainImageUpload.(MainImageUpload.java:3
> 8)
>
>
> Sorry, I meant to say 'request'
>
> MainImageUpload is what the file uploader points to.
>
> Michael
>
> -Original Message-
> From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, June 25, 2008 11:34 AM
> To: users@wicket.apache.org
> Subject: Re: Multipart form throws exception
>
> response not being multipart? wasnt aware there was such a thing...
>
> -igor
>
> On Wed, Jun 25, 2008 at 11:24 AM, Michael Mehrle
> <[EMAIL PROTECTED]> wrote:
>> I'm on Wicket 1.3.3 and am experiencing problems with multipart
> content
>> on Safari and IE. The backend page receiving the image processes it
> just
>> fine and returns a response like this:
>>
>>
>>
>> RequestCycle.get().setRequestTarget(new IRequestTarget() {
>>
>>public void detach(RequestCycle
>> requestCycle) {
>>
>>}
>>
>>public void respond(RequestCycle
>> requestCycle) {
>>
>>// formulate the JSON
>> response
>>
>>StringBuffer response
=
>> new StringBuffer("{\n");
>>
>>if (StringUtils.isNotEmpty(error)) {
>>
>>response.append("\"error\":
>> \"").append(getString(error)).append("\"");
>>
>>} else {
>>
>>response.append("\"msg\":
>>
>
\"").append(getString("successfulFileUploadNotification")).append("\",\n
>> ");
>>
>>response.append("\"photoId\":
>> \"").append(photo.getId()).append("\",\n");
>>
>>response.append("\"uri\":
>> \"").append(photoService.getPhotoSrc(photo)).append("\"");
>>
>>}
>>
>>response.append("\n}");
>>
>>Response rep =
>> requestCycle.getResponse();
>>
>>
>> rep.setContentType("text/javascript");
>>
>>rep.write(response);
>>
>>}
>>
>>});
>>
>>
>>
>> As you can see I'm bouncing a JSON response back, which is received
> and
>> handled on my front end. It works in Firefox but fails in Safari and
> IE
>> with an error message which I would love to post but I'm not getting
>> every time. I do remember however that it complained about the
> response
>> not being 'multipart'.
>>
>>
>>
>> There is a similar bug report that was posted a while ago and claimed
>> this to be fixed in 1.3.3.
>>
>>
>>
>>
>
http://www.nabble.com/Multipart-form-with-nested-ajaxform-throws-excepti
>> on-in-1.3.1-td15975693.html
>>
>>
>>
>> Any suggestions would be welcome.
>>
>>
>>
>> Thanks!
>>
>>
>>
>> Michael
>>
>>
>
> -
> 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: Multipart form throws exception

2008-06-25 Thread Michael Mehrle
Just ran into the exception again:

java.lang.IllegalStateException: ServletRequest does not contain
multipart content
at
org.apache.wicket.protocol.http.servlet.MultipartServletWebRequest.(MultipartServletWebRequest.java:90)
at
com.evite.event.web.create.MainImageUpload.receiveUpload(MainImageUpload
.java:66)
at
com.evite.event.web.create.MainImageUpload.(MainImageUpload.java:3
8)


Sorry, I meant to say 'request'

MainImageUpload is what the file uploader points to.

Michael

-Original Message-
From: Igor Vaynberg [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 25, 2008 11:34 AM
To: users@wicket.apache.org
Subject: Re: Multipart form throws exception

response not being multipart? wasnt aware there was such a thing...

-igor

On Wed, Jun 25, 2008 at 11:24 AM, Michael Mehrle
<[EMAIL PROTECTED]> wrote:
> I'm on Wicket 1.3.3 and am experiencing problems with multipart
content
> on Safari and IE. The backend page receiving the image processes it
just
> fine and returns a response like this:
>
>
>
> RequestCycle.get().setRequestTarget(new IRequestTarget() {
>
>public void detach(RequestCycle
> requestCycle) {
>
>}
>
>public void respond(RequestCycle
> requestCycle) {
>
>// formulate the JSON
> response
>
>StringBuffer response =
> new StringBuffer("{\n");
>
>if (StringUtils.isNotEmpty(error)) {
>
>response.append("\"error\":
> \"").append(getString(error)).append("\"");
>
>} else {
>
>response.append("\"msg\":
>
\"").append(getString("successfulFileUploadNotification")).append("\",\n
> ");
>
>response.append("\"photoId\":
> \"").append(photo.getId()).append("\",\n");
>
>response.append("\"uri\":
> \"").append(photoService.getPhotoSrc(photo)).append("\"");
>
>}
>
>response.append("\n}");
>
>Response rep =
> requestCycle.getResponse();
>
>
> rep.setContentType("text/javascript");
>
>rep.write(response);
>
>}
>
>});
>
>
>
> As you can see I'm bouncing a JSON response back, which is received
and
> handled on my front end. It works in Firefox but fails in Safari and
IE
> with an error message which I would love to post but I'm not getting
> every time. I do remember however that it complained about the
response
> not being 'multipart'.
>
>
>
> There is a similar bug report that was posted a while ago and claimed
> this to be fixed in 1.3.3.
>
>
>
>
http://www.nabble.com/Multipart-form-with-nested-ajaxform-throws-excepti
> on-in-1.3.1-td15975693.html
>
>
>
> Any suggestions would be welcome.
>
>
>
> Thanks!
>
>
>
> Michael
>
>

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



Multipart form throws exception

2008-06-25 Thread Michael Mehrle
I'm on Wicket 1.3.3 and am experiencing problems with multipart content
on Safari and IE. The backend page receiving the image processes it just
fine and returns a response like this:

 

RequestCycle.get().setRequestTarget(new IRequestTarget() {

public void detach(RequestCycle
requestCycle) {

}

public void respond(RequestCycle
requestCycle) {

// formulate the JSON
response 

StringBuffer response =
new StringBuffer("{\n");

if (StringUtils.isNotEmpty(error)) {

response.append("\"error\":
\"").append(getString(error)).append("\"");

} else {

response.append("\"msg\":
\"").append(getString("successfulFileUploadNotification")).append("\",\n
");

response.append("\"photoId\":
\"").append(photo.getId()).append("\",\n");

response.append("\"uri\":
\"").append(photoService.getPhotoSrc(photo)).append("\"");

}

response.append("\n}");

Response rep =
requestCycle.getResponse();

 
rep.setContentType("text/javascript");

rep.write(response);

}

});

 

As you can see I'm bouncing a JSON response back, which is received and
handled on my front end. It works in Firefox but fails in Safari and IE
with an error message which I would love to post but I'm not getting
every time. I do remember however that it complained about the response
not being 'multipart'.

 

There is a similar bug report that was posted a while ago and claimed
this to be fixed in 1.3.3.

 

http://www.nabble.com/Multipart-form-with-nested-ajaxform-throws-excepti
on-in-1.3.1-td15975693.html

 

Any suggestions would be welcome.

 

Thanks!

 

Michael



RE: Grabbing a form component's input before the form has been submitted

2008-06-19 Thread Michael Mehrle
Okay, I fixed it - by accident I realized that the field started
populating AFTER I first entered some erroneous data, and then a real
date. Changing the JS even from BLUR to CHANGE fixed the issue. It was
simply an event based timing problem. Works like a charm now.

Thanks for the help, Igor - the onError() method implicitly lead to
finding the solution :-)

Cheers,

Michael

-Original Message-
From: Michael Mehrle [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 19, 2008 10:36 AM
To: users@wicket.apache.org
Subject: RE: Grabbing a form component's input before the form has been
submitted

I tried that - the onUpdate() method is being called as soon as the
field is being populated with a date. The onError() method is being
called as well when invalid input is entered (e.g. 'foo').

This must be something simple - I mean grabbing a field's input is the
underlying mechanism allowing AJAX in the first place.

Michael

-Original Message-
From: Igor Vaynberg [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 18, 2008 10:28 PM
To: users@wicket.apache.org
Subject: Re: Grabbing a form component's input before the form has been
submitted

are you sure the field validates? override onerror() in the ajax
behavior and set a break point there.

-igor

On Wed, Jun 18, 2008 at 6:30 PM, Michael Mehrle <[EMAIL PROTECTED]>
wrote:
> I wonder what difference it makes what 'link' I'm using. The more
> interesting code is this:
>
> dateField.add(new
AjaxFormComponentUpdatingBehavior(JavaScriptUtil.BLUR)
> {
>@Override
>protected void onUpdate(AjaxRequestTarget
> target) {
>LOG.debug("Date Input: {}",
> dateField.getInput());
>LOG.debug("Date Model: {}",
> dateField.getModelObject());
>}
>
>});
>
> Although there is a behavior attached to the text field it still logs
> null for both the input and the model. Don't understand why this isn't
> being updated.
>
> Thanks,
>
> Michael
>
> -Original Message-
> From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, June 18, 2008 5:45 PM
> To: users@wicket.apache.org
> Subject: Re: Grabbing a form component's input before the form has
been
> submitted
>
> if you would have actually pasted your code someone would have been
> able to help you a long time ago...
>
> i dont know what kind of link you are using to launch the modal
>
> or how you are launching the modal
>
> etc
>
>
> -igor
>
> On Wed, Jun 18, 2008 at 5:17 PM, Michael Mehrle
<[EMAIL PROTECTED]>
> wrote:
>> Added that listener and my logger shows that it's still empty - about
> to
>> pull my hair out here. I frankly think there should be a default
> method
>> of handling such a scenario.
>>
>> Any input/help would be appreciated.
>>
>> Thanks,
>>
>> Michael
>>
>> -Original Message-
>> From: brian.diekelman [mailto:[EMAIL PROTECTED]
>> Sent: Wednesday, June 18, 2008 3:42 PM
>> To: users@wicket.apache.org
>> Subject: RE: Grabbing a form component's input before the form has
> been
>> submitted
>>
>>
>> If I'm understanding you correctly the input it still sitting on the
>> client
>> (since the form hasn't been submitted) and the server doesn't have
any
>> knowledge of it when it renders the modal.
>>
>> You should be able to use AjaxFormComponentUpdatingBehavor("onblur")
> on
>> the
>> date field.  That will send an ajax event to notify the server of the
>> component change so it is updated in the modal.
>>
>>
>> Michael Mehrle wrote:
>>>
>>> Nope - still getting null, although the field is populated. How can
I
>>> force this without submitting the form?
>>>
>>> Michael
>>>
>>> -Original Message-
>>> From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
>>> Sent: Tuesday, June 17, 2008 8:24 PM
>>> To: users@wicket.apache.org
>>> Subject: Re: Grabbing a form component's input before the form has
>> been
>>> submitted
>>>
>>> getinput()
>>>
>>> -igor
>>>
>>> On Tue, Jun 17, 2008 at 6:10 PM, Michael Mehrle
>> <[EMAIL PROTECTED]>
>>> wrote:
>>>> I have a form that contains a date textfield. When a user fills out
>>> the
>>>> date and then launches a modal via another link I need to somehow
>> pass
>>>> that field's input to the modal's panel. Prob

RE: Grabbing a form component's input before the form has been submitted

2008-06-19 Thread Michael Mehrle
I tried that - the onUpdate() method is being called as soon as the
field is being populated with a date. The onError() method is being
called as well when invalid input is entered (e.g. 'foo').

This must be something simple - I mean grabbing a field's input is the
underlying mechanism allowing AJAX in the first place.

Michael

-Original Message-
From: Igor Vaynberg [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 18, 2008 10:28 PM
To: users@wicket.apache.org
Subject: Re: Grabbing a form component's input before the form has been
submitted

are you sure the field validates? override onerror() in the ajax
behavior and set a break point there.

-igor

On Wed, Jun 18, 2008 at 6:30 PM, Michael Mehrle <[EMAIL PROTECTED]>
wrote:
> I wonder what difference it makes what 'link' I'm using. The more
> interesting code is this:
>
> dateField.add(new
AjaxFormComponentUpdatingBehavior(JavaScriptUtil.BLUR)
> {
>@Override
>protected void onUpdate(AjaxRequestTarget
> target) {
>LOG.debug("Date Input: {}",
> dateField.getInput());
>LOG.debug("Date Model: {}",
> dateField.getModelObject());
>}
>
>});
>
> Although there is a behavior attached to the text field it still logs
> null for both the input and the model. Don't understand why this isn't
> being updated.
>
> Thanks,
>
> Michael
>
> -Original Message-
> From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, June 18, 2008 5:45 PM
> To: users@wicket.apache.org
> Subject: Re: Grabbing a form component's input before the form has
been
> submitted
>
> if you would have actually pasted your code someone would have been
> able to help you a long time ago...
>
> i dont know what kind of link you are using to launch the modal
>
> or how you are launching the modal
>
> etc
>
>
> -igor
>
> On Wed, Jun 18, 2008 at 5:17 PM, Michael Mehrle
<[EMAIL PROTECTED]>
> wrote:
>> Added that listener and my logger shows that it's still empty - about
> to
>> pull my hair out here. I frankly think there should be a default
> method
>> of handling such a scenario.
>>
>> Any input/help would be appreciated.
>>
>> Thanks,
>>
>> Michael
>>
>> -Original Message-
>> From: brian.diekelman [mailto:[EMAIL PROTECTED]
>> Sent: Wednesday, June 18, 2008 3:42 PM
>> To: users@wicket.apache.org
>> Subject: RE: Grabbing a form component's input before the form has
> been
>> submitted
>>
>>
>> If I'm understanding you correctly the input it still sitting on the
>> client
>> (since the form hasn't been submitted) and the server doesn't have
any
>> knowledge of it when it renders the modal.
>>
>> You should be able to use AjaxFormComponentUpdatingBehavor("onblur")
> on
>> the
>> date field.  That will send an ajax event to notify the server of the
>> component change so it is updated in the modal.
>>
>>
>> Michael Mehrle wrote:
>>>
>>> Nope - still getting null, although the field is populated. How can
I
>>> force this without submitting the form?
>>>
>>> Michael
>>>
>>> -Original Message-
>>> From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
>>> Sent: Tuesday, June 17, 2008 8:24 PM
>>> To: users@wicket.apache.org
>>> Subject: Re: Grabbing a form component's input before the form has
>> been
>>> submitted
>>>
>>> getinput()
>>>
>>> -igor
>>>
>>> On Tue, Jun 17, 2008 at 6:10 PM, Michael Mehrle
>> <[EMAIL PROTECTED]>
>>> wrote:
>>>> I have a form that contains a date textfield. When a user fills out
>>> the
>>>> date and then launches a modal via another link I need to somehow
>> pass
>>>> that field's input to the modal's panel. Problem is that the form
at
>>>> that point has not been submitted yet. I already tried:
>>>>
>>>>
>>>>
>>>> Date startDate = (Date)startTimeField.getConvertedInput();
>>>>
>>>>
>>>>
>>>> However, it's always null. How can I do this?
>>>>
>>>>
>>>>
>>>> Thanks in advance...
>>>>
>>>>
>>>>
>>>> Michael
>>>>
>>>>
>>>
>>>
--

RE: Grabbing a form component's input before the form has been submitted

2008-06-18 Thread Michael Mehrle
I wonder what difference it makes what 'link' I'm using. The more
interesting code is this:

dateField.add(new AjaxFormComponentUpdatingBehavior(JavaScriptUtil.BLUR)
{
@Override
protected void onUpdate(AjaxRequestTarget
target) {
LOG.debug("Date Input: {}",
dateField.getInput());
LOG.debug("Date Model: {}",
dateField.getModelObject());
}

});

Although there is a behavior attached to the text field it still logs
null for both the input and the model. Don't understand why this isn't
being updated.

Thanks,

Michael

-Original Message-
From: Igor Vaynberg [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 18, 2008 5:45 PM
To: users@wicket.apache.org
Subject: Re: Grabbing a form component's input before the form has been
submitted

if you would have actually pasted your code someone would have been
able to help you a long time ago...

i dont know what kind of link you are using to launch the modal

or how you are launching the modal

etc


-igor

On Wed, Jun 18, 2008 at 5:17 PM, Michael Mehrle <[EMAIL PROTECTED]>
wrote:
> Added that listener and my logger shows that it's still empty - about
to
> pull my hair out here. I frankly think there should be a default
method
> of handling such a scenario.
>
> Any input/help would be appreciated.
>
> Thanks,
>
> Michael
>
> -Original Message-
> From: brian.diekelman [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, June 18, 2008 3:42 PM
> To: users@wicket.apache.org
> Subject: RE: Grabbing a form component's input before the form has
been
> submitted
>
>
> If I'm understanding you correctly the input it still sitting on the
> client
> (since the form hasn't been submitted) and the server doesn't have any
> knowledge of it when it renders the modal.
>
> You should be able to use AjaxFormComponentUpdatingBehavor("onblur")
on
> the
> date field.  That will send an ajax event to notify the server of the
> component change so it is updated in the modal.
>
>
> Michael Mehrle wrote:
>>
>> Nope - still getting null, although the field is populated. How can I
>> force this without submitting the form?
>>
>> Michael
>>
>> -Original Message-
>> From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
>> Sent: Tuesday, June 17, 2008 8:24 PM
>> To: users@wicket.apache.org
>> Subject: Re: Grabbing a form component's input before the form has
> been
>> submitted
>>
>> getinput()
>>
>> -igor
>>
>> On Tue, Jun 17, 2008 at 6:10 PM, Michael Mehrle
> <[EMAIL PROTECTED]>
>> wrote:
>>> I have a form that contains a date textfield. When a user fills out
>> the
>>> date and then launches a modal via another link I need to somehow
> pass
>>> that field's input to the modal's panel. Problem is that the form at
>>> that point has not been submitted yet. I already tried:
>>>
>>>
>>>
>>> Date startDate = (Date)startTimeField.getConvertedInput();
>>>
>>>
>>>
>>> However, it's always null. How can I do this?
>>>
>>>
>>>
>>> Thanks in advance...
>>>
>>>
>>>
>>> Michael
>>>
>>>
>>
>> -
>> 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/Grabbing-a-form-component%27s-input-before-the-for
> m-has-been-submitted-tp17957853p17993636.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]


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



RE: Grabbing a form component's input before the form has been submitted

2008-06-18 Thread Michael Mehrle
/* Pops up the modal */
private void showModal(final FooModalWindow modalWindow,
AjaxRequestTarget target) {
Date startDate =
(Date)startTimeField.getConvertedInput();
if (null != startDate) {
MutableDateTime dateTime = new
MutableDateTime(startDate);
 
((Foo)FooDetailsPanel.this.getModelObject()).setStartTime(dateTime.toDat
e());
}
 
modalWindow.setTitle(getLocalizer().getString("BarFooModalTitle",
FooDetailsPanel.this));
modalWindow.setContent(new
CreateBarFooPanel(modalWindow.getContentId(),
FooDetailsPanel.this.getModel(), modalWindow));
modalWindow.show(target);
}

-Original Message-
From: Igor Vaynberg [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 18, 2008 5:45 PM
To: users@wicket.apache.org
Subject: Re: Grabbing a form component's input before the form has been
submitted

if you would have actually pasted your code someone would have been
able to help you a long time ago...

i dont know what kind of link you are using to launch the modal

or how you are launching the modal

etc


-igor

On Wed, Jun 18, 2008 at 5:17 PM, Michael Mehrle <[EMAIL PROTECTED]>
wrote:
> Added that listener and my logger shows that it's still empty - about
to
> pull my hair out here. I frankly think there should be a default
method
> of handling such a scenario.
>
> Any input/help would be appreciated.
>
> Thanks,
>
> Michael
>
> -Original Message-
> From: brian.diekelman [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, June 18, 2008 3:42 PM
> To: users@wicket.apache.org
> Subject: RE: Grabbing a form component's input before the form has
been
> submitted
>
>
> If I'm understanding you correctly the input it still sitting on the
> client
> (since the form hasn't been submitted) and the server doesn't have any
> knowledge of it when it renders the modal.
>
> You should be able to use AjaxFormComponentUpdatingBehavor("onblur")
on
> the
> date field.  That will send an ajax Foo to notify the server of the
> component change so it is updated in the modal.
>
>
> Michael Mehrle wrote:
>>
>> Nope - still getting null, although the field is populated. How can I
>> force this without submitting the form?
>>
>> Michael
>>
>> -Original Message-
>> From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
>> Sent: Tuesday, June 17, 2008 8:24 PM
>> To: users@wicket.apache.org
>> Subject: Re: Grabbing a form component's input before the form has
> been
>> submitted
>>
>> getinput()
>>
>> -igor
>>
>> On Tue, Jun 17, 2008 at 6:10 PM, Michael Mehrle
> <[EMAIL PROTECTED]>
>> wrote:
>>> I have a form that contains a date textfield. When a user fills out
>> the
>>> date and then launches a modal via another link I need to somehow
> pass
>>> that field's input to the modal's panel. Problem is that the form at
>>> that point has not been submitted yet. I already tried:
>>>
>>>
>>>
>>> Date startDate = (Date)startTimeField.getConvertedInput();
>>>
>>>
>>>
>>> However, it's always null. How can I do this?
>>>
>>>
>>>
>>> Thanks in advance...
>>>
>>>
>>>
>>> Michael
>>>
>>>
>>
>> -
>> 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/Grabbing-a-form-component%27s-input-before-the-for
> m-has-been-submitted-tp17957853p17993636.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]


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



RE: Grabbing a form component's input before the form has been submitted

2008-06-18 Thread Michael Mehrle
Added that listener and my logger shows that it's still empty - about to
pull my hair out here. I frankly think there should be a default method
of handling such a scenario.

Any input/help would be appreciated.

Thanks,

Michael

-Original Message-
From: brian.diekelman [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 18, 2008 3:42 PM
To: users@wicket.apache.org
Subject: RE: Grabbing a form component's input before the form has been
submitted


If I'm understanding you correctly the input it still sitting on the
client
(since the form hasn't been submitted) and the server doesn't have any
knowledge of it when it renders the modal.

You should be able to use AjaxFormComponentUpdatingBehavor("onblur") on
the
date field.  That will send an ajax event to notify the server of the
component change so it is updated in the modal.


Michael Mehrle wrote:
> 
> Nope - still getting null, although the field is populated. How can I
> force this without submitting the form?
> 
> Michael
> 
> -Original Message-
> From: Igor Vaynberg [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, June 17, 2008 8:24 PM
> To: users@wicket.apache.org
> Subject: Re: Grabbing a form component's input before the form has
been
> submitted
> 
> getinput()
> 
> -igor
> 
> On Tue, Jun 17, 2008 at 6:10 PM, Michael Mehrle
<[EMAIL PROTECTED]>
> wrote:
>> I have a form that contains a date textfield. When a user fills out
> the
>> date and then launches a modal via another link I need to somehow
pass
>> that field's input to the modal's panel. Problem is that the form at
>> that point has not been submitted yet. I already tried:
>>
>>
>>
>> Date startDate = (Date)startTimeField.getConvertedInput();
>>
>>
>>
>> However, it's always null. How can I do this?
>>
>>
>>
>> Thanks in advance...
>>
>>
>>
>> Michael
>>
>>
> 
> -
> 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/Grabbing-a-form-component%27s-input-before-the-for
m-has-been-submitted-tp17957853p17993636.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: Grabbing a form component's input before the form has been submitted

2008-06-18 Thread Michael Mehrle
Nope - still getting null, although the field is populated. How can I
force this without submitting the form?

Michael

-Original Message-
From: Igor Vaynberg [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 17, 2008 8:24 PM
To: users@wicket.apache.org
Subject: Re: Grabbing a form component's input before the form has been
submitted

getinput()

-igor

On Tue, Jun 17, 2008 at 6:10 PM, Michael Mehrle <[EMAIL PROTECTED]>
wrote:
> I have a form that contains a date textfield. When a user fills out
the
> date and then launches a modal via another link I need to somehow pass
> that field's input to the modal's panel. Problem is that the form at
> that point has not been submitted yet. I already tried:
>
>
>
> Date startDate = (Date)startTimeField.getConvertedInput();
>
>
>
> However, it's always null. How can I do this?
>
>
>
> Thanks in advance...
>
>
>
> Michael
>
>

-
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: Browser not jumping to Wicket Anchor

2008-06-17 Thread Michael Mehrle
Oh, and for the anchor string - do I include the hash as well? I added
the call below without the hash and it's not jumping to that anchor.
Frustrating...

Michael

-Original Message-
From: Michael Mehrle [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 17, 2008 6:19 PM
To: users@wicket.apache.org
Subject: RE: Browser not jumping to Wicket Anchor

Just curious - what does 'location.hash' stand for? In any case, is this
supposed to cause the page to jump to the anchor?

Michael

-Original Message-
From: Gwyn Evans [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 16, 2008 2:51 PM
To: users@wicket.apache.org
Subject: Re: Browser not jumping to Wicket Anchor

Not an issue I've come across but also not an area I've explored... A
quick
search through the mailing list did suggest one possible approach as
below,
but I've no idea how viable it might be!

public Page extends WebPage implements IHeadContributor {

@Override
public void renderHead(IHeaderResponse r) {
   r.renderOnLoadJavascript("location.hash='YOUR-ANCHOR'");
}
}

/Gwyn

On Mon, Jun 16, 2008 at 10:33 PM, Michael Mehrle
<[EMAIL PROTECTED]>
wrote:

> Yes - they do match - you're right, always check the basics first. The
> problem is that even if I bookmark the anchored page (with the anchor
> tagged on), and load the page it won't jump there. So, I don't think
> it's the way I create the anchor (because the URL looks correct) -
it's
> all the other wicket AJAX stuff that somehow prevents the anchor from
> being recognized on page load. Is there a work around for this?
>
> Thanks,
>
> Michael
>
> -Original Message-
> From: Gwyn Evans [mailto:[EMAIL PROTECTED]
> Sent: Monday, June 16, 2008 1:02 PM
> To: users@wicket.apache.org
> Subject: Re: Browser not jumping to Wicket Anchor
>
> Just looking at the HTML, do the anchor & the destination match
> correctly?
> Is the destination url just a normal page, or a form of some sort?
>
> /Gwyn
>
> On Mon, Jun 16, 2008 at 6:58 PM, Michael Mehrle
<[EMAIL PROTECTED]>
> wrote:
>
> > I created an Link to another page's anchor similar to the code shown
> > below. The anchor actually gets tagged on to the bookmarkable URL.
> > However, for some reason the browser does not jump to my anchor.
> >
> >
> >
> > Not sure what's going on - is there a particular way I have to
create
> an
> > anchor in Wicket so that the URL causes the browser to scroll
further
> > down in the page?
> >
> >
> >
> > Thanks,
> >
> >
> >
> > Michael
> >
> >
> >
> >
> >
> > 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;
> >
> >  }
> >
> >
> >
> > }
> >
> >
> >
> >
>
> -
> 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: Browser not jumping to Wicket Anchor

2008-06-17 Thread Michael Mehrle
Just curious - what does 'location.hash' stand for? In any case, is this
supposed to cause the page to jump to the anchor?

Michael

-Original Message-
From: Gwyn Evans [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 16, 2008 2:51 PM
To: users@wicket.apache.org
Subject: Re: Browser not jumping to Wicket Anchor

Not an issue I've come across but also not an area I've explored... A
quick
search through the mailing list did suggest one possible approach as
below,
but I've no idea how viable it might be!

public Page extends WebPage implements IHeadContributor {

@Override
public void renderHead(IHeaderResponse r) {
   r.renderOnLoadJavascript("location.hash='YOUR-ANCHOR'");
}
}

/Gwyn

On Mon, Jun 16, 2008 at 10:33 PM, Michael Mehrle
<[EMAIL PROTECTED]>
wrote:

> Yes - they do match - you're right, always check the basics first. The
> problem is that even if I bookmark the anchored page (with the anchor
> tagged on), and load the page it won't jump there. So, I don't think
> it's the way I create the anchor (because the URL looks correct) -
it's
> all the other wicket AJAX stuff that somehow prevents the anchor from
> being recognized on page load. Is there a work around for this?
>
> Thanks,
>
> Michael
>
> -Original Message-
> From: Gwyn Evans [mailto:[EMAIL PROTECTED]
> Sent: Monday, June 16, 2008 1:02 PM
> To: users@wicket.apache.org
> Subject: Re: Browser not jumping to Wicket Anchor
>
> Just looking at the HTML, do the anchor & the destination match
> correctly?
> Is the destination url just a normal page, or a form of some sort?
>
> /Gwyn
>
> On Mon, Jun 16, 2008 at 6:58 PM, Michael Mehrle
<[EMAIL PROTECTED]>
> wrote:
>
> > I created an Link to another page's anchor similar to the code shown
> > below. The anchor actually gets tagged on to the bookmarkable URL.
> > However, for some reason the browser does not jump to my anchor.
> >
> >
> >
> > Not sure what's going on - is there a particular way I have to
create
> an
> > anchor in Wicket so that the URL causes the browser to scroll
further
> > down in the page?
> >
> >
> >
> > Thanks,
> >
> >
> >
> > Michael
> >
> >
> >
> >
> >
> > 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;
> >
> >  }
> >
> >
> >
> > }
> >
> >
> >
> >
>
> -
> 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]



Grabbing a form component's input before the form has been submitted

2008-06-17 Thread Michael Mehrle
I have a form that contains a date textfield. When a user fills out the
date and then launches a modal via another link I need to somehow pass
that field's input to the modal's panel. Problem is that the form at
that point has not been submitted yet. I already tried:

 

Date startDate = (Date)startTimeField.getConvertedInput();

 

However, it's always null. How can I do this?

 

Thanks in advance...

 

Michael



RE: Browser not jumping to Wicket Anchor

2008-06-16 Thread Michael Mehrle
Yes - they do match - you're right, always check the basics first. The
problem is that even if I bookmark the anchored page (with the anchor
tagged on), and load the page it won't jump there. So, I don't think
it's the way I create the anchor (because the URL looks correct) - it's
all the other wicket AJAX stuff that somehow prevents the anchor from
being recognized on page load. Is there a work around for this?

Thanks,

Michael

-Original Message-
From: Gwyn Evans [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 16, 2008 1:02 PM
To: users@wicket.apache.org
Subject: Re: Browser not jumping to Wicket Anchor

Just looking at the HTML, do the anchor & the destination match
correctly?
Is the destination url just a normal page, or a form of some sort?

/Gwyn

On Mon, Jun 16, 2008 at 6:58 PM, Michael Mehrle <[EMAIL PROTECTED]>
wrote:

> I created an Link to another page's anchor similar to the code shown
> below. The anchor actually gets tagged on to the bookmarkable URL.
> However, for some reason the browser does not jump to my anchor.
>
>
>
> Not sure what's going on - is there a particular way I have to create
an
> anchor in Wicket so that the URL causes the browser to scroll further
> down in the page?
>
>
>
> Thanks,
>
>
>
> Michael
>
>
>
>
>
> 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;
>
>  }
>
>
>
> }
>
>
>
>

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



Browser not jumping to Wicket Anchor

2008-06-16 Thread Michael Mehrle
I created an Link to another page's anchor similar to the code shown
below. The anchor actually gets tagged on to the bookmarkable URL.
However, for some reason the browser does not jump to my anchor.

 

Not sure what's going on - is there a particular way I have to create an
anchor in Wicket so that the URL causes the browser to scroll further
down in the page?

 

Thanks,

 

Michael

 

 

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;

  }

  

}

 



RE: Anchors in Wicket?

2008-06-13 Thread Michael Mehrle
I created an Link to another page's anchor similar to the code shown below. The 
anchor actually gets tagged on to the bookmarkable URL. However, for some 
reason the browser does not jump to my anchor.

Not sure what's going on - is there a particular way I have to create an anchor 
in Wicket so that the URL causes the browser to scroll further down in the page?

Thanks,

Michael

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

2008-06-10 Thread Michael Mehrle
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:



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]



Anchors in Wicket?

2008-06-10 Thread Michael Mehrle
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



RE: 1.3.4 release

2008-06-10 Thread Michael Mehrle
1.3-SNAPSHOT seems to be pretty stable and easy to add to your maven project. I 
actually downloaded and compiled yesterday but after having compile problems 
wound up using 1.3-SNAPSHOT. Just my 2 cents...

Michael

-Original Message-
From: Ricky [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 10, 2008 8:50 AM
To: users@wicket.apache.org
Subject: Re: 1.3.4 release

OK, thanks for your response guys. appreciate it; I understand that it is a
time consuming process and also takes time to check if release has any
impacts etc. I guess we'll have to go with 1.3-SNAPSHOT for now.

Thanks,
Rick




Z-depth problem with AutoCompleteTextField in IE

2008-06-10 Thread Michael Mehrle
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:

 

http://screencast.com/t/DsqIA4pxtut

 

Any thoughts? We have not done any custom styling of the
AutoCompleteTextField as far as I know. Can anyone replicate this
problem?

 

Thanks,

 

Michael

 

 

 

 



Z-depth problem with AutoCompleteTextField in IE

2008-06-09 Thread Michael Mehrle
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:

 

http://screencast.com/t/DsqIA4pxtut

 

Any thoughts? We have not done any custom styling of the
AutoCompleteTextField as far as I know. Can anyone replicate this
problem?

 

Thanks,

 

Michael

 



RE: AutoCompleteTextField scrolls entire page

2008-06-09 Thread Michael Mehrle
Alright, it seems that the 1.3-SNAPSHOT release fixes the scrolling
problem. HOWEVER, in IE I still experience a strange z-depth problem.
Meaning that the drop down menu appears *behind* neighboring form fields
- take a look at this screenshot:

http://screencast.com/t/DsqIA4pxtut

Any thoughts? I'm going to post this in its own thread to make sure a
few more folks look at this.

Thanks,

Michael


-Original Message-
From: Igor Vaynberg [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 09, 2008 1:40 PM
To: users@wicket.apache.org
Subject: Re: AutoCompleteTextField scrolls entire page

svn co https://svn.apache.org/repos/asf/wicket/branches/wicket-1.3.x
wicket-1.3.x
cd wicket-1.3.x
mvn install

-igor

On Mon, Jun 9, 2008 at 1:18 PM, Michael Mehrle <[EMAIL PROTECTED]>
wrote:
> Igor - please help me out - I have been trying to download that
snapshot
> branch/tag but it keeps failing. I'm using maven and am following the
> instructions (http://tinyurl.com/5dnxsf), but it keeps failing.
>
> Michael
>
> -Original Message-
> From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
> Sent: Monday, June 09, 2008 11:25 AM
> To: users@wicket.apache.org
> Subject: Re: AutoCompleteTextField scrolls entire page
>
> before you submit a jira ticket make sure it is also broken in the
> wicket-1.3.x svn branch - which will be the 1.3.4 release - nothing
> really mystical about it.
>
> -igor
>
> On Mon, Jun 9, 2008 at 11:15 AM, Michael Mehrle
<[EMAIL PROTECTED]>
> wrote:
>> I have not gone back to 1.3.2 yet - will give this a run in a few. If
> it
>> works with 1.3.2 I will open a JIRA ticket for 1.3.3.
>>
>> FYI, I don't seem the only one experiencing this - someone else
posted
>> about this as he was able to replicate the problem with one of your
>> wicket demos.
>>
>> Michael
>>
>> -Original Message-
>> From: Eelco Hillenius [mailto:[EMAIL PROTECTED]
>> Sent: Monday, June 09, 2008 11:12 AM
>> To: users@wicket.apache.org
>> Subject: Re: AutoCompleteTextField scrolls entire page
>>
>> On Mon, Jun 9, 2008 at 10:58 AM, Michael Mehrle
> <[EMAIL PROTECTED]>
>> wrote:
>>> Marcus - I did NOT resolve it yet - not getting much help here
except
>>> for talk about some mystical 1.3.4 release I can't get my hands on.
> It
>>> breaks with everything we wrote here involving AutoComplete - and
all
>> of
>>> it was working fine with 1.3.2 as far as I remember. So, this puppy
> is
>>> broken and if someone can point me the right way I would love to
help
>>> fix it. But at this point I don't know where to start - not exactly
a
>>> huge JavaScript/CSS aficionado.
>>
>> If this used to work, but doesn't now, you should be able to track
>> down the differences between the two releases. The first thing you
>> could try is to get the exact source of the AC component of 1.3.2
(all
>> releases are tagged in our SVN repo) and see if that makes the
>> difference. If it does, a change in that component did, if not,
>> something larger (the ajax engine for instance) is in play.
>>
>> Could you also open a JIRA issue for it if you confirmed this is a
> bug?
>>
>> 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]
>>
>>
>
> -
> 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: Getting the snapshot via maven2?

2008-06-09 Thread Michael Mehrle
Tried that, but had problems. Anyway, Igor gave me the svn instructions and I 
just built it myself.

Thanks for trying to help.

Michael

-Original Message-
From: Ricky [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 09, 2008 3:37 PM
To: users@wicket.apache.org
Subject: Re: Getting the snapshot via maven2?

use 1.3-SNAPSHOT as version.

Rick

On Mon, Jun 9, 2008 at 4:22 PM, Michael Mehrle <[EMAIL PROTECTED]>
wrote:

> I have been trying to download that snapshot branch/tag but it keeps
> failing. I'm using maven and am following the instructions
> (http://tinyurl.com/5dnxsf) but without success. How do I get
> today/yesterday's snapshot of 1.3.x?
>
>
>
> Cheers,
>
>
>
> Michael
>
>
>
>


Getting the snapshot via maven2?

2008-06-09 Thread Michael Mehrle
I have been trying to download that snapshot branch/tag but it keeps
failing. I'm using maven and am following the instructions
(http://tinyurl.com/5dnxsf) but without success. How do I get
today/yesterday's snapshot of 1.3.x?

 

Cheers,

 

Michael

 



RE: AutoCompleteTextField scrolls entire page

2008-06-09 Thread Michael Mehrle
Igor - please help me out - I have been trying to download that snapshot
branch/tag but it keeps failing. I'm using maven and am following the
instructions (http://tinyurl.com/5dnxsf), but it keeps failing.

Michael

-Original Message-
From: Igor Vaynberg [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 09, 2008 11:25 AM
To: users@wicket.apache.org
Subject: Re: AutoCompleteTextField scrolls entire page

before you submit a jira ticket make sure it is also broken in the
wicket-1.3.x svn branch - which will be the 1.3.4 release - nothing
really mystical about it.

-igor

On Mon, Jun 9, 2008 at 11:15 AM, Michael Mehrle <[EMAIL PROTECTED]>
wrote:
> I have not gone back to 1.3.2 yet - will give this a run in a few. If
it
> works with 1.3.2 I will open a JIRA ticket for 1.3.3.
>
> FYI, I don't seem the only one experiencing this - someone else posted
> about this as he was able to replicate the problem with one of your
> wicket demos.
>
> Michael
>
> -Original Message-
> From: Eelco Hillenius [mailto:[EMAIL PROTECTED]
> Sent: Monday, June 09, 2008 11:12 AM
> To: users@wicket.apache.org
> Subject: Re: AutoCompleteTextField scrolls entire page
>
> On Mon, Jun 9, 2008 at 10:58 AM, Michael Mehrle
<[EMAIL PROTECTED]>
> wrote:
>> Marcus - I did NOT resolve it yet - not getting much help here except
>> for talk about some mystical 1.3.4 release I can't get my hands on.
It
>> breaks with everything we wrote here involving AutoComplete - and all
> of
>> it was working fine with 1.3.2 as far as I remember. So, this puppy
is
>> broken and if someone can point me the right way I would love to help
>> fix it. But at this point I don't know where to start - not exactly a
>> huge JavaScript/CSS aficionado.
>
> If this used to work, but doesn't now, you should be able to track
> down the differences between the two releases. The first thing you
> could try is to get the exact source of the AC component of 1.3.2 (all
> releases are tagged in our SVN repo) and see if that makes the
> difference. If it does, a change in that component did, if not,
> something larger (the ajax engine for instance) is in play.
>
> Could you also open a JIRA issue for it if you confirmed this is a
bug?
>
> 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]
>
>

-
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: AutoCompleteTextField scrolls entire page

2008-06-09 Thread Michael Mehrle
Thanks for clearing that up, Igor. I was under the impression that was
the 1.3.3 release. Will definitely give this a run as well and confirm
before I file any reports.

Cheers,

Michael

-Original Message-
From: Igor Vaynberg [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 09, 2008 11:25 AM
To: users@wicket.apache.org
Subject: Re: AutoCompleteTextField scrolls entire page

before you submit a jira ticket make sure it is also broken in the
wicket-1.3.x svn branch - which will be the 1.3.4 release - nothing
really mystical about it.

-igor

On Mon, Jun 9, 2008 at 11:15 AM, Michael Mehrle <[EMAIL PROTECTED]>
wrote:
> I have not gone back to 1.3.2 yet - will give this a run in a few. If
it
> works with 1.3.2 I will open a JIRA ticket for 1.3.3.
>
> FYI, I don't seem the only one experiencing this - someone else posted
> about this as he was able to replicate the problem with one of your
> wicket demos.
>
> Michael
>
> -Original Message-
> From: Eelco Hillenius [mailto:[EMAIL PROTECTED]
> Sent: Monday, June 09, 2008 11:12 AM
> To: users@wicket.apache.org
> Subject: Re: AutoCompleteTextField scrolls entire page
>
> On Mon, Jun 9, 2008 at 10:58 AM, Michael Mehrle
<[EMAIL PROTECTED]>
> wrote:
>> Marcus - I did NOT resolve it yet - not getting much help here except
>> for talk about some mystical 1.3.4 release I can't get my hands on.
It
>> breaks with everything we wrote here involving AutoComplete - and all
> of
>> it was working fine with 1.3.2 as far as I remember. So, this puppy
is
>> broken and if someone can point me the right way I would love to help
>> fix it. But at this point I don't know where to start - not exactly a
>> huge JavaScript/CSS aficionado.
>
> If this used to work, but doesn't now, you should be able to track
> down the differences between the two releases. The first thing you
> could try is to get the exact source of the AC component of 1.3.2 (all
> releases are tagged in our SVN repo) and see if that makes the
> difference. If it does, a change in that component did, if not,
> something larger (the ajax engine for instance) is in play.
>
> Could you also open a JIRA issue for it if you confirmed this is a
bug?
>
> 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]
>
>

-
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: AutoCompleteTextField scrolls entire page

2008-06-09 Thread Michael Mehrle
I have not gone back to 1.3.2 yet - will give this a run in a few. If it
works with 1.3.2 I will open a JIRA ticket for 1.3.3. 

FYI, I don't seem the only one experiencing this - someone else posted
about this as he was able to replicate the problem with one of your
wicket demos.

Michael

-Original Message-
From: Eelco Hillenius [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 09, 2008 11:12 AM
To: users@wicket.apache.org
Subject: Re: AutoCompleteTextField scrolls entire page

On Mon, Jun 9, 2008 at 10:58 AM, Michael Mehrle <[EMAIL PROTECTED]>
wrote:
> Marcus - I did NOT resolve it yet - not getting much help here except
> for talk about some mystical 1.3.4 release I can't get my hands on. It
> breaks with everything we wrote here involving AutoComplete - and all
of
> it was working fine with 1.3.2 as far as I remember. So, this puppy is
> broken and if someone can point me the right way I would love to help
> fix it. But at this point I don't know where to start - not exactly a
> huge JavaScript/CSS aficionado.

If this used to work, but doesn't now, you should be able to track
down the differences between the two releases. The first thing you
could try is to get the exact source of the AC component of 1.3.2 (all
releases are tagged in our SVN repo) and see if that makes the
difference. If it does, a change in that component did, if not,
something larger (the ajax engine for instance) is in play.

Could you also open a JIRA issue for it if you confirmed this is a bug?

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: AutoCompleteTextField scrolls entire page

2008-06-09 Thread Michael Mehrle
Marcus - I did NOT resolve it yet - not getting much help here except
for talk about some mystical 1.3.4 release I can't get my hands on. It
breaks with everything we wrote here involving AutoComplete - and all of
it was working fine with 1.3.2 as far as I remember. So, this puppy is
broken and if someone can point me the right way I would love to help
fix it. But at this point I don't know where to start - not exactly a
huge JavaScript/CSS aficionado.

Keep me posted if you find anything - will do the same.

Michael



-Original Message-
From: Marcus Mattila [mailto:[EMAIL PROTECTED] 
Sent: Sunday, June 08, 2008 5:52 AM
To: users@wicket.apache.org
Subject: Re: AutoCompleteTextField scrolls entire page

Hi, we have reproduced the same problem with AutocompleteTextfield. We
use 1.3-SNAPSHOT. Did you get it solved?

Code and css we use is same as in Wicket Examples:
http://www.wicket-library.com/wicket-examples/ajax/?wicket:interface=sou
rces:0:filespanel:file:2:link::ILinkListener::


br,
Marcus


On Sat, Jun 7, 2008 at 12:02 AM, Michael Mehrle <[EMAIL PROTECTED]>
wrote:
> I am seeing the following problem with several AutoCompleteTextFields
on
> different pages:
>
>
>
> When I type a letter and the menu items are showing I am unable to
> scroll down the list with my mouse and make a selection. What happens
> instead is that the page scrolls up towards the mouse and the
> Autocomplete plus the menu scrolls out of view.
>
>
>
> Again, two developers here have the same problem with two separate
> implementations/pages. So, I am fairly sure this has nothing to do
with
> the way we integrated it. My first guess would be the style sheet, but
> we have not made any pertinent changes.
>
>
>
> Any help would be appreciated - this behavior is being encountered on
> Firefox on Windows/Mac. On IE it doesn't work at all and I just get
some
> 'type mismatch' error message. Safari on Windows doesn't do anything -
I
> don't see a menu at all.
>
>
>
> Thanks,
>
>
>
> Michael
>
>

-
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: AutoCompleteTextField scrolls entire page

2008-06-09 Thread Michael Mehrle
I cannot use the generics release for this commercial project. Would need a 
build based on 1.3.x that fixes this.

Michael

-Original Message-
From: Ricky [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 06, 2008 8:22 PM
To: users@wicket.apache.org
Subject: Re: AutoCompleteTextField scrolls entire page

err 1.3-SNAPSHOT for now, or 1.4-m1.

On Fri, Jun 6, 2008 at 11:20 PM, Ricky <[EMAIL PROTECTED]> wrote:

> Use SNAPSHOT
>
>
> On Fri, Jun 6, 2008 at 8:17 PM, Michael Mehrle <[EMAIL PROTECTED]>
> wrote:
>
>> Where can I get a build of 1.3.4, so I can test this?
>>
>> Michael
>>
>> -Original Message-
>> From: Ricky [mailto:[EMAIL PROTECTED]
>> Sent: Friday, June 06, 2008 2:47 PM
>> To: users@wicket.apache.org
>> Subject: Re: AutoCompleteTextField scrolls entire page
>>
>> Hey,
>> This is fixed 1.4-m1 and 1.3.4 (to be released at some point, I am not
>> sure
>> when).
>>
>> Rick
>>
>> On Fri, Jun 6, 2008 at 5:02 PM, Michael Mehrle <[EMAIL PROTECTED]>
>> wrote:
>>
>> > I am seeing the following problem with several AutoCompleteTextFields on
>> > different pages:
>> >
>> >
>> >
>> > When I type a letter and the menu items are showing I am unable to
>> > scroll down the list with my mouse and make a selection. What happens
>> > instead is that the page scrolls up towards the mouse and the
>> > Autocomplete plus the menu scrolls out of view.
>> >
>> >
>> >
>> > Again, two developers here have the same problem with two separate
>> > implementations/pages. So, I am fairly sure this has nothing to do with
>> > the way we integrated it. My first guess would be the style sheet, but
>> > we have not made any pertinent changes.
>> >
>> >
>> >
>> > Any help would be appreciated - this behavior is being encountered on
>> > Firefox on Windows/Mac. On IE it doesn't work at all and I just get some
>> > 'type mismatch' error message. Safari on Windows doesn't do anything - I
>> > don't see a menu at all.
>> >
>> >
>> >
>> > Thanks,
>> >
>> >
>> >
>> > Michael
>> >
>> >
>>
>
>
>
>


RE: AutoCompleteTextField scrolls entire page

2008-06-06 Thread Michael Mehrle
Where can I get a build of 1.3.4, so I can test this?

Michael

-Original Message-
From: Ricky [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 06, 2008 2:47 PM
To: users@wicket.apache.org
Subject: Re: AutoCompleteTextField scrolls entire page

Hey,
This is fixed 1.4-m1 and 1.3.4 (to be released at some point, I am not sure
when).

Rick

On Fri, Jun 6, 2008 at 5:02 PM, Michael Mehrle <[EMAIL PROTECTED]>
wrote:

> I am seeing the following problem with several AutoCompleteTextFields on
> different pages:
>
>
>
> When I type a letter and the menu items are showing I am unable to
> scroll down the list with my mouse and make a selection. What happens
> instead is that the page scrolls up towards the mouse and the
> Autocomplete plus the menu scrolls out of view.
>
>
>
> Again, two developers here have the same problem with two separate
> implementations/pages. So, I am fairly sure this has nothing to do with
> the way we integrated it. My first guess would be the style sheet, but
> we have not made any pertinent changes.
>
>
>
> Any help would be appreciated - this behavior is being encountered on
> Firefox on Windows/Mac. On IE it doesn't work at all and I just get some
> 'type mismatch' error message. Safari on Windows doesn't do anything - I
> don't see a menu at all.
>
>
>
> Thanks,
>
>
>
> Michael
>
>


AutoCompleteTextField scrolls entire page

2008-06-06 Thread Michael Mehrle
I am seeing the following problem with several AutoCompleteTextFields on
different pages:

 

When I type a letter and the menu items are showing I am unable to
scroll down the list with my mouse and make a selection. What happens
instead is that the page scrolls up towards the mouse and the
Autocomplete plus the menu scrolls out of view. 

 

Again, two developers here have the same problem with two separate
implementations/pages. So, I am fairly sure this has nothing to do with
the way we integrated it. My first guess would be the style sheet, but
we have not made any pertinent changes.

 

Any help would be appreciated - this behavior is being encountered on
Firefox on Windows/Mac. On IE it doesn't work at all and I just get some
'type mismatch' error message. Safari on Windows doesn't do anything - I
don't see a menu at all.

 

Thanks,

 

Michael



DataProvider as model for AutoCompleteTextField?

2008-06-05 Thread Michael Mehrle
I have written a DataProvider as the model for a ListView, and would
also like to use it for a AutoCompleteTextField. I have done that
successfully in the past by explicitly accessing the iterator() method.
But I was hoping to be able to simply assign it as a model somehow. Is
this possible?

 

Thanks,

 

Michael



RE: java.util.Date model accepting Date incl. time?

2008-06-02 Thread Michael Mehrle
Okay, I figured it out - that was the old method - needs a type.

Using a field specific converter solved my problem as I am now
formatting the date the way I need to see it as a String.

Cheers,

Michael

-Original Message-
From: Michael Mehrle [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 02, 2008 4:48 PM
To: users@wicket.apache.org
Subject: RE: java.util.Date model accepting Date incl. time?

I'm trying to override:

public IConverter getConverter();

but it's final - how is this usually done? This is way too difficult,
IMHO...

Michael

-Original Message-----
From: Michael Mehrle [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 02, 2008 4:42 PM
To: users@wicket.apache.org
Subject: RE: java.util.Date model accepting Date incl. time?

Well, actually your previous approach might solve my Validator problem,
and this way I could enforce specific conversion rules per field. I
didn't know that I could do that - let me dig around and see if I can
make this work.

Michael

-Original Message-
From: Jeremy Thomerson [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 02, 2008 4:39 PM
To: users@wicket.apache.org
Subject: RE: java.util.Date model accepting Date incl. time?

Oh, sorry, yes, it's likely the validator, not the converter.  Ignore my
just sent email.

Jeremy Thomerson
http://www.wickettraining.com
-- sent from a wireless device


-Original Message-
From: Michael Mehrle <[EMAIL PROTECTED]>
Sent: Monday, June 02, 2008 6:36 PM
To: users@wicket.apache.org
Subject: RE: java.util.Date model accepting Date incl. time?

I'm actually now thinking that is merely a DateValidator.range problem.
If there is a time I don't mind it being shown - it's the
DateValidator.range that won't accept it.

The other solution would be to remove the time from the model via the
converter below. However, I have not seen a way to do this - it seems
that one needs to provide a time format and that's it. How would I
ignore the time altogether?

Hope this all makes sense...

Michael

-Original Message-
From: Jeremy Thomerson [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 02, 2008 3:20 PM
To: users@wicket.apache.org
Subject: Re: java.util.Date model accepting Date incl. time?

It looks like because the DateConverter code uses
DateFormat.getDateInstance(DateFormat.SHORT, locale);, if you dig into
this
method, it uses time style "FULL", which is documented like this:
"3:30:42pm
PST".  Try using that for your date.  If that works, than the problem is
just that it expects a much longer version of the time.

If that's the case, just override the converter for java.util.Date (I
know
you know how to do this ;) and you could put a new DateConverter, and
override this method to return whatever you want.  For instance you
could do
DateFormat.getDateTimeInstance(foo, bar, foo, bar)

/**
 * @param locale
 * @return Returns the date format.
 */
public DateFormat getDateFormat(Locale locale)
{
if (locale == null)
{
locale = Locale.getDefault();
}

return DateFormat.getDateInstance(DateFormat.SHORT, locale);
}



-
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: java.util.Date model accepting Date incl. time?

2008-06-02 Thread Michael Mehrle
I'm trying to override:

public IConverter getConverter();

but it's final - how is this usually done? This is way too difficult,
IMHO...

Michael

-Original Message-----
From: Michael Mehrle [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 02, 2008 4:42 PM
To: users@wicket.apache.org
Subject: RE: java.util.Date model accepting Date incl. time?

Well, actually your previous approach might solve my Validator problem,
and this way I could enforce specific conversion rules per field. I
didn't know that I could do that - let me dig around and see if I can
make this work.

Michael

-Original Message-
From: Jeremy Thomerson [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 02, 2008 4:39 PM
To: users@wicket.apache.org
Subject: RE: java.util.Date model accepting Date incl. time?

Oh, sorry, yes, it's likely the validator, not the converter.  Ignore my
just sent email.

Jeremy Thomerson
http://www.wickettraining.com
-- sent from a wireless device


-Original Message-
From: Michael Mehrle <[EMAIL PROTECTED]>
Sent: Monday, June 02, 2008 6:36 PM
To: users@wicket.apache.org
Subject: RE: java.util.Date model accepting Date incl. time?

I'm actually now thinking that is merely a DateValidator.range problem.
If there is a time I don't mind it being shown - it's the
DateValidator.range that won't accept it.

The other solution would be to remove the time from the model via the
converter below. However, I have not seen a way to do this - it seems
that one needs to provide a time format and that's it. How would I
ignore the time altogether?

Hope this all makes sense...

Michael

-Original Message-
From: Jeremy Thomerson [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 02, 2008 3:20 PM
To: users@wicket.apache.org
Subject: Re: java.util.Date model accepting Date incl. time?

It looks like because the DateConverter code uses
DateFormat.getDateInstance(DateFormat.SHORT, locale);, if you dig into
this
method, it uses time style "FULL", which is documented like this:
"3:30:42pm
PST".  Try using that for your date.  If that works, than the problem is
just that it expects a much longer version of the time.

If that's the case, just override the converter for java.util.Date (I
know
you know how to do this ;) and you could put a new DateConverter, and
override this method to return whatever you want.  For instance you
could do
DateFormat.getDateTimeInstance(foo, bar, foo, bar)

/**
 * @param locale
 * @return Returns the date format.
 */
public DateFormat getDateFormat(Locale locale)
{
if (locale == null)
{
locale = Locale.getDefault();
}

return DateFormat.getDateInstance(DateFormat.SHORT, locale);
}



-
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: java.util.Date model accepting Date incl. time?

2008-06-02 Thread Michael Mehrle
Well, actually your previous approach might solve my Validator problem,
and this way I could enforce specific conversion rules per field. I
didn't know that I could do that - let me dig around and see if I can
make this work.

Michael

-Original Message-
From: Jeremy Thomerson [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 02, 2008 4:39 PM
To: users@wicket.apache.org
Subject: RE: java.util.Date model accepting Date incl. time?

Oh, sorry, yes, it's likely the validator, not the converter.  Ignore my
just sent email.

Jeremy Thomerson
http://www.wickettraining.com
-- sent from a wireless device


-Original Message-----
From: Michael Mehrle <[EMAIL PROTECTED]>
Sent: Monday, June 02, 2008 6:36 PM
To: users@wicket.apache.org
Subject: RE: java.util.Date model accepting Date incl. time?

I'm actually now thinking that is merely a DateValidator.range problem.
If there is a time I don't mind it being shown - it's the
DateValidator.range that won't accept it.

The other solution would be to remove the time from the model via the
converter below. However, I have not seen a way to do this - it seems
that one needs to provide a time format and that's it. How would I
ignore the time altogether?

Hope this all makes sense...

Michael

-Original Message-
From: Jeremy Thomerson [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 02, 2008 3:20 PM
To: users@wicket.apache.org
Subject: Re: java.util.Date model accepting Date incl. time?

It looks like because the DateConverter code uses
DateFormat.getDateInstance(DateFormat.SHORT, locale);, if you dig into
this
method, it uses time style "FULL", which is documented like this:
"3:30:42pm
PST".  Try using that for your date.  If that works, than the problem is
just that it expects a much longer version of the time.

If that's the case, just override the converter for java.util.Date (I
know
you know how to do this ;) and you could put a new DateConverter, and
override this method to return whatever you want.  For instance you
could do
DateFormat.getDateTimeInstance(foo, bar, foo, bar)

/**
 * @param locale
 * @return Returns the date format.
 */
public DateFormat getDateFormat(Locale locale)
{
if (locale == null)
{
locale = Locale.getDefault();
}

return DateFormat.getDateInstance(DateFormat.SHORT, locale);
}



-
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: java.util.Date model accepting Date incl. time?

2008-06-02 Thread Michael Mehrle
I'm actually now thinking that is merely a DateValidator.range problem.
If there is a time I don't mind it being shown - it's the
DateValidator.range that won't accept it.

The other solution would be to remove the time from the model via the
converter below. However, I have not seen a way to do this - it seems
that one needs to provide a time format and that's it. How would I
ignore the time altogether?

Hope this all makes sense...

Michael

-Original Message-
From: Jeremy Thomerson [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 02, 2008 3:20 PM
To: users@wicket.apache.org
Subject: Re: java.util.Date model accepting Date incl. time?

It looks like because the DateConverter code uses
DateFormat.getDateInstance(DateFormat.SHORT, locale);, if you dig into
this
method, it uses time style "FULL", which is documented like this:
"3:30:42pm
PST".  Try using that for your date.  If that works, than the problem is
just that it expects a much longer version of the time.

If that's the case, just override the converter for java.util.Date (I
know
you know how to do this ;) and you could put a new DateConverter, and
override this method to return whatever you want.  For instance you
could do
DateFormat.getDateTimeInstance(foo, bar, foo, bar)

/**
 * @param locale
 * @return Returns the date format.
 */
public DateFormat getDateFormat(Locale locale)
{
if (locale == null)
{
locale = Locale.getDefault();
}

return DateFormat.getDateInstance(DateFormat.SHORT, locale);
}



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



RE: java.util.Date model accepting Date incl. time?

2008-06-02 Thread Michael Mehrle
Actually, I just tried to enter various time formats but it refuses all
of them (with/without seconds, PM, PST, etc.). Only a pure date works
(e.g 3/3/2009).

Michael

-Original Message-
From: Jeremy Thomerson [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 02, 2008 3:20 PM
To: users@wicket.apache.org
Subject: Re: java.util.Date model accepting Date incl. time?

It looks like because the DateConverter code uses
DateFormat.getDateInstance(DateFormat.SHORT, locale);, if you dig into
this
method, it uses time style "FULL", which is documented like this:
"3:30:42pm
PST".  Try using that for your date.  If that works, than the problem is
just that it expects a much longer version of the time.

If that's the case, just override the converter for java.util.Date (I
know
you know how to do this ;) and you could put a new DateConverter, and
override this method to return whatever you want.  For instance you
could do
DateFormat.getDateTimeInstance(foo, bar, foo, bar)

/**
 * @param locale
 * @return Returns the date format.
 */
public DateFormat getDateFormat(Locale locale)
{
if (locale == null)
{
locale = Locale.getDefault();
}

return DateFormat.getDateInstance(DateFormat.SHORT, locale);
}


On Mon, Jun 2, 2008 at 4:53 PM, Michael Mehrle <[EMAIL PROTECTED]>
wrote:

> I have a text field that is backed by a java.util.Date model. When
> typing in a simple date (e.g. 4/1/2009) everything is fine. But when I
> type in a date including a time (e.g. 5/23/09 12:00 AM) I get a
> validation error:
>
>
>
> '5/23/09 12:00 AM' is not a valid Date.
>
>
>
> Obviously a date (unlike a Timestamp) should be able to accept a
'full'
> date - how do I fix this?
>
>
>
> Michael
>
>


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

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



RE: java.util.Date model accepting Date incl. time?

2008-06-02 Thread Michael Mehrle
Yeah, I had a suspicion that this was related but I wasn't sure I wanted
to switch on the time format for the entire site. For instance - some
users might only type in the short date version - some others the long
one. I'm not sure how to address this.

Michael

-Original Message-
From: Jeremy Thomerson [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 02, 2008 3:20 PM
To: users@wicket.apache.org
Subject: Re: java.util.Date model accepting Date incl. time?

It looks like because the DateConverter code uses
DateFormat.getDateInstance(DateFormat.SHORT, locale);, if you dig into
this
method, it uses time style "FULL", which is documented like this:
"3:30:42pm
PST".  Try using that for your date.  If that works, than the problem is
just that it expects a much longer version of the time.

If that's the case, just override the converter for java.util.Date (I
know
you know how to do this ;) and you could put a new DateConverter, and
override this method to return whatever you want.  For instance you
could do
DateFormat.getDateTimeInstance(foo, bar, foo, bar)

/**
 * @param locale
 * @return Returns the date format.
 */
public DateFormat getDateFormat(Locale locale)
{
if (locale == null)
{
locale = Locale.getDefault();
}

return DateFormat.getDateInstance(DateFormat.SHORT, locale);
}


On Mon, Jun 2, 2008 at 4:53 PM, Michael Mehrle <[EMAIL PROTECTED]>
wrote:

> I have a text field that is backed by a java.util.Date model. When
> typing in a simple date (e.g. 4/1/2009) everything is fine. But when I
> type in a date including a time (e.g. 5/23/09 12:00 AM) I get a
> validation error:
>
>
>
> '5/23/09 12:00 AM' is not a valid Date.
>
>
>
> Obviously a date (unlike a Timestamp) should be able to accept a
'full'
> date - how do I fix this?
>
>
>
> Michael
>
>


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

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



java.util.Date model accepting Date incl. time?

2008-06-02 Thread Michael Mehrle
I have a text field that is backed by a java.util.Date model. When
typing in a simple date (e.g. 4/1/2009) everything is fine. But when I
type in a date including a time (e.g. 5/23/09 12:00 AM) I get a
validation error: 

 

'5/23/09 12:00 AM' is not a valid Date.

 

Obviously a date (unlike a Timestamp) should be able to accept a 'full'
date - how do I fix this?

 

Michael



RE: Timestamp -> java.util.Date convertion in Wicket

2008-06-02 Thread Michael Mehrle
YES - we have lift off :-)

You kick butt, Jeremy - thanks so much for sharing this and for helping
so persistently. I owe you one...

Michael

-Original Message-
From: Jeremy Thomerson [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 02, 2008 1:00 PM
To: users@wicket.apache.org
Subject: Re: Timestamp -> java.util.Date convertion in Wicket

Very weird.  There must be some other code interfering somewhere.  In
WebApplication (which I'm assuming you're overriding), it has this code:

protected IConverterLocator newConverterLocator()
{
return new ConverterLocator();
}

So, you should be using a ConverterLocator instance (which you must or
my
code would've caused you a ClassCastException).

In ConverterLocator's constructor, it has:
public ConverterLocator()
{
  // i snipped a bunch of lines
set(java.sql.Timestamp.class, new SqlTimestampConverter());
}

So, it must be something very silly.  Like, perhaps you are accidentally
calling
set(some.other.package.not.java.sql.Timestamp, new IConverter())

Is that possible?  Maybe your IDE imported the wrong Timestamp, which
would
explain why your set call returns null.  Try checking that, or just
using
set(java.sql.Timestamp.class, new YourConverter()...); to explicitly
name
the Timestamp with package.

Let me know - now I'm curious.

Jeremy

On Sun, Jun 1, 2008 at 4:52 PM, Michael Mehrle <[EMAIL PROTECTED]>
wrote:

> Okay, this is what I'm getting:
>
> [DEBUG EviteApplication] I OVERRODE THIS CONVERTER: null
>
> Strange - isn't it? The only thing I changed was to remove 
> from your IConverter definition. I'm using Wicket 1.3.4.
>
> Thoughts?
>
> Michael
>
> -Original Message-
> From: Jeremy Thomerson [mailto:[EMAIL PROTECTED]
> Sent: Saturday, May 31, 2008 11:18 PM
> To: users@wicket.apache.org
> Subject: Re: Timestamp -> java.util.Date convertion in Wicket
>
> Weird indeed.  Do this... capture the return of your
((ConverterLocator)
> getConverterLocator()).set(...) call.  In that method, it is returning
> the
> result of a Map.put(Timestamp.class, your-converter).  Therefore, the
> result
> should be non-null, as you should be overriding the default
> implementation
> that was already put in the map.
>
> Something like:
>
> IConverter ic = ((ConverterLocator)
> getConverterLocator()).set(Timestamp.class, new
IConverter()
> {
>
>private static final long serialVersionUID = 1L;
>
>public Timestamp convertToObject(String value, Locale
> locale) {
>if (value == null) {
>return null;
>}
>if (locale == null) {
>locale = Locale.getDefault();
>}
>DateFormat format =
> DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT);
>try {
>Date date = format.parse(value);
>return new Timestamp(date.getTime());
>} catch (ParseException e) {
>throw new ConversionException("Cannot parse '"
>+ value + "' using format " + format)
>.setSourceValue(value).setTargetType(
>
> Timestamp.class).setConverter(this)
>.setLocale(locale);
>}
>}
>
>public String convertToString(final Timestamp value,
> Locale
> locale) {
>if (value == null) {
>return null;
>}
>if (locale == null) {
>locale = Locale.getDefault();
>}
>DateFormat format =
> DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT);
>    return format.format(value);
>}
>
>});
> System.out.println("I OVERRODE THIS CONVERTER: "+ ic);
>
> Also - what version are you running?
>
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>
> On Sun, Jun 1, 2008 at 1:05 AM, Michael Mehrle
<[EMAIL PROTECTED]>
> wrote:
>
> > Yes, exactly the way you're doing it - didn't change anything except
> for
> > removing the generic def in the IConverter interface (not using
> generics
> > yet in my current project).
> >
> > And yes, I also set my breakpoint but it's never being called. The
> field
> > simply grabs the time value and no conversion seems to be happening.
> >
> > BTW, very elegant fix - just hope I can make this work (driving me
&g

RE: Timestamp -> java.util.Date convertion in Wicket

2008-06-02 Thread Michael Mehrle
Okay, NOW we're getting somewhere :-)

[DEBUG Application] I OVERRODE THIS CONVERTER:
[EMAIL PROTECTED]

Much better output now - I'll let you know if this actually works in my
app.

Michael

-Original Message-
From: Jeremy Thomerson [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 02, 2008 1:00 PM
To: users@wicket.apache.org
Subject: Re: Timestamp -> java.util.Date convertion in Wicket

Very weird.  There must be some other code interfering somewhere.  In
WebApplication (which I'm assuming you're overriding), it has this code:

protected IConverterLocator newConverterLocator()
{
return new ConverterLocator();
}

So, you should be using a ConverterLocator instance (which you must or
my
code would've caused you a ClassCastException).

In ConverterLocator's constructor, it has:
public ConverterLocator()
{
  // i snipped a bunch of lines
set(java.sql.Timestamp.class, new SqlTimestampConverter());
}

So, it must be something very silly.  Like, perhaps you are accidentally
calling
set(some.other.package.not.java.sql.Timestamp, new IConverter())

Is that possible?  Maybe your IDE imported the wrong Timestamp, which
would
explain why your set call returns null.  Try checking that, or just
using
set(java.sql.Timestamp.class, new YourConverter()...); to explicitly
name
the Timestamp with package.

Let me know - now I'm curious.

Jeremy

On Sun, Jun 1, 2008 at 4:52 PM, Michael Mehrle <[EMAIL PROTECTED]>
wrote:

> Okay, this is what I'm getting:
>
> [DEBUG EviteApplication] I OVERRODE THIS CONVERTER: null
>
> Strange - isn't it? The only thing I changed was to remove 
> from your IConverter definition. I'm using Wicket 1.3.4.
>
> Thoughts?
>
> Michael
>
> -Original Message-
> From: Jeremy Thomerson [mailto:[EMAIL PROTECTED]
> Sent: Saturday, May 31, 2008 11:18 PM
> To: users@wicket.apache.org
> Subject: Re: Timestamp -> java.util.Date convertion in Wicket
>
> Weird indeed.  Do this... capture the return of your
((ConverterLocator)
> getConverterLocator()).set(...) call.  In that method, it is returning
> the
> result of a Map.put(Timestamp.class, your-converter).  Therefore, the
> result
> should be non-null, as you should be overriding the default
> implementation
> that was already put in the map.
>
> Something like:
>
> IConverter ic = ((ConverterLocator)
> getConverterLocator()).set(Timestamp.class, new
IConverter()
> {
>
>private static final long serialVersionUID = 1L;
>
>public Timestamp convertToObject(String value, Locale
> locale) {
>if (value == null) {
>return null;
>}
>if (locale == null) {
>locale = Locale.getDefault();
>}
>DateFormat format =
> DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT);
>try {
>Date date = format.parse(value);
>return new Timestamp(date.getTime());
>} catch (ParseException e) {
>throw new ConversionException("Cannot parse '"
>+ value + "' using format " + format)
>.setSourceValue(value).setTargetType(
>
> Timestamp.class).setConverter(this)
>.setLocale(locale);
>}
>}
>
>public String convertToString(final Timestamp value,
> Locale
> locale) {
>if (value == null) {
>return null;
>}
>if (locale == null) {
>locale = Locale.getDefault();
>}
>DateFormat format =
> DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT);
>return format.format(value);
>}
>
>});
> System.out.println("I OVERRODE THIS CONVERTER: "+ ic);
>
> Also - what version are you running?
>
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>
> On Sun, Jun 1, 2008 at 1:05 AM, Michael Mehrle
<[EMAIL PROTECTED]>
> wrote:
>
> > Yes, exactly the way you're doing it - didn't change anything except
> for
> > removing the generic def in the IConverter interface (not using
> generics
> > yet in my current project).
> >
> > And yes, I also set my breakpoint but it's never being called. The
> field
> > simply grabs the time value and no conversion seems to be happening.
> >
> > BTW, very 

RE: Timestamp -> java.util.Date convertion in Wicket

2008-06-02 Thread Michael Mehrle
Ayayay: import com.sun.jmx.snmp.Timestamp;

LOL

I'll change it and let you know what happens. BTW, you ARE good!

Michael

-Original Message-
From: Jeremy Thomerson [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 02, 2008 1:00 PM
To: users@wicket.apache.org
Subject: Re: Timestamp -> java.util.Date convertion in Wicket

Very weird.  There must be some other code interfering somewhere.  In
WebApplication (which I'm assuming you're overriding), it has this code:

protected IConverterLocator newConverterLocator()
{
return new ConverterLocator();
}

So, you should be using a ConverterLocator instance (which you must or
my
code would've caused you a ClassCastException).

In ConverterLocator's constructor, it has:
public ConverterLocator()
{
  // i snipped a bunch of lines
set(java.sql.Timestamp.class, new SqlTimestampConverter());
}

So, it must be something very silly.  Like, perhaps you are accidentally
calling
set(some.other.package.not.java.sql.Timestamp, new IConverter())

Is that possible?  Maybe your IDE imported the wrong Timestamp, which
would
explain why your set call returns null.  Try checking that, or just
using
set(java.sql.Timestamp.class, new YourConverter()...); to explicitly
name
the Timestamp with package.

Let me know - now I'm curious.

Jeremy

On Sun, Jun 1, 2008 at 4:52 PM, Michael Mehrle <[EMAIL PROTECTED]>
wrote:

> Okay, this is what I'm getting:
>
> [DEBUG EviteApplication] I OVERRODE THIS CONVERTER: null
>
> Strange - isn't it? The only thing I changed was to remove 
> from your IConverter definition. I'm using Wicket 1.3.4.
>
> Thoughts?
>
> Michael
>
> -Original Message-
> From: Jeremy Thomerson [mailto:[EMAIL PROTECTED]
> Sent: Saturday, May 31, 2008 11:18 PM
> To: users@wicket.apache.org
> Subject: Re: Timestamp -> java.util.Date convertion in Wicket
>
> Weird indeed.  Do this... capture the return of your
((ConverterLocator)
> getConverterLocator()).set(...) call.  In that method, it is returning
> the
> result of a Map.put(Timestamp.class, your-converter).  Therefore, the
> result
> should be non-null, as you should be overriding the default
> implementation
> that was already put in the map.
>
> Something like:
>
> IConverter ic = ((ConverterLocator)
> getConverterLocator()).set(Timestamp.class, new
IConverter()
> {
>
>private static final long serialVersionUID = 1L;
>
>public Timestamp convertToObject(String value, Locale
> locale) {
>if (value == null) {
>return null;
>}
>if (locale == null) {
>locale = Locale.getDefault();
>}
>DateFormat format =
> DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT);
>try {
>Date date = format.parse(value);
>return new Timestamp(date.getTime());
>} catch (ParseException e) {
>throw new ConversionException("Cannot parse '"
>+ value + "' using format " + format)
>.setSourceValue(value).setTargetType(
>
> Timestamp.class).setConverter(this)
>.setLocale(locale);
>}
>}
>
>public String convertToString(final Timestamp value,
> Locale
> locale) {
>if (value == null) {
>return null;
>}
>if (locale == null) {
>locale = Locale.getDefault();
>}
>DateFormat format =
> DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT);
>return format.format(value);
>}
>
>});
> System.out.println("I OVERRODE THIS CONVERTER: "+ ic);
>
> Also - what version are you running?
>
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>
> On Sun, Jun 1, 2008 at 1:05 AM, Michael Mehrle
<[EMAIL PROTECTED]>
> wrote:
>
> > Yes, exactly the way you're doing it - didn't change anything except
> for
> > removing the generic def in the IConverter interface (not using
> generics
> > yet in my current project).
> >
> > And yes, I also set my breakpoint but it's never being called. The
> field
> > simply grabs the time value and no conversion seems to be happening.
> >
> > BTW, very elegant fix - just hope I can make this work (driving me
> cra

RE: How to access properties files outside of Wicket components?

2008-06-02 Thread Michael Mehrle
That's what I have been doing, mate ;-)

I'm looking for a solution that allows me to load the properties file
out of the same folder as my class or WEB-INF. Not working right now and
I pretty much tried all approaches I could find online.

Wicket does not offer a way to access resource bundles outside of Wicket
components?

Michael

-Original Message-
From: Erik van Oosten [mailto:[EMAIL PROTECTED] 
Sent: Sunday, June 01, 2008 10:32 PM
To: users@wicket.apache.org
Subject: Re: How to access properties files outside of Wicket
components?

You should the other getResource*() methods, those on Class:
http://java.sun.com/javase/6/docs/api/java/lang/Class.html#getResourceAs
Stream(java.lang.String)

Regards,
    Erik.


Michael Mehrle wrote:
> Right now I had to resort to the solution below, but I would very much
> like to know the standard way of doing this, as this required me to
> place my properties file into the src/main/resources folder:
>
> static {
>   try {
>   
>
properties.load(Thread.currentThread().getContextClassLoader().getResour
> ceAsStream(
>   "MyComponent.properties"));
>   } catch (Exception e) {
>   LOG.error("Unable to load file
> MyComponent.properties' - error: {}", e.getMessage(), e);
>   }
>   }
>
>   public static String getProperty(String key) {
>   return properties.getProperty(key);
>   }
>   


-
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 access properties files outside of Wicket components?

2008-06-01 Thread Michael Mehrle
Right now I had to resort to the solution below, but I would very much
like to know the standard way of doing this, as this required me to
place my properties file into the src/main/resources folder:

static {
try {

properties.load(Thread.currentThread().getContextClassLoader().getResour
ceAsStream(
"MyComponent.properties"));
} catch (Exception e) {
LOG.error("Unable to load file
MyComponent.properties' - error: {}", e.getMessage(), e);
}
}

public static String getProperty(String key) {
return properties.getProperty(key);
}



-Original Message-
From: Michael Mehrle [mailto:[EMAIL PROTECTED] 
Sent: Sunday, June 01, 2008 3:50 PM
To: users@wicket.apache.org
Subject: How to access properties files outside of Wicket components?

I just refactored one of my pages and externalized an inner class into
an outer class that however still needs access to that page's property
stings. Can I just treat that page's properties file as a resource
bundle and retrieve the strings the old fashioned way? Or will there be
problems?

 

Thanks,

 

Michael


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



How to access properties files outside of Wicket components?

2008-06-01 Thread Michael Mehrle
I just refactored one of my pages and externalized an inner class into
an outer class that however still needs access to that page's property
stings. Can I just treat that page's properties file as a resource
bundle and retrieve the strings the old fashioned way? Or will there be
problems?

 

Thanks,

 

Michael



RE: Timestamp -> java.util.Date convertion in Wicket

2008-06-01 Thread Michael Mehrle
Okay, this is what I'm getting:

[DEBUG EviteApplication] I OVERRODE THIS CONVERTER: null

Strange - isn't it? The only thing I changed was to remove 
from your IConverter definition. I'm using Wicket 1.3.4.

Thoughts?

Michael

-Original Message-
From: Jeremy Thomerson [mailto:[EMAIL PROTECTED] 
Sent: Saturday, May 31, 2008 11:18 PM
To: users@wicket.apache.org
Subject: Re: Timestamp -> java.util.Date convertion in Wicket

Weird indeed.  Do this... capture the return of your ((ConverterLocator)
getConverterLocator()).set(...) call.  In that method, it is returning
the
result of a Map.put(Timestamp.class, your-converter).  Therefore, the
result
should be non-null, as you should be overriding the default
implementation
that was already put in the map.

Something like:

IConverter ic = ((ConverterLocator)
getConverterLocator()).set(Timestamp.class, new IConverter()
{

private static final long serialVersionUID = 1L;

public Timestamp convertToObject(String value, Locale
locale) {
if (value == null) {
return null;
}
if (locale == null) {
locale = Locale.getDefault();
}
DateFormat format =
DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT);
try {
Date date = format.parse(value);
return new Timestamp(date.getTime());
} catch (ParseException e) {
throw new ConversionException("Cannot parse '"
+ value + "' using format " + format)
.setSourceValue(value).setTargetType(
 
Timestamp.class).setConverter(this)
.setLocale(locale);
}
}

public String convertToString(final Timestamp value,
Locale
locale) {
if (value == null) {
return null;
}
if (locale == null) {
locale = Locale.getDefault();
}
DateFormat format =
DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT);
return format.format(value);
}

});
System.out.println("I OVERRODE THIS CONVERTER: "+ ic);

Also - what version are you running?


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

On Sun, Jun 1, 2008 at 1:05 AM, Michael Mehrle <[EMAIL PROTECTED]>
wrote:

> Yes, exactly the way you're doing it - didn't change anything except
for
> removing the generic def in the IConverter interface (not using
generics
> yet in my current project).
>
> And yes, I also set my breakpoint but it's never being called. The
field
> simply grabs the time value and no conversion seems to be happening.
>
> BTW, very elegant fix - just hope I can make this work (driving me
crazy
> this issue).
>
> Michael
>
> -Original Message-
> From: Jeremy Thomerson [mailto:[EMAIL PROTECTED]
> Sent: Saturday, May 31, 2008 7:14 PM
> To: users@wicket.apache.org
> Subject: RE: Timestamp -> java.util.Date convertion in Wicket
>
> Did you make sure to use the code exactly (it calls SET on the
concrete
> implementation rather than the standard way of just adding a converter
> to the interface)?
>
> Which version are you using?  This problem appeared in 1.3, and I have
> tested my fix in all versions of of 1.3 and 1.4-m1 and m2.
>
> You can set a breakpoint in your implementation and in the default
with
> Wicket to see which is getting called.  Let me know what you find.
>
> Jeremy Thomerson
> http://www.wickettraining.com
> -- sent from a wireless device
>
>
> -Original Message-
> From: Michael Mehrle <[EMAIL PROTECTED]>
> Sent: Saturday, May 31, 2008 8:57 PM
> To: users@wicket.apache.org
> Subject: RE: Timestamp -> java.util.Date convertion in Wicket
>
> Hello Jeremy:
>
> I added the converter to my apps init() method per your example but
the
> problem persists. I keep seeing 12:00am instead of the date. Any
> suggestions?
>
> Michael
>
> -Original Message-
> From: Jeremy Thomerson [mailto:[EMAIL PROTECTED]
> Sent: Friday, May 30, 2008 7:35 PM
> To: users@wicket.apache.org
> Subject: RE: Timestamp -> java.util.Date convertion in Wicket
>
> Found a link:
>
> http://markmail.org/message/m5cyca4vsrrvcrid
>
> Jeremy Thomerson
> http://www.wickettraining.com
> -- sent from a wireless device
>
>
> -Original Message-
> From: Michael Mehrle <[EMAIL PROTECTED]>
> Sent: Friday, May 30, 2008 8:55 PM
> To: users@wicket.apache.org
>

RE: Changing Link string conditionally?

2008-06-01 Thread Michael Mehrle
Okay, so I need to treat the link text as a separate entity - makes
sense. Thanks a lot - can't believe I didn't think of that...

Michael

-Original Message-
From: Erik van Oosten [mailto:[EMAIL PROTECTED] 
Sent: Sunday, June 01, 2008 2:00 AM
To: users@wicket.apache.org
Subject: Re: Changing Link string conditionally?

The idea is to put a span inside the a, and then attach a Label to the
span.

Is that something you can work with?

Regards,
    Erik.


Michael Mehrle wrote:
> Okay, this seems so easy, but I'm somehow stuck. How do I change the
> string of a Link based on some condition? Do I simply provide a
> terminated tag and set the model (i.e. the visible string) in my code?
>
>   


-
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: Timestamp -> java.util.Date convertion in Wicket

2008-05-31 Thread Michael Mehrle
Yes, exactly the way you're doing it - didn't change anything except for
removing the generic def in the IConverter interface (not using generics
yet in my current project).

And yes, I also set my breakpoint but it's never being called. The field
simply grabs the time value and no conversion seems to be happening.

BTW, very elegant fix - just hope I can make this work (driving me crazy
this issue).

Michael

-Original Message-
From: Jeremy Thomerson [mailto:[EMAIL PROTECTED] 
Sent: Saturday, May 31, 2008 7:14 PM
To: users@wicket.apache.org
Subject: RE: Timestamp -> java.util.Date convertion in Wicket

Did you make sure to use the code exactly (it calls SET on the concrete
implementation rather than the standard way of just adding a converter
to the interface)?

Which version are you using?  This problem appeared in 1.3, and I have
tested my fix in all versions of of 1.3 and 1.4-m1 and m2.

You can set a breakpoint in your implementation and in the default with
Wicket to see which is getting called.  Let me know what you find.

Jeremy Thomerson
http://www.wickettraining.com
-- sent from a wireless device


-Original Message-----
From: Michael Mehrle <[EMAIL PROTECTED]>
Sent: Saturday, May 31, 2008 8:57 PM
To: users@wicket.apache.org
Subject: RE: Timestamp -> java.util.Date convertion in Wicket

Hello Jeremy:

I added the converter to my apps init() method per your example but the
problem persists. I keep seeing 12:00am instead of the date. Any
suggestions?

Michael

-Original Message-
From: Jeremy Thomerson [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 30, 2008 7:35 PM
To: users@wicket.apache.org
Subject: RE: Timestamp -> java.util.Date convertion in Wicket

Found a link:

http://markmail.org/message/m5cyca4vsrrvcrid

Jeremy Thomerson
http://www.wickettraining.com
-- sent from a wireless device


-----Original Message-
From: Michael Mehrle <[EMAIL PROTECTED]>
Sent: Friday, May 30, 2008 8:55 PM
To: users@wicket.apache.org
Subject: Timestamp -> java.util.Date convertion in Wicket

I am persisting java.util.Date objects to the DB but am getting
Timestamp objects back (no surprise there since the hibernate type is
set to 'timestamp'). Wicket converts the Timestamp and populates my
field without complaining but all I'm getting is the time (12:00am - the
default start time since it wasn't set due to it originating as a Date).
Is there some sort of default converter? I assume this is a common
scenario.

 

Thanks,

 

Michael 



-
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: Timestamp -> java.util.Date convertion in Wicket

2008-05-31 Thread Michael Mehrle
Hello Jeremy:

I added the converter to my apps init() method per your example but the
problem persists. I keep seeing 12:00am instead of the date. Any
suggestions?

Michael

-Original Message-
From: Jeremy Thomerson [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 30, 2008 7:35 PM
To: users@wicket.apache.org
Subject: RE: Timestamp -> java.util.Date convertion in Wicket

Found a link:

http://markmail.org/message/m5cyca4vsrrvcrid

Jeremy Thomerson
http://www.wickettraining.com
-- sent from a wireless device


-Original Message-
From: Michael Mehrle <[EMAIL PROTECTED]>
Sent: Friday, May 30, 2008 8:55 PM
To: users@wicket.apache.org
Subject: Timestamp -> java.util.Date convertion in Wicket

I am persisting java.util.Date objects to the DB but am getting
Timestamp objects back (no surprise there since the hibernate type is
set to 'timestamp'). Wicket converts the Timestamp and populates my
field without complaining but all I'm getting is the time (12:00am - the
default start time since it wasn't set due to it originating as a Date).
Is there some sort of default converter? I assume this is a common
scenario.

 

Thanks,

 

Michael 



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



Changing Link string conditionally?

2008-05-31 Thread Michael Mehrle
Okay, this seems so easy, but I'm somehow stuck. How do I change the
string of a Link based on some condition? Do I simply provide a
terminated tag and set the model (i.e. the visible string) in my code?

 

Michael



Timestamp -> java.util.Date convertion in Wicket

2008-05-30 Thread Michael Mehrle
I am persisting java.util.Date objects to the DB but am getting
Timestamp objects back (no surprise there since the hibernate type is
set to 'timestamp'). Wicket converts the Timestamp and populates my
field without complaining but all I'm getting is the time (12:00am - the
default start time since it wasn't set due to it originating as a Date).
Is there some sort of default converter? I assume this is a common
scenario.

 

Thanks,

 

Michael 



RE: AjaxLink not clickable in IE

2008-05-22 Thread Michael Mehrle
Nothing happens in the AJAX debug - checked that first thing. It just
behaves as if the link doesn't exist.

Michael

-Original Message-
From: richardwilko [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 22, 2008 1:54 AM
To: users@wicket.apache.org
Subject: Re: AjaxLink not clickable in IE


I have found ie to be rubbish it comes to javascript, any error in any
file
can stop all the javascript on the page working.  make sure you dont
have
other javascript on the page which causes problems.

Also open up the wicket ajax debug window and see you anything happens
in
there when you click on the link.


richard



igor.vaynberg wrote:
> 
> wow. we spoil our users too much when they complain about not getting
> a response after 3 hours...
> 
> -igor
> 
> On Wed, May 21, 2008 at 5:24 PM, Michael Mehrle
<[EMAIL PROTECTED]>
> wrote:
>> Anyone? Or are we only talking generics today? ;-)
>>
>> Seriously, could use a 2nd pair of eyes on this one... any input
>> appreciated.
>>
>> -Original Message-
>> From: Michael Mehrle [mailto:[EMAIL PROTECTED]
>> Sent: Wednesday, May 21, 2008 2:31 PM
>> To: users@wicket.apache.org
>> Subject: AjaxLink not clickable in IE
>>
>> I've got this AjaxLink:
>>
>>
>>
>> fooLink = new AjaxLink("fooLink") {
>>
>>@Override
>>
>>public void
>> onClick(AjaxRequestTarget target) {
>>
>>Boolean
>> selected = (Boolean) fooCheckBox.getModelObject();
>>
>>if
>> (!selected) {
>>
>>
>> fooCheckBox.setModelObject((new Boolean(true)));
>>
>>}
>>
>>
>> target.addComponent(fooCheckBox);
>>
>>// pop up
>> the modal
>>
>>
>> showRecurringFooModal(recurringFooModalWindow, target);
>>
>>}
>>
>>};
>>
>>
>>
>>   > key="fooLabel" /> 
>>
>>
>>
>> Works fine in Safari and Firefox but in IE it's not clickable - looks
>> like a link but the mouse pointer doesn't change and nothing happens
>> when clicking. No error message either in IE's JS console or in AJAX.
>> Any idea what I'm doing wrong here?
>>
>>
>>
>> Michael
>>
>>
>> -
>> 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/AjaxLink-not-clickable-in-IE-tp17379705p17399591.h
tml
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: AjaxLink not clickable in IE

2008-05-22 Thread Michael Mehrle
LOL - sorry - I saw tons of messages regarding generics and wanted to
make sure it didn't fall through the cracks. 

Yes, you spoil us! :-P

M.

-Original Message-
From: Igor Vaynberg [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 21, 2008 6:50 PM
To: users@wicket.apache.org
Subject: Re: AjaxLink not clickable in IE

wow. we spoil our users too much when they complain about not getting
a response after 3 hours...

-igor

On Wed, May 21, 2008 at 5:24 PM, Michael Mehrle <[EMAIL PROTECTED]>
wrote:
> Anyone? Or are we only talking generics today? ;-)
>
> Seriously, could use a 2nd pair of eyes on this one... any input
> appreciated.
>
> -Original Message-
> From: Michael Mehrle [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, May 21, 2008 2:31 PM
> To: users@wicket.apache.org
> Subject: AjaxLink not clickable in IE
>
> I've got this AjaxLink:
>
>
>
> fooLink = new AjaxLink("fooLink") {
>
>@Override
>
>public void
> onClick(AjaxRequestTarget target) {
>
>Boolean
> selected = (Boolean) fooCheckBox.getModelObject();
>
>if
> (!selected) {
>
>
> fooCheckBox.setModelObject((new Boolean(true)));
>
>}
>
>
> target.addComponent(fooCheckBox);
>
>// pop up
> the modal
>
>
> showRecurringFooModal(recurringFooModalWindow, target);
>
>}
>
>};
>
>
>
>  key="fooLabel" />
>
>
>
> Works fine in Safari and Firefox but in IE it's not clickable - looks
> like a link but the mouse pointer doesn't change and nothing happens
> when clicking. No error message either in IE's JS console or in AJAX.
> Any idea what I'm doing wrong here?
>
>
>
> Michael
>
>
> -
> 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: AjaxLink not clickable in IE

2008-05-21 Thread Michael Mehrle
Anyone? Or are we only talking generics today? ;-)

Seriously, could use a 2nd pair of eyes on this one... any input
appreciated.

-Original Message-
From: Michael Mehrle [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 21, 2008 2:31 PM
To: users@wicket.apache.org
Subject: AjaxLink not clickable in IE

I've got this AjaxLink:

 

fooLink = new AjaxLink("fooLink") {

@Override

public void
onClick(AjaxRequestTarget target) {

Boolean
selected = (Boolean) fooCheckBox.getModelObject();

if
(!selected) {

 
fooCheckBox.setModelObject((new Boolean(true)));

}

 
target.addComponent(fooCheckBox);

// pop up
the modal

 
showRecurringFooModal(recurringFooModalWindow, target);

}

};

 



 

Works fine in Safari and Firefox but in IE it's not clickable - looks
like a link but the mouse pointer doesn't change and nothing happens
when clicking. No error message either in IE's JS console or in AJAX.
Any idea what I'm doing wrong here?

 

Michael


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



RE: AjaxLink not clickable in IE

2008-05-21 Thread Michael Mehrle
FYI - this is the HTML being generated:

Click me now.

Does not work in IE only. Any input would be appreciated.

Michael

-Original Message-
From: Michael Mehrle [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 21, 2008 2:31 PM
To: users@wicket.apache.org
Subject: AjaxLink not clickable in IE

I've got this AjaxLink:

 

fooLink = new AjaxLink("fooLink") {

@Override

public void
onClick(AjaxRequestTarget target) {

Boolean
selected = (Boolean) fooCheckBox.getModelObject();

if
(!selected) {

 
fooCheckBox.setModelObject((new Boolean(true)));

}

 
target.addComponent(fooCheckBox);

// pop up
the modal

 
showRecurringFooModal(recurringFooModalWindow, target);

}

};

 



 

Works fine in Safari and Firefox but in IE it's not clickable - looks
like a link but the mouse pointer doesn't change and nothing happens
when clicking. No error message either in IE's JS console or in AJAX.
Any idea what I'm doing wrong here?

 

Michael


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



AjaxLink not clickable in IE

2008-05-21 Thread Michael Mehrle
I've got this AjaxLink:

 

fooLink = new AjaxLink("fooLink") {

@Override

public void
onClick(AjaxRequestTarget target) {

Boolean
selected = (Boolean) fooCheckBox.getModelObject();

if
(!selected) {

 
fooCheckBox.setModelObject((new Boolean(true)));

}

 
target.addComponent(fooCheckBox);

// pop up
the modal

 
showRecurringFooModal(recurringFooModalWindow, target);

}

};

 



 

Works fine in Safari and Firefox but in IE it's not clickable - looks
like a link but the mouse pointer doesn't change and nothing happens
when clicking. No error message either in IE's JS console or in AJAX.
Any idea what I'm doing wrong here?

 

Michael



DateField throwing runtime error in IE only

2008-05-21 Thread Michael Mehrle
I have a DateField inside a modal and when clicking on the date icon
it's throwing a 'unknown runtime error' in IE's JavaScript console.
Works in Safari and Firefox.

 

Is this a commonly known problem?

 

Michael



DateTimeField AjaxEventBehavior problem

2008-05-20 Thread Michael Mehrle
I've got a DateTimeField panel which works just fine. However, I need to
toggle the visibility of a checkbox once the date has been populated.
This is of course via AJAX with an AjaxEventBehavior.

 

I tried to slap the behavior on the DateTimeField panel, but the onEvent
method only gets triggered when I select am/pm, which is the last field
in that panel. BTW, when referring to 'panel' I mean that internal panel
that DateTimeField uses, not my own panel in my page.

 

How can I make the date field in the DateTimeField panel trigger my
event?

 

Thanks,

 

Michael



RE: DateField strangeness

2008-05-20 Thread Michael Mehrle
Grrr - of course!! I originally mocked it as a TextField. Thanks :-)

Michael

-Original Message-
From: Gerolf Seitz [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 20, 2008 1:52 PM
To: users@wicket.apache.org
Subject: Re: DateField strangeness

iirc, that happens when the corresponding markup of the DateField is
an  tag and not a  tag.
DateField is a Panel (or FormComponentPanel), but not a FormComponent
like TextField.

hth,
  Gerolf

On Tue, May 20, 2008 at 10:47 PM, Michael Mehrle <[EMAIL PROTECTED]>
wrote:

> I'm adding a DateField like this:
>
>
>
> DateField endTimeField = new DateField("eventSchedule.endTime");
>
>
>
> Now, when I open my page I see two fields - one with the id
> "eventSchedule.endTime" and one next to it, before the JS calendar icon
> called 'date83'.  All I want to do is to show one field followed by the
> JS calendar icon.
>
>
>
> Is there something I'm missing here?
>
>
>
> Michael
>
>


DateField strangeness

2008-05-20 Thread Michael Mehrle
I'm adding a DateField like this:

 

DateField endTimeField = new DateField("eventSchedule.endTime");

 

Now, when I open my page I see two fields - one with the id
"eventSchedule.endTime" and one next to it, before the JS calendar icon
called 'date83'.  All I want to do is to show one field followed by the
JS calendar icon.

 

Is there something I'm missing here?

 

Michael



RE: Strange problem cancelling out of a modal

2008-05-20 Thread Michael Mehrle
That seems to be working fine now. It's sometimes easy to ignore/forget
the underpinnings of how wicket works. Obviously, to wicket this is a
submit button and the form was being processed prior to closing the
modal.

Thanks a lot for your help :-)

Michael

-Original Message-
From: Maurice Marrink [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 20, 2008 11:56 AM
To: users@wicket.apache.org
Subject: Re: Strange problem cancelling out of a modal

See Button#setDefaultFormProcessing and you would call it either in
the constructor of the button or directly after constructing the
button. onsubmit is too late.

Maurice

On Tue, May 20, 2008 at 8:49 PM, Michael Mehrle <[EMAIL PROTECTED]>
wrote:
> I looked for that call, but couldn't find it - could you please point
me
> in the right direction?
>
> Also, I assume setting this in the cancel button's event handler would
> be sufficient?
>
> Thanks for your input.
>
> -Original Message-
> From: Maurice Marrink [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, May 20, 2008 11:47 AM
> To: users@wicket.apache.org
> Subject: Re: Strange problem cancelling out of a modal
>
> It turns off form validating and model updating, giving you full
> control to this yourself or skip it all together.
> In the case of a cancel button the latter is generally what you want.
>
> Alternatively you can use a plain link so your form does not even get
> submitted.
>
> Maurice
>
> On Tue, May 20, 2008 at 8:34 PM, Michael Mehrle
<[EMAIL PROTECTED]>
> wrote:
>> Not that I am aware of - don't know that setting. What would that do
>> exactly?
>>
>>
>>
>> -Original Message-
>> From: Maurice Marrink [mailto:[EMAIL PROTECTED]
>> Sent: Tuesday, May 20, 2008 12:02 AM
>> To: users@wicket.apache.org
>> Subject: Re: Strange problem cancelling out of a modal
>>
>> Does your cancel button have default formprocessing set to false?
>>
>> Maurice
>>
>> On Tue, May 20, 2008 at 2:36 AM, Michael Mehrle
> <[EMAIL PROTECTED]>
>> wrote:
>>> I've got a strange problem cancelling out of a modal. Unless I make
>>> selections on all my form components inside that modal, it just
won't
>>> close. Debugger shows that the cancel button's onSubmit() method
>> doesn't
>>> even get called, unless I fill out all the fields and select all the
>>> radios. The AJAX panel doesn't show any errors either, neither does
>> the
>>> feedback panel.
>>>
>>>
>>>
>>> I suspect this has to do with those components being set to
required,
>>> but I never had a problem like that before.
>>>
>>>
>>>
>>> Any idea what's going on here?
>>>
>>>
>>>
>>> Michael
>>>
>>>
>>
>> -
>> 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]


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



RE: Strange problem cancelling out of a modal

2008-05-20 Thread Michael Mehrle
I looked for that call, but couldn't find it - could you please point me
in the right direction?

Also, I assume setting this in the cancel button's event handler would
be sufficient?

Thanks for your input.

-Original Message-
From: Maurice Marrink [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 20, 2008 11:47 AM
To: users@wicket.apache.org
Subject: Re: Strange problem cancelling out of a modal

It turns off form validating and model updating, giving you full
control to this yourself or skip it all together.
In the case of a cancel button the latter is generally what you want.

Alternatively you can use a plain link so your form does not even get
submitted.

Maurice

On Tue, May 20, 2008 at 8:34 PM, Michael Mehrle <[EMAIL PROTECTED]>
wrote:
> Not that I am aware of - don't know that setting. What would that do
> exactly?
>
>
>
> -Original Message-
> From: Maurice Marrink [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, May 20, 2008 12:02 AM
> To: users@wicket.apache.org
> Subject: Re: Strange problem cancelling out of a modal
>
> Does your cancel button have default formprocessing set to false?
>
> Maurice
>
> On Tue, May 20, 2008 at 2:36 AM, Michael Mehrle
<[EMAIL PROTECTED]>
> wrote:
>> I've got a strange problem cancelling out of a modal. Unless I make
>> selections on all my form components inside that modal, it just won't
>> close. Debugger shows that the cancel button's onSubmit() method
> doesn't
>> even get called, unless I fill out all the fields and select all the
>> radios. The AJAX panel doesn't show any errors either, neither does
> the
>> feedback panel.
>>
>>
>>
>> I suspect this has to do with those components being set to required,
>> but I never had a problem like that before.
>>
>>
>>
>> Any idea what's going on here?
>>
>>
>>
>> Michael
>>
>>
>
> -
> 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: Strange problem cancelling out of a modal

2008-05-20 Thread Michael Mehrle
Not that I am aware of - don't know that setting. What would that do
exactly?



-Original Message-
From: Maurice Marrink [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 20, 2008 12:02 AM
To: users@wicket.apache.org
Subject: Re: Strange problem cancelling out of a modal

Does your cancel button have default formprocessing set to false?

Maurice

On Tue, May 20, 2008 at 2:36 AM, Michael Mehrle <[EMAIL PROTECTED]>
wrote:
> I've got a strange problem cancelling out of a modal. Unless I make
> selections on all my form components inside that modal, it just won't
> close. Debugger shows that the cancel button's onSubmit() method
doesn't
> even get called, unless I fill out all the fields and select all the
> radios. The AJAX panel doesn't show any errors either, neither does
the
> feedback panel.
>
>
>
> I suspect this has to do with those components being set to required,
> but I never had a problem like that before.
>
>
>
> Any idea what's going on here?
>
>
>
> Michael
>
>

-
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: Problem with Wicket and MySQL

2008-05-19 Thread Michael Mehrle
I'm pretty sure putting the jar into Tomcat's container lib dir will fix
his problem.

-Original Message-
From: Eelco Hillenius [mailto:[EMAIL PROTECTED] 
Sent: Monday, May 19, 2008 6:07 PM
To: users@wicket.apache.org
Subject: Re: Problem with Wicket and MySQL

> and i have made sure i have this jar
> "mysql-connector-java-5.1.6-bin.jar" to my buid path... but the
> problem goes on...

Build path != runtime path. Make sure the jar is in your runtime path as
well.

FWIW, never ever write such code for a production application because
you'll run into scalability problems pretty fast. At the very least,
use a connection pool.

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: Problem with Wicket and MySQL

2008-05-19 Thread Michael Mehrle
Okay, I'm not sure how you've set up the project, but I remember that
you sometimes had to copy the JDBC driver into the tomcat lib directory.
Haven't touched tomcat in a while, but there are project specific libs
and container specific ones - if you put it in the container lib dir
you'll avoid these classloader issues.



-Original Message-
From: Bogdan Mihai [mailto:[EMAIL PROTECTED] 
Sent: Monday, May 19, 2008 6:00 PM
To: users@wicket.apache.org
Subject: Re: Problem with Wicket and MySQL

I am using Eclipse 3.3 with the last version of JDK

On Tue, May 20, 2008 at 3:58 AM, Michael Mehrle <[EMAIL PROTECTED]>
wrote:
> Are you running this out of your IDE or with maven?
>
> -Original Message-
> From: Bogdan Mihai [mailto:[EMAIL PROTECTED]
> Sent: Monday, May 19, 2008 5:53 PM
> To: users@wicket.apache.org
> Subject: Re: Problem with Wicket and MySQL
>
> Hello,
>
> this are my imports:
>
> import java.util.ArrayList;
> import java.sql.DriverManager;
> import java.sql.ResultSet;
> import java.sql.SQLException;
>
> import com.mysql.jdbc.Connection;
> import com.mysql.jdbc.Driver;
> import com.mysql.jdbc.Statement;
>
> and i have made sure i have this jar
> "mysql-connector-java-5.1.6-bin.jar" to my buid path... but the
> problem goes on...
>
> On Tue, May 20, 2008 at 3:48 AM, Michael Mehrle
<[EMAIL PROTECTED]>
> wrote:
>> You need to download the MYSQL JDBC driver and put it in your
> classpath.
>> That'll fix it.
>>
>> The code is trying to load the JDBC driver 'by name' - since it's not
>> there it can't find it.
>>
>> Michael
>>
>> -Original Message-
>> From: Mihai Bogdan Eugen [mailto:[EMAIL PROTECTED]
>> Sent: Monday, May 19, 2008 5:46 PM
>> To: users@wicket.apache.org
>> Subject: Problem with Wicket and MySQL
>>
>>
>> Hello,
>>
>> First of all, I am kind of new with this Wicket, actually, I am using
>> it for only a couple of days.
>> Secondly, I don't even know if I post this in the right place, so I
>> appologize if I had made such a mistake.
>>
>> Now, the problem that made write this post:
>>
>> I am working on a small JAVA + MySQL project, and by chance, when
>> browsing through Apache Software, I have discovered Wicket. I kind of
>> got the feeling with it thanks to the tutorials, but now I try to
>> integrate something related to MySQL in it:
>>
>> I have a class Catalog, :
>>
>> public class Catalog
>> {
>>   private ArrayList products;
>>
>>   public Catalog()
>>   {
>>   this.products = new ArrayList();
>>   this.populateCatalog();
>>   }
>>   private void populateCatalog()
>>   {
>>   Connection connection = null;
>>   Statement statement = null;
>>   ResultSet result_set = null;
>>
>>   String url = "jdbc:mysql://localhost:3306/proiect";
>>   String user = "root";
>>   String password = "";
>>
>>   try
>>   {
>>   Class.forName("com.mysql.jdbc.Driver");
>>
>>   connection  = (Connection)
>> DriverManager.getConnection(url,
>> user, password);
>>   statement   = (Statement)
>> connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
>> ResultSet.CONCUR_READ_ONLY);
>>   result_set  = statement.executeQuery("SELECT * from
>> produse
>> ORDER BY id_produs");
>>
>>   while(result_set.next())
>>   {
>>   this.products.add(new Product(
>> result_set.getInt("id_produs"),  result_set.getString("nume_poza")
));
>>   }
>>
>>   releaseResources(connection, statement, result_set);
>>   }
>>   catch (SQLException exception)
>>   {
>>   System.out.println("Eroare
>> =>"+exception.getLocalizedMessage());
>>   }
>>   catch (ClassNotFoundException exception)
>>   {
>>   exception.printStackTrace();
>>   }
>>   }
>>
>>   private static void releaseResources(Connection connection,
>> Statement
>> statement, ResultSet result_set) throws SQLException
>>   {
>>   result_set.close();
>>   statement.close();
>>  

RE: Problem with Wicket and MySQL

2008-05-19 Thread Michael Mehrle
Are you running this out of your IDE or with maven?

-Original Message-
From: Bogdan Mihai [mailto:[EMAIL PROTECTED] 
Sent: Monday, May 19, 2008 5:53 PM
To: users@wicket.apache.org
Subject: Re: Problem with Wicket and MySQL

Hello,

this are my imports:

import java.util.ArrayList;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;

import com.mysql.jdbc.Connection;
import com.mysql.jdbc.Driver;
import com.mysql.jdbc.Statement;

and i have made sure i have this jar
"mysql-connector-java-5.1.6-bin.jar" to my buid path... but the
problem goes on...

On Tue, May 20, 2008 at 3:48 AM, Michael Mehrle <[EMAIL PROTECTED]>
wrote:
> You need to download the MYSQL JDBC driver and put it in your
classpath.
> That'll fix it.
>
> The code is trying to load the JDBC driver 'by name' - since it's not
> there it can't find it.
>
> Michael
>
> -Original Message-
> From: Mihai Bogdan Eugen [mailto:[EMAIL PROTECTED]
> Sent: Monday, May 19, 2008 5:46 PM
> To: users@wicket.apache.org
> Subject: Problem with Wicket and MySQL
>
>
> Hello,
>
> First of all, I am kind of new with this Wicket, actually, I am using
> it for only a couple of days.
> Secondly, I don't even know if I post this in the right place, so I
> appologize if I had made such a mistake.
>
> Now, the problem that made write this post:
>
> I am working on a small JAVA + MySQL project, and by chance, when
> browsing through Apache Software, I have discovered Wicket. I kind of
> got the feeling with it thanks to the tutorials, but now I try to
> integrate something related to MySQL in it:
>
> I have a class Catalog, :
>
> public class Catalog
> {
>   private ArrayList products;
>
>   public Catalog()
>   {
>   this.products = new ArrayList();
>   this.populateCatalog();
>   }
>   private void populateCatalog()
>   {
>   Connection connection = null;
>   Statement statement = null;
>   ResultSet result_set = null;
>
>   String url = "jdbc:mysql://localhost:3306/proiect";
>   String user = "root";
>   String password = "";
>
>   try
>   {
>   Class.forName("com.mysql.jdbc.Driver");
>
>   connection  = (Connection)
> DriverManager.getConnection(url,
> user, password);
>   statement   = (Statement)
> connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
> ResultSet.CONCUR_READ_ONLY);
>   result_set  = statement.executeQuery("SELECT * from
> produse
> ORDER BY id_produs");
>
>   while(result_set.next())
>   {
>   this.products.add(new Product(
> result_set.getInt("id_produs"),  result_set.getString("nume_poza") ));
>   }
>
>   releaseResources(connection, statement, result_set);
>   }
>   catch (SQLException exception)
>   {
>   System.out.println("Eroare
> =>"+exception.getLocalizedMessage());
>   }
>   catch (ClassNotFoundException exception)
>   {
>   exception.printStackTrace();
>   }
>   }
>
>   private static void releaseResources(Connection connection,
> Statement
> statement, ResultSet result_set) throws SQLException
>   {
>   result_set.close();
>   statement.close();
>   connection.close();
>
>   }
> }
>
> When I "run" the site, i get an error at line
> "Class.forName("com.mysql.jdbc.Driver");" from the file up above. I
> don;t know how to copy-paste the output on the Tomcat Servlet Engine
> (oh, yes, I am running it on Tomcat), it is embedded into a JAVA
> window... Anywya, the next line in the stack trace, besides
> ClassNotFoundException: com.mysql.jdbc.Driver
> is "at
>
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader
> .java);
>
> Any help it is highly apreciated, and thanks for your understanding.
> --
> View this message in context:
>
http://www.nabble.com/Problem-with-Wicket-and-MySQL-tp17331074p17331074.
> 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]
>
>



-- 
Mihai Bogdan Eugen

-
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: Problem with Wicket and MySQL

2008-05-19 Thread Michael Mehrle
You need to download the MYSQL JDBC driver and put it in your classpath.
That'll fix it.

The code is trying to load the JDBC driver 'by name' - since it's not
there it can't find it.

Michael

-Original Message-
From: Mihai Bogdan Eugen [mailto:[EMAIL PROTECTED] 
Sent: Monday, May 19, 2008 5:46 PM
To: users@wicket.apache.org
Subject: Problem with Wicket and MySQL


Hello,

First of all, I am kind of new with this Wicket, actually, I am using
it for only a couple of days.
Secondly, I don't even know if I post this in the right place, so I
appologize if I had made such a mistake.

Now, the problem that made write this post:

I am working on a small JAVA + MySQL project, and by chance, when
browsing through Apache Software, I have discovered Wicket. I kind of
got the feeling with it thanks to the tutorials, but now I try to
integrate something related to MySQL in it:

I have a class Catalog, :

public class Catalog
{
   private ArrayList products;

   public Catalog()
   {
   this.products = new ArrayList();
   this.populateCatalog();
   }
   private void populateCatalog()
   {
   Connection connection = null;
   Statement statement = null;
   ResultSet result_set = null;

   String url = "jdbc:mysql://localhost:3306/proiect";
   String user = "root";
   String password = "";

   try
   {
   Class.forName("com.mysql.jdbc.Driver");

   connection  = (Connection)
DriverManager.getConnection(url,
user, password);
   statement   = (Statement)
connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
ResultSet.CONCUR_READ_ONLY);
   result_set  = statement.executeQuery("SELECT * from
produse
ORDER BY id_produs");

   while(result_set.next())
   {
   this.products.add(new Product(
result_set.getInt("id_produs"),  result_set.getString("nume_poza") ));
   }

   releaseResources(connection, statement, result_set);
   }
   catch (SQLException exception)
   {
   System.out.println("Eroare
=>"+exception.getLocalizedMessage());
   }
   catch (ClassNotFoundException exception)
   {
   exception.printStackTrace();
   }
   }

   private static void releaseResources(Connection connection,
Statement
statement, ResultSet result_set) throws SQLException
   {
   result_set.close();
   statement.close();
   connection.close();

   }
}

When I "run" the site, i get an error at line
"Class.forName("com.mysql.jdbc.Driver");" from the file up above. I
don;t know how to copy-paste the output on the Tomcat Servlet Engine
(oh, yes, I am running it on Tomcat), it is embedded into a JAVA
window... Anywya, the next line in the stack trace, besides
ClassNotFoundException: com.mysql.jdbc.Driver
is "at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader
.java);

Any help it is highly apreciated, and thanks for your understanding.
-- 
View this message in context:
http://www.nabble.com/Problem-with-Wicket-and-MySQL-tp17331074p17331074.
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]



Strange problem cancelling out of a modal

2008-05-19 Thread Michael Mehrle
I've got a strange problem cancelling out of a modal. Unless I make
selections on all my form components inside that modal, it just won't
close. Debugger shows that the cancel button's onSubmit() method doesn't
even get called, unless I fill out all the fields and select all the
radios. The AJAX panel doesn't show any errors either, neither does the
feedback panel.

 

I suspect this has to do with those components being set to required,
but I never had a problem like that before.

 

Any idea what's going on here?

 

Michael



RE: How to reset the feedback panel

2008-05-18 Thread Michael Mehrle
This works - thanks a lot. BTW, was the JIRA request directed to me?

Michael

-Original Message-
From: Eelco Hillenius [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 13, 2008 6:51 PM
To: users@wicket.apache.org
Subject: Re: How to reset the feedback panel

In 1.3 and up (so this won't work for 1.2):

You can use Session.get().getFeedbackMessages().clear() (or call clear
using a filter to just clear specific ones). Component specific
feedback messages are also temporarily stored in the session, so
you'll get those as well.

Btw, Session#getFeedbackMessages says "@return unmodifiable list of
feedback messages". This is wrong, as it is mutable (and it is
actually not a list anymore). Could you please create a JIRA issue to
fix the javadoc for 1.3 and 1.4?

Cheers,

Eelco

On Tue, May 13, 2008 at 6:28 PM, Michael Mehrle <[EMAIL PROTECTED]>
wrote:
> How do I reset the feedback panel from within an event handler? I
tried
>  to set the feedback's model to null, but that throws an error:
>
>
>
>  org.apache.wicket.WicketRuntimeException: No get method defined for
>  class: class com.evite.event.model.Event expression: feedback
>
> at
>
org.apache.wicket.util.lang.PropertyResolver.getGetAndSetter(PropertyRes
>  olver.java:433)
>
> at
>
org.apache.wicket.util.lang.PropertyResolver.getObjectAndGetSetter(Prope
>  rtyResolver.java:275)
>
> at
>
org.apache.wicket.util.lang.PropertyResolver.getValue(PropertyResolver.j
>  ava:84)
>
>

-
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 reset the feedback panel

2008-05-13 Thread Michael Mehrle
How do I reset the feedback panel from within an event handler? I tried
to set the feedback's model to null, but that throws an error:

 

org.apache.wicket.WicketRuntimeException: No get method defined for
class: class com.evite.event.model.Event expression: feedback

at
org.apache.wicket.util.lang.PropertyResolver.getGetAndSetter(PropertyRes
olver.java:433)

at
org.apache.wicket.util.lang.PropertyResolver.getObjectAndGetSetter(Prope
rtyResolver.java:275)

at
org.apache.wicket.util.lang.PropertyResolver.getValue(PropertyResolver.j
ava:84)



RE: Custom validation string for 'required' fields

2008-05-12 Thread Michael Mehrle
Never mind - I figured it out. I had changed the component ID and didn't
update the properties mapping for Required (very embarrassing but this
happens in the best families).



-Original Message-
From: Michael Mehrle [mailto:[EMAIL PROTECTED] 
Sent: Monday, May 12, 2008 5:08 PM
To: users@wicket.apache.org
Subject: Custom validation string for 'required' fields

This should be simple. I have a radio group ("group"), which is
required:

 

monthlyRadioGroup.setRequired(true);

 

that group is inside a WebMarkupContainer ("monthlyLayer"), which is
inside my form ("submitForm").

 

My panel's property file has this:

submitForm.monthlyLayer.group.Required = My own error message

 

However, I keep getting the default error message. What am I doing
wrong?

 

 

 


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



Custom validation string for 'required' fields

2008-05-12 Thread Michael Mehrle
This should be simple. I have a radio group ("group"), which is
required:

 

monthlyRadioGroup.setRequired(true);

 

that group is inside a WebMarkupContainer ("monthlyLayer"), which is
inside my form ("submitForm").

 

My panel's property file has this:

submitForm.monthlyLayer.group.Required = My own error message

 

However, I keep getting the default error message. What am I doing
wrong?

 

 

 



RE: DropDownChoice throws IllegalArgumentException with Integer values

2008-05-12 Thread Michael Mehrle
I completely agree, Johan. Bad example - I really like John Krasney's
example - a lot more elegant:


public MyBusinessClass {
  private int period; // getter/setter omitted for clarity }

MyBusinessClass myObject = // blah
List periods = Arrays.asList(new Integer[] { 1, 7, 14, 30, 365 });

new DropDownChoice("period",
  new PropertyModel(myObject, "period"),
  periods,
  new ChoiceRenderer() {
public String getDisplayValue(Object object) {
  int period = ((Integer) object).intValue();
  switch (period) {
case 1: return "Day";
case 7: return "Week";
case 14: return "Fortnight";
case 30: return "Month";
case 365: return "Year";
default: throw new RuntimeException();
  }
}
  }
);

-Original Message-
From: Johan Compagner [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 09, 2008 10:43 PM
To: users@wicket.apache.org
Subject: Re: DropDownChoice throws IllegalArgumentException with Integer
values

And thats why i think the wiki example is a bad one. It points people
in the wrong way.

On 5/10/08, John Krasnay <[EMAIL PROTECTED]> wrote:
> On Fri, May 09, 2008 at 06:42:11PM -0700, Michael Mehrle wrote:
>> Thanks for the input, John - but I the plot thickens here. It seems
that
>> there is actually a Wicket bug that needs to get fixed. After a lot
of
>> tinkering I figured out why I was getting this error. The VERY FIRST
>> TIME my renderer is being called it actually calls getIdValue() with
an
>> Integer, not with the Object that I'm using. In my debugger I saw the
>
> This isn't a bug. The integer is coming from your business model.
> DropDownChoice calls getIdValue() with this value so it can pre-select
> the correct option based on your current business object value.
>
> I'll try explaining this again. Maybe this time it will click.
>
> You give a DDC a model and a list of possible values. The type of
object
> returned by the model and the type of objects in the list *must* be
the
> same. You've already mentioned that your model returns an Integer, so
> you *must* pass a list of Integers, not IntegerSelectChoice or
anything
> else.
>
> If you want to display something different than the integer, you have
to
> implement some custom code in ChoiceRenderer.getDisplayValue(). Don't
> get hung up on the idea that the value returned has to be a property
of
> the objects in your list. It can be anything, such as the
> getString("period_" + object.toString()) in my example.
>
> You are probably used to a Model2 framework like Struts, where you
have
> to create lists of key/value pair objects to render s. No need
> for such an artificial structure in Wicket.
>
> Is the light coming on yet?
>
> jk
>
>
> -
> 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: DropDownChoice throws IllegalArgumentException with Integer values

2008-05-12 Thread Michael Mehrle
Yeah, I can be thick headed at times ;-)

Actually the solution is to add some custom code to getIdValue(), not
getDisplayValue(). It's a bit of a hack, but seems to work fine now.
Next time I'll build this differently though, that's for sure.

Thank you for walking me through this. This whole thing was a bit
confusing to me, especially since that tutorial leads people in the
wrong direction. It makes complete sense that the model and list objects
need to be of the same type.

Best,

Michael

-Original Message-
From: John Krasnay [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 09, 2008 7:13 PM
To: users@wicket.apache.org
Subject: Re: DropDownChoice throws IllegalArgumentException with Integer
values

On Fri, May 09, 2008 at 06:42:11PM -0700, Michael Mehrle wrote:
> Thanks for the input, John - but I the plot thickens here. It seems
that
> there is actually a Wicket bug that needs to get fixed. After a lot of
> tinkering I figured out why I was getting this error. The VERY FIRST
> TIME my renderer is being called it actually calls getIdValue() with
an
> Integer, not with the Object that I'm using. In my debugger I saw the

This isn't a bug. The integer is coming from your business model.
DropDownChoice calls getIdValue() with this value so it can pre-select
the correct option based on your current business object value.

I'll try explaining this again. Maybe this time it will click.

You give a DDC a model and a list of possible values. The type of object
returned by the model and the type of objects in the list *must* be the
same. You've already mentioned that your model returns an Integer, so
you *must* pass a list of Integers, not IntegerSelectChoice or anything
else.

If you want to display something different than the integer, you have to
implement some custom code in ChoiceRenderer.getDisplayValue(). Don't
get hung up on the idea that the value returned has to be a property of
the objects in your list. It can be anything, such as the
getString("period_" + object.toString()) in my example.

You are probably used to a Model2 framework like Struts, where you have
to create lists of key/value pair objects to render s. No need
for such an artificial structure in Wicket.

Is the light coming on yet?

jk


-
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 throws IllegalArgumentException with Integer values

2008-05-09 Thread Michael Mehrle
I used some of your stuff but ran into a suspected 1.3.3 Wicket bug (see
previous message I just sent out).

Thanks for the help - go and enjoy your weekend.

Michael

-Original Message-
From: Doug Donohoe [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 09, 2008 6:41 PM
To: users@wicket.apache.org
Subject: RE: DropDownChoice throws IllegalArgumentException with Integer
values


You can get at the underlying Integer by calling getKey() on the
IntegerSelectChoice object the model holds.  If that doesn't work,
you'll
have to figure out an alternative on your own.  The good news is that
you
have working code to start from.

-Doug



Michael Mehrle wrote:
> 
> I like your solution, but you are using an IntegerSelectChoice as your
> model, which won't work for me. I need to set my model to a regular
> Integer since that's what's being persisted on the backend.
> 
> Michael
> 

-- 
View this message in context:
http://www.nabble.com/DropDownChoice-throws-IllegalArgumentException-wit
h-Integer-values-tp17139227p17159082.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: DropDownChoice throws IllegalArgumentException with Integer values

2008-05-09 Thread Michael Mehrle
Thanks for the input, John - but I the plot thickens here. It seems that
there is actually a Wicket bug that needs to get fixed. After a lot of
tinkering I figured out why I was getting this error. The VERY FIRST
TIME my renderer is being called it actually calls getIdValue() with an
Integer, not with the Object that I'm using. In my debugger I saw the
same method being called with different object types (Integer and
IntegerSelectChoice). Take a look at my (obviously silly, but working)
work around:

/* Manages the display/id value for our dropdown choices. */
private class CountChoiceRenderer implements
IChoiceRenderer {
/**
 * Get the display value from the SelectChoice
(what the user sees)
 *
 * @param object a SelectChoice object
 * @return display
 */
@Todo(comment = "Replace Object with  once
Wicket incl. generics is available" )
public String getDisplayValue(Object object) {
return
((IntegerSelectChoice)object).getDisplay();
}

/**
 * Get key value (what is returned from the
browser)
 *
 * @param object a SelectChoice object
 * @param index not used
 * @return object.getKeyAsString()
 */
@Todo(comment = "Replace Object with  once
Wicket incl. generics is available" )
public String getIdValue(Object object, int
index) {
String result = "A";
if (object instanceof Integer) {
// WICKET BUG!!!
LOG.debug("Integer returned");
} else {
result =
((IntegerSelectChoice)object).getKeyAsString();
}
return result;
}

}

Now, it works, but only because I'm forcing my renderer to omit the case
when it's being called with an Integer. My log gets hit four times and
there are four dropdowns of that type in my panel. Very weird stuff
going on here. Of course there's a chance that I screwed something up,
but I have been over my code with a fine toothed comb and everything
looks clean. I'm only using IntegerSelectChoice for populating my
DropDownChoice, never Integers directly.

Michael

-Original Message-
From: John Krasnay [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 09, 2008 6:27 PM
To: users@wicket.apache.org
Subject: Re: DropDownChoice throws IllegalArgumentException with Integer
values

On Fri, May 09, 2008 at 03:39:07PM -0700, Michael Mehrle wrote:
> I like your solution, but you are using an IntegerSelectChoice as your
> model, which won't work for me. I need to set my model to a regular
> Integer since that's what's being persisted on the backend.
> 
> Michael

Quite right. I really don't like the idea of SelectChoice (a
view-related class) in a business model. Try this, Michael...

public MyBusinessClass {
  private int period; // getter/setter omitted for clarity
}

MyBusinessClass myObject = // blah
List periods = Arrays.asList(new Integer[] { 1, 7, 14, 30, 365 });

new DropDownChoice("period", 
  new PropertyModel(myObject, "period"),
  periods, 
  new ChoiceRenderer() {
public String getDisplayValue(Object object) {
  int period = ((Integer) object).intValue();
  switch (period) {
case 1: return "Day";
case 7: return "Week";
case 14: return "Fortnight";
case 30: return "Month";
case 365: return "Year";
default: throw new RuntimeException();
  }
}
  }
);

If like me you have to localize all your strings, it becomes even
simpler...

new DropDownChoice("period", 
  new PropertyModel(myObject, "period"),
  periods, 
  new ChoiceRenderer() {
public String getDisplayValue(Object object) {
  return getString("period_" + object.toString());
}
  }
);

...then in your properties file...

period_1=Day
period_7=Week
# ...and so on

jk

-
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 throws IllegalArgumentException with Integer values

2008-05-09 Thread Michael Mehrle
I like your solution, but you are using an IntegerSelectChoice as your
model, which won't work for me. I need to set my model to a regular
Integer since that's what's being persisted on the backend.

Michael


-Original Message-
From: Doug Donohoe [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 09, 2008 2:23 PM
To: users@wicket.apache.org
Subject: RE: DropDownChoice throws IllegalArgumentException with Integer
values


Yes, I'm on 1.4-m1.  However, you can remove all the generic stuff and
it
will still work.  I just migrated to generics yesterday, so the code
does
work on 1.3.3.

Or you can invest in moving to 1.4-m1.  It seems to be working great and
using generics is nice.

-Doug


Michael Mehrle wrote:
> 
> Hi Doug:
> 
> Thanks for that - this might just work :-) One problem I'm running
into
> is that the version of IChoiceRenderer I am using cannot be
> parameterized (it's not generic). Do you have a different wicket
release
> than I do?
> 
> I'm on 1.3.3.
> 
> Michael
> 
> -Original Message-
> From: Doug Donohoe [mailto:[EMAIL PROTECTED] 
> Sent: Friday, May 09, 2008 9:30 AM
> To: users@wicket.apache.org
> Subject: RE: DropDownChoice throws IllegalArgumentException with
Integer
> values
> 
> 
> I posted on my wiki how I solved this problem.  Hopefully it will help
> you:
> 
>
http://wiki.donohoedigital.com/wiki/Wiki.jsp?page=DropDownChoice+Example
> 
> -Doug
> 
> 
> Michael Mehrle wrote:
>> 
>> The code is pretty massive, would be tough to post all that here.
>> Basically, it's an integer backed DropDownChoice that has the word
>> 'guest' tagged on to incrementing numbers (e.g. 1 - 10) in the label.
>> When I remove the word 'guest' in the label it works just fine. Did
> your
>> dropdown have integers as the labels or was there more?
>> 
>> It seems that the problem lies in the conversion, and that Wicket
>> somehow is trying to grab the label value and put it into the model.
>> 
>> If anyone has run into such a problem I'd appreciate any input.
>> 
>> Michael
>> 
>> 
>> 
>> -Original Message-
>> From: Doug Donohoe [mailto:[EMAIL PROTECTED] 
>> Sent: Friday, May 09, 2008 8:41 AM
>> To: users@wicket.apache.org
>> Subject: RE: DropDownChoice throws IllegalArgumentException with
> Integer
>> values
>> 
>> 
>> Post your code.  It's hard to guess w/out seeing the code.  I have an
>> integer-based drop down choice working well (I used that example as
my
>> starting point).
>> 
>> -Doug
>> 
>> 
>> Michael Mehrle wrote:
>>> 
>>> Anyone? Was hoping for some input here ;-)
>>> 
>>> -Original Message-
>>> From: Michael Mehrle [mailto:[EMAIL PROTECTED] 
>>> Sent: Thursday, May 08, 2008 6:35 PM
>>> To: users@wicket.apache.org
>>> Subject: RE: DropDownChoice throws IllegalArgumentException with
>> Integer
>>> values
>>> 
>>> Okay, I just stepped through this and getting the feeling that
>> 'somehow'
>>> the label is being passed on to the model. Now, if the label is '1'
> it
>>> works fine, but if it's '1 day', then I get that error.
>>> 
>>> The question here is: why is the label being passed back to the
> model?
>>> Doesn't make any sense - I'm using a ChoiceRenderer as such:
>>> 
>>> new ChoiceRenderer("label", "value")
>>> 
>>> Do I also need to add some kind of converter to properly assign the
>>> model?
>>> 
>>> Any input would be appreciated.
>>> 
>>> Michael
>>> 
>>> -Original Message-
>>> From: Michael Mehrle [mailto:[EMAIL PROTECTED] 
>>> Sent: Thursday, May 08, 2008 5:19 PM
>>> To: users@wicket.apache.org
>>> Subject: DropDownChoice throws IllegalArgumentException with Integer
>>> values
>>> 
>>> This is the error I'm getting:
>>> 
>>>  
>>> 
>>> [DEBUG LoadAdDataInterceptor] Loaded
>>> AdData:[EMAIL PROTECTED] 
>>> 
>>> [ERROR RequestCycle] Cannot format given Object as a Number 
>>> 
>>> java.lang.IllegalArgumentException: Cannot format given Object as a
>>> Number
>>> 
>>> at
java.text.DecimalFormat.format(DecimalFormat.java:480)
>>> 
>>> at java.text.Format.format(Format.java:133)
>>> 
>>> at
>>>
>>
>
org.apache.wicket.util.conver

RE: DropDownChoice throws IllegalArgumentException with Integer values

2008-05-09 Thread Michael Mehrle
Hey Doug - thanks for the update - good to hear that it works on 1.3.3.
Bummer having to remove the generics - you did a great job defining the
generic types. Reading the code makes my head spin!! :-)

I'll do some surgery on this and hope to get it working.

Cheers,

Michael

-Original Message-
From: Doug Donohoe [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 09, 2008 2:23 PM
To: users@wicket.apache.org
Subject: RE: DropDownChoice throws IllegalArgumentException with Integer
values


Yes, I'm on 1.4-m1.  However, you can remove all the generic stuff and
it
will still work.  I just migrated to generics yesterday, so the code
does
work on 1.3.3.

Or you can invest in moving to 1.4-m1.  It seems to be working great and
using generics is nice.

-Doug


Michael Mehrle wrote:
> 
> Hi Doug:
> 
> Thanks for that - this might just work :-) One problem I'm running
into
> is that the version of IChoiceRenderer I am using cannot be
> parameterized (it's not generic). Do you have a different wicket
release
> than I do?
> 
> I'm on 1.3.3.
> 
> Michael
> 
> -Original Message-
> From: Doug Donohoe [mailto:[EMAIL PROTECTED] 
> Sent: Friday, May 09, 2008 9:30 AM
> To: users@wicket.apache.org
> Subject: RE: DropDownChoice throws IllegalArgumentException with
Integer
> values
> 
> 
> I posted on my wiki how I solved this problem.  Hopefully it will help
> you:
> 
>
http://wiki.donohoedigital.com/wiki/Wiki.jsp?page=DropDownChoice+Example
> 
> -Doug
> 
> 
> Michael Mehrle wrote:
>> 
>> The code is pretty massive, would be tough to post all that here.
>> Basically, it's an integer backed DropDownChoice that has the word
>> 'guest' tagged on to incrementing numbers (e.g. 1 - 10) in the label.
>> When I remove the word 'guest' in the label it works just fine. Did
> your
>> dropdown have integers as the labels or was there more?
>> 
>> It seems that the problem lies in the conversion, and that Wicket
>> somehow is trying to grab the label value and put it into the model.
>> 
>> If anyone has run into such a problem I'd appreciate any input.
>> 
>> Michael
>> 
>> 
>> 
>> -Original Message-
>> From: Doug Donohoe [mailto:[EMAIL PROTECTED] 
>> Sent: Friday, May 09, 2008 8:41 AM
>> To: users@wicket.apache.org
>> Subject: RE: DropDownChoice throws IllegalArgumentException with
> Integer
>> values
>> 
>> 
>> Post your code.  It's hard to guess w/out seeing the code.  I have an
>> integer-based drop down choice working well (I used that example as
my
>> starting point).
>> 
>> -Doug
>> 
>> 
>> Michael Mehrle wrote:
>>> 
>>> Anyone? Was hoping for some input here ;-)
>>> 
>>> -Original Message-
>>> From: Michael Mehrle [mailto:[EMAIL PROTECTED] 
>>> Sent: Thursday, May 08, 2008 6:35 PM
>>> To: users@wicket.apache.org
>>> Subject: RE: DropDownChoice throws IllegalArgumentException with
>> Integer
>>> values
>>> 
>>> Okay, I just stepped through this and getting the feeling that
>> 'somehow'
>>> the label is being passed on to the model. Now, if the label is '1'
> it
>>> works fine, but if it's '1 day', then I get that error.
>>> 
>>> The question here is: why is the label being passed back to the
> model?
>>> Doesn't make any sense - I'm using a ChoiceRenderer as such:
>>> 
>>> new ChoiceRenderer("label", "value")
>>> 
>>> Do I also need to add some kind of converter to properly assign the
>>> model?
>>> 
>>> Any input would be appreciated.
>>> 
>>> Michael
>>> 
>>> -Original Message-
>>> From: Michael Mehrle [mailto:[EMAIL PROTECTED] 
>>> Sent: Thursday, May 08, 2008 5:19 PM
>>> To: users@wicket.apache.org
>>> Subject: DropDownChoice throws IllegalArgumentException with Integer
>>> values
>>> 
>>> This is the error I'm getting:
>>> 
>>>  
>>> 
>>> [DEBUG LoadAdDataInterceptor] Loaded
>>> AdData:[EMAIL PROTECTED] 
>>> 
>>> [ERROR RequestCycle] Cannot format given Object as a Number 
>>> 
>>> java.lang.IllegalArgumentException: Cannot format given Object as a
>>> Number
>>> 
>>> at
java.text.DecimalFormat.format(DecimalFormat.java:480)
>>> 
>>> at java.text.F

RE: DropDownChoice throws IllegalArgumentException with Integer values

2008-05-09 Thread Michael Mehrle
Any ideas that work with 1.3.3? ;-)

-Original Message-
From: Doug Donohoe [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 09, 2008 9:30 AM
To: users@wicket.apache.org
Subject: RE: DropDownChoice throws IllegalArgumentException with Integer
values


I posted on my wiki how I solved this problem.  Hopefully it will help
you:

http://wiki.donohoedigital.com/wiki/Wiki.jsp?page=DropDownChoice+Example

-Doug



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



RE: DropDownChoice throws IllegalArgumentException with Integer values

2008-05-09 Thread Michael Mehrle
Hi Doug:

Thanks for that - this might just work :-) One problem I'm running into
is that the version of IChoiceRenderer I am using cannot be
parameterized (it's not generic). Do you have a different wicket release
than I do?

I'm on 1.3.3.

Michael

-Original Message-
From: Doug Donohoe [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 09, 2008 9:30 AM
To: users@wicket.apache.org
Subject: RE: DropDownChoice throws IllegalArgumentException with Integer
values


I posted on my wiki how I solved this problem.  Hopefully it will help
you:

http://wiki.donohoedigital.com/wiki/Wiki.jsp?page=DropDownChoice+Example

-Doug


Michael Mehrle wrote:
> 
> The code is pretty massive, would be tough to post all that here.
> Basically, it's an integer backed DropDownChoice that has the word
> 'guest' tagged on to incrementing numbers (e.g. 1 - 10) in the label.
> When I remove the word 'guest' in the label it works just fine. Did
your
> dropdown have integers as the labels or was there more?
> 
> It seems that the problem lies in the conversion, and that Wicket
> somehow is trying to grab the label value and put it into the model.
> 
> If anyone has run into such a problem I'd appreciate any input.
> 
> Michael
> 
> 
> 
> -Original Message-
> From: Doug Donohoe [mailto:[EMAIL PROTECTED] 
> Sent: Friday, May 09, 2008 8:41 AM
> To: users@wicket.apache.org
> Subject: RE: DropDownChoice throws IllegalArgumentException with
Integer
> values
> 
> 
> Post your code.  It's hard to guess w/out seeing the code.  I have an
> integer-based drop down choice working well (I used that example as my
> starting point).
> 
> -Doug
> 
> 
> Michael Mehrle wrote:
>> 
>> Anyone? Was hoping for some input here ;-)
>> 
>> -Original Message-
>> From: Michael Mehrle [mailto:[EMAIL PROTECTED] 
>> Sent: Thursday, May 08, 2008 6:35 PM
>> To: users@wicket.apache.org
>> Subject: RE: DropDownChoice throws IllegalArgumentException with
> Integer
>> values
>> 
>> Okay, I just stepped through this and getting the feeling that
> 'somehow'
>> the label is being passed on to the model. Now, if the label is '1'
it
>> works fine, but if it's '1 day', then I get that error.
>> 
>> The question here is: why is the label being passed back to the
model?
>> Doesn't make any sense - I'm using a ChoiceRenderer as such:
>> 
>> new ChoiceRenderer("label", "value")
>> 
>> Do I also need to add some kind of converter to properly assign the
>> model?
>> 
>> Any input would be appreciated.
>> 
>> Michael
>> 
>> -Original Message-
>> From: Michael Mehrle [mailto:[EMAIL PROTECTED] 
>> Sent: Thursday, May 08, 2008 5:19 PM
>> To: users@wicket.apache.org
>> Subject: DropDownChoice throws IllegalArgumentException with Integer
>> values
>> 
>> This is the error I'm getting:
>> 
>>  
>> 
>> [DEBUG LoadAdDataInterceptor] Loaded
>> AdData:[EMAIL PROTECTED] 
>> 
>> [ERROR RequestCycle] Cannot format given Object as a Number 
>> 
>> java.lang.IllegalArgumentException: Cannot format given Object as a
>> Number
>> 
>> at java.text.DecimalFormat.format(DecimalFormat.java:480)
>> 
>> at java.text.Format.format(Format.java:133)
>> 
>> at
>>
>
org.apache.wicket.util.convert.converters.AbstractNumberConverter.conver
>> tToString(AbstractNumberConverter.java:109)
>> 
>> at
>>
>
org.apache.wicket.util.lang.PropertyResolverConverter.convert(PropertyRe
>> solverConverter.java:84)
>> 
>>  
>> 
>> I'm using List to populate the DropDownChoice, as per
> the
>> online example:
>> 
>>  
>> 
>>
>
http://cwiki.apache.org/WICKET/another-dropdownchoice-example-by-adam.ht
>> ml
>> 
>>  
>> 
>> The only change I made to SelectOption is to set the 'value' field to
> an
>> Integer (which I need for my model).
>> 
>>  
>> 
>> Anyone any ideas as to what's going on? I'm pretty sure I didn't swap
>> the label/value pairs as the labels show up properly.
>> 
>>  
>> 
>> Thanks,
>> 
>>  
>> 
>> Michael
>> 
>> 
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> 
>> 
>> -

RE: DropDownChoice throws IllegalArgumentException with Integer values

2008-05-09 Thread Michael Mehrle
Great input and you're forgiven for jumping the gun with SelectOption
;-)

I didn't even know there was a wicket SelectOption, which puts a new
spin on things. Regarding the conversion back to the model: Yes, I was
following the example hoping IT WOULD BE CORRECT.

I concur with you that it's probably trying to cast SelectOption into an
Integer, but that doesn't explain why it actually works when I refrain
from tagging a non-integer string to the label (e.g. '1' as the label
vs. '1 guest'). How does it manage to convert properly then?

Michael

-Original Message-
From: John Krasnay [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 09, 2008 9:02 AM
To: users@wicket.apache.org
Subject: Re: DropDownChoice throws IllegalArgumentException with Integer
values

On Fri, May 09, 2008 at 11:53:30AM -0400, John Krasnay wrote:
> On Fri, May 09, 2008 at 08:25:05AM -0700, Michael Mehrle wrote:
> > Anyone? Was hoping for some input here ;-)
> > 
> >
http://cwiki.apache.org/WICKET/another-dropdownchoice-example-by-adam.ht
> > ml
> > 
> > The only change I made to SelectOption is to set the 'value' field
to an
> > Integer (which I need for my model).
> > 
> 
> That example is terrible. SelectOption is a Wicket component and an
> internal implementation detail of DropDownChoice. It should not be in
> your business model as the example shows.
> 
> If you're setting an integer property via a DropDownChoice, you should
> pass a List and implement ChoiceRenderer.getDisplayValue() to
> output the right string to display.
> 
> My wild-ass guess would be that Wicket is trying to cast a
SelectOption
> into an Integer, with predictable results.
> 
> jk

Ugh, I just noticed that the example has its own SelectOption class, not
the one from Wicket. But I stand by the "golden rule" of DropDownChoice:
always pass a list of the same type of object that you expect to receive
back in your business model.

jk

-
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 throws IllegalArgumentException with Integer values

2008-05-09 Thread Michael Mehrle
The code is pretty massive, would be tough to post all that here.
Basically, it's an integer backed DropDownChoice that has the word
'guest' tagged on to incrementing numbers (e.g. 1 - 10) in the label.
When I remove the word 'guest' in the label it works just fine. Did your
dropdown have integers as the labels or was there more?

It seems that the problem lies in the conversion, and that Wicket
somehow is trying to grab the label value and put it into the model.

If anyone has run into such a problem I'd appreciate any input.

Michael



-Original Message-
From: Doug Donohoe [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 09, 2008 8:41 AM
To: users@wicket.apache.org
Subject: RE: DropDownChoice throws IllegalArgumentException with Integer
values


Post your code.  It's hard to guess w/out seeing the code.  I have an
integer-based drop down choice working well (I used that example as my
starting point).

-Doug


Michael Mehrle wrote:
> 
> Anyone? Was hoping for some input here ;-)
> 
> -----Original Message-
> From: Michael Mehrle [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, May 08, 2008 6:35 PM
> To: users@wicket.apache.org
> Subject: RE: DropDownChoice throws IllegalArgumentException with
Integer
> values
> 
> Okay, I just stepped through this and getting the feeling that
'somehow'
> the label is being passed on to the model. Now, if the label is '1' it
> works fine, but if it's '1 day', then I get that error.
> 
> The question here is: why is the label being passed back to the model?
> Doesn't make any sense - I'm using a ChoiceRenderer as such:
> 
> new ChoiceRenderer("label", "value")
> 
> Do I also need to add some kind of converter to properly assign the
> model?
> 
> Any input would be appreciated.
> 
> Michael
> 
> -Original Message-
> From: Michael Mehrle [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, May 08, 2008 5:19 PM
> To: users@wicket.apache.org
> Subject: DropDownChoice throws IllegalArgumentException with Integer
> values
> 
> This is the error I'm getting:
> 
>  
> 
> [DEBUG LoadAdDataInterceptor] Loaded
> AdData:[EMAIL PROTECTED] 
> 
> [ERROR RequestCycle] Cannot format given Object as a Number 
> 
> java.lang.IllegalArgumentException: Cannot format given Object as a
> Number
> 
> at java.text.DecimalFormat.format(DecimalFormat.java:480)
> 
> at java.text.Format.format(Format.java:133)
> 
> at
>
org.apache.wicket.util.convert.converters.AbstractNumberConverter.conver
> tToString(AbstractNumberConverter.java:109)
> 
> at
>
org.apache.wicket.util.lang.PropertyResolverConverter.convert(PropertyRe
> solverConverter.java:84)
> 
>  
> 
> I'm using List to populate the DropDownChoice, as per
the
> online example:
> 
>  
> 
>
http://cwiki.apache.org/WICKET/another-dropdownchoice-example-by-adam.ht
> ml
> 
>  
> 
> The only change I made to SelectOption is to set the 'value' field to
an
> Integer (which I need for my model).
> 
>  
> 
> Anyone any ideas as to what's going on? I'm pretty sure I didn't swap
> the label/value pairs as the labels show up properly.
> 
>  
> 
> Thanks,
> 
>  
> 
> Michael
> 
> 
> -
> 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/DropDownChoice-throws-IllegalArgumentException-wit
h-Integer-values-tp17139227p17150771.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: DropDownChoice throws IllegalArgumentException with Integer values

2008-05-09 Thread Michael Mehrle
Anyone? Was hoping for some input here ;-)

-Original Message-
From: Michael Mehrle [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 08, 2008 6:35 PM
To: users@wicket.apache.org
Subject: RE: DropDownChoice throws IllegalArgumentException with Integer
values

Okay, I just stepped through this and getting the feeling that 'somehow'
the label is being passed on to the model. Now, if the label is '1' it
works fine, but if it's '1 day', then I get that error.

The question here is: why is the label being passed back to the model?
Doesn't make any sense - I'm using a ChoiceRenderer as such:

new ChoiceRenderer("label", "value")

Do I also need to add some kind of converter to properly assign the
model?

Any input would be appreciated.

Michael

-Original Message-
From: Michael Mehrle [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 08, 2008 5:19 PM
To: users@wicket.apache.org
Subject: DropDownChoice throws IllegalArgumentException with Integer
values

This is the error I'm getting:

 

[DEBUG LoadAdDataInterceptor] Loaded
AdData:[EMAIL PROTECTED] 

[ERROR RequestCycle] Cannot format given Object as a Number 

java.lang.IllegalArgumentException: Cannot format given Object as a
Number

at java.text.DecimalFormat.format(DecimalFormat.java:480)

at java.text.Format.format(Format.java:133)

at
org.apache.wicket.util.convert.converters.AbstractNumberConverter.conver
tToString(AbstractNumberConverter.java:109)

at
org.apache.wicket.util.lang.PropertyResolverConverter.convert(PropertyRe
solverConverter.java:84)

 

I'm using List to populate the DropDownChoice, as per the
online example:

 

http://cwiki.apache.org/WICKET/another-dropdownchoice-example-by-adam.ht
ml

 

The only change I made to SelectOption is to set the 'value' field to an
Integer (which I need for my model).

 

Anyone any ideas as to what's going on? I'm pretty sure I didn't swap
the label/value pairs as the labels show up properly.

 

Thanks,

 

Michael


-
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 throws IllegalArgumentException with Integer values

2008-05-08 Thread Michael Mehrle
Okay, I just stepped through this and getting the feeling that 'somehow'
the label is being passed on to the model. Now, if the label is '1' it
works fine, but if it's '1 day', then I get that error.

The question here is: why is the label being passed back to the model?
Doesn't make any sense - I'm using a ChoiceRenderer as such:

new ChoiceRenderer("label", "value")

Do I also need to add some kind of converter to properly assign the
model?

Any input would be appreciated.

Michael

-Original Message-
From: Michael Mehrle [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 08, 2008 5:19 PM
To: users@wicket.apache.org
Subject: DropDownChoice throws IllegalArgumentException with Integer
values

This is the error I'm getting:

 

[DEBUG LoadAdDataInterceptor] Loaded
AdData:[EMAIL PROTECTED] 

[ERROR RequestCycle] Cannot format given Object as a Number 

java.lang.IllegalArgumentException: Cannot format given Object as a
Number

at java.text.DecimalFormat.format(DecimalFormat.java:480)

at java.text.Format.format(Format.java:133)

at
org.apache.wicket.util.convert.converters.AbstractNumberConverter.conver
tToString(AbstractNumberConverter.java:109)

at
org.apache.wicket.util.lang.PropertyResolverConverter.convert(PropertyRe
solverConverter.java:84)

 

I'm using List to populate the DropDownChoice, as per the
online example:

 

http://cwiki.apache.org/WICKET/another-dropdownchoice-example-by-adam.ht
ml

 

The only change I made to SelectOption is to set the 'value' field to an
Integer (which I need for my model).

 

Anyone any ideas as to what's going on? I'm pretty sure I didn't swap
the label/value pairs as the labels show up properly.

 

Thanks,

 

Michael


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



DropDownChoice throws IllegalArgumentException with Integer values

2008-05-08 Thread Michael Mehrle
This is the error I'm getting:

 

[DEBUG LoadAdDataInterceptor] Loaded
AdData:[EMAIL PROTECTED] 

[ERROR RequestCycle] Cannot format given Object as a Number 

java.lang.IllegalArgumentException: Cannot format given Object as a
Number

at java.text.DecimalFormat.format(DecimalFormat.java:480)

at java.text.Format.format(Format.java:133)

at
org.apache.wicket.util.convert.converters.AbstractNumberConverter.conver
tToString(AbstractNumberConverter.java:109)

at
org.apache.wicket.util.lang.PropertyResolverConverter.convert(PropertyRe
solverConverter.java:84)

 

I'm using List to populate the DropDownChoice, as per the
online example:

 

http://cwiki.apache.org/WICKET/another-dropdownchoice-example-by-adam.ht
ml

 

The only change I made to SelectOption is to set the 'value' field to an
Integer (which I need for my model).

 

Anyone any ideas as to what's going on? I'm pretty sure I didn't swap
the label/value pairs as the labels show up properly.

 

Thanks,

 

Michael



RE: AJAX fails with error failure code 0x80040111

2008-04-30 Thread Michael Mehrle
I'm also getting 'busy channel - postponing' when I keep clicking on the save 
button.

Anybody? Have no idea how to fix this... The same panel worked just fine 30 
minutes ago, have not added any new code and it suddenly started happening. 

Michael

-Original Message-
From: Michael Mehrle [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 30, 2008 4:54 PM
To: users@wicket.apache.org
Subject: RE: AJAX fails with error failure code 0x80040111

More info: after a minute or so I see this exception in the console:

[DEBUG LoadAdDataInterceptor] Loaded AdData:[EMAIL PROTECTED] 
[ERROR RequestCycle] After 1 minute the Pagemap null is still locked by: 
Thread[btpool0-1,5,main], giving up trying to get the page for path: 
6:FooTabbedPanel:panel:createFooForm:recurringFooLink 
org.apache.wicket.WicketRuntimeException: After 1 minute the Pagemap null is 
still locked by: Thread[btpool0-1,5,main], giving up trying to get the page for 
path: 6:FooTabbedPanel:panel:createFooForm:recurringFooLink
at org.apache.wicket.Session.getPage(Session.java:740)
at 
org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(AbstractRequestCycleProcessor.java:448)
at 
org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:139)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1224)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1331)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
at 
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:363)
at 
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:194)
at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at 
com.bar.common.filter.InterceptorFilter.doFilter(InterceptorFilter.java:60)
at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at 
com.bar.common.filter.RequestInfoGatheringFilter.doFilter(RequestInfoGatheringFilter.java:33)
at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at 
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
at 
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at 
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
at 
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at 
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at 
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
at 
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:211)
at 
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at 
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
at org.mortbay.jetty.Server.handle(Server.java:313)
at 
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
at 
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:830)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
at 
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:396)
at 
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)

-Original Message-
From: Michael Mehrle [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 30, 2008 4:40 PM
To: users@wicket.apache.org
Subject: AJAX fails with error failure code 0x80040111

I've got a modal with various AJAX components inside a form. I'm suddenly start 
getting this error, when pressing the save button:

ERROR: 
Exception evaluating AJAX status: [Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIXMLHttpRequest.status]"  nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)"  location: "JS frame :: http://localhost:8000/app/resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js :: anonymous :: line 905"  data: no]
ERROR: Received Ajax response with code: unavailable
INFO: Invoking post-call handler(s)...

Also, the Ajax debug window is accessible again after pressing the save button, 
so the 'modality' of the modal has been removed. However, it still shows on the 
screen and the remainder of the page is dimmed out.

Any ideas? 

Michael


---

  1   2   3   >