AttributeAppender should solve your problem. fmu
2010/1/20 Steve Whitson <steven.whit...@gmail.com>: > 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.println("deleting report" ); > service.deleteReport( selectedReport ); > } > }; > add( deleteReportLink ); > > // add a confirmation to the Delete Report operation > deleteReportLink.add( > new SimpleAttributeModifier( "onclick", "return confirm( 'Are you > sure?');" ) > ); > > Here's the markup: > > <a href="#" wicket:id="deletereport">Delete Report</a> > <!-- <input type="button" wicket:id="deletereport" value="Delete Report" > /> --> > <!-- <button type="button" wicket:id="deletereport">Delete Report</button> > --> > > In the markup, when I use an 'a' tag the javascript confirmation dialog > works fine along with the onClick() override. When I use it with either of > the (commented out) button inputs, the dialog appears, but the 'onClick()' > override is never executed. > > I'd much rather this work with a button and not a hyperlink. > > Any ideas or help is greatly appreciated. > -Steve > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org