Re: javascript confirm - seems to work fine with link markup but not with button markup (AttributePrepender)

2010-01-20 Thread Steve Whitson
Yep... that did the trick! Thanks much for all your help! -Steve Here's what I did I made a copy of AttributeAppender, and changed the method newValue( String, String ) to this: protected String newValue(String currentValue, String appendValue) { final int appendValueLen =

Re: javascript confirm - seems to work fine with link markup but not with button markup

2010-01-20 Thread Ernesto Reinaldo Barreiro
and maybe donating it back to the community;-) Ernesto On Wed, Jan 20, 2010 at 5:01 PM, Fatih Mehmet Ucar wrote: > yes, if you are gonna use this in several places, creating a class > like AttributePrepender may be a better idea. > > 2010/1/20 Ernesto Reinaldo Barreiro : > > I remember Martijn

Re: javascript confirm - seems to work fine with link markup but not with button markup

2010-01-20 Thread Fatih Mehmet Ucar
yes, if you are gonna use this in several places, creating a class like AttributePrepender may be a better idea. 2010/1/20 Ernesto Reinaldo Barreiro : > I remember Martijn advising to copy/paste AttributeAppender and transforming > it to AttributePrepender for such a use case... > > Best, > > Erne

Re: javascript confirm - seems to work fine with link markup but not with button markup

2010-01-20 Thread Ernesto Reinaldo Barreiro
I remember Martijn advising to copy/paste AttributeAppender and transforming it to AttributePrepender for such a use case... Best, Ernesto On Wed, Jan 20, 2010 at 4:26 PM, Steve Whitson wrote: > Thanks for the suggestion... > > It appears as though I need to insert the attribute before the exis

Re: javascript confirm - seems to work fine with link markup but not with button markup

2010-01-20 Thread Fatih Mehmet Ucar
onClick code is created in onComponentTag(), and replaced by getOnClickScript() you can override the getOnClickScript() to prepend custom js code. fmu 2010/1/20 Steve Whitson : > Thanks for the suggestion... > > It appears as though I need to insert the attribute before the existing > onclick att

Re: javascript confirm - seems to work fine with link markup but not with button markup

2010-01-20 Thread Steve Whitson
Thanks for the suggestion... It appears as though I need to insert the attribute before the existing onclick attribute. How do I retrieve the existing onclick attribute? My hope is to retrieve the existing onclick attribute so I can prepend my onclick action and use AttributeModifier to repl

Re: javascript confirm - seems to work fine with link markup but not with button markup

2010-01-20 Thread Fatih Mehmet Ucar
AttributeAppender should solve your problem. fmu 2010/1/20 Steve Whitson : > Hi, > > I'm new to wicket, and am working on my first app.  Great alternative to > other WebUI frameworks! > > I've added a link to my panel using this code: > >       Link deleteReportLink = new Link( "deletereport" ) {

javascript confirm - seems to work fine with link markup but not with button markup

2010-01-20 Thread Steve Whitson
Hi, I'm new to wicket, and am working on my first app. Great alternative to other WebUI frameworks! I've added a link to my panel using this code: Link deleteReportLink = new Link( "deletereport" ) { @Override public void onClick() { System.out.pri