Re: ListView remove a row by SubmitLink always move the last one
Sven, I forgot. code: - ListView listView = new ListView( users, users ) { @Override protected void populateItem( final ListItem item ) { item.setDefaultModel( new CompoundPropertyModel( item.getModelObject() ) ); item.add( new TextFieldString( firstName ) ); item.add( new TextFieldString( lastName ) ); item.add( //removeLink( remove, item ) ); new SubmitLink( remove, item.getModel() ) { private static final long serialVersionUID = 1L; @Override public void onSubmit() { // copy from ListView removeLink addStateChange(); item.modelChanging(); getList().remove( item.getIndex() ); modelChanged(); removeAll(); } }.setDefaultFormProcessing( false ) ); } } -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/ListView-remove-a-row-by-SubmitLink-always-delete-the-last-one-tp4659796p4659895.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ListView remove a row by SubmitLink always move the last one
Thank you for quick response. I tried what you suggested, no luck. What I think is clicking remove link (SubmitLink), form memorizes input data, then remove row. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/ListView-remove-a-row-by-SubmitLink-always-delete-the-last-one-tp4659796p4659899.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ListView remove a row by SubmitLink always move the last one
ListPage.html http://apache-wicket.1842946.n4.nabble.com/file/n4659905/ListPage.html ListPage.java http://apache-wicket.1842946.n4.nabble.com/file/n4659905/ListPage.java User.java http://apache-wicket.1842946.n4.nabble.com/file/n4659905/User.java Hi Sven, it is odd. When I was building the quickstart, SubmitLink acts like removeLink. It was directly copied for the code. I am going to review my code on weekend. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/ListView-remove-a-row-by-SubmitLink-always-delete-the-last-one-tp4659796p4659905.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ListView remove a row by SubmitLink always move the last one
Hi Sven, I review my code and api. I misunderstood the setDefaultFormProcessing( false ). Simply removing that method, then it works. Now I am thinking of a way to skip validation, and process form updating. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/ListView-remove-a-row-by-SubmitLink-always-delete-the-last-one-tp4659796p4659919.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
ListView remove a row by SubmitLink always move the last one
Hi all, I have a form of inputs (ListView). I firstly tried the removeLink, it was working. Because it is a normal link, it simply don't keep the other rows inputs. Obviously, it does not meet the requirement. I thought SubmitLink was good, but it always removed the last row. I clearly see the index is correct, but result is incorrect. I searched this forum and google, and found the a few answers, none of them worked in my case. Could some one please help? p.s. I set setReuseItems(true) 'coz wicket api said, If you nest a ListView in a Form, always set this property to true, as otherwise validation will not work properly., which is correct. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/ListView-remove-a-row-by-SubmitLink-always-move-the-last-one-tp4659796.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: user interface design: if any error, textbox channge to red ... ...
It works. Thank you very much -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/user-interface-design-if-any-error-textbox-channge-to-red-tp4659495p4659797.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: user interface design: if any error, textbox channge to red ... ...
Thanks a lot. I will try it on weekend. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/user-interface-design-if-any-error-textbox-channge-to-red-tp4659495p4659522.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: reuse Form Panel code for WizardStep?
I will try. thank you -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/reuse-Form-Panel-code-for-WizardStep-tp4659295p4659493.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
user interface design: if any error, textbox channge to red ... ...
I am able to do it with AttributeModifier.append( class, error ). However, if I press F5, the feedback message disappears, the textbox remains red. It seems that error stays there forever. Did I missing something? How does the feedback message work? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/user-interface-design-if-any-error-textbox-channge-to-red-tp4659495.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
reuse Form Panel code for WizardStep?
Hi, How can I reuse a form panel code for WizardStep, in both html and java class? My current project, required a lot to create new stuff by wizard, and create/edit them by normal form as well. Since the logic/code is basically same, I think it is doable. So, I tried, but no luck. Any advice will be appreciated. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/reuse-Form-Panel-code-for-WizardStep-tp4659295.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: reuse Form Panel code for WizardStep?
The problem is wicket:idfor example: Formjavanew RequiredTextField( companyName );WizardStepjavanew RequiredTextField( company.companyName ); -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/reuse-Form-Panel-code-for-WizardStep-tp4659295p4659302.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
wicket 6.x add additional folder
Hi, I stick to wicket 1.5.4 for quite a long while. I used to getResourceSettings().addResourceFolder( folderName ) in app init() to achieve adding additional folder. However, I don't see API 6.x has such as a method in ResourceSettings. Do I miss something? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-6-x-add-additional-folder-tp4656212.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket 6.x add additional folder
Thanks a lot. Sorry for my careless reading... -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-6-x-add-additional-folder-tp4656212p4656215.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Link onclick setMarkupId doesn't work.
What I am trying to do is: if menu item is selected (onClick), change the markup li id or class. However, it doesn't seem to work. Am I missing something? html ul id=menu li class=menuitem wicket:id=menuitem # /li /ul wicket ListView listView = new ListView( menuitem, menuItemList ) { @Override protected void populateItem( ListItemMenuItem item ) { final MenuItem menuItem = item.getModelObject(); LinkWebPage link = new LinkWebPage( menuitemLink ) { @Override public void onClick() { MarkupContainer container = getParent(); //System.out.println( container: +container ); container.setMarkupId( selected_menu_item ); //System.out.println( container: +container.getMarkupId() ); container.add( new SimpleAttributeModifier( id, selected_menu_item ) ); setResponsePage( menuItem.getPage() ); } }; link.add( new Label( menuitemName, menuItem.getId() ) ); item.add( link ); } }; Any help is much appreciated. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Link-onclick-setMarkupId-doesn-t-work-tp2998815p2998815.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Link onclick setMarkupId doesn't work.
James Carman wrote: Why not just use pure JavaScript for this? All you're trying to do is change a class or id (I'd do class) when something is clicked. Is there any reason why you need to go server-side for this? my javascript skill is limited. could you please show how to do it? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Link-onclick-setMarkupId-doesn-t-work-tp2998815p2998874.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Link onclick setMarkupId doesn't work.
Igor Vaynberg-2 wrote: listview.setreuseitems(true) for what its worth it is better to pull then to push values. -igor thanks a lot. it still doesn't work. I am using wicket 1.4.12. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Link-onclick-setMarkupId-doesn-t-work-tp2998815p2999008.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Lambdas in Java Preview - Part 5: Apache Wicket
the url is not working -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Lambdas-in-Java-Preview-Part-5-Apache-Wicket-tp2297512p2301552.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
DataView sort .properties file
Hello all, i'm using DataView to display html table with sorting feature. Thanks to wicket example, Sorting DataView Example - builds on previous to demonstrate sorting http://www.wicket-library.com/wicket-examples/repeater/?wicket:bookmarkablePage=:org.apache.wicket.examples.repeater.SortingPage The problem is: one of fields' type is integer 1, 2, 3, 4 ..., which represents Very High, High, Normal, Low... I use .properties file to display meaningful values to table cells. i can't sort the field properly, because it's always sorting by field's real value (1, 2, 3), not displaying value. Thanks in advance. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/DataView-sort-properties-file-tp2294973p2294973.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Sorting and ListView
lenzenc wrote: This issue isn't about how to sort, this issue is at what point do you grab the translated name. Did you solve this problem? I am having same problem. I totally agree with, it isn't about how to sort, I am new in wicket. Any sample code will be appreciated. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Re-Sorting-and-ListView-tp1861768p2293509.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ListView in a Form -- issue with properties
hi, just add the form wicket id in property file. e.g. wicket:id=xxxForm -wicket:id=valueListView -wicket:id=value xxxForm.valueListView.value.Required=please enter the value Trevor Baker-2 wrote: Hi, I have a form that has an ListView (wicket:id=”valueListView”) of a bunch of required text fields (wicket:id=”value”). In my WebApplication.properties, I have: form.valueListView.value.Required=Please enter the Value However when I submit the form, in my error feedback if the field is blank it always displays the default: Field 'value is required. What is the proper way to write the property so it displays my custom error feedback message? Thanks, Trev -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/ListView-in-a-Form-issue-with-properties-tp2281199p2282008.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Internationalizing a DDC
very cool, but the options' values are force to 0, 1, 2, 3, 4 ... option value=0Day/option option value=1Week /option option value=2Fortnight/option option value=3Month/option option value=4Year/option I've tried the whole night, any help is appreciated. Sven Meier wrote: You can do without the ChoiceRenderer if you put your terms in a property file next to your panel/page: A.java new DropDownChoice(period, ...) { protected boolean localizeDisplayValues() { return true; } } A.html select wicket:id=period/ A.properties period.1 = Day period.7 = Week period.14 = Fortnight period.30 = Month period.365 = Year Sven -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Internationalizing-a-DDC-tp1869877p2281661.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
localize options DropDownChoice
I am trying to localize select's option. Do I have to load several lists, which represent a different language? That's too complicated. e.g. option value=1day/option option value=7week/option option value=30month/option option value=365year/option to option value=1天/option option value=7周/option option value=30月/option option value=365年/option I read Sven Meier's post, which is helpful, but didn't solve the problem completely. http://apache-wicket.1842946.n4.nabble.com/Internationalizing-a-DDC-td1869877.html Without ChoiceRender wicket set value list to 0, 1, 2, 3 ... ... e.g. properties file: inputForm.period.1=天 inputForm.period.7=周 inputForm.period.30=月 inputForm.period.365=年 output html: option value=0天/option option value=1周/option option value=2月/option option value=3年/option So, did I miss something? or there is another approach? I am struggling with the problem. Any help I will be really appreciated. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/localize-options-DropDownChoice-tp2281778p2281778.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org