Re: Styling label tags
On Monday 02 September 2013 10:12:25 Martin Grigorov wrote: On Sat, Aug 31, 2013 at 10:18 AM, Lucio Crusca lu...@sulweb.org wrote: In data venerdì 30 agosto 2013 10:48:35, Martin Grigorov ha scritto: Hi Lucio, The suggested solution should work. Which one? I think I've tried all of them and reported issues here, but maybe I missed one. FormComponentLabel + AttributeModifier I didn't understand how I'm supposed to use the FormComponentLabel class, since wicket:id and wicket:for cannot be put together in the same label tag and I need a reusable and repeatable panel with a styled label tag inside. I asked for an example and Francois Meillet provided one, but his example didn't use the wiket:for attribute, which I need, and using a dummy for=anything is invalid HTML. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Styling label tags
Hi Lucio, On Wed, Sep 4, 2013 at 10:06 AM, Lucio Crusca lu...@sulweb.org wrote: On Monday 02 September 2013 10:12:25 Martin Grigorov wrote: On Sat, Aug 31, 2013 at 10:18 AM, Lucio Crusca lu...@sulweb.org wrote: In data venerdì 30 agosto 2013 10:48:35, Martin Grigorov ha scritto: Hi Lucio, The suggested solution should work. Which one? I think I've tried all of them and reported issues here, but maybe I missed one. FormComponentLabel + AttributeModifier I didn't understand how I'm supposed to use the FormComponentLabel class, since wicket:id and wicket:for cannot be put together in the same label tag and I need a reusable and repeatable panel with a styled label tag inside. I asked for an example and Francois Meillet provided one, but his example didn't use the wiket:for attribute, which I need, and using a dummy for=anything is invalid HTML. Wicket is open source, i.e. it is very easy to see what a given class does. You can check https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/markup/html/form/FormComponentLabel.java?source=cc#L76 and see that FormComponentLabel sets the 'for' attribute for you. So there is no need of wicket:for in this case. Also there is https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/markup/html/form/SimpleFormComponentLabel.java?source=cc that uses form component's label to set the text if you want. Wicket-Examples project provides examples how to use these components. See https://github.com/apache/wicket/blob/master/wicket-examples/src/main/java/org/apache/wicket/examples/forminput/FormInput.java?source=cc#L126 What's left for you is to use AttributeModifier or its specialization AttributeAppender to set the class for any label. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Styling label tags
Hi Lucio, The for=anything was referring to the id=anything of the input tag, which is valid. See http://www.w3schools.com/tags/tag_label.asp. form wicket:id=form label wicket:id=label_tag for=anything span wicket:id=label_tag_Text /span /label input wicket:id=name type=text size=40 id=anything /form François On Wed, Sep 4, 2013 at 9:06 AM, Lucio Crusca lu...@sulweb.org wrote: On Monday 02 September 2013 10:12:25 Martin Grigorov wrote: On Sat, Aug 31, 2013 at 10:18 AM, Lucio Crusca lu...@sulweb.org wrote: In data venerdì 30 agosto 2013 10:48:35, Martin Grigorov ha scritto: Hi Lucio, The suggested solution should work. Which one? I think I've tried all of them and reported issues here, but maybe I missed one. FormComponentLabel + AttributeModifier I didn't understand how I'm supposed to use the FormComponentLabel class, since wicket:id and wicket:for cannot be put together in the same label tag and I need a reusable and repeatable panel with a styled label tag inside. I asked for an example and Francois Meillet provided one, but his example didn't use the wiket:for attribute, which I need, and using a dummy for=anything is invalid HTML. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: AutoCompleteTextField ajax update problem
Hi, You can use 6.11.0-SNAPSHOT from http://wicket.apache.org/start/quickstart.html. It has all the needed data in the generated pom.xml. On Wed, Sep 4, 2013 at 6:11 AM, jchappelle jchappe...@4redi.com wrote: Thanks for your response Sven. The AutoCompleteTextField was part of a bigger component that was a homegrown tagging component. I ended up re-implementing it using wicket-select2 and it works now, even better I might add! However, I did have a similar problem on another panel where loading the AutoCompleteTextField via ajax did not work. I saw somewhere that bug has been fixed in the latest trunk. I couldn't figure out how to get the 6.11.0-SNAPSHOT to pull in through our nexus repository so I reverted back to 6.9.1 and it worked. I'll wait for the 6.11.0 release and see if that fixes it. Thanks a bunch! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/AutoCompleteTextField-ajax-update-problem-tp4661176p4661182.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
Disabled drop down do not pass required validator.
Hello, I have drop down with a required validator. My form is not auto processed and I do the validation call. If the field is disabled, the required valitator fails which I do not want. A workaround was to override the method isInputNullable to return false. Is this safe? Or is there a better solution? Thanks. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Disabled-drop-down-do-not-pass-required-validator-tp4661187.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: Disabled drop down do not pass required validator.
Hi, If a form component is disabled then the browser doesn't send its value to the server. On Wed, Sep 4, 2013 at 11:04 AM, cosmindumy cosmind...@yahoo.com wrote: Hello, I have drop down with a required validator. My form is not auto processed and I do the validation call. If the field is disabled, the required valitator fails which I do not want. A workaround was to override the method isInputNullable to return false. Is this safe? Or is there a better solution? Thanks. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Disabled-drop-down-do-not-pass-required-validator-tp4661187.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: Custom FormComponent and model update
I managed to got it working, but in the end I gave up trying to integrate my js library and did it using pure wicket, the end result was a lot nicer and much easier to maintain. Thank you for your answer. On 30/08/13 03:09, Martin Grigorov wrote: Hi, There is a special handling for Ajax requests - the page is marked as dirty and stored, but its pageId is not incremented. So the new state completely overrides the old in the store. By the object is not attached to a Form I understand that you try to update the model of a Component which is not in the page's component tree. Since this component is not visible/reachable by the page then its stateful behavior is not reachable too. So at the end the page may be still stateless and thus never stored. Try with: page.setStatelessHint(false) On Fri, Aug 30, 2013 at 8:22 AM, Edgar Merino donvo...@gmail.com wrote: I'm completely lost here, I've been debugging AjaxCheckBox just to see how it manages to not make the page dirty, but something strange happens when calling Component#dirty(boolean) on Component#modelChanging(), I set a breakpoint in the beginning of the Component#dirty(boolean) method but it never gets there... although it is being called by Component#dirty(). However, when using my custom FormComponent, it will always mark the page as dirty (it will enter the method) making my changes to be visible only on the next version of the page, which is not what I want, any idea how to solve this? On 29/08/13 23:05, Edgar Merino wrote: Found the problem, it has to do with versioning of pages... my callback is not changing the version number in the URL so everytime I refresh the web page I'm retrieving the older version of the page. I'm gonna have to work with AjaxRequestTarget in order to avoid this I guess. On 29/08/13 22:52, Edgar Merino wrote: I have track this down to the Component#modelChanging() method, it seems that the actual modified page is not being stored in the session (perhaps it has something to do with dirty pages?). I'm a bit lost here, any clue would be appreciated. Thank you. On 29/08/13 14:33, Edgar Merino wrote: Hello, I'm having a problem with a FormComponent I'm implementing, I'm manually calling FormComponent#validate(), FormComponent#valid() and FormComponent#updateModel() inside MyBehavior#onRequest() since the object is not attached to a Form, I'm using a custom Behavior (MyBehavior, which extends AbstractAjaxBehavior, I don't need any of the functionality provided by AjaxDefaultAbstractBehavior), the model changes for this request but every time a new request is handled I see the component still uses the old model that was supposed to be replaced in the previous request. By debugging the application I can see that everytime a new request is handled, the FormComponent will look for the model in the Component#data attribute array, which holds the initially set IModel and is never changed... I don't have a clue on how to change this, I bet this is the key to solve this, does anyone have a clue on how to do this? Thanks in advance, Edgar Merino. --**--**- To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.orgusers-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
Re: Disabled drop down do not pass required validator.
Thanks for response. Seems that best solution is replicate wicket behaviour. To validate only if is enabled and visible. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Disabled-drop-down-do-not-pass-required-validator-tp4661187p4661190.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.10 required attribute and cancel buttons
Hi, I have a form with a cancel button with type=submit as suggested here: https://cwiki.apache.org/confluence/display/WICKET/Multiple+submit+buttons. Since version 6.10.0, Wicket adds the HTML5 required attribute which causes the browser validation to fail when the user clicks the Cancel button. Since the button's type is submit, the browser forces the user to fill-in the required fields and doesn't send the cancel request to the server. What is the best way to fix this? Thanks, Luis -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-6-10-required-attribute-and-cancel-buttons-tp4661191.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.10 required attribute and cancel buttons
https://issues.apache.org/jira/browse/WICKET-5324 https://issues.apache.org/jira/browse/WICKET-5331 On Wed, Sep 4, 2013 at 12:12 PM, pureza pur...@gmail.com wrote: Hi, I have a form with a cancel button with type=submit as suggested here: https://cwiki.apache.org/confluence/display/WICKET/Multiple+submit+buttons . Since version 6.10.0, Wicket adds the HTML5 required attribute which causes the browser validation to fail when the user clicks the Cancel button. Since the button's type is submit, the browser forces the user to fill-in the required fields and doesn't send the cancel request to the server. What is the best way to fix this? Thanks, Luis -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-6-10-required-attribute-and-cancel-buttons-tp4661191.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.10 required attribute and cancel buttons
Thanks. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-6-10-required-attribute-and-cancel-buttons-tp4661191p4661193.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: Internal frame in Wicket Page to external website
Is your iframe src always the same? If so why do you need to use Java code for it when plain HTML would suffice? If it's not, then use the InlineFrame and override the CharSequence getURL() if you want to generate your own external URL. ~ Thank you, Paul Bors On Fri, Aug 23, 2013 at 2:09 PM, Gabriel Landon glan...@piti.pf wrote: Haiko, Ok, but InlineFrame works only for wicket page, not external page. Or am I missing something? Gabriel. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Internal-frame-in-Wicket-Page-to-external-website-tp4661032p4661064.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: DataTable + Categories
Good idea. I will give it a go. Med venlig hilsen / Best regards Tommy Sadiq Hinrichsen Selvstændig IT-udvikler HD-ØP Humlebækgade 16, 1.tv. 2200 København N Tlf: 26 24 14 36 Mangler du en billig anlægsgartner, så prøv http://www.sl-haveanlaeg.dk 2013/9/3 Gabriel Landon glan...@piti.pf Hi, Maybe you could use org.apache.wicket.extensions.markup.html.repeater.tree.TableTree Regards, Gabriel. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/DataTable-Categories-tp4661178p4661181.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