Re: optional DropDowns
Hi thank you for your help. I did switch from int to Integer and it works fine now. Cheers B Matthias Keller schrieb: Hi Björn You should probably either switch from int to Integer (which can be null) or provide an own values list which includes your default entry for example with value -1 (or customize the DropDownChoice to do that) Matt Björn Tietjens wrote: Hi, I have a problem with an webform containing several dropdowns. Each dropdown is getting a (shared) object and one of the objects (int) properties as model. This way I can set the properties width and height of the object box. Now the drop downs are supposed to be optional... and when no item was chosen a default value should be applied. Not choosing an item from the dropdown and submitting the form resuts in an error saying that 'null' could not be set for the property of the model... How can I make that work? thank you for your help in advance! - 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
AjaxFallbackDefaultDataTable problem
Hi there, I would need some help on the AjaxFallbackDefaultDataTable please. I am using this AjaxFallbackDefaultDataTable to display entries from a database using hibernate and a SortableDataProvider. I inserted a Action column to delete entries. My ActionPanel adds a link and overwrites its onClick event, deleting the row from the database, BUT now the table on my page does not update until i completely reload the whole page. I am doing a ajaxFallbackDefaultDataTable.modelChanged(); but that doesnt do the job either. What do I need to ? Thank you for your help! Cheers Björn - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
wicket-contrib-examples
Hey, where can I view the sources of the http://www.wicket-library.com/wicket-contrib-examples/cdapp; ? Cheers Björn - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
PropertyColumnLong
Hi, when trying to user a PropertyColumn like this: ... ListIColumn columns = new ArrayListIColumn(); columns.add(new PropertyColumnLong(new ModelString(ID), id)); columns.add(new PropertyColumnString(new ModelString(First Name),firstName,firstName)); ... I keep getting the following error: ...The type PropertyColumn is not generic; it cannot be parameterized with arguments Long... Why is that? What am I doing wrong? Cheers Björn - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: [VOTE] Organizing Wicket Stuff / Regular Release Schedule?
[X] - YES - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
get method defined for class
Hi all, i keep getting tis strange error:* WicketMessage: No get method defined for class: class java.lang.String expression: id** Root cause:** org.apache.wicket.WicketRuntimeException: No get method defined for class: class java.lang.String expression: id*** when executing this line: *add(new DropDownChoice(ddArtikel, new PropertyModel(artikel, name), artikelList, new ChoiceRenderer(name, id))); *in my class Artikel the id property is of type long, when i chang it to String then it works... how do i need to do that to make it work as long? Thanx for your help. Cheers Björn - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: get method defined for class
yep, thats what the problem was... new PropertyModel(artikel, name) indeed was of Type String changing that to Type Artikel made it work. Thanx very much ;-) Michael Sparer schrieb: nope that's not true, they don't expect Strings correct me if i'm wrong, but i think the problem most likely lies here: add(new DropDownChoice(ddArtikel, new PropertyModel(artikel, name), artikelList, new ChoiceRenderer(name, id))); -- the choicerenderer looks for the path id on the model object, which is a string in your case (new PropertyModel(artikel, name)), use e.g. new Model(artikel) Jurrie Overgoor-3 wrote: Björn-Peter Tietjens wrote: Hi all, i keep getting tis strange error:* WicketMessage: No get method defined for class: class java.lang.String expression: id** Root cause:** org.apache.wicket.WicketRuntimeException: No get method defined for class: class java.lang.String expression: id*** when executing this line: *add(new DropDownChoice(ddArtikel, new PropertyModel(artikel, name), artikelList, new ChoiceRenderer(name, id))); *in my class Artikel the id property is of type long, when i chang it to String then it works... how do i need to do that to make it work as long? I think that PropertyModels (and models in general) expect string return values for the POJO's getXXX() methods. You can try to override the getIdValue() method. Something like this: ChoiceRenderer c = new ChoiceRenderer(name, id) { public String getIdValue(Object object, int index) { return + (long)object; } }; Note that this code is untested, and intended as explanation. -- With kind regards, Jurrie Overgoor 2go-mobile b.v. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Michael Sparer http://talk-on-tech.blogspot.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
strange error: getter for member
Hi, I am new to wicket and now I got a strange problem with wicket... WicketMessage: No get method defined for class: class mypackage.Artikel expression: artikel BUT: my class mypackage.Artikel does not have an member artikel... thanks for some help... complete error: WicketMessage: No get method defined for class: class de.synerlogis.core.artikel.Artikel expression: artikel Root cause: org.apache.wicket.WicketRuntimeException: No get method defined for class: class mypackage.Artikel expression: artikel at org.apache.wicket.util.lang.PropertyResolver.getGetAndSetter(PropertyResolver.java:436) at org.apache.wicket.util.lang.PropertyResolver.getObjectAndGetSetter(PropertyResolver.java:278) at org.apache.wicket.util.lang.PropertyResolver.getValue(PropertyResolver.java:87) at org.apache.wicket.model.AbstractPropertyModel.getObject(AbstractPropertyModel.java:113) at org.apache.wicket.Component.getModelObject(Component.java:1559) at org.apache.wicket.markup.html.form.AbstractSingleSelectChoice.getModelValue(AbstractSingleSelectChoice.java:140) at org.apache.wicket.markup.html.form.FormComponent.getValue(FormComponent.java:797) at org.apache.wicket.markup.html.form.AbstractChoice.onComponentTagBody(AbstractChoice.java:344) at org.apache.wicket.Component.renderComponent(Component.java:2481) at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1411) at org.apache.wicket.Component.render(Component.java:2318) at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1297) at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1476) at org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1401) at org.apache.wicket.markup.html.form.Form.onComponentTagBody(Form.java:1679) at org.apache.wicket.Component.renderComponent(Component.java:2481) at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1411) at org.apache.wicket.markup.html.form.Form.onRender(Form.java:1743) at org.apache.wicket.Component.render(Component.java:2318) at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1297) at org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1427) at org.apache.wicket.Page.onRender(Page.java:1459) at org.apache.wicket.Component.render(Component.java:2318) at org.apache.wicket.Page.renderPage(Page.java:905) at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:231) at org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:104) at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1177) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1248) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1349) at org.apache.wicket.RequestCycle.request(RequestCycle.java:493) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:387) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:199) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:619)
Hibernate + HTML-Table
Hey there, I want to execute a simple sql-count-query with a group by statement and display the result in a html-table... something like: session = HibernateUtil.getSessionFactory().getCurrentSession(); session.beginTransaction(); String SQL_QUERY = SELECT COUNT(*),Date FROM Person Group By Date; Query query = session.createQuery(SQL_QUERY); What is the best way to manage that, not using too much fancy stuff...? Cheers B - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
more than one html file accessible
Hi, i am absolutly new to wicket... i did the quickstart, and even got an app running including a form and hibernate access to mysql saving the filled in data with it... ...but... At the moment I have exactly one HomePage.html alongside the HomePage.java in my app and the config bit in the public class WicketApplication extends WebApplication: ... public Class getHomePage() { return HomePage.class; } ... Now I want to have another page, something like StatisticPage.html with StatisticPage.java with in the same app. Changing the getHomePage-Method to: public Class getHomePage() { return StatisticPage.class; } does the job... but then I don't get to HomePage.html anymore :-( What do i need to do, that i can define HomePage.html as default reachable under: http://localhost:8080/MYAPP/; and at the same time http://localhost:8080/MYAPP/stats; to get to the StatisticPage.html ??? Thanx for some help!!! Cheers B - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]