Re: Radio with compoundPropertyModel
Hi Rodrigo Thanks for your help, but that's not the point. The point is, I need a way to make the radio work the same way textField works, for example. I have a dynamic list of phones and I want the auto bind of propertyModel automatically set the boolean property of my object to true or false according to user choice. Thank you Marco On Tue, Aug 9, 2011 at 4:34 PM, Rodrigo Heffner wrote: > Hi Marco, > > I'm not sure why this is happening. I would probably add an > AjaxFormComponentUpdatingBehavior to your radio (here is an example > http://wicketstuff.org/wicket13/ajax/choice) and use some debug lines > to check values. Note that your components must be inside a form > (which I believe yours must be anyways). > > Here's how I think the code would look like: > > //let's say that modelChoices is an array of strings that contains > "default" in it > final RadioChoice radio = new RadioChoice("default", > model.bind("default"), modelChoices); > radio.setOutputMarkupId(true); > > radio.add(new AjaxFormComponentUpdatingBehavior("onchange") > { > protected void onUpdate(AjaxRequestTarget target) > { > target.addComponent(this.getComponent()); > //debug here or add log lines to see the value of > this.getComponent().getDefaultModelObject(); > } > }); > > Sorry this isn't a solution, but it's where I'd start looking for > something. I'm sure someone with more experience may have a much > better suggestion. > > On Tue, Aug 9, 2011 at 7:19 PM, Marco Aurélio Silva wrote: >> Hi Rodrigo, >> >> Thanks for the fast response, but that approach didn't solve the >> problem. Actually, the problem is not the CompoundPropertyModel, if I >> use a PropertyModel instead it wouldn't work as well... in both cases >> only the textField is updating my model, the radio does not. >> >> Thanks >> Marco >> >> On Tue, Aug 9, 2011 at 4:13 PM, Rodrigo Heffner >> wrote: >>> Please change my TextField line for >>> >>> add(TextField("number", model.bind("number"))); >>> >>> Please check parenthesis as well :) I'm not working now and my IDE is not >>> open >>> >>> Sorry! >>> >>> On Tue, Aug 9, 2011 at 7:12 PM, Rodrigo Heffner >>> wrote: >>>> Hi Marco, >>>> >>>> I haven't tested this, but I believe this should do the trick: >>>> >>>> class PhoneNumber { >>>> >>>> String number; >>>> boolean default; >>>> >>>> /* Add getters and setters for both */ >>>> >>>> } >>>> >>>> public void EditPhonePanel(String id, PhoneNumber phoneNumber) { >>>> >>>> CompoundPropertyModel model = new CompoundPropertyModel(phoneNumber); >>>> >>>> add(TextField("number"), model.bind("number")); >>>> >>>> add(Radio("default", model.bind("default"))); >>>> >>>> } >>>> >>>> Let me know if this works. >>>> >>>> >>>> Cheers, >>>> Rodrigo >>>> >>>> On Tue, Aug 9, 2011 at 6:48 PM, Marco Aurélio Silva >>>> wrote: >>>>> Hi All >>>>> >>>>> I'm having problems to make a radio component work the way I need. >>>>> >>>>> I have a list of PhoneNumber objects: >>>>> >>>>> class PhoneNumber { >>>>> >>>>> String number; >>>>> boolean default; >>>>> } >>>>> >>>>> The list can have only one entry set as default value. I'm trying to >>>>> make the radio button set the value of default in each object, so when >>>>> I submit the form to save the object my model is synced with user >>>>> changes. I don't want to set the value in the radioGroup model. >>>>> >>>>> I've created a Panel to edit a single phoneNumber object: >>>>> >>>>> >>>>> public void EditPhonePanel(String id, PhoneNumber phoneNumber) { >>>>> >>>>> setModel(new CompoundPropertyModel(phoneNumber)); >>>>> >>>>> add(TextField("number")); >>>>> >>>>> add(Radio("default")); >>>>> >>>>> } &
Re: Radio with compoundPropertyModel
Hi Rodrigo, Thanks for the fast response, but that approach didn't solve the problem. Actually, the problem is not the CompoundPropertyModel, if I use a PropertyModel instead it wouldn't work as well... in both cases only the textField is updating my model, the radio does not. Thanks Marco On Tue, Aug 9, 2011 at 4:13 PM, Rodrigo Heffner wrote: > Please change my TextField line for > > add(TextField("number", model.bind("number"))); > > Please check parenthesis as well :) I'm not working now and my IDE is not open > > Sorry! > > On Tue, Aug 9, 2011 at 7:12 PM, Rodrigo Heffner > wrote: >> Hi Marco, >> >> I haven't tested this, but I believe this should do the trick: >> >> class PhoneNumber { >> >> String number; >> boolean default; >> >> /* Add getters and setters for both */ >> >> } >> >> public void EditPhonePanel(String id, PhoneNumber phoneNumber) { >> >> CompoundPropertyModel model = new CompoundPropertyModel(phoneNumber); >> >> add(TextField("number"), model.bind("number")); >> >> add(Radio("default", model.bind("default"))); >> >> } >> >> Let me know if this works. >> >> >> Cheers, >> Rodrigo >> >> On Tue, Aug 9, 2011 at 6:48 PM, Marco Aurélio Silva >> wrote: >>> Hi All >>> >>> I'm having problems to make a radio component work the way I need. >>> >>> I have a list of PhoneNumber objects: >>> >>> class PhoneNumber { >>> >>> String number; >>> boolean default; >>> } >>> >>> The list can have only one entry set as default value. I'm trying to >>> make the radio button set the value of default in each object, so when >>> I submit the form to save the object my model is synced with user >>> changes. I don't want to set the value in the radioGroup model. >>> >>> I've created a Panel to edit a single phoneNumber object: >>> >>> >>> public void EditPhonePanel(String id, PhoneNumber phoneNumber) { >>> >>> setModel(new CompoundPropertyModel(phoneNumber)); >>> >>> add(TextField("number")); >>> >>> add(Radio("default")); >>> >>> } >>> >>> >>> And I'm using a repeater to add one EditPhonePanel for each phone in my >>> list. >>> >>> The number property of PhoneNumber object is being updated as >>> expected, but I don't know how to make the radio button update the >>> default property. Can someone help me? Thanks in advance! >>> >>> I'm using wicket 1.3.6 and java 5 >>> >>> Marco Silva >>> >>> - >>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >>> For additional commands, e-mail: users-h...@wicket.apache.org >>> >>> >> >> >> >> -- >> Rodrigo H M Bezerra >> > > > > -- > Rodrigo H M Bezerra > > - > 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
Radio with compoundPropertyModel
Hi All I'm having problems to make a radio component work the way I need. I have a list of PhoneNumber objects: class PhoneNumber { String number; boolean default; } The list can have only one entry set as default value. I'm trying to make the radio button set the value of default in each object, so when I submit the form to save the object my model is synced with user changes. I don't want to set the value in the radioGroup model. I've created a Panel to edit a single phoneNumber object: public void EditPhonePanel(String id, PhoneNumber phoneNumber) { setModel(new CompoundPropertyModel(phoneNumber)); add(TextField("number")); add(Radio("default")); } And I'm using a repeater to add one EditPhonePanel for each phone in my list. The number property of PhoneNumber object is being updated as expected, but I don't know how to make the radio button update the default property. Can someone help me? Thanks in advance! I'm using wicket 1.3.6 and java 5 Marco Silva - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
ReplaceWith don't works properly after call to AjaxTabbedPanel.setSelectedTab
Hi All I'm having a problem using replaceWith method on a panel. That panel is inside a tab on AjaxTabbedPanel, and everything works fine, except when I need to open the page with a tab selected (call to mypage.tabbedPanel.setSelectedTab), then the panel is replaced on the tab itself instead of be replaced on the panel inside the tab. Does anyone has any help? I'm using wicket 1.3.6 Thank you Marco
Re: How to debug Back Button
That's what I tried, but the page wasn't there :( But, I updated to wicket 1.2.7 and now it is working better... I still getting the page expired but only when click on back and next a lot of time... Thank you for your help! On Tue, Apr 29, 2008 at 3:16 PM, Johan Compagner <[EMAIL PROTECTED]> wrote: > Just test the pagemap accessstack what exactly happens. > > Place a few breakpoints there, if you press the backbutton, then ie > does a call to the server an ff doesnt? But that shouldnt be to much > of a problem. That page just should be there. > > > > On 4/29/08, Marco Aurélio Silva <[EMAIL PROTECTED]> wrote: > > I put a breakpoint on Wicket.Session > > on method > > public final Page getPage(final String pageMapName, final String path, > > final int versionNumber) > > > > It seems Firefox is nothing making a request when I navigate with back > > and forward button. On IE the call to this line: > > > > Page page = pageMap.get(Integer.parseInt(id), versionNumber); > > > > the page returns null, that's why I got the page expired :/ > > > > Any suggestion? > > > > > > > > On Tue, Apr 29, 2008 at 9:35 AM, Marco Aurélio Silva <[EMAIL PROTECTED]> > > wrote: > > > Move to 1.3 now is not an option :( > > > > > > > > > > > > On Mon, Apr 28, 2008 at 5:55 PM, Johan Compagner <[EMAIL PROTECTED]> > > wrote: > > > > Dont know why it is different in ie compared to ff, but do upgrade to > > > > 1.3 because then page expired are pretty much none excistent. > > > > > > > > > > > > > > > > On 4/28/08, Marco Aurélio Silva <[EMAIL PROTECTED]> wrote: > > > > > Hi All > > > > > > > > > > I'm using wicket 1.2.6 and I'm having problems with back button on > > IE. > > > > > I can go back with back button of browser, but when I try to go > > > > > forward, I get a Page Expired. The log is set to debug, but I can't > > > > > find anything in log file to help me find out what is causing > this. > > I > > > > > don't know if there is a problem in my code because in Firefox I > can > > > > > navigate back and forward with browser buttons without any problem. > > > > > > > > > > My doubt is where should I look to found the problem? > > > > > > > > > > Thanks in advance! > > > > > > > > > > Marco > > > > > > > > > > > > - > > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > > - > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > -- > Sent from Gmail for mobile | mobile.google.com > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to debug Back Button
I put a breakpoint on Wicket.Session on method public final Page getPage(final String pageMapName, final String path, final int versionNumber) It seems Firefox is nothing making a request when I navigate with back and forward button. On IE the call to this line: Page page = pageMap.get(Integer.parseInt(id), versionNumber); the page returns null, that's why I got the page expired :/ Any suggestion? On Tue, Apr 29, 2008 at 9:35 AM, Marco Aurélio Silva <[EMAIL PROTECTED]> wrote: > Move to 1.3 now is not an option :( > > > > On Mon, Apr 28, 2008 at 5:55 PM, Johan Compagner <[EMAIL PROTECTED]> wrote: > > Dont know why it is different in ie compared to ff, but do upgrade to > > 1.3 because then page expired are pretty much none excistent. > > > > > > > > On 4/28/08, Marco Aurélio Silva <[EMAIL PROTECTED]> wrote: > > > Hi All > > > > > > I'm using wicket 1.2.6 and I'm having problems with back button on IE. > > > I can go back with back button of browser, but when I try to go > > > forward, I get a Page Expired. The log is set to debug, but I can't > > > find anything in log file to help me find out what is causing this. I > > > don't know if there is a problem in my code because in Firefox I can > > > navigate back and forward with browser buttons without any problem. > > > > > > My doubt is where should I look to found the problem? > > > > > > Thanks in advance! > > > > > > Marco > > > > > > - > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to debug Back Button
Move to 1.3 now is not an option :( On Mon, Apr 28, 2008 at 5:55 PM, Johan Compagner <[EMAIL PROTECTED]> wrote: > Dont know why it is different in ie compared to ff, but do upgrade to > 1.3 because then page expired are pretty much none excistent. > > > > On 4/28/08, Marco Aurélio Silva <[EMAIL PROTECTED]> wrote: > > Hi All > > > > I'm using wicket 1.2.6 and I'm having problems with back button on IE. > > I can go back with back button of browser, but when I try to go > > forward, I get a Page Expired. The log is set to debug, but I can't > > find anything in log file to help me find out what is causing this. I > > don't know if there is a problem in my code because in Firefox I can > > navigate back and forward with browser buttons without any problem. > > > > My doubt is where should I look to found the problem? > > > > Thanks in advance! > > > > Marco > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to debug Back Button
Hi All I'm using wicket 1.2.6 and I'm having problems with back button on IE. I can go back with back button of browser, but when I try to go forward, I get a Page Expired. The log is set to debug, but I can't find anything in log file to help me find out what is causing this. I don't know if there is a problem in my code because in Firefox I can navigate back and forward with browser buttons without any problem. My doubt is where should I look to found the problem? Thanks in advance! Marco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Bug on modal window
My point is: It doesn't work if the is inside the . And I can't put a div (with div works) because the div has a line break. On Mon, Mar 31, 2008 at 5:57 PM, Martijn Dashorst < [EMAIL PROTECTED]> wrote: > What is your point? it works != it is good/legal/standards > compliant/works everywhere/works any time/etc. > > Browsers are notorious for incompatible behavior for standards > compliant markup. You just found out what happens with non-standards > compliant markup. > > Martijn > > On 3/31/08, Marco Aurélio Silva <[EMAIL PROTECTED]> wrote: > > But it works fine on FF > > > > > > On Mon, Mar 31, 2008 at 5:35 PM, Matej Knopp <[EMAIL PROTECTED]> > wrote: > > > > > It can not be . Span is an inline element so you can't put > block > > > element such as divs inside span. That is invalid markup and it > > > confuses browsers. > > > > > > -Matej > > > > > > On Mon, Mar 31, 2008 at 10:22 PM, Marco Aurélio Silva < > [EMAIL PROTECTED]> > > > wrote: > > > > Hi all > > > > > > > > I found a bug in ModalWindow of wicket 1.2.6. If the markup of > > > modalwindow > > > > is inside a tag p, the modal doesn't work on IE6 and IE7. > > > > I wrote a CMS componente where the user can insert links on the > page. > > > If > > > > user insert a link that is a popup inside a tag the popup > > > doesn't > > > > open. This is what I can see on ajax debbuger: > > > > > > > > *INFO: * > > > > *INFO: * > > > > Initiating Ajax GET request on > > > > > > > > > /myapp/app/?wicket:interface=:3:cms:p:body:content:cont:right:cont:right:cont:right:cont:right:cont:right:cont:right:cont:right:cont:right:cont:right:cont:link:buttonContainer:lis:cont:link::IBehaviorListener&wicket:behaviorId=0&random= > > > > 0.4619706830869044 > > > > *INFO: *Invoking pre-call handler(s)... > > > > *INFO: *Received ajax response (1937 characters) > > > > *INFO: * > > > > > > > > > > > > id="cms_p_body_content_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_link_buttonContainer_lis_cont_modalWindowRepeater" > > > > > > > > > *INFO: *Response parsed. Now invoking steps... > > > > *ERROR: *Error while parsing response: Unknow runtimer error. > > > > *INFO: *Invoking post-call handler(s)... > > > > *INFO: *Invoking failure handler(s)... > > > > > > > > What I found out is that the error only happens if the markup of > modal > > > > window is a SPAN. If I use a DIV, the modal works fine. > Unfortunately I > > > > can't use DIV because DIV cause line break, and this break the > layout > > > of my > > > > page. I tried to debug the javascript, but is a lot of lines and > the JS > > > > debugger of IE didn't help. Can anyone help me? > > > > > > > > > > > > > > > > -- > > > Resizable and reorderable grid components. > > > http://www.inmethod.com > > > > > > - > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > -- > Buy Wicket in Action: http://manning.com/dashorst > Apache Wicket 1.3.2 is released > Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.2 > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: Bug on modal window
Actually, it works with span also on IE, it only not works if the span is inside the tag On Mon, Mar 31, 2008 at 5:35 PM, Matej Knopp <[EMAIL PROTECTED]> wrote: > It can not be . Span is an inline element so you can't put block > element such as divs inside span. That is invalid markup and it > confuses browsers. > > -Matej > > On Mon, Mar 31, 2008 at 10:22 PM, Marco Aurélio Silva <[EMAIL PROTECTED]> > wrote: > > Hi all > > > > I found a bug in ModalWindow of wicket 1.2.6. If the markup of > modalwindow > > is inside a tag p, the modal doesn't work on IE6 and IE7. > > I wrote a CMS componente where the user can insert links on the page. > If > > user insert a link that is a popup inside a tag the popup > doesn't > > open. This is what I can see on ajax debbuger: > > > > *INFO: * > > *INFO: * > > Initiating Ajax GET request on > > > > /myapp/app/?wicket:interface=:3:cms:p:body:content:cont:right:cont:right:cont:right:cont:right:cont:right:cont:right:cont:right:cont:right:cont:right:cont:link:buttonContainer:lis:cont:link::IBehaviorListener&wicket:behaviorId=0&random= > > 0.4619706830869044 > > *INFO: *Invoking pre-call handler(s)... > > *INFO: *Received ajax response (1937 characters) > > *INFO: * > > > > > id="cms_p_body_content_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_link_buttonContainer_lis_cont_modalWindowRepeater" > > > > > *INFO: *Response parsed. Now invoking steps... > > *ERROR: *Error while parsing response: Unknow runtimer error. > > *INFO: *Invoking post-call handler(s)... > > *INFO: *Invoking failure handler(s)... > > > > What I found out is that the error only happens if the markup of modal > > window is a SPAN. If I use a DIV, the modal works fine. Unfortunately I > > can't use DIV because DIV cause line break, and this break the layout > of my > > page. I tried to debug the javascript, but is a lot of lines and the JS > > debugger of IE didn't help. Can anyone help me? > > > > > > -- > Resizable and reorderable grid components. > http://www.inmethod.com > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: Bug on modal window
But it works fine on FF On Mon, Mar 31, 2008 at 5:35 PM, Matej Knopp <[EMAIL PROTECTED]> wrote: > It can not be . Span is an inline element so you can't put block > element such as divs inside span. That is invalid markup and it > confuses browsers. > > -Matej > > On Mon, Mar 31, 2008 at 10:22 PM, Marco Aurélio Silva <[EMAIL PROTECTED]> > wrote: > > Hi all > > > > I found a bug in ModalWindow of wicket 1.2.6. If the markup of > modalwindow > > is inside a tag p, the modal doesn't work on IE6 and IE7. > > I wrote a CMS componente where the user can insert links on the page. > If > > user insert a link that is a popup inside a tag the popup > doesn't > > open. This is what I can see on ajax debbuger: > > > > *INFO: * > > *INFO: * > > Initiating Ajax GET request on > > > > /myapp/app/?wicket:interface=:3:cms:p:body:content:cont:right:cont:right:cont:right:cont:right:cont:right:cont:right:cont:right:cont:right:cont:right:cont:link:buttonContainer:lis:cont:link::IBehaviorListener&wicket:behaviorId=0&random= > > 0.4619706830869044 > > *INFO: *Invoking pre-call handler(s)... > > *INFO: *Received ajax response (1937 characters) > > *INFO: * > > > > > id="cms_p_body_content_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_link_buttonContainer_lis_cont_modalWindowRepeater" > > > > > *INFO: *Response parsed. Now invoking steps... > > *ERROR: *Error while parsing response: Unknow runtimer error. > > *INFO: *Invoking post-call handler(s)... > > *INFO: *Invoking failure handler(s)... > > > > What I found out is that the error only happens if the markup of modal > > window is a SPAN. If I use a DIV, the modal works fine. Unfortunately I > > can't use DIV because DIV cause line break, and this break the layout > of my > > page. I tried to debug the javascript, but is a lot of lines and the JS > > debugger of IE didn't help. Can anyone help me? > > > > > > -- > Resizable and reorderable grid components. > http://www.inmethod.com > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Bug on modal window
Hi all I found a bug in ModalWindow of wicket 1.2.6. If the markup of modalwindow is inside a tag p, the modal doesn't work on IE6 and IE7. I wrote a CMS componente where the user can insert links on the page. If user insert a link that is a popup inside a tag the popup doesn't open. This is what I can see on ajax debbuger: *INFO: * *INFO: * Initiating Ajax GET request on /myapp/app/?wicket:interface=:3:cms:p:body:content:cont:right:cont:right:cont:right:cont:right:cont:right:cont:right:cont:right:cont:right:cont:right:cont:link:buttonContainer:lis:cont:link::IBehaviorListener&wicket:behaviorId=0&random= 0.4619706830869044 *INFO: *Invoking pre-call handler(s)... *INFO: *Received ajax response (1937 characters) *INFO: * *INFO: *Response parsed. Now invoking steps... *ERROR: *Error while parsing response: Unknow runtimer error. *INFO: *Invoking post-call handler(s)... *INFO: *Invoking failure handler(s)... What I found out is that the error only happens if the markup of modal window is a SPAN. If I use a DIV, the modal works fine. Unfortunately I can't use DIV because DIV cause line break, and this break the layout of my page. I tried to debug the javascript, but is a lot of lines and the JS debugger of IE didn't help. Can anyone help me?
Re: setEscapeModelStrings to false as default
What do you mean? If wicket escapes and unescapes it on database should be saved ">" instead ">" ? On Wed, Mar 19, 2008 at 3:20 PM, Matej Knopp <[EMAIL PROTECTED]> wrote: > What you are saying makes little sense. Wicket escapes and unescapes > the field value transparently, so your model object will never contain > the > > > -Matej > > On Wed, Mar 19, 2008 at 6:57 PM, Marco Aurélio Silva <[EMAIL PROTECTED]> > wrote: > > Hi all > > > > Is there a way to set EscapeModelStrings to false in a global way (to > all > > components)? I'm having problems with this. If the size of a column on > > database is 20, and the user fill 20 characters on this field and one > > character is, for example, ">", wicket will convert it to '>' and > when > > try to save the field will have more than 20 characters. I just don't > want > > to call setEscapeModelStrings(false) for every text field on my > > application > > > > > > Thank you > > Marco > > > > > > -- > Resizable and reorderable grid components. > http://www.inmethod.com > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: setEscapeModelStrings to false as default
My site is a extranet, so, only users that have user/password/ssl certificate can acces it. But, what is your advice to solve this problem? Can you give me more details how to use visitChildren? On Wed, Mar 19, 2008 at 3:03 PM, Martijn Dashorst < [EMAIL PROTECTED]> wrote: > You are aware of the security implications such as javascript injection > attacks? > > You can use a visitor to set it for your input fields. see visitChildren() > > Martijn > > On 3/19/08, Marco Aurélio Silva <[EMAIL PROTECTED]> wrote: > > Hi all > > > > Is there a way to set EscapeModelStrings to false in a global way (to > all > > components)? I'm having problems with this. If the size of a column on > > database is 20, and the user fill 20 characters on this field and one > > character is, for example, ">", wicket will convert it to '>' and > when > > try to save the field will have more than 20 characters. I just don't > want > > to call setEscapeModelStrings(false) for every text field on my > > application > > > > > > Thank you > > > > Marco > > > > > -- > Buy Wicket in Action: http://manning.com/dashorst > Apache Wicket 1.3.2 is released > Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.2 > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: setEscapeModelStrings to false as default
By the way, I'm using wicket 1.2.6 On Wed, Mar 19, 2008 at 2:57 PM, Marco Aurélio Silva <[EMAIL PROTECTED]> wrote: > Hi all > > Is there a way to set EscapeModelStrings to false in a global way (to all > components)? I'm having problems with this. If the size of a column on > database is 20, and the user fill 20 characters on this field and one > character is, for example, ">", wicket will convert it to '>' and when > try to save the field will have more than 20 characters. I just don't want > to call setEscapeModelStrings(false) for every text field on my > application > > > Thank you > Marco > >
setEscapeModelStrings to false as default
Hi all Is there a way to set EscapeModelStrings to false in a global way (to all components)? I'm having problems with this. If the size of a column on database is 20, and the user fill 20 characters on this field and one character is, for example, ">", wicket will convert it to '>' and when try to save the field will have more than 20 characters. I just don't want to call setEscapeModelStrings(false) for every text field on my application Thank you Marco
Formated integer in TextField
Hi All I'm having a problem with TextField on wicket 1.2.6. I must format the integer numbers, so, when the number is 123456780 it will be formated as 123,456,789 or 123.456.789 (according to user locale). The problem is that when I submit the form, the validation fails because 123,456,789 is not a valid integer number. Is there a way to solve this? Thanks in advance! Marco
Re: Problems with ResourceModel and StringResourceModel
I solved the problem with this code on the setUp method: List resourceLoaders = application.getResourceSettings ().getStringResourceLoaders(); List copy = new ArrayList(resourceLoaders); Collections.copy(copy,resourceLoaders); application.getResourceSettings().addStringResourceLoader(new ClassStringResourceLoader(application, MyApplication.class)); for (Iterator iterator = copy.iterator(); iterator.hasNext();) { IStringResourceLoader object = (IStringResourceLoader) iterator.next(); application.getResourceSettings().addStringResourceLoader(object); } This solution is based on this mail: Re: Loading global resources in test? Erik Underbjerg Wed, 22 Aug 2007 08:04:49 -0700 I figured it out. Guess I didn't read the documentation properly afterall. In the documentation for addStringResourceLoader is says: Description copied from interface: IResourceSettings Add a string resource loader to the chain of loaders. If this is the first call to this method since the creation of the application settings then the existing chain is cleared before the new loader is added. So the solution was to: 1. retrieve and save all the existing resource loaders 2. add them again 3. add the extra resource loader as below. Then it worked. Sorry for the trouble, and thanks for your time. /Erik On Feb 6, 2008 2:51 PM, Igor Vaynberg <[EMAIL PROTECTED]> wrote: > dont know about 1.2, but in 1.3 there is a constructor that takes an > instance of application, so you would do new WicketTester(new > MyApplication()); > > -igor > > > > On Feb 6, 2008 9:11 AM, Marco Aurélio Silva <[EMAIL PROTECTED]> wrote: > > How to make it use my application subclass? > > WicketTester.set(Application application) trow this exception: > > > > wicket.WicketRuntimeException: Use Application.init() method for > > configuring your application object > > at wicket.Application.getSettings(Application.java:606) > > at wicket.Application.getDebugSettings(Application.java:449) > > at wicket.protocol.http.HttpSessionStore.setAttribute( HttpSessionStore.java:51) > > at wicket.protocol.http.AbstractHttpSessionStore.bind( AbstractHttpSessionStore.java:165) > > at wicket.protocol.http.MockWebApplication.setupRequestAndResponse( MockWebApplication.java:411) > > at wicket.util.tester.WicketTester.startPage(WicketTester.java :230) > > at AppTester.testHome(AppTester.java:56) > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > at sun.reflect.NativeMethodAccessorImpl.invoke( NativeMethodAccessorImpl.java:39) > > at sun.reflect.DelegatingMethodAccessorImpl.invoke( DelegatingMethodAccessorImpl.java:25) > > at java.lang.reflect.Method.invoke(Method.java:324) > > at junit.framework.TestCase.runTest(TestCase.java:164) > > at junit.framework.TestCase.runBare(TestCase.java:130) > > at junit.framework.TestResult$1.protect(TestResult.java:106) > > at junit.framework.TestResult.runProtected(TestResult.java:124) > > at junit.framework.TestResult.run(TestResult.java:109) > > at junit.framework.TestCase.run(TestCase.java:120) > > at junit.framework.TestSuite.runTest(TestSuite.java:230) > > at junit.framework.TestSuite.run(TestSuite.java:225) > > at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run( JUnit3TestReference.java:130) > > at org.eclipse.jdt.internal.junit.runner.TestExecution.run( TestExecution.java:38) > > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests( RemoteTestRunner.java:460) > > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests( RemoteTestRunner.java:673) > > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run( RemoteTestRunner.java:386) > > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main( RemoteTestRunner.java:196) > > > > > > > > > > On Feb 6, 2008 1:55 PM, Igor Vaynberg <[EMAIL PROTECTED]> wrote: > > > you have to make wicket tester use _your_ application subclass > > > > > > -igor > > > > > > > > > > > > On Feb 6, 2008 8:50 AM, Marco Aurélio Silva <[EMAIL PROTECTED]> wrote: > > > > Hi all > > > > > > > > I'm writing test cases for my wicket application (1.2.6), and I'm > > > > having problems with the ResourceModel and StringResourceModel. It > > > > seems like when loaded by a WicketTester (with startPage method) these > > > > components doesn't load the global resource file > &
Re: Problems with ResourceModel and StringResourceModel
How to make it use my application subclass? WicketTester.set(Application application) trow this exception: wicket.WicketRuntimeException: Use Application.init() method for configuring your application object at wicket.Application.getSettings(Application.java:606) at wicket.Application.getDebugSettings(Application.java:449) at wicket.protocol.http.HttpSessionStore.setAttribute(HttpSessionStore.java:51) at wicket.protocol.http.AbstractHttpSessionStore.bind(AbstractHttpSessionStore.java:165) at wicket.protocol.http.MockWebApplication.setupRequestAndResponse(MockWebApplication.java:411) at wicket.util.tester.WicketTester.startPage(WicketTester.java:230) at AppTester.testHome(AppTester.java:56) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at junit.framework.TestCase.runTest(TestCase.java:164) at junit.framework.TestCase.runBare(TestCase.java:130) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:120) at junit.framework.TestSuite.runTest(TestSuite.java:230) at junit.framework.TestSuite.run(TestSuite.java:225) at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196) On Feb 6, 2008 1:55 PM, Igor Vaynberg <[EMAIL PROTECTED]> wrote: > you have to make wicket tester use _your_ application subclass > > -igor > > > > On Feb 6, 2008 8:50 AM, Marco Aurélio Silva <[EMAIL PROTECTED]> wrote: > > Hi all > > > > I'm writing test cases for my wicket application (1.2.6), and I'm > > having problems with the ResourceModel and StringResourceModel. It > > seems like when loaded by a WicketTester (with startPage method) these > > components doesn't load the global resource file > > "MyApplication.properties". If I put the key on a property file with > > the same name of the page, it works. When I run the same page in > > tomcat, it works fine. > > > > > > Thank you > > Marco > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problems with ResourceModel and StringResourceModel
Hi all I'm writing test cases for my wicket application (1.2.6), and I'm having problems with the ResourceModel and StringResourceModel. It seems like when loaded by a WicketTester (with startPage method) these components doesn't load the global resource file "MyApplication.properties". If I put the key on a property file with the same name of the page, it works. When I run the same page in tomcat, it works fine. Thank you Marco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to load application resource properties on Junit test
Hi all I'm writing some test cases for my wicket application, and I got the follow exception: Caused by: java.util.MissingResourceException: Unable to find resource: home for component: pathway:repeater:i_want_to:stepLink:stepColor at wicket.Localizer.getString(Localizer.java:262) at wicket.Localizer.getString(Localizer.java:181) at wicket.model.ResourceModel.getObject(ResourceModel.java:69) at wicket.Component.getModelObject(Component.java:983) at wicket.Component.getModelObjectAsString(Component.java:998) at wicket.markup.html.basic.Label.onComponentTagBody(Label.java:113) at wicket.Component.renderComponent(Component.java:1712) ... 67 more The problem is this resource key "home" is located at the global resource file MyApplication.properties, and in this test case I'm testing a simple Page. After a lot debug, I noticed that the problem is only when I try to get a resource in code, using ResourceModel or StringResourceModel (I mean, the tag in HTML works fine). In Junit test, these models can't find the key in the global resource file. If I put the key in the property file of my Page, it works. By the way, the code works fine on application running on web container, just in Junit test it fails. I'm using wicket 1.2.6. Any help is welcome! Thank you Marco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: I18N - WicketMessageResolver is not looking on default language file
Sorry, I forgot this "detail". I'm using version 1.2.6 Thank you On Jan 17, 2008 12:47 PM, Johan Compagner <[EMAIL PROTECTED]> wrote: > Which version of wicket? > > > On 1/17/08, Marco Aurélio Silva <[EMAIL PROTECTED]> wrote: > > Hi All > > > > In my application I have 2 properties file: MKBApplication.properties > > and MKBApplication_nl.properties > > > > When the browser is set to other language than Dutch, everything is > > working fine. But, when the language is Dutch, wicket is not showing > > the labels that are not on MKBApplication_nl file. I thing it should > > also look to default language file if it didn't find the key on > > localized file. Below, is part of the log file: > > > > 2008-01-17 10:07:23,317 DEBUG > > [wicket.resource.loader.AbstractStringResourceLoader] Try to load > > resource from: br.com.weev.finan.mkb_er.MKBApplication:nl; key: > > application_version > > 2008-01-17 10:07:23,317 DEBUG > > [wicket.resource.loader.AbstractStringResourceLoader] Try to load > > resource from: wicket.Application:nl; key: application_version > > 2008-01-17 10:07:23,317 DEBUG > > [wicket.resource.loader.AbstractStringResourceLoader] Try to load > > resource from: br.com.weev.finan.mkb_er.MKBApplication:nl; key: > > _header.application_version > > 2008-01-17 10:07:23,317 DEBUG > > [wicket.resource.loader.AbstractStringResourceLoader] Try to load > > resource from: wicket.Application:nl; key: > > _header.application_version > > 2008-01-17 10:07:23,317 DEBUG > > [wicket.resource.loader.AbstractStringResourceLoader] Try to load > > resource from: br.com.weev.finan.mkb_er.MKBApplication:nl; key: > > application_version > > 2008-01-17 10:07:23,317 DEBUG > > [wicket.resource.loader.AbstractStringResourceLoader] Try to load > > resource from: wicket.Application:nl; key: application_version > > 2008-01-17 10:07:23,317 INFO > > [wicket.markup.resolver.WicketMessageResolver] No value found for > > message key: application_version > > > > Can someone help? > > > > Thank you > > Marco > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
I18N - WicketMessageResolver is not looking on default language file
Hi All In my application I have 2 properties file: MKBApplication.properties and MKBApplication_nl.properties When the browser is set to other language than Dutch, everything is working fine. But, when the language is Dutch, wicket is not showing the labels that are not on MKBApplication_nl file. I thing it should also look to default language file if it didn't find the key on localized file. Below, is part of the log file: 2008-01-17 10:07:23,317 DEBUG [wicket.resource.loader.AbstractStringResourceLoader] Try to load resource from: br.com.weev.finan.mkb_er.MKBApplication:nl; key: application_version 2008-01-17 10:07:23,317 DEBUG [wicket.resource.loader.AbstractStringResourceLoader] Try to load resource from: wicket.Application:nl; key: application_version 2008-01-17 10:07:23,317 DEBUG [wicket.resource.loader.AbstractStringResourceLoader] Try to load resource from: br.com.weev.finan.mkb_er.MKBApplication:nl; key: _header.application_version 2008-01-17 10:07:23,317 DEBUG [wicket.resource.loader.AbstractStringResourceLoader] Try to load resource from: wicket.Application:nl; key: _header.application_version 2008-01-17 10:07:23,317 DEBUG [wicket.resource.loader.AbstractStringResourceLoader] Try to load resource from: br.com.weev.finan.mkb_er.MKBApplication:nl; key: application_version 2008-01-17 10:07:23,317 DEBUG [wicket.resource.loader.AbstractStringResourceLoader] Try to load resource from: wicket.Application:nl; key: application_version 2008-01-17 10:07:23,317 INFO [wicket.markup.resolver.WicketMessageResolver] No value found for message key: application_version Can someone help? Thank you Marco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to create a PDF file - NotSerializableException
Hi Evan I'm using wicketcontrib-jasperreports, but I think it is only to create a PDF and show it on screen. I want to save the PDF as a file in the database. I need a OutpStream or something like that to get the byte array of PDF and save it on the database. On Jan 15, 2008 7:04 PM, Evan Chooly <[EMAIL PROTECTED]> wrote: > You should probably look into using Resources. the > wicketcontrib-jasperreports has this done for you already. > > > On Jan 15, 2008 12:01 PM, Marco Aurélio Silva <[EMAIL PROTECTED]> wrote: > > > Hi > > > > I'm trying to create a PDF file with Jasper inside a page with wicket > > 1.2.6, but I'm getting an exception: > > > > Root cause: > > > > java.io.NotSerializableException: > > org.apache.catalina.core.ApplicationContextFacade > > . > > . > > Complete stack: > > > > wicket.WicketRuntimeException: Internal error cloning object. Make > > sure all dependent objects implement Serializable. > > > > The code that is causing the Exception, is this: > > > > JasperRunManager.runReportToPdfStream(context.getResourceAsStream > > ("WEB-INF/reports/scanPdf/creditScanPdf.jasper"),outputStream,map, > > new ScanPdf(new > > ArrayList())); > > > > I tried to put this inside a LoadableDetachableModel, but no success. > > Any help is welcome! > > Thank you > > Marco > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to create a PDF file - NotSerializableException
Hi I'm trying to create a PDF file with Jasper inside a page with wicket 1.2.6, but I'm getting an exception: Root cause: java.io.NotSerializableException: org.apache.catalina.core.ApplicationContextFacade . . Complete stack: wicket.WicketRuntimeException: Internal error cloning object. Make sure all dependent objects implement Serializable. The code that is causing the Exception, is this: JasperRunManager.runReportToPdfStream(context.getResourceAsStream("WEB-INF/reports/scanPdf/creditScanPdf.jasper"),outputStream,map, new ScanPdf(new ArrayList())); I tried to put this inside a LoadableDetachableModel, but no success. Any help is welcome! Thank you Marco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Date validation
Simple solution... thank you! On Jan 8, 2008 12:38 PM, Eelco Hillenius <[EMAIL PROTECTED]> wrote: > You should set the type to Date by either using the appropriate > constructor or by calling setType. > > Eelco > > > On Jan 8, 2008 10:16 PM, Marco Aurélio Silva <[EMAIL PROTECTED]> wrote: > > Wicket 1.2.6 > > > > I'm using this code: > > > > RequiredTextField dateField = new RequiredTextField("dueDate", new > > PropertyModel (newsItem, "dueDate")); > > form.add(dateField); > > form.add(new DatePicker("dateFieldPicker", dateField)); > > > > Anyway, I solved the problem creating a "SimpleDateValidator" > > > > public class SimpleDateValidator extends AbstractValidator { > > > > private static final long serialVersionUID = 1L; > > > > public void validate(FormComponent component) { > > DateConverter converter = new DateConverter(true); > > try { > > Object date = > > converter.convert(component.getModelObject(),Locale.getDefault()); > > } catch (Exception e){ > > error(component); > > > > } > > } > > } > > > > > > On Jan 8, 2008 12:11 PM, Eelco Hillenius <[EMAIL PROTECTED]> wrote: > > > What version of Wicket/ which component? > > > > > > Eelco > > > > > > > > > On Jan 8, 2008 9:34 PM, Marco Aurélio Silva <[EMAIL PROTECTED]> wrote: > > > > Hi > > > > > > > > I'm having problems with validation on a date field. Is there a easy > > > > way to validate user input on date fields? If user types a invalid > > > > date like "32-01-2008" I got a ConversionException: > > > > > > > > wicket.util.convert.ConversionException: Cannot parse '32-01-2008' > > > > using format [EMAIL PROTECTED] > > > > at > > > > wicket.util.convert.converters.AbstractConverter.newConversionException(AbstractConverter.java:72) > > > > at > > > > wicket.util.convert.converters.AbstractConverter.parse(AbstractConverter.java:52) > > > > at > > > > wicket.util.convert.converters.DateConverter.convert(DateConverter.java:73) > > > > at wicket.util.convert.Converter.convert(Converter.java:207) > > > > > > > > > > > > Thank you > > > > Marco > > > > > > > > - > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > > - > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Date validation
Wicket 1.2.6 I'm using this code: RequiredTextField dateField = new RequiredTextField("dueDate", new PropertyModel (newsItem, "dueDate")); form.add(dateField); form.add(new DatePicker("dateFieldPicker", dateField)); Anyway, I solved the problem creating a "SimpleDateValidator" public class SimpleDateValidator extends AbstractValidator { private static final long serialVersionUID = 1L; public void validate(FormComponent component) { DateConverter converter = new DateConverter(true); try { Object date = converter.convert(component.getModelObject(),Locale.getDefault()); } catch (Exception e){ error(component); } } } On Jan 8, 2008 12:11 PM, Eelco Hillenius <[EMAIL PROTECTED]> wrote: > What version of Wicket/ which component? > > Eelco > > > On Jan 8, 2008 9:34 PM, Marco Aurélio Silva <[EMAIL PROTECTED]> wrote: > > Hi > > > > I'm having problems with validation on a date field. Is there a easy > > way to validate user input on date fields? If user types a invalid > > date like "32-01-2008" I got a ConversionException: > > > > wicket.util.convert.ConversionException: Cannot parse '32-01-2008' > > using format [EMAIL PROTECTED] > > at > > wicket.util.convert.converters.AbstractConverter.newConversionException(AbstractConverter.java:72) > > at > > wicket.util.convert.converters.AbstractConverter.parse(AbstractConverter.java:52) > > at > > wicket.util.convert.converters.DateConverter.convert(DateConverter.java:73) > > at wicket.util.convert.Converter.convert(Converter.java:207) > > > > > > Thank you > > Marco > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Date validation
Hi I'm having problems with validation on a date field. Is there a easy way to validate user input on date fields? If user types a invalid date like "32-01-2008" I got a ConversionException: wicket.util.convert.ConversionException: Cannot parse '32-01-2008' using format [EMAIL PROTECTED] at wicket.util.convert.converters.AbstractConverter.newConversionException(AbstractConverter.java:72) at wicket.util.convert.converters.AbstractConverter.parse(AbstractConverter.java:52) at wicket.util.convert.converters.DateConverter.convert(DateConverter.java:73) at wicket.util.convert.Converter.convert(Converter.java:207) Thank you Marco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: SubmitLink on Firefox
The problem was on the submitLink ID. I was using the ID "submit". Changing the id to "submitButton" solved the problem. Thank you Marco On Dec 26, 2007 10:21 AM, Marco Aurélio Silva <[EMAIL PROTECTED]> wrote: > Hi > I'm trying to use a SubmitLink to submit a form, but it is not working on > Firefox. I get the follow message: > > f.submit is not a function > > Inspecting the code generated by wicket, I noticed that on firefox the > call to line 9 ( f.submit() ) is calling the element "e", because the > instruction on line 2. > > 1 var e=document.getElementById ('form:hf:0'); > 2 e.name='submit'; > 3 e.value='x'; > 4 var f=document.getElementById('form'); > 5 if (f.onsubmit != undefined) { > 6 if (f.onsubmit()==false) > 7 return false; > 8 } > 9 f.submit(); > 10 e.value=''; > 11 e.name='';return false;" > > > Is this a know bug? Is there a way to make this work on Firefox? > > Thank you > Marco >
SubmitLink on Firefox
Hi I'm trying to use a SubmitLink to submit a form, but it is not working on Firefox. I get the follow message: f.submit is not a function Inspecting the code generated by wicket, I noticed that on firefox the call to line 9 ( f.submit() ) is calling the element "e", because the instruction on line 2. 1 var e=document.getElementById('form:hf:0'); 2 e.name='submit'; 3 e.value='x'; 4 var f=document.getElementById('form'); 5 if (f.onsubmit != undefined) { 6 if (f.onsubmit()==false) 7 return false; 8 } 9 f.submit(); 10 e.value=''; 11 e.name='';return false;" Is this a know bug? Is there a way to make this work on Firefox? Thank you Marco
wicket:message and HTML
Hi Is there a way to use html code from a language file using, like setEscapeModelStrings(false) on a label? Thank you Marco
Re: HTML code inside language file
And is there a way to this without a label, houst with the ? On Dec 12, 2007 1:23 PM, Sébastien Piller <[EMAIL PROTECTED]> wrote: > Marco Aurélio Silva a écrit : > > Hi > > > > I'm trying to use some HTML codes with internationalized page. For > example, > > some texts have words in italic and I need to use the tag. But when > > wicket renders the text the tag is showed on screen instead make the > > word italic. Any suggestion? > > > > Thank you > > Marco > > > > > Hi, > > just call "setEscapeModelStrings(false)" on your label ;) > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
HTML code inside language file
Hi I'm trying to use some HTML codes with internationalized page. For example, some texts have words in italic and I need to use the tag. But when wicket renders the text the tag is showed on screen instead make the word italic. Any suggestion? Thank you Marco
Submit form and close Modal Window
Hi I'm having problems to close a modal window after submit the form. What I need to do is: do a search if search result is empty show a message in modal window else, close the modal window The problem is that to make the search I must submit the form to get the values, and to close the window I need an AjaxRequestTarget. Is there a way to submit the form and close the window without an AjaxRequestTarget? Thanks Marco
Re: Add fields Dynamically
Thank you all! It works! On Nov 13, 2007 4:53 PM, Nick Heudecker <[EMAIL PROTECTED]> wrote: > Yeah, either way, this is readily solvable with panels and some form of > repeater. > > On Nov 13, 2007 1:51 PM, Scott Swank <[EMAIL PROTECTED]> wrote: > > > You could create a panel with a question and its answers. Then add > > such a panel repeatedly, perhaps with a ListView. > > > > - Scott > > > > > > On Nov 13, 2007 10:58 AM, Marco Aurélio Silva <[EMAIL PROTECTED]> wrote: > > > Hi > > > > > > I need to add fields to a page dynamically. I neet do build something > > like a > > > survey where the questions and answers are stored on the database, so > > they > > > can be changed by the administrator because this I can't create > the > > > HTML file with the fields Is there a way to do this? > > > > > > Thank you > > > Marco > > > > > > > > > > > -- > > Scott Swank > > reformed mathematician > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > -- > Nick Heudecker > Professional Wicket Training & Consulting > http://www.systemmobile.com > > Eventful - Intelligent Event Management > http://www.eventfulhq.com >
Re: Add fields Dynamically
Ok, thanks, I will try! On Nov 13, 2007 4:53 PM, Nick Heudecker <[EMAIL PROTECTED]> wrote: > Yeah, either way, this is readily solvable with panels and some form of > repeater. > > On Nov 13, 2007 1:51 PM, Scott Swank <[EMAIL PROTECTED]> wrote: > > > You could create a panel with a question and its answers. Then add > > such a panel repeatedly, perhaps with a ListView. > > > > - Scott > > > > > > On Nov 13, 2007 10:58 AM, Marco Aurélio Silva <[EMAIL PROTECTED]> wrote: > > > Hi > > > > > > I need to add fields to a page dynamically. I neet do build something > > like a > > > survey where the questions and answers are stored on the database, so > > they > > > can be changed by the administrator because this I can't create > the > > > HTML file with the fields Is there a way to do this? > > > > > > Thank you > > > Marco > > > > > > > > > > > -- > > Scott Swank > > reformed mathematician > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > -- > Nick Heudecker > Professional Wicket Training & Consulting > http://www.systemmobile.com > > Eventful - Intelligent Event Management > http://www.eventfulhq.com >
Re: Add fields Dynamically
Hi Nick I think that use of panel will help, but not at all. Because I have topics, and each topic will be showed in one page with their questions, and when click on next goes to the next topic: *General Information:* Address : Phone Number : --- *Job Infromation *Company Name City Wage* * So, I can create a panel to each type of answer (input, dropDown, radio...) but how to add dynamic number of panels? Thank you Marco On Nov 13, 2007 4:00 PM, Nick Heudecker <[EMAIL PROTECTED]> wrote: > Hi Marco, > > This question has been asked a few times on the list. The solution is to > create a panel for each question type. This is exactly what I did for the > surveys on Eventful. > > On Nov 13, 2007 12:58 PM, Marco Aurélio Silva <[EMAIL PROTECTED]> wrote: > > > Hi > > > > I need to add fields to a page dynamically. I neet do build something > like > > a > > survey where the questions and answers are stored on the database, so > they > > can be changed by the administrator because this I can't create the > > HTML file with the fields Is there a way to do this? > > > > Thank you > > Marco > > > > > > -- > Nick Heudecker > Professional Wicket Training & Consulting > http://www.systemmobile.com > > Eventful - Intelligent Event Management > http://www.eventfulhq.com >
Re: Add fields Dynamically
Thank you Nick, I will look for this mail! On Nov 13, 2007 4:00 PM, Nick Heudecker <[EMAIL PROTECTED]> wrote: > Hi Marco, > > This question has been asked a few times on the list. The solution is to > create a panel for each question type. This is exactly what I did for the > surveys on Eventful. > > On Nov 13, 2007 12:58 PM, Marco Aurélio Silva <[EMAIL PROTECTED]> wrote: > > > Hi > > > > I need to add fields to a page dynamically. I neet do build something > like > > a > > survey where the questions and answers are stored on the database, so > they > > can be changed by the administrator because this I can't create the > > HTML file with the fields Is there a way to do this? > > > > Thank you > > Marco > > > > > > -- > Nick Heudecker > Professional Wicket Training & Consulting > http://www.systemmobile.com > > Eventful - Intelligent Event Management > http://www.eventfulhq.com >
Add fields Dynamically
Hi I need to add fields to a page dynamically. I neet do build something like a survey where the questions and answers are stored on the database, so they can be changed by the administrator because this I can't create the HTML file with the fields Is there a way to do this? Thank you Marco
Form values from Panel
Hi all I have a Panel that is open with a ModalWindow, and when it is closed the main page is updated. The problem is that I can't get the values from dropDowns of panel, they are coming always null. Is there something I'm doing wrong? Is possible to use Form on Panel? Thanks in advance! Marco
Re: Make PageableListView row click
Is there a way to do it without javascript? Thanks On Nov 6, 2007 3:27 PM, Al Maw <[EMAIL PROTECTED]> wrote: > Marco Aurélio Silva wrote: > > I'm using a PageableListView component and I want to make each row of > the > > list clickable. I don't want to add a column with a label like > "details", I > > just want to click in any place of the row to go to details. Is there a > way > > to do this? > > If you don't mind requiring JavaScript, this might work well for you: > > protected void populateItem(ListItem item) { > item.add(new AjaxEventBehavior("onclick") { >protected void onEvent(AjaxRequestTarget target) { > // Do stuff here. > } > }); > } > > > > Good luck. > > Regards, > > Al > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: Make PageableListView row click
That's what I thought to do, but how to call the detail page with javascript? On Nov 6, 2007 3:01 PM, Stefan Fußenegger <[EMAIL PROTECTED]> wrote: > > add javascript to your tags > > pure html sample: > > onmouseout="this.style.background='white';" > onclick="alert('bang')"> >Test >Test >Test >Test > > > (Source: > http://radio.javaranch.com/pascarello/2004/12/30/1104419159000.html) > > > > Marco Aurélio Silva wrote: > > > > Hi all > > > > I'm using a PageableListView component and I want to make each row of > the > > list clickable. I don't want to add a column with a label like > "details", > > I > > just want to click in any place of the row to go to details. Is there a > > way > > to do this? > > > > Thanks in advance > > Marco > > > > > > > - > --- > Stefan Fußenegger > http://talk-on-tech.blogspot.com // looking for a nicer domain ;) > -- > View this message in context: > http://www.nabble.com/Make-PageableListView-row-click-tf4759886.html#a13612378 > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Make PageableListView row click
Hi all I'm using a PageableListView component and I want to make each row of the list clickable. I don't want to add a column with a label like "details", I just want to click in any place of the row to go to details. Is there a way to do this? Thanks in advance Marco