Re: [Wicket-user] getting form field value from AutoCompleteTextField
I think I found one solution, what I did was to add the normal textfield an AjaxFormComponentUpdatingBehavior associated to the onchange event. In the code of onUpdate() I add an AttributeModifier that replaces the value of the value attribute, then I replace the textfield in the form and use target.addComponent(form, form) to replace the form in the page, so when the autocomplete textfield receives input the getElementById() can get the value. At least is working, any comments are welcome. Jaime. Jaime De La Jara [EMAIL PROTECTED] wrote: I'm not sure if I fully understand it, but maybe if the first textfield sent its value and a serverside reference hold it until the autocomplete field received the input and used this value?. Jaime. Igor Vaynberg [EMAIL PROTECTED] wrote: hmmm it doesnt work because the url is cached by the autocomplete script. we need to think of another way. -igor On 3/27/07, Jaime De La Jara [EMAIL PROTECTED] wrote:Ok, I understand, now I'm including a striped down code version of the problem. It contains an ant build file whose directory definition should be changed, but apart from that I think it could run without trouble, I haven't included style file so the autocomplete box is transparent but it's working. If you take a look at the VendorsAutocompleteBehaviour.java file, you'll see how the parameter is being recovered using document.getElementById. Thanks, Jaime. Igor Vaynberg [EMAIL PROTECTED] wrote: the reason i wanted a quickstart is so that i can see the problem in runtime. what you have sent over does not compile when i drop it into quickstart as it contains your app-specific classes/daos/validators which you have not included. -igor On 3/26/07, Jaime De La Jara [EMAIL PROTECTED] wrote: Ok, here it goes, though it's not complete quickstart, maybe it can help to show the context. The zip contains the page ( index.html, Index.java) and the autocomplete field and behaviour. Hope it can help to find what's going on. Thanks again, Jaime. Igor Vaynberg [EMAIL PROTECTED] wrote: if you feel like creating a quickstart i can take a look at that -igor On 3/26/07, Jaime De La Jara[EMAIL PROTECTED] wrote:No, it has one (returned by getMarkupId() and generated by setOutputMarkup(true)). This is the generated html : input value= maxlength=16 type=text class=tipo size=12 name=numero id=numero script document.getElementById('numero').focus();/script The strange thing is that if I set the value of the field in the model so the page loads with the normal field populated, then the code works returning the value I set in the page (in Java). It seems that the javascript is not getting the input typed in the field. Igor Vaynberg [EMAIL PROTECTED] wrote: your textfield doesnt have an id attribute defined, so docuement.getelemetnbyid is not finding it -igor On 3/26/07, Jaime De La Jara[EMAIL PROTECTED] wrote: Sorry in the last post I had a type instead of limiter=1415 it should be numFact=1415, I'm using numFact as the request variable. Jaime De La Jara [EMAIL PROTECTED] wrote: Igor, unfortunely I haven't been able to use the solution proposed. I copied and pasted the code for the getCallbackUrl method but it had a minor typo, but after I corrected and reloaded the page with the autocomplete field the browser (IE) throws a javascript error. The following works (using a hard code value) : return super.getCallbackUrl () + limiter=1415; but If I use this : return super.getCallbackUrl () + ' + 'numeroFact=' + document.getElementById('numero').value + '; or return super.getCallbackUrl() + numeroFact=' + document.getElementById(\numero\).value + '; I get an when getting the parameter from the request. The code generated in the page is the following : new Wicket.AutoComplete('indexForm_proveedores', '/adm-facturas/app?wicket:interface=:4:indexForm:proveedores:-1:IUnversionedBehaviorListenerwicket:behaviorId=1wicket:ignoreIfNotActive=truelimiter=' + document.getElementById('numero').value + ''); It seems the retrieval of the field is returning null !. The field is defined as follows in the page : input wicket:id=numero type=text class=tipo size=12 and in the Java code : add(new TextField(numero) { public String getMarkupId() { return numero; } }.add(new NumeroFacturaValidador()). add(StringValidator.maximumLength(12)). setOutputMarkupId(true).add(new FieldFocusBehavior())); I don't know what I'm doing wrong, any help would be greatly appreciated. Jaime. Jaime De La Jara [EMAIL PROTECTED] wrote: Absolutely !, thanks a lot Igor, I'll try it right now. I agree that is an uncommon use case and it doesn't deserve an api change and a custom solution
Re: [Wicket-user] getting form field value from AutoCompleteTextField
I'm not sure if I fully understand it, but maybe if the first textfield sent its value and a serverside reference hold it until the autocomplete field received the input and used this value?. Jaime. Igor Vaynberg [EMAIL PROTECTED] wrote: hmmm it doesnt work because the url is cached by the autocomplete script. we need to think of another way. -igor On 3/27/07, Jaime De La Jara [EMAIL PROTECTED] wrote:Ok, I understand, now I'm including a striped down code version of the problem. It contains an ant build file whose directory definition should be changed, but apart from that I think it could run without trouble, I haven't included style file so the autocomplete box is transparent but it's working. If you take a look at the VendorsAutocompleteBehaviour.java file, you'll see how the parameter is being recovered using document.getElementById. Thanks, Jaime. Igor Vaynberg [EMAIL PROTECTED] wrote: the reason i wanted a quickstart is so that i can see the problem in runtime. what you have sent over does not compile when i drop it into quickstart as it contains your app-specific classes/daos/validators which you have not included. -igor On 3/26/07, Jaime De La Jara [EMAIL PROTECTED] wrote: Ok, here it goes, though it's not complete quickstart, maybe it can help to show the context. The zip contains the page ( index.html, Index.java) and the autocomplete field and behaviour. Hope it can help to find what's going on. Thanks again, Jaime. Igor Vaynberg [EMAIL PROTECTED] wrote: if you feel like creating a quickstart i can take a look at that -igor On 3/26/07, Jaime De La Jara[EMAIL PROTECTED] wrote:No, it has one (returned by getMarkupId() and generated by setOutputMarkup(true)). This is the generated html : input value= maxlength=16 type=text class=tipo size=12 name=numero id=numero script document.getElementById('numero').focus();/script The strange thing is that if I set the value of the field in the model so the page loads with the normal field populated, then the code works returning the value I set in the page (in Java). It seems that the javascript is not getting the input typed in the field. Igor Vaynberg [EMAIL PROTECTED] wrote: your textfield doesnt have an id attribute defined, so docuement.getelemetnbyid is not finding it -igor On 3/26/07, Jaime De La Jara[EMAIL PROTECTED] wrote: Sorry in the last post I had a type instead of limiter=1415 it should be numFact=1415, I'm using numFact as the request variable. Jaime De La Jara [EMAIL PROTECTED] wrote: Igor, unfortunely I haven't been able to use the solution proposed. I copied and pasted the code for the getCallbackUrl method but it had a minor typo, but after I corrected and reloaded the page with the autocomplete field the browser (IE) throws a javascript error. The following works (using a hard code value) : return super.getCallbackUrl () + limiter=1415; but If I use this : return super.getCallbackUrl () + ' + 'numeroFact=' + document.getElementById('numero').value + '; or return super.getCallbackUrl() + numeroFact=' + document.getElementById(\numero\).value + '; I get an when getting the parameter from the request. The code generated in the page is the following : new Wicket.AutoComplete('indexForm_proveedores', '/adm-facturas/app?wicket:interface=:4:indexForm:proveedores:-1:IUnversionedBehaviorListenerwicket:behaviorId=1wicket:ignoreIfNotActive=truelimiter=' + document.getElementById('numero').value + ''); It seems the retrieval of the field is returning null !. The field is defined as follows in the page : input wicket:id=numero type=text class=tipo size=12 and in the Java code : add(new TextField(numero) { public String getMarkupId() { return numero; } }.add(new NumeroFacturaValidador()). add(StringValidator.maximumLength(12)). setOutputMarkupId(true).add(new FieldFocusBehavior())); I don't know what I'm doing wrong, any help would be greatly appreciated. Jaime. Jaime De La Jara [EMAIL PROTECTED] wrote: Absolutely !, thanks a lot Igor, I'll try it right now. I agree that is an uncommon use case and it doesn't deserve an api change and a custom solution is what is needed. Jaime. Igor Vaynberg[EMAIL PROTECTED] wrote: ok, this is a bit tricky but is def doable. i dont think this is a very common usecase, so i dont think we will create all the factories/etc for you to be able to do this out of the box because in most cases it will just be api bloat. that said, although not trivial it is still def very possible start with extending the autocompletebehavior override getcallbackurl and do something like return super.getcallbackurl()++'limiter='+document.getelementbyid('someid').value
[Wicket-user] getting form field value from AutoCompleteTextField
Hi, I have a form with some fields and a AutoCompleteTextField that is working nice, however now I need to retrieve the value of a TextField from this AutoCompleteTextField so I can restrict the values shown for autocompletion. Is this possible? in the affirmative case, could you give me a hint? Thanks, Jaime. - Don't be flakey. Get Yahoo! Mail for Mobile and always stay connected to friends.- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] getting form field value from AutoCompleteTextField
Basically what I need is to narrow the possible choices of the autocomplete field, depending on the value the user entered in the other field (which is a normal field). This is a user requirement to simplify their data entry, in this case the normal field is an invoice number and the autocomplete field corresponds to the vendor name, so if the user enters invoice number 0189, and in the autocomplete he types E the list displayed should show only the vendors whose name start with an E and have an invoice numbered 0189. Thanks, Jaime. Igor Vaynberg [EMAIL PROTECTED] wrote: On 3/26/07, Jaime De La Jara [EMAIL PROTECTED] wrote: Hi, I have a form with some fields and a AutoCompleteTextField that is working nice, however now I need to retrieve the value of a TextField from this AutoCompleteTextField so I can restrict the values shown for autocompletion. Is this possible? umm...isnt that what the autocomplete is for? you are in control of the choices, so why would you need to further restrict them? -igor in the affirmative case, could you give me a hint? Thanks, Jaime. - Don't be flakey. Get Yahoo! Mail for Mobile and always stay connected to friends. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Don't be flakey. Get Yahoo! Mail for Mobile and always stay connected to friends.- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] getting form field value from AutoCompleteTextField
Absolutely !, thanks a lot Igor, I'll try it right now. I agree that is an uncommon use case and it doesn't deserve an api change and a custom solution is what is needed. Jaime. Igor Vaynberg [EMAIL PROTECTED] wrote: ok, this is a bit tricky but is def doable. i dont think this is a very common usecase, so i dont think we will create all the factories/etc for you to be able to do this out of the box because in most cases it will just be api bloat. that said, although not trivial it is still def very possible start with extending the autocompletebehavior override getcallbackurl and do something like return super.getcallbackurl()++'limiter='+document.getelementbyid('someid').value); so now whenever the url is invoked for the autocomplete it will also contain a limiter param whose value will be the value of that textfield - make sure someid is the id of that textfield. then simply create your own component, or add the behavior directly to a textfield, see AutoCompleteTextField source - its rather trivial. now in your getchoices() you can do getrequest().getparameter(limiter) and that will give you that extra value you need to filter make sense? -igor On 3/26/07, Jaime De La Jara [EMAIL PROTECTED] wrote: Basically what I need is to narrow the possible choices of the autocomplete field, depending on the value the user entered in the other field (which is a normal field). This is a user requirement to simplify their data entry, in this case the normal field is an invoice number and the autocomplete field corresponds to the vendor name, so if the user enters invoice number 0189, and in the autocomplete he types E the list displayed should show only the vendors whose name start with an E and have an invoice numbered 0189. Thanks, Jaime. Igor Vaynberg [EMAIL PROTECTED] wrote: On 3/26/07, Jaime De La Jara [EMAIL PROTECTED] wrote: Hi, I have a form with some fields and a AutoCompleteTextField that is working nice, however now I need to retrieve the value of a TextField from this AutoCompleteTextField so I can restrict the values shown for autocompletion. Is this possible? umm...isnt that what the autocomplete is for? you are in control of the choices, so why would you need to further restrict them? -igor in the affirmative case, could you give me a hint? Thanks, Jaime. - Don't be flakey. Get Yahoo! Mail for Mobile and always stay connected to friends. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Don't be flakey. Get Yahoo! Mail for Mobile and always stay connected to friends. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Looking for earth-friendly autos? Browse Top Cars by Green Rating at Yahoo! Autos' Green Center. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share
Re: [Wicket-user] getting form field value from AutoCompleteTextField
Igor, unfortunely I haven't been able to use the solution proposed. I copied and pasted the code for the getCallbackUrl method but it had a minor typo, but after I corrected and reloaded the page with the autocomplete field the browser (IE) throws a javascript error. The following works (using a hard code value) : return super.getCallbackUrl() + limiter=1415; but If I use this : return super.getCallbackUrl() + ' + 'numeroFact=' + document.getElementById('numero').value + '; or return super.getCallbackUrl() + numeroFact=' + document.getElementById(\numero\).value + '; I get an when getting the parameter from the request. The code generated in the page is the following : new Wicket.AutoComplete('indexForm_proveedores', '/adm-facturas/app?wicket:interface=:4:indexForm:proveedores:-1:IUnversionedBehaviorListenerwicket:behaviorId=1wicket:ignoreIfNotActive=truelimiter=' + document.getElementById('numero').value + ''); It seems the retrieval of the field is returning null !. The field is defined as follows in the page : input wicket:id=numero type=text class=tipo size=12 and in the Java code : add(new TextField(numero) { public String getMarkupId() { return numero; } }.add(new NumeroFacturaValidador()). add(StringValidator.maximumLength(12)). setOutputMarkupId(true).add(new FieldFocusBehavior())); I don't know what I'm doing wrong, any help would be greatly appreciated. Jaime. Jaime De La Jara [EMAIL PROTECTED] wrote: Absolutely !, thanks a lot Igor, I'll try it right now. I agree that is an uncommon use case and it doesn't deserve an api change and a custom solution is what is needed. Jaime. Igor Vaynberg [EMAIL PROTECTED] wrote: ok, this is a bit tricky but is def doable. i dont think this is a very common usecase, so i dont think we will create all the factories/etc for you to be able to do this out of the box because in most cases it will just be api bloat. that said, although not trivial it is still def very possible start with extending the autocompletebehavior override getcallbackurl and do something like return super.getcallbackurl()++'limiter='+document.getelementbyid('someid').value); so now whenever the url is invoked for the autocomplete it will also contain a limiter param whose value will be the value of that textfield - make sure someid is the id of that textfield. then simply create your own component, or add the behavior directly to a textfield, see AutoCompleteTextField source - its rather trivial. now in your getchoices() you can do getrequest().getparameter(limiter) and that will give you that extra value you need to filter make sense? -igor On 3/26/07, Jaime De La Jara [EMAIL PROTECTED] wrote: Basically what I need is to narrow the possible choices of the autocomplete field, depending on the value the user entered in the other field (which is a normal field). This is a user requirement to simplify their data entry, in this case the normal field is an invoice number and the autocomplete field corresponds to the vendor name, so if the user enters invoice number 0189, and in the autocomplete he types E the list displayed should show only the vendors whose name start with an E and have an invoice numbered 0189. Thanks, Jaime. Igor Vaynberg [EMAIL PROTECTED] wrote: On 3/26/07, Jaime De La Jara [EMAIL PROTECTED] wrote: Hi, I have a form with some fields and a AutoCompleteTextField that is working nice, however now I need to retrieve the value of a TextField from this AutoCompleteTextField so I can restrict the values shown for autocompletion. Is this possible? umm...isnt that what the autocomplete is for? you are in control of the choices, so why would you need to further restrict them? -igor in the affirmative case, could you give me a hint? Thanks, Jaime. - Don't be flakey. Get Yahoo! Mail for Mobile and always stay connected to friends. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID
Re: [Wicket-user] getting form field value from AutoCompleteTextField
Sorry in the last post I had a type instead of limiter=1415 it should be numFact=1415, I'm using numFact as the request variable. Jaime De La Jara [EMAIL PROTECTED] wrote: Igor, unfortunely I haven't been able to use the solution proposed. I copied and pasted the code for the getCallbackUrl method but it had a minor typo, but after I corrected and reloaded the page with the autocomplete field the browser (IE) throws a javascript error. The following works (using a hard code value) : return super.getCallbackUrl() + limiter=1415; but If I use this : return super.getCallbackUrl() + ' + 'numeroFact=' + document.getElementById('numero').value + '; or return super.getCallbackUrl() + numeroFact=' + document.getElementById(\numero\).value + '; I get an when getting the parameter from the request. The code generated in the page is the following : new Wicket.AutoComplete('indexForm_proveedores', '/adm-facturas/app?wicket:interface=:4:indexForm:proveedores:-1:IUnversionedBehaviorListenerwicket:behaviorId=1wicket:ignoreIfNotActive=truelimiter=' + document.getElementById('numero').value + ''); It seems the retrieval of the field is returning null !. The field is defined as follows in the page : input wicket:id=numero type=text class=tipo size=12 and in the Java code : add(new TextField(numero) { public String getMarkupId() { return numero; } }.add(new NumeroFacturaValidador()). add(StringValidator.maximumLength(12)). setOutputMarkupId(true).add(new FieldFocusBehavior())); I don't know what I'm doing wrong, any help would be greatly appreciated. Jaime. Jaime De La Jara [EMAIL PROTECTED] wrote: Absolutely !, thanks a lot Igor, I'll try it right now. I agree that is an uncommon use case and it doesn't deserve an api change and a custom solution is what is needed. Jaime. Igor Vaynberg [EMAIL PROTECTED] wrote: ok, this is a bit tricky but is def doable. i dont think this is a very common usecase, so i dont think we will create all the factories/etc for you to be able to do this out of the box because in most cases it will just be api bloat. that said, although not trivial it is still def very possible start with extending the autocompletebehavior override getcallbackurl and do something like return super.getcallbackurl()++'limiter='+document.getelementbyid('someid').value); so now whenever the url is invoked for the autocomplete it will also contain a limiter param whose value will be the value of that textfield - make sure someid is the id of that textfield. then simply create your own component, or add the behavior directly to a textfield, see AutoCompleteTextField source - its rather trivial. now in your getchoices() you can do getrequest().getparameter(limiter) and that will give you that extra value you need to filter make sense? -igor On 3/26/07, Jaime De La Jara [EMAIL PROTECTED] wrote: Basically what I need is to narrow the possible choices of the autocomplete field, depending on the value the user entered in the other field (which is a normal field). This is a user requirement to simplify their data entry, in this case the normal field is an invoice number and the autocomplete field corresponds to the vendor name, so if the user enters invoice number 0189, and in the autocomplete he types E the list displayed should show only the vendors whose name start with an E and have an invoice numbered 0189. Thanks, Jaime. Igor Vaynberg [EMAIL PROTECTED] wrote: On 3/26/07, Jaime De La Jara [EMAIL PROTECTED] wrote: Hi, I have a form with some fields and a AutoCompleteTextField that is working nice, however now I need to retrieve the value of a TextField from this AutoCompleteTextField so I can restrict the values shown for autocompletion. Is this possible? umm...isnt that what the autocomplete is for? you are in control of the choices, so why would you need to further restrict them? -igor in the affirmative case, could you give me a hint? Thanks, Jaime. - Don't be flakey. Get Yahoo! Mail for Mobile and always stay connected to friends. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel
Re: [Wicket-user] getting form field value from AutoCompleteTextField
No, it has one (returned by getMarkupId() and generated by setOutputMarkup(true)). This is the generated html : input value= maxlength=16 type=text class=tipo size=12 name=numero id=numero scriptdocument.getElementById('numero').focus();/script The strange thing is that if I set the value of the field in the model so the page loads with the normal field populated, then the code works returning the value I set in the page (in Java). It seems that the javascript is not getting the input typed in the field. Igor Vaynberg [EMAIL PROTECTED] wrote: your textfield doesnt have an id attribute defined, so docuement.getelemetnbyid is not finding it -igor On 3/26/07, Jaime De La Jara [EMAIL PROTECTED] wrote:Sorry in the last post I had a type instead of limiter=1415 it should be numFact=1415, I'm using numFact as the request variable. Jaime De La Jara [EMAIL PROTECTED] wrote: Igor, unfortunely I haven't been able to use the solution proposed. I copied and pasted the code for the getCallbackUrl method but it had a minor typo, but after I corrected and reloaded the page with the autocomplete field the browser (IE) throws a javascript error. The following works (using a hard code value) : return super.getCallbackUrl() + limiter=1415; but If I use this : return super.getCallbackUrl() + ' + 'numeroFact=' + document.getElementById('numero').value + '; or return super.getCallbackUrl() + numeroFact=' + document.getElementById(\numero\).value + '; I get an when getting the parameter from the request. The code generated in the page is the following : new Wicket.AutoComplete('indexForm_proveedores', '/adm-facturas/app?wicket:interface=:4:indexForm:proveedores:-1:IUnversionedBehaviorListenerwicket:behaviorId=1wicket:ignoreIfNotActive=truelimiter=' + document.getElementById('numero').value + ''); It seems the retrieval of the field is returning null !. The field is defined as follows in the page : input wicket:id=numero type=text class=tipo size=12 and in the Java code : add(new TextField(numero) { public String getMarkupId() { return numero; } }.add(new NumeroFacturaValidador()). add(StringValidator.maximumLength(12)). setOutputMarkupId(true).add(new FieldFocusBehavior())); I don't know what I'm doing wrong, any help would be greatly appreciated. Jaime. Jaime De La Jara [EMAIL PROTECTED] wrote: Absolutely !, thanks a lot Igor, I'll try it right now. I agree that is an uncommon use case and it doesn't deserve an api change and a custom solution is what is needed. Jaime. Igor Vaynberg [EMAIL PROTECTED] wrote: ok, this is a bit tricky but is def doable. i dont think this is a very common usecase, so i dont think we will create all the factories/etc for you to be able to do this out of the box because in most cases it will just be api bloat. that said, although not trivial it is still def very possible start with extending the autocompletebehavior override getcallbackurl and do something like return super.getcallbackurl()++'limiter='+document.getelementbyid('someid').value); so now whenever the url is invoked for the autocomplete it will also contain a limiter param whose value will be the value of that textfield - make sure someid is the id of that textfield. then simply create your own component, or add the behavior directly to a textfield, see AutoCompleteTextField source - its rather trivial. now in your getchoices() you can do getrequest().getparameter(limiter) and that will give you that extra value you need to filter make sense? -igor On 3/26/07, Jaime De La Jara [EMAIL PROTECTED] wrote: Basically what I need is to narrow the possible choices of the autocomplete field, depending on the value the user entered in the other field (which is a normal field). This is a user requirement to simplify their data entry, in this case the normal field is an invoice number and the autocomplete field corresponds to the vendor name, so if the user enters invoice number 0189, and in the autocomplete he types E the list displayed should show only the vendors whose name start with an E and have an invoice numbered 0189. Thanks, Jaime. Igor Vaynberg [EMAIL PROTECTED] wrote: On 3/26/07, Jaime De La Jara [EMAIL PROTECTED] wrote: Hi, I have a form with some fields and a AutoCompleteTextField that is working nice, however now I need to retrieve the value of a TextField from this AutoCompleteTextField so I can restrict the values shown for autocompletion. Is this possible? umm...isnt that what the autocomplete is for? you are in control of the choices, so why would you need to further restrict them? -igor in the affirmative case, could you give me a hint? Thanks, Jaime. - Don't be flakey
Re: [Wicket-user] file upload validation resets form
Ok, I'll check it in more detail and submit an issue if neccesary, thanks. Jaime. Eelco Hillenius [EMAIL PROTECTED] wrote: I haven't investigated this, but did you come further with this? If you think it is a bug, please open a JIRA issue for it. Eelco On 3/15/07, Jaime De La Jara wrote: Hi, I'm using the FileUpload component and set the maxSize property to 150Kb, I've found that when the uploaded file size is greater than this value, an error message is displayed (which I customized) but the other fields in the form are emptied. How can I fix this situation? Thanks, Jaime. Now that's room service! Choose from over 150,000 hotels in 45,000 destinations on Yahoo! Travel to find your fit. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Don't get soaked. Take a quick peek at the forecast with theYahoo! Search weather shortcut.- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] file upload validation resets form
Hi, I'm using the FileUpload component and set the maxSize property to 150Kb, I've found that when the uploaded file size is greater than this value, an error message is displayed (which I customized) but the other fields in the form are emptied. How can I fix this situation? Thanks, Jaime. - Now that's room service! Choose from over 150,000 hotels in 45,000 destinations on Yahoo! Travel to find your fit.- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] exception when accesing application instance from a new Thread
Ok, I tried Application.get(servletName) and it worked !, basically I needed to access a Dao object that is defined in Spring and whose getter is in my Application instance, I think I'll go this way. Thanks Igor :) Jaime. Igor Vaynberg [EMAIL PROTECTED] wrote: that shouldnt be a problem, each node has its own application object and each node will register it under the same servlet context key. i dont know what you are doing exactly, but you might still have to set the threadlocal if you are using part of api that needs it. -igor On 12/22/06, Jaime De La Jara [EMAIL PROTECTED] wrote: Ok, ckecking the API I found this other method : public static Application get(java.lang.String applicationKey) that allows me to obtain the reference of my application, thought its use is not recommended. Is there any side effect of using this method? Maybe it should be used with care in a cluster? Jaime. Igor Vaynberg [EMAIL PROTECTED] wrote: call it anyway :) -igor On 12/22/06, Jaime De La Jara [EMAIL PROTECTED] wrote: Hi, I need to start a new thread that loads some data while displaying a progress bar, however I'm getting the following exception : Exception in thread Thread-20 wicket.WicketRuntimeException: There is no application attached to current thread Thread-20 at wicket.Application.get(Application.java:163) at wicket.spring.SpringWebApplication$1.getSpringContext(SpringWebApplication.java:52) at wicket.spring.SpringBeanLocator.locateProxyTarget(SpringBeanLocator.java :117) at wicket.proxy.LazyInitProxyFactory$JdkHandler.invoke(LazyInitProxyFactory.java:373) at wicket.proxy.$Proxy0.cargarProveedores(Unknown Source) at cl.eclac.sipc.web.administracion.paginas.VendorsLoadProcess.run (LoadVendors.java:145) at java.lang.Thread.run(Thread.java:595) To the new thread I'm passing a dao to do the data load : new Thread(new VendorsLoadProcess(LoadVendors.this.getVendorDao(), ajaxBar, msgSuccess, msgError)).start(); How can I fix this error? I checked tha API and it says that : set( Application application) THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. Any help would be greatly appreciated, thanks. Jaime. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel
[Wicket-user] exception when accesing application instance from a new Thread
Hi, I need to start a new thread that loads some data while displaying a progress bar, however I'm getting the following exception : Exception in thread Thread-20 wicket.WicketRuntimeException: There is no application attached to current thread Thread-20 at wicket.Application.get(Application.java:163) at wicket.spring.SpringWebApplication$1.getSpringContext(SpringWebApplication.java:52) at wicket.spring.SpringBeanLocator.locateProxyTarget(SpringBeanLocator.java:117) at wicket.proxy.LazyInitProxyFactory$JdkHandler.invoke(LazyInitProxyFactory.java:373) at wicket.proxy.$Proxy0.cargarProveedores(Unknown Source) at cl.eclac.sipc.web.administracion.paginas.VendorsLoadProcess.run(LoadVendors.java:145) at java.lang.Thread.run(Thread.java:595) To the new thread I'm passing a dao to do the data load : new Thread(new VendorsLoadProcess(LoadVendors.this.getVendorDao(), ajaxBar, msgSuccess, msgError)).start(); How can I fix this error? I checked tha API and it says that : set(Application application) THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. Any help would be greatly appreciated, thanks. Jaime. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] exception when accesing application instance from a new Thread
Ok, ckecking the API I found this other method : public static Application get(java.lang.String applicationKey) that allows me to obtain the reference of my application, thought its use is not recommended. Is there any side effect of using this method? Maybe it should be used with care in a cluster? Jaime. Igor Vaynberg [EMAIL PROTECTED] wrote: call it anyway :) -igor On 12/22/06, Jaime De La Jara [EMAIL PROTECTED] wrote: Hi, I need to start a new thread that loads some data while displaying a progress bar, however I'm getting the following exception : Exception in thread Thread-20 wicket.WicketRuntimeException: There is no application attached to current thread Thread-20 at wicket.Application.get(Application.java:163) at wicket.spring.SpringWebApplication$1.getSpringContext(SpringWebApplication.java:52) at wicket.spring.SpringBeanLocator.locateProxyTarget(SpringBeanLocator.java :117) at wicket.proxy.LazyInitProxyFactory$JdkHandler.invoke(LazyInitProxyFactory.java:373) at wicket.proxy.$Proxy0.cargarProveedores(Unknown Source) at cl.eclac.sipc.web.administracion.paginas.VendorsLoadProcess.run (LoadVendors.java:145) at java.lang.Thread.run(Thread.java:595) To the new thread I'm passing a dao to do the data load : new Thread(new VendorsLoadProcess(LoadVendors.this.getVendorDao(), ajaxBar, msgSuccess, msgError)).start(); How can I fix this error? I checked tha API and it says that : set( Application application) THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. Any help would be greatly appreciated, thanks. Jaime. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] updating page contents before and after long process
I dit it and worked great !, thank you both. Jaime. Eelco Hillenius [EMAIL PROTECTED] wrote: You could do the processing in a separate thread, and return the page immediately with the progress component that polls (e.g. using Ajax, though doesn't have to) for the progress. Or like Igor said, put your progress bar on the page to begin with, make your form submit an ajax submit, on the submit start that other thread and make the progress component visible (and it will thus automatically start polling). Eelco On 12/5/06, Jaime De La Jara wrote: Thanks, though I'm not sure if this is what I need, maybe I didn't explained my problem clearly. First, some code may help : The html : .. .. var bar1= createBar(300,15,'white',1,'#215dc6','#428eff',85,17,3,); . . OK SubmitLink Java : ... Page constructor final WebMarkupContainer bar = new WebMarkupContainer(progressBar); final Label msg = new Label(msg, Processing Vendors Load); bar.add(msg); add(bar.setVisible(false)); ... add(new SubmitLink(okLink) { public void onSubmit() { // Here I should make the progressBar visible and it should be displayed bar.setVisible(true); (*) // This is the process that takes some time (~ 15 sec) getVendorDao().loadVendors(); (*) // Here I should display a message informing the load results // Here I should make the bar invisible again. bar.setVisible(false); } } . The problem is, that the page is not reloaded until (*) is completed so the bar is not made visible before the loading process begins. Any hints are greatly appreciated, Jaime. Igor Vaynberg wrote: if you dont mind using ajax then search for ajax poller, that might be useful to you. initially make the components that take a long time to load their model invisible, then in ajax poller once they are loaded make them visible and add them to the ajax target so they will be painted. -igor On 12/5/06, Jaime De La Jara wrote: Hi, I'm looking for advice in the following situation : I have a page that lets the users to load the DB information from an external DB, this takes some time so I was thinking to display a progress bar while the process completes, this progress bar is initially invisible. The problem is : How can I make this bar visible, begin the loading process (in parallel) and then refresh the contents of the page with the results of the process? Thanks, Jaime. Any questions? Get answers on any topic at Yahoo! Answers. Try it now. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user Cheap Talk? Check out Yahoo! Messenger's low PC-to-Phone call rates. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Access over 1 million songs
[Wicket-user] updating page contents before and after long process
Hi, I'm looking for advice in the following situation : I have a page that lets the users to load the DB information from an external DB, this takes some time so I was thinking to display a progress bar while the process completes, this progress bar is initially invisible. The problem is : How can I make this bar visible, begin the loading process (in parallel) and then refresh the contents of the page with the results of the process? Thanks, Jaime. - Any questions? Get answers on any topic at Yahoo! Answers. Try it now.- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] updating page contents before and after long process
Thanks, though I'm not sure if this is what I need, maybe I didn't explained my problem clearly. First, some code may help : The html : .. .. span wicket:id = progressBar span wicket:id=msg/span script type=text/javascript var bar1= createBar(300,15,'white',1,'#215dc6','#428eff',85,17,3,); /script /span . . OK SubmitLink Java : ... Page constructor final WebMarkupContainer bar = new WebMarkupContainer(progressBar); final Label msg = new Label(msg, Processing Vendors Load); bar.add(msg); add(bar.setVisible(false)); ... add(new SubmitLink(okLink) { public void onSubmit() { // Here I should make the progressBar visible and it should be displayed bar.setVisible(true); (*) // This is the process that takes some time (~ 15 sec) getVendorDao().loadVendors(); (*) // Here I should display a message informing the load results // Here I should make the bar invisible again. bar.setVisible(false); } } . The problem is, that the page is not reloaded until (*) is completed so the bar is not made visible before the loading process begins. Any hints are greatly appreciated, Jaime. Igor Vaynberg [EMAIL PROTECTED] wrote: if you dont mind using ajax then search for ajax poller, that might be useful to you. initially make the components that take a long time to load their model invisible, then in ajax poller once they are loaded make them visible and add them to the ajax target so they will be painted. -igor On 12/5/06, Jaime De La Jara [EMAIL PROTECTED] wrote: Hi, I'm looking for advice in the following situation : I have a page that lets the users to load the DB information from an external DB, this takes some time so I was thinking to display a progress bar while the process completes, this progress bar is initially invisible. The problem is : How can I make this bar visible, begin the loading process (in parallel) and then refresh the contents of the page with the results of the process? Thanks, Jaime. - Any questions? Get answers on any topic at Yahoo! Answers. Try it now. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Cheap Talk? Check out Yahoo! Messenger's low PC-to-Phone call rates.- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] RuntimeException not being caught despite configuration
I'm using version 1.2.2 so in 1.2.3 it will be fixed? Yes, the problem occurs in WebRequestCodingStrategy.addInterfaceParameters when it parses the url parameters, since this is the result of an exception being thrown in the process of instantiating an error page it could have a different processing?. I also look at IRequestCodingStrategy.decode() but in WebRequestCodingStrategy this method is final so one can't override it to catch any exception thrown in its processing.Thanks,Jaime.Johan Compagner [EMAIL PROTECTED] wrote: this is fixed in the current trunk of 1.x What is happening is that your error page is also again erroring.. Because you tamper with the wicket url and that is causing problems in the current buildjohan On 10/12/06, Jaime De La Jara [EMAIL PROTECTED] wrote: I changed the init parameter "configuration" to deployment but the problem persists. If I change the following url : http://localhost:8080/phonebook/app?wicket:interface=:1:1:tohttp://localhost:8080/phonebook/app?wicket:interface=:1:X :I still get :java.lang.NumberFormatException: For input string: "X" java.lang.NumberFormatException.forInputString(NumberFormatException.java:48) java.lang.Integer.parseInt(Integer.java:447) java.lang.Integer.parseInt(Integer.java:497) wicket.protocol.http.request.WebRequestCodingStrategy.addInterfaceParameters(WebRequestCodingStrategy.java:424) wicket.protocol.http.request.WebRequestCodingStrategy.decode(WebRequestCodingStrategy.java:157) wicket.Request.getRequestParameters(Request.java:161) wicket.Page.init(Page.java:1149) wicket.Page.init(Page.java:194) wicket.markup.html.WebPage.init(WebPage.java:119) wicket.contrib.phonebook.web.page.BasePage.init(BasePage.java:53) wicket.contrib.phonebook.web.page.ErrorPage.init(ErrorPage.java:38) wicket.contrib.phonebook.web.PhonebookApplication$2$1.onRuntimeException(PhonebookApplication.java:250) wicket.request.compound.DefaultExceptionResponseStrategy.onRuntimeException(DefaultExceptionResponseStrategy.java:125) wicket.request.compound.DefaultExceptionResponseStrategy.respond(DefaultExceptionResponseStrategy.java:64) wicket.request.compound.AbstractCompoundRequestCycleProcessor.respond(AbstractCompoundRequestCycleProcessor.java:76) wicket.RequestCycle.step(RequestCycle.java:1006) wicket.RequestCycle.steps(RequestCycle.java:1040) wicket.RequestCycle.request(RequestCycle.java:454) wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:216) javax.servlet.http.HttpServlet.service(HttpServlet.java:689) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.springframework.orm.jdo.support.OpenPersistenceManagerInViewFilter.doFilterInternal(OpenPersistenceManagerInViewFilter.java:106) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)The config I'm using is : context-param param-nameconfiguration/param-name param-valuedeployment/param-value /context-paramSurely I'm confusing some parameter value or something. Jaime.i think you have to be in deployment mode-IgorOn 10/11/06, Jaime De La Jara [EMAIL PROTECTED] wrote:Hi, changing the url information and reloading causes a RuntimeException stack trace to be shown instead of a custom ErrorPage that I have configured in y app : This is the configuration being used :getApplicationSettings().setInternalErrorPage(ErrorPage.class); getExceptionSettings().setUnexpectedExceptionDisplay(IExceptionSettings.SHOW_INTERNAL_ERROR_PAGE );and protected IRequestCycleFactory getDefaultRequestCycleFactory() { return new IRequestCycleFactory() { private static final long serialVersionUID = 1L; public RequestCycle newRequestCycle(Session session, Request request, Response response) { return new WebRequestCycle((WebSession) session, (WebRequest) request, (WebResponse) response) { @Override public wicket.Page onRuntimeException(wicket.Page page, RuntimeException e) { System.out.println("Page : " + page); return new ErrorPage(e); } }; } }; }and ErrorPage constructor is : public ErrorPage(RuntimeException e) { String errorMsg = "Se ha producido un error inesperado"; System.out.println ("Exception : " + getRootException(e)); if (UnAuthorizedException.class.isInstance (getRootException(e))) errorMsg = "Ud. no esta autorizado a realizar esta accion"; add(new Label("error", errorMsg)); add(new Link("homeLink") { public void onClick() { setResponsePage(new ListContactsPage()); } }); } However the following trace is shown when I tweak the Url (as a user could do) and press the reload button : java.lang.NumberFormatException: For input string: "users" java.lang.NumberFormatException.forInputString(NumberFormatException.java:48) java.lang.Integer.parseInt(Integer.java:447) java.lang.Integer.parseInt(Integer.java:497) wicket.protocol.http.request.WebRequestCodingStrategy.addInterfaceParameters(WebRequestCodingStrategy.java:424) wicket.protocol.http.request.WebRequestCo
Re: [Wicket-user] RuntimeException not being caught despite configuration
I changed the init parameter "configuration" to deployment but the problem persists. If I change the following url :http://localhost:8080/phonebook/app?wicket:interface=:1:1:tohttp://localhost:8080/phonebook/app?wicket:interface=:1:X:I still get :java.lang.NumberFormatException: For input string: "X" java.lang.NumberFormatException.forInputString(NumberFormatException.java:48) java.lang.Integer.parseInt(Integer.java:447) java.lang.Integer.parseInt(Integer.java:497) wicket.protocol.http.request.WebRequestCodingStrategy.addInterfaceParameters(WebRequestCodingStrategy.java:424) wicket.protocol.http.request.WebRequestCodingStrategy.decode(WebRequestCodingStrategy.java:157) wicket.Request.getRequestParameters(Request.java:161) wicket.Page.init(Page.java:1149) wicket.Page.init(Page.java:194) wicket.markup.html.WebPage.init(WebPage.java:119) wicket.contrib.phonebook.web.page.BasePage.init(BasePage.java:53) wicket.contrib.phonebook.web.page.ErrorPage.init(ErrorPage.java:38) wicket.contrib.phonebook.web.PhonebookApplication$2$1.onRuntimeException(PhonebookApplication.java:250) wicket.request.compound.DefaultExceptionResponseStrategy.onRuntimeException(DefaultExceptionResponseStrategy.java:125) wicket.request.compound.DefaultExceptionResponseStrategy.respond(DefaultExceptionResponseStrategy.java:64) wicket.request.compound.AbstractCompoundRequestCycleProcessor.respond(AbstractCompoundRequestCycleProcessor.java:76) wicket.RequestCycle.step(RequestCycle.java:1006) wicket.RequestCycle.steps(RequestCycle.java:1040) wicket.RequestCycle.request(RequestCycle.java:454) wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:216) javax.servlet.http.HttpServlet.service(HttpServlet.java:689) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.springframework.orm.jdo.support.OpenPersistenceManagerInViewFilter.doFilterInternal(OpenPersistenceManagerInViewFilter.java:106) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)The config I'm using is : context-param param-nameconfiguration/param-name param-valuedeployment/param-value /context-paramSurely I'm confusing some parameter value or something.Jaime.i think you have to be in deployment mode-IgorOn 10/11/06, Jaime De La Jara [EMAIL PROTECTED] wrote:Hi, changing the url information and reloading causes a RuntimeException stack trace to be shown instead of a custom ErrorPage that I have configured in y app : This is the configuration being used :getApplicationSettings().setInternalErrorPage(ErrorPage.class); getExceptionSettings().setUnexpectedExceptionDisplay(IExceptionSettings.SHOW_INTERNAL_ERROR_PAGE );and protected IRequestCycleFactory getDefaultRequestCycleFactory() { return new IRequestCycleFactory() { private static final long serialVersionUID = 1L; public RequestCycle newRequestCycle(Session session, Request request, Response response) { return new WebRequestCycle((WebSession) session, (WebRequest) request, (WebResponse) response) { @Override public wicket.Page onRuntimeException(wicket.Page page, RuntimeException e) { System.out.println("Page : " + page); return new ErrorPage(e); } }; } }; }and ErrorPage constructor is : public ErrorPage(RuntimeException e) { String errorMsg = "Se ha producido un error inesperado"; System.out.println("Exception : " + getRootException(e)); if (UnAuthorizedException.class.isInstance (getRootException(e))) errorMsg = "Ud. no esta autorizado a realizar esta accion"; add(new Label("error", errorMsg)); add(new Link("homeLink") { public void onClick() { setResponsePage(new ListContactsPage()); } }); }However the following trace is shown when I tweak the Url (as a user could do) and press the reload button :java.lang.NumberFormatException: For input string: "users" java.lang.NumberFormatException.forInputString(NumberFormatException.java:48) java.lang.Integer.parseInt(Integer.java:447) java.lang.Integer.parseInt(Integer.java:497) wicket.protocol.http.request.WebRequestCodingStrategy.addInterfaceParameters(WebRequestCodingStrategy.java:424) wicket.protocol.http.request.WebRequestCodingStrategy.decode(WebRequestCodingStrategy.java:157) wicket.Request.getRequestParameters(Request.java:161) wicket.Page.init(Page.java:1149) wicket.Page.init(Page.java:194) wicket.markup.html.WebPage.init(WebPage.java:119) wicket.contrib.phonebook.web.page.BasePage.init(BasePage.java:53) wicket.contrib.phonebook.web.page.ErrorPage.init(ErrorPage.java:37) wicket.contrib.phonebook.web.PhonebookApplication$2$1.onRuntimeException(PhonebookApplication.java:249) wicket.request.compound.DefaultExceptionResponseStrategy.onRuntimeException(DefaultExceptionResponseStrategy.java:125) wicket.request.compound.DefaultExceptionResponseStrategy.respond(DefaultExceptionResponseStrategy.java:64) wicket.request.compound.AbstractCompoundRequestCycleProcessor.respond(AbstractCompoundRequestCycleProcessor.java:76) wicket.
[Wicket-user] RuntimeException not being caught despite configuration
Hi, changing the url information and reloading causes a RuntimeException stack trace to be shown instead of a custom ErrorPage that I have configured in y app :This is the configuration being used :getApplicationSettings().setInternalErrorPage(ErrorPage.class); getExceptionSettings().setUnexpectedExceptionDisplay(IExceptionSettings.SHOW_INTERNAL_ERROR_PAGE);andprotected IRequestCycleFactory getDefaultRequestCycleFactory() { return new IRequestCycleFactory() { private static final long serialVersionUID = 1L; public RequestCycle newRequestCycle(Session session, Request request, Response response) { return new WebRequestCycle((WebSession) session, (WebRequest) request, (WebResponse) response) { @Override public wicket.Page onRuntimeException(wicket.Page page, RuntimeException e) { System.out.println("Page : " + page); return new ErrorPage(e); } }; } }; }and ErrorPage constructor is : public ErrorPage(RuntimeException e) { String errorMsg = "Se ha producido un error inesperado"; System.out.println("Exception : " + getRootException(e)); if (UnAuthorizedException.class.isInstance(getRootException(e))) errorMsg = "Ud. no esta autorizado a realizar esta accion"; add(new Label("error", errorMsg)); add(new Link("homeLink") { public void onClick() { setResponsePage(new ListContactsPage()); } }); }However the following trace is shown when I tweak the Url (as a user could do) and press the reload button :java.lang.NumberFormatException: For input string: "users" java.lang.NumberFormatException.forInputString(NumberFormatException.java:48) java.lang.Integer.parseInt(Integer.java:447) java.lang.Integer.parseInt(Integer.java:497) wicket.protocol.http.request.WebRequestCodingStrategy.addInterfaceParameters(WebRequestCodingStrategy.java:424) wicket.protocol.http.request.WebRequestCodingStrategy.decode(WebRequestCodingStrategy.java:157) wicket.Request.getRequestParameters(Request.java:161) wicket.Page.init(Page.java:1149) wicket.Page.init(Page.java:194) wicket.markup.html.WebPage.init(WebPage.java:119) wicket.contrib.phonebook.web.page.BasePage.init(BasePage.java:53) wicket.contrib.phonebook.web.page.ErrorPage.init(ErrorPage.java:37) wicket.contrib.phonebook.web.PhonebookApplication$2$1.onRuntimeException(PhonebookApplication.java:249) wicket.request.compound.DefaultExceptionResponseStrategy.onRuntimeException(DefaultExceptionResponseStrategy.java:125) wicket.request.compound.DefaultExceptionResponseStrategy.respond(DefaultExceptionResponseStrategy.java:64) wicket.request.compound.AbstractCompoundRequestCycleProcessor.respond(AbstractCompoundRequestCycleProcessor.java:76) wicket.RequestCycle.step(RequestCycle.java:1006) wicket.RequestCycle.steps(RequestCycle.java:1040) wicket.RequestCycle.request(RequestCycle.java:454) wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:216) javax.servlet.http.HttpServlet.service(HttpServlet.java:689) javax.servlet.http.HttpServlet.service(HttpServlet.java:802)Is there some config missing?Thanks,Jaime. All-new Yahoo! Mail - Fire up a more powerful email and get things done faster.- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] navigation inside a tabbed pane
But If I'm not wrong PanelCachingTab stores the first panel displayed and this is not what I need since if the user navigates, say, to third panel in the navigation flow and selects another tab and then returns to the first tab the first panel would be displayed right?. In the specific case I'm trying to implement this, the phonebook app, in the ListContactsPanel I have a createLink, and this is how I replace the current panel to the new one : IndexPage idxPage = (IndexPage)getPage(); MarkupContainer tab = (MarkupContainer)idxPage.get("tabs"); EditContactPanel editPanel = new EditContactPanel((Panel)tab.get("panel"), getParent().getId(), 0); tab.replace(editPanel); idxPage.setPanel(editPanel);where IndexPage has the tabs and it has an instance variable, panel, that contains the last accesed panel for tab 1 (it could have a Map for each tab).The problem is that I find the above code too complicated and something very similar has to be used in each place I replace a panel. Besides in the case of the UserActionPanel I had to change the constructor to pass it a reference to the ListContactsPanel.Any tips?Thanks,Jaime.ITab is a factory for tab panels - it is there as a level of indirection so you dont have to create/populate panels for each tab until the user selects the tab.there is nothing special you need for state management - wicket takes care of it for you. to keep the state of previous tabs instead of always creating a new panel in your ITab impl, keep the ref to the old one, see PanelCachingTab which does just that.also instead of using getParent().replace() it might be cleaner to use component.replaceWith()-IgorSo, if I use the Panels approach I'd need just one page and the navigation inside a tab would be using the replace method of MarkupContainer right?, and in this case how could I manage state in each tab?One thing of TabbedPanel implmentation I don't understand is why tabs are added first to a list and then added to the TabbedPanel, also why Tab is not a MarkupContainer since is supossed to contain a panel?Thanks and Regards,Jaime.yes, have everything be a panel. there is absolutely nothing wrong with that. wicket makes very little distinction between a page and a panel - a page is just a top level container.if you create a basepage or something similar you will lose previous state - like selected tab, etc. it is simly much easier to work with panels. -IgorOn 10/9/06, Jaime De La Jara [EMAIL PROTECTED] wrote: And in the case of a web app that handles, for example, invoices and vendors with this navigation flow : Invoice Search - List of Invoices - Invoice detail - Invoice edition Vendors Search - List of Vendors - Vendor detail - Vendor edition and I'd like to create two tabs, one for Invoices and the other for Vendors. Would I have to convert each Page to a panel and instead of setResponsePage use replace and the corresponding code to retrieve a parent and all that? What if I created a BasePage that contained the tabs and have each page to inherit from this page to add the specific markup and take care of tab selection?How hard would be to extend TabbedPanel and ITab to manage the above situation? Besides one would have to consider what happens to a tab state when the user changes the selected tabs and returns to the first tab, it'd have to redisplay the first page of the flow or redisplay the last page?Thanks,Jaime. To work with panels and component replacement. That way you would hardly ever work with setReponsePage, but rather with Component#replaceWith or MarkupContainer#replace in Wicket 1.2.x, or in Wicket 2.0, you would just create the new component with the proper parent or in case you'd want to reuse an older instance, you can use Component#reAttach Eelco On 10/5/06, Jaime De La Jara [EMAIL PROTECTED] wrote: What could be the preferred way to have an application with tabs and have a bunch of pages inside one of the tabs so the navigation between them is equivalent as a navigation between standalone pages? Besides of extending from Panel, What would be the analog of setResponsePage() ?Thanks. Jaime. Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1¢/min.- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Do you Yahoo!? Get on board. You're invited to try the new Yahoo! Mail.- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.s
Re: [Wicket-user] navigation inside a tabbed panel
So, if I use the Panels approach I'd need just one page and the navigation inside a tab would be using the replace method of MarkupContainer right?, and in this case how could I manage state in each tab?One thing of TabbedPanel implmentation I don't understand is why tabs are added first to a list and then added to the TabbedPanel, also why Tab is not a MarkupContainer since is supossed to contain a panel?Thanks and Regards,Jaime.yes, have everything be a panel. there is absolutely nothing wrong with that. wicket makes very little distinction between a page and a panel - a page is just a top level container.if you create a basepage or something similar you will lose previous state - like selected tab, etc. it is simly much easier to work with panels. -IgorOn 10/9/06, Jaime De La Jara [EMAIL PROTECTED] wrote: And in the case of a web app that handles, for example, invoices and vendors with this navigation flow : Invoice Search - List of Invoices - Invoice detail - Invoice edition Vendors Search - List of Vendors - Vendor detail - Vendor edition and I'd like to create two tabs, one for Invoices and the other for Vendors. Would I have to convert each Page to a panel and instead of setResponsePage use replace and the corresponding code to retrieve a parent and all that? What if I created a BasePage that contained the tabs and have each page to inherit from this page to add the specific markup and take care of tab selection?How hard would be to extend TabbedPanel and ITab to manage the above situation? Besides one would have to consider what happens to a tab state when the user changes the selected tabs and returns to the first tab, it'd have to redisplay the first page of the flow or redisplay the last page?Thanks,Jaime. To work with panels and component replacement. That way you would hardly ever work with setReponsePage, but rather with Component#replaceWith or MarkupContainer#replace in Wicket 1.2.x, or in Wicket 2.0, you would just create the new component with the proper parent or in case you'd want to reuse an older instance, you can use Component#reAttach Eelco On 10/5/06, Jaime De La Jara [EMAIL PROTECTED] wrote: What could be the preferred way to have an application with tabs and have a bunch of pages inside one of the tabs so the navigation between them is equivalent as a navigation between standalone pages? Besides of extending from Panel, What would be the analog of setResponsePage() ?Thanks. Jaime. Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1¢/min.- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Get your own web address for just $1.99/1st yr. We'll help. Yahoo! Small Business. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] navigation inside a tabbed panel
What could be the preferred way to have an application with tabs and have a bunch of pages inside one of the tabs so the navigation between them is equivalent as a navigation between standalone pages? Besides of extending from Panel, What would be the analog of setResponsePage() ?Thanks.Jaime. Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1¢/min.- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] saving tab panel state inside a tabbed panel
But, if I'm not wrong, in this case I can recover the first panel displayed in the Tab right? This has to do with my former post (http://www.nabble.com/navigation-inside-a-tabbed-panel-tf2391055.html) about how could navigation inside a tab could be achieved, for this I've just used the MarkupContainer.replace() method but since a TabbedPanel has a list of tabs and the panel is not contained in each Tab but in the TabbedPanel I don't see how could I get the current panel displayed to save for later use when the Tab is redisplayed. I also looked at TabbedPanel and consider overriding the setSelectTab and getSelectedTab methods but unfortunely they're final. I'm stuck here, most probably the solution is straightforward but I can't see it.Jaime.Igor Vaynberg [EMAIL PROTECTED] wrote: your ITab implementation can hang on to the panel instead of creating a new one all the time. see PanelCachingTab.-IgorOn 10/5/06, Jaime De La Jara [EMAIL PROTECTED] wrote:Is it possible to save the state of a tab panel, so if I change to another tab and return to the first panel, the contents are retrieved in some way?If yes, how could be done? Thanks,Jaime.Do you Yahoo!? Everyone is raving about the all-new Yahoo! Mail. -Take Surveys. Earn Cash. Influence the Future of ITJoin SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___Wicket-user mailing list Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user -Take Surveys. Earn Cash. Influence the Future of ITJoin SourceForge.net's Techsay panel and you'll get the chance to share youropinions on IT business topics through brief surveys -- and earn cashhttp://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___Wicket-user mailing listWicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2¢/min or less.- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] saving tab panel state inside a tabbed panel
Is it possible to save the state of a tab panel, so if I change to another tab and return to the first panel, the contents are retrieved in some way?If yes, how could be done?Thanks,Jaime. Do you Yahoo!? Everyone is raving about the all-new Yahoo! Mail.- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] updating feedback panel from onSubmit method of AjaxSubmitLink
In the phonebook app there is an EditContactPage that subclass BasePage that has a feedback panel. To the EditContactPage I added an AjaxSubmitLink that adds an address to a contact, I need to validate the address info in the onSubmit method so if it's invalid display a message in the feedbackpanel (which is outside the form that contains the submitting link). How could I do it?Thanks.Jaime. Get your email and more, right on the new Yahoo.com - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] rendering of a collection property in a PropertyColumn
The problem was I copied the fragment in the ListContactsPage and it had to be included in the BasePage which is the superclass of the former page. In my code I referenced the ListContactsPage.this variable otherwise it wouldn't have compiled.Thanks.Jaime.Igor Vaynberg [EMAIL PROTECTED] wrote: you need to be more careful when copying code :)Fragment frag=new Fragment(componentId, "addresses-frag", Mypage.this);which in your case would be Fragment frag=new Fragment(componentId, "addresses-frag", ListContactsPage.this);-IgorOn 9/26/06, Jaime De La Jara [EMAIL PROTECTED] wrote: I tried the code, but it throws the following exception :Exception : wicket.markup.MarkupException: Markup does not contain a fragment with id=addr-frag; Component: [MarkupContainer [Component id = cell, page = wicket.contrib.phonebook.web.page.ListContactsPage , path = 2:users:rows:1:cells:7:cell.Fragment, isVisible = true, isVersioned = true]]I included the fragment in the ListContactsPage as follows :wicket:extenda href="" wicket:id="createLink"Create New Contact/abr/br/ table wicket:id="users" cellspacing="0" cellpadding="2" class="grid" wicket:fragment id="addr-frag" select wicket:id="dropdown"/select /wicket:fragment/table/wicket:extendIt seems that it is expecting to find the fragment inside the markup of DataTable.What can be wrong?Thanks,Jaime.Igor Vaynberg [EMAIL PROTECTED] wrote: dont quote me on thisin MyPage.htmlwicket:fragment id="addresses-frag"select wicket:id="dropdown"/select/wicket:fragment class MyPage {class AddressColumn extends AbstractColumn { void populateItem(final Item cellItem, final String componentId, final IModel rowModel) { Fragment frag=new Fragment(componentId, "addresses-frag", Mypage.this); item.add(frag); frag.add (new DropDownChoice("dropdown", new PropertyModel(rowModel, "addresses", new IChoiceRenderer() { String getId(Obect o, int idx) { return idx} String getDisplayValue(Object o) { return ((Address)o).getStreet(); }}); }}-IgorOn 9/26/06, Jaime De La Jara [EMAIL PROTECTED] wrote: Hi, playing with the phonebook example app I added a collection field to Contact class, this field is a collection of instances of class Address which has two String fields : city and street. I'd like to display a drop down choice containing the street property for each address instance that a contact has, How could I achieve this? Thanks,Jaime. Get your own web address for just $1.99/1st yr. We'll help. Yahoo! Small Business. -Take Surveys. Earn Cash. Influence the Future of ITJoin SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___Wicket-user mailing list Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user -Take Surveys. Earn Cash. Influence the Future of ITJoin SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___Wicket-user mailing list Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user All-new Yahoo! Mail - Fire up a more powerful email and get things done faster. -Take Surveys. Earn Cash. Influence the Future of ITJoin SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___Wicket-user mailing list Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user -Take Surveys. Earn Cash. Influence the Future of ITJoin SourceForge.net's Techsay panel and you'll get the chance to share youropinions on IT business topics through brief surveys -- and earn cashhttp://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___Wicket-user mailing listWicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user How low will we go? Check out Yahoo! Messengers low PC-to-Phone call rates.- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll
Re: [Wicket-user] rendering of a collection property in a PropertyColumn
I used my name page otherwise it wouldn't have compiled :).Here is the markup :wicket:extenda href="" wicket:id="createLink"Create New Contact/abr/br/table wicket:id="users" cellspacing="0" cellpadding="2" class="grid" wicket:fragment id="addr-frag" select wicket:id="dropdown"/select /wicket:fragment/table/wicket:extendand here is the populateItem method :public void populateItem(final Item item, final String componentId, final IModel rowModel) { Fragment frag = new Fragment(componentId, "addr-frag", ListContactsPage.this); item.add(frag); frag.add(new DropDownChoice("dropdown", new PropertyModel(rowModel, "addresses"), new IChoiceRenderer() { public String getIdValue(Object o, int idx) { return String.valueOf(idx); } public String getDisplayValue(Object o) { return((Address)o).getStreet(); } })); }as I mentioned it seems a problem that has to do with the DataTable markup, since in the exception a cell element is displayed.Jaime.Igor Vaynberg [EMAIL PROTECTED] wrote: you need to be more careful when copying code :)Fragment frag=new Fragment(componentId, "addresses-frag", Mypage.this);which in your case would be Fragment frag=new Fragment(componentId, "addresses-frag", ListContactsPage.this);-IgorOn 9/26/06, Jaime De La Jara [EMAIL PROTECTED] wrote: I tried the code, but it throws the following exception :Exception : wicket.markup.MarkupException: Markup does not contain a fragment with id=addr-frag; Component: [MarkupContainer [Component id = cell, page = wicket.contrib.phonebook.web.page.ListContactsPage , path = 2:users:rows:1:cells:7:cell.Fragment, isVisible = true, isVersioned = true]]I included the fragment in the ListContactsPage as follows :wicket:extenda href="" wicket:id="createLink"Create New Contact/abr/br/ table wicket:id="users" cellspacing="0" cellpadding="2" class="grid" wicket:fragment id="addr-frag" select wicket:id="dropdown"/select /wicket:fragment/table/wicket:extendIt seems that it is expecting to find the fragment inside the markup of DataTable.What can be wrong?Thanks,Jaime.Igor Vaynberg [EMAIL PROTECTED] wrote: dont quote me on thisin MyPage.htmlwicket:fragment id="addresses-frag"select wicket:id="dropdown"/select/wicket:fragment class MyPage {class AddressColumn extends AbstractColumn { void populateItem(final Item cellItem, final String componentId, final IModel rowModel) { Fragment frag=new Fragment(componentId, "addresses-frag", Mypage.this); item.add(frag); frag.add (new DropDownChoice("dropdown", new PropertyModel(rowModel, "addresses", new IChoiceRenderer() { String getId(Obect o, int idx) { return idx} String getDisplayValue(Object o) { return ((Address)o).getStreet(); }}); }}-IgorOn 9/26/06, Jaime De La Jara [EMAIL PROTECTED] wrote: Hi, playing with the phonebook example app I added a collection field to Contact class, this field is a collection of instances of class Address which has two String fields : city and street. I'd like to display a drop down choice containing the street property for each address instance that a contact has, How could I achieve this? Thanks,Jaime. Get your own web address for just $1.99/1st yr. We'll help. Yahoo! Small Business. -Take Surveys. Earn Cash. Influence the Future of ITJoin SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___Wicket-user mailing list Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user -Take Surveys. Earn Cash. Influence the Future of ITJoin SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___Wicket-user mailing list Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user All-new Yahoo! Mail - Fire up a more powerful email and get things done faster. -Take Surveys. Earn Cash. Influence the Future of ITJoin SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___Wicket-user mailing list Wicket-user@lists
[Wicket-user] rendering of a collection property in a PropertyColumn
Hi, playing with the phonebook example app I added a collection field to Contact class, this field is a collection of instances of class Address which has two String fields : city and street. I'd like to display a drop down choice containing the street property for each address instance that a contact has, How could I achieve this?Thanks,Jaime. Get your own web address for just $1.99/1st yr. We'll help. Yahoo! Small Business. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] rendering of a collection property in a PropertyColumn
I tried the code, but it throws the following exception :Exception : wicket.markup.MarkupException: Markup does not contain a fragment with id=addr-frag; Component: [MarkupContainer [Component id = cell, page = wicket.contrib.phonebook.web.page.ListContactsPage, path = 2:users:rows:1:cells:7:cell.Fragment, isVisible = true, isVersioned = true]]I included the fragment in the ListContactsPage as follows :wicket:extenda href="" wicket:id="createLink"Create New Contact/abr/br/table wicket:id="users" cellspacing="0" cellpadding="2" class="grid" wicket:fragment id="addr-frag" select wicket:id="dropdown"/select /wicket:fragment/table/wicket:extendIt seems that it is expecting to find the fragment inside the markup of DataTable.What can be wrong?Thanks,Jaime.Igor Vaynberg [EMAIL PROTECTED] wrote: dont quote me on thisin MyPage.htmlwicket:fragment id="addresses-frag"select wicket:id="dropdown"/select/wicket:fragmentclass MyPage {class AddressColumn extends AbstractColumn { void populateItem(final Item cellItem, final String componentId, final IModel rowModel) { Fragment frag=new Fragment(componentId, "addresses-frag", Mypage.this); item.add(frag); frag.add (new DropDownChoice("dropdown", new PropertyModel(rowModel, "addresses", new IChoiceRenderer() { String getId(Obect o, int idx) { return idx} String getDisplayValue(Object o) { return ((Address)o).getStreet(); }}); }}-IgorOn 9/26/06, Jaime De La Jara [EMAIL PROTECTED] wrote: Hi, playing with the phonebook example app I added a collection field to Contact class, this field is a collection of instances of class Address which has two String fields : city and street. I'd like to display a drop down choice containing the street property for each address instance that a contact has, How could I achieve this? Thanks,Jaime. Get your own web address for just $1.99/1st yr. We'll help. Yahoo! Small Business. -Take Surveys. Earn Cash. Influence the Future of ITJoin SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___Wicket-user mailing list Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user -Take Surveys. Earn Cash. Influence the Future of ITJoin SourceForge.net's Techsay panel and you'll get the chance to share youropinions on IT business topics through brief surveys -- and earn cashhttp://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___Wicket-user mailing listWicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user All-new Yahoo! Mail - Fire up a more powerful email and get things done faster.- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] image l10n and path and submit tracking
You're right the page method afterCallComponent could be used, just I was looking for something like a superclass hook method that could be called by the framework after some processing occurred (in my case after a submit).In the case for the generic callback I was thinking of something that could be plugged in, instead of having a pair of methods for each step (onBefore../after...),I'm not sure if it makes sense, maybe an interface callback approach could also be useful.Jaime.Igor Vaynberg [EMAIL PROTECTED] wrote: The page hook could be of useful for a submit button but maybe not for a link. how do you figure?Perhaps, I'm not sure, but a generic callback mechanism could be added to the Component class, so pre and post processor could be added for the event listener methods (onSubmit(), onClick(), etc). we already have them and they have all been listed in this thread. i dont think we need more, in fact i think we already have too many.-Igor -Using Tomcat but need to do more? Need to support web services, security?Get stuff done quickly with pre-integrated technology to make your job easierDownload IBM WebSphere Application Server v.1.0.1 based on Apache Geronimohttp://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___Wicket-user mailing listWicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1¢/min.- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] image l10n and path and submit tracking
I've just added the afterCallComponent to my base page and put some println to see what Component and Listener it was receiving, and when I click a submit button the component that gets called it's the form containing it, I think I misunderstood the method's behaviour since I was expecting that every call to a page component would cause this method to be called. In this case I can't determine which button was clicked. Maybe what I'm looking is too cumbersome, and should evaluate using AOP which in this case I was trying to avoid, I haven't taken a look at Eelco proposal of modifying the RequestCycleProcessor, first I'll try to understand it better.Jaime.Igor Vaynberg [EMAIL PROTECTED] wrote: but you can do this yourself by implementing callbacks to these pluggable things in your basepage afterCallComponent.-IgorOn 9/5/06, Jaime De La Jara [EMAIL PROTECTED] wrote: You're right the page method afterCallComponent could be used, just I was looking for something like a superclass hook method that could be called by the framework after some processing occurred (in my case after a submit). In the case for the generic callback I was thinking of something that could be plugged in, instead of having a pair of methods for each step (onBefore../after...),I'm not sure if it makes sense, maybe an interface callback approach could also be useful. Jaime.Igor Vaynberg [EMAIL PROTECTED] wrote: The page hook could be of useful for a submit button but maybe not for a link. how do you figure?Perhaps, I'm not sure, but a generic callback mechanism could be added to the Component class, so pre and post processor could be added for the event listener methods (onSubmit(), onClick(), etc). we already have them and they have all been listed in this thread. i dont think we need more, in fact i think we already have too many.-Igor - Using Tomcat but need to do more? Need to support web services, security?Get stuff done quickly with pre-integrated technology to make your job easierDownload IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___Wicket-user mailing list Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1¢/min. -Using Tomcat but need to do more? Need to support web services, security?Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___Wicket-user mailing list Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user -Using Tomcat but need to do more? Need to support web services, security?Get stuff done quickly with pre-integrated technology to make your job easierDownload IBM WebSphere Application Server v.1.0.1 based on Apache Geronimohttp://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___Wicket-user mailing listWicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1¢/min.- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] image l10n and path and submit tracking
you're right, I browsed the source code of Form and Button and it's just like that. The findSubmittingButton method is protected and final so unfortunely It's of no use in this case. I guess that I'll check another way to tackle this thing, maybe the simplest is to subclass a couple of class MyButton and MyLink and have the subclasses call the superclass event handler first. Thanks a lot again,Jaime.Igor Vaynberg [EMAIL PROTECTED] wrote: yes because the event is raised on the form not the button, thats how http works. the form then forwards the onsubmit to the button. seee findSubmittingButton() in the form, too bad its not public otherwise you couldve used it directly. -IgorOn 9/5/06, Jaime De La Jara [EMAIL PROTECTED] wrote: I've just added the afterCallComponent to my base page and put some println to see what Component and Listener it was receiving, and when I click a submit button the component that gets called it's the form containing it, I think I misunderstood the method's behaviour since I was expecting that every call to a page component would cause this method to be called. In this case I can't determine which button was clicked. Maybe what I'm looking is too cumbersome, and should evaluate using AOP which in this case I was trying to avoid, I haven't taken a look at Eelco proposal of modifying the RequestCycleProcessor, first I'll try to understand it better. Jaime.Igor Vaynberg [EMAIL PROTECTED] wrote: but you can do this yourself by implementing callbacks to these pluggable things in your basepage afterCallComponent.-IgorOn 9/5/06, Jaime De La Jara [EMAIL PROTECTED] wrote: You're right the page method afterCallComponent could be used, just I was looking for something like a superclass hook method that could be called by the framework after some processing occurred (in my case after a submit). In the case for the generic callback I was thinking of something that could be plugged in, instead of having a pair of methods for each step (onBefore../after...), I'm not sure if it makes sense, maybe an interface callback approach could also be useful. Jaime.Igor Vaynberg [EMAIL PROTECTED] wrote: The page hook could be of useful for a submit button but maybe not for a link. how do you figure? Perhaps, I'm not sure, but a generic callback mechanism could be added to the Component class, so pre and post processor could be added for the event listener methods (onSubmit(), onClick(), etc). we already have them and they have all been listed in this thread. i dont think we need more, in fact i think we already have too many.-Igor - Using Tomcat but need to do more? Need to support web services, security?Get stuff done quickly with pre-integrated technology to make your job easierDownload IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___Wicket-user mailing list Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls.Great rates starting at 1¢/min. -Using Tomcat but need to do more? Need to support web services, security?Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -Using Tomcat but need to do more? Need to support web services, security?Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___Wicket-user mailing list Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1¢/min. -Using Tomcat but need to do more? Need to support web services, security?Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___Wicket-user mailing list Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] image l10n and path and submit tracking
giving it a second thought, the afterComponentCall approach seems good, however to make it simpler the findSubmitting Button should be public so one shouldn't have to make a new Form class just to call that method. I noticed that the Feature Request #1476905 asks just that unfortunely is open.Thanks,Jaime.Jaime De La Jara [EMAIL PROTECTED] wrote: you're right, I browsed the source code of Form and Button and it's just like that. The findSubmittingButton method is protected and final so unfortunely It's of no use in this case. I guess that I'll check another way to tackle this thing, maybe the simplest is to subclass a couple of class MyButton and MyLink and have the subclasses call the superclass event handler first. Thanks a lot again,Jaime.Igor Vaynberg [EMAIL PROTECTED] wrote: yes because the event is raised on the form not the button, thats how http works. the form then forwards the onsubmit to the button. seee findSubmittingButton() in the form, too bad its not public otherwise you couldve used it directly. -IgorOn 9/5/06, Jaime De La Jara [EMAIL PROTECTED] wrote: I've just added the afterCallComponent to my base page and put some println to see what Component and Listener it was receiving, and when I click a submit button the component that gets called it's the form containing it, I think I misunderstood the method's behaviour since I was expecting that every call to a page component would cause this method to be called. In this case I can't determine which button was clicked. Maybe what I'm looking is too cumbersome, and should evaluate using AOP which in this case I was trying to avoid, I haven't taken a look at Eelco proposal of modifying the RequestCycleProcessor, first I'll try to understand it better. Jaime.Igor Vaynberg [EMAIL PROTECTED] wrote: but you can do this yourself by implementing callbacks to these pluggable things in your basepage afterCallComponent.-IgorOn 9/5/06, Jaime De La Jara [EMAIL PROTECTED] wrote: You're right the page method afterCallComponent could be used, just I was looking for something like a superclass hook method that could be called by the framework after some processing occurred (in my case after a submit). In the case for the generic callback I was thinking of something that could be plugged in, instead of having a pair of methods for each step (onBefore../after...), I'm not sure if it makes sense, maybe an interface callback approach could also be useful. Jaime.Igor Vaynberg [EMAIL PROTECTED] wrote: The page hook could be of useful for a submit button but maybe not for a link. how do you figure? Perhaps, I'm not sure, but a generic callback mechanism could be added to the Component class, so pre and post processor could be added for the event listener methods (onSubmit(), onClick(), etc). we already have them and they have all been listed in this thread. i dont think we need more, in fact i think we already have too many.-Igor - Using Tomcat but need to do more? Need to support web services, security?Get stuff done quickly with pre-integrated technology to make your job easierDownload IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___Wicket-user mailing list Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls.Great rates starting at 1¢/min. -Using Tomcat but need to do more? Need to support web services, security?Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -Using Tomcat but need to do more? Need to support web services, security?Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___Wicket-user mailing list Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1¢/min. -Using Tomcat but need to do more? Need to support web services, security?Get stuff done quickly with pre-integrated technology to make your job easier Download IBM
[Wicket-user] image l10n and path and submit tracking
I've been investigating the issue of localized images and their location in the application folders and I haven't found a simple way to handle it. I've taken a look at SubmitLink but when I add an image using :add(new Image("cancelButtonImage", new ResourceModel("button.cancel"))where button.cancel is defined in a property file as : CANCEL.gifbut to the image file name is added the page package and I prefer to keep the images in a separate directory. So, How could I deal with localized images and their location? I'm using a set up where the pages are in the same folder as the page classes.For the second problem I need to track everytime a submit occurs or a link is clicked, how could I do that? I checked the javadocs and found onEndRequest but noticed that is deprecated, also I tried onDetach but it's also called when the button is displayed. I thought of adding a superclass that on its onSubmit() would log some information and then sublasses would have to call super.onSubmit() but it doesn't look a good solution.Thanks in advance,Jaime. Stay in the know. Pulse on the new Yahoo.com. Check it out. - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] image l10n and path and submit tracking
The constructor comes from this : Image(java.lang.Stringid, IModelmodel) and it works, however it requires the CANCEL.gif file be located in the same directory of the html page class (it prepends the package name to the image file). This is an example of a more general case of where one should put the html files and the images contained in them, so one can have images in different locales?For the submit and link tracking, the Javadocs say that is not recomended to override this method besides it would work for submits only. Here what I'm looking is some way of "intercepting" the click of a button or a link.Thanks a lot,Jaime.Igor Vaynberg [EMAIL PROTECTED] wrote: On 9/4/06, Jaime De La Jara [EMAIL PROTECTED] wrote: I've been investigating the issue of localized images and their location in the application folders and I haven't found a simple way to handle it. I've taken a look at SubmitLink but when I add an image using : add(new Image("cancelButtonImage", new ResourceModel("button.cancel"))where button.cancel is defined in a property file as : CANCEL.gifumm...i dont know who added that constructor...but i dont see it used anywhere as far as image resolution is required so i would file a bug you can also do new Image("id", new ResourceReference(Scope.class, getLocalizer().getString("button.cancel"))); For the second problem I need to track everytime a submit occurs or a link is clicked, how could I do that? I checked the javadocs and found onEndRequest but noticed that is deprecated, also I tried onDetach but it's also called when the button is displayed. I thought of adding a superclass that on its onSubmit() would log some information and then sublasses would have to call super.onSubmit() but it doesn't look a good solution.i would subclass form and override form.process() and add a custom callback from there.-Igor -Using Tomcat but need to do more? Need to support web services, security?Get stuff done quickly with pre-integrated technology to make your job easierDownload IBM WebSphere Application Server v.1.0.1 based on Apache Geronimohttp://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___Wicket-user mailing listWicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user Do you Yahoo!? Get on board. You're invited to try the new Yahoo! Mail.- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] image l10n and path and submit tracking
Ok, thanks. I found the onEndRequest method that does something like what I'm looking for but it's been deprecated. The page hook could be of useful for a submit button but maybe not for a link. Perhaps, I'm not sure, but a generic callback mechanism could be added to the Component class, so pre and post processor could be added for the event listener methods (onSubmit(), onClick(), etc).Best Regards,Jaime.Igor Vaynberg [EMAIL PROTECTED] wrote: also Page has before/afterCallComponet()we have enough hooks, maybe even too many, where you dont need aop-IgorOn 9/4/06, Eelco Hillenius [EMAIL PROTECTED] wrote: For the submit and link tracking, the Javadocs say that is not recomended to override this method besides it would work for submits only. Here what I'm looking is some way of "intercepting" the click of a button or a link. You should be able to use proper OAP (like AspectJ) with Wicket if youwish. Or you can define a custom request targets or even a customrequest cycle processor like this (in your application class): @Overrideprotected IRequestCycleProcessor newRequestCycleProcessor() {final IRequestCycleProcessor wrapped = super.newRequestCycleProcessor();return new IRequestCycleProcessor() { public IRequestCodingStrategy getRequestCodingStrategy() {return wrapped.getRequestCodingStrategy();}public void processEvents(RequestCycle requestCycle) {IRequestTarget resolvedTarget = requestCycle .getRequestTarget();if (resolvedTarget instanceof IComponentRequestTarget) {// etc, etc.}wrapped.processEvents(requestCycle);}public IRequestTarget resolve(RequestCycle requestCycle, RequestParameters requestParameters) {return wrapped.resolve(requestCycle, requestParameters);}public void respond(RequestCycle requestCycle) {wrapped.respond(requestCycle); }public void respond(RuntimeException e,RequestCycle requestCycle) {wrapped.respond(e, requestCycle);}};}Eelco- Using Tomcat but need to do more? Need to support web services, security?Get stuff done quickly with pre-integrated technology to make your job easierDownload IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___ Wicket-user mailing listWicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user -Using Tomcat but need to do more? Need to support web services, security?Get stuff done quickly with pre-integrated technology to make your job easierDownload IBM WebSphere Application Server v.1.0.1 based on Apache Geronimohttp://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___Wicket-user mailing listWicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user Stay in the know. Pulse on the new Yahoo.com. Check it out. - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] Navigator customization
Continuing with my dissection of the phonebook application I've come to the customization of the NavigatorLabel and PagingNavigator classes. How would be a nice way to customize them, so for example change the message "Showing .. to .. of .." and the less than and greater than symbols for an internationalized message and arrow images. I've noticed that the former message is included in the NavigatorLabel class and the symbols appear in the markup associated with the Paging Navigator component.Thanks,Jaime. All-new Yahoo! Mail - Fire up a more powerful email and get things done faster.- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Navigator customization
Ok thanks, maybe that properties could be parametrized in some way, so one would configure them instead of subclassing each time a custom display is required?Jaime.Igor Vaynberg [EMAIL PROTECTED] wrote: you would create your own pagingnavigator y subclassing the existing and changing markup/customizing labelsthen create your own paginglabelthen override NavigationToolbar.newPagingNavigator/newPagingLabel and return your own subclasses -IgorOn 8/29/06, Jaime De La Jara [EMAIL PROTECTED] wrote: Continuing with my dissection of the phonebook application I've come to the customization of the NavigatorLabel and PagingNavigator classes. How would be a nice way to customize them, so for example change the message "Showing .. to .. of .." and the less than and greater than symbols for an internationalized message and arrow images. I've noticed that the former message is included in the NavigatorLabel class and the symbols appear in the markup associated with the Paging Navigator component. Thanks,Jaime. All-new Yahoo! Mail - Fire up a more powerful email and get things done faster. -Using Tomcat but need to do more? Need to support web services, security?Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___Wicket-user mailing list Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user -Using Tomcat but need to do more? Need to support web services, security?Get stuff done quickly with pre-integrated technology to make your job easierDownload IBM WebSphere Application Server v.1.0.1 based on Apache Geronimohttp://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___Wicket-user mailing listWicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2¢/min or less.- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Navigator customization
If I knew how that would be an honor , but I'm a wicket begginer yet, besidesI've been browsing the source code and I found what seems to be a problem with the suclassing of NavigatorLabel and PagingNavigator approach, and this is the construction of a DefaultDataTable because there are the toolnbars added to the table.How could this be tackled?Thanks,Jaime.Igor Vaynberg [EMAIL PROTECTED] wrote: you are more then welcome to patch it :)-IgorOn 8/29/06, Jaime De La Jara [EMAIL PROTECTED] wrote:Ok thanks, maybe that properties could be parametrized in some way, so one would configure them instead of subclassing each time a custom display is required? Jaime.Igor Vaynberg [EMAIL PROTECTED] wrote: you would create your own pagingnavigator y subclassing the existing and changing markup/customizing labels then create your own paginglabelthen override NavigationToolbar.newPagingNavigator/newPagingLabel and return your own subclasses -IgorOn 8/29/06, Jaime De La Jara [EMAIL PROTECTED] wrote: Continuing with my dissection of the phonebook application I've come to the customization of the NavigatorLabel and PagingNavigator classes. How would be a nice way to customize them, so for example change the message "Showing .. to .. of .." and the less than and greater than symbols for an internationalized message and arrow images. I've noticed that the former message is included in the NavigatorLabel class and the symbols appear in the markup associated with the Paging Navigator component. Thanks,Jaime. All-new Yahoo! Mail - Fire up a more powerful email and get things done faster. -Using Tomcat but need to do more? Need to support web services, security?Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___Wicket-user mailing list Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user-Using Tomcat but need to do more? Need to support web services, security?Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___Wicket-user mailing list Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2¢/min or less. -Using Tomcat but need to do more? Need to support web services, security?Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___Wicket-user mailing list Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user -Using Tomcat but need to do more? Need to support web services, security?Get stuff done quickly with pre-integrated technology to make your job easierDownload IBM WebSphere Application Server v.1.0.1 based on Apache Geronimohttp://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___Wicket-user mailing listWicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2¢/min or less.- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] wicket application unit testing advice
Hi, I've looking for how can I unit test the pages that compose the phonebook example application and I've seen different approaches that cause me some confusion. In the examples package the tests are based in jWebUnit, also I found the WicketTester utility class and in the wiki I found an article about Spring that uses the EasyMock library. I'm new to the subject so I'm asking for some hints and clues that could be used as a starting point. In the particular case of the phonebook app, which I'm trying to use as a template app, I find difficult to test the ListContactsPage since it has a DefaultDataTable that uses a DataProvider that uses a reference to the Dao, so much elements are playing some role in this page and I dont know where to start.Thanks in advance,Jaime. Do you Yahoo!? Get on board. You're invited to try the new Yahoo! Mail.- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] Fwd: Re: refreshing the contents of page back
I´m sorry if I didnt explain the problem clearly, what I´m saying is that in the case of the phonebook app when I add a new contact in the EditContact page and the ListContacts is redisplayed the last name of the new contact is not added to the list of unique last names, so it seems that the model for the filters used for each field is not refreshed.Jaime.Igor Vaynberg [EMAIL PROTECTED] wrote: Date: Sat, 26 Aug 2006 19:53:27 -0700From: "Igor Vaynberg" [EMAIL PROTECTED]To: wicket-user@lists.sourceforge.netSubject: Re: [Wicket-user] refreshing the contents of page back i dont really understand what you are sayinggenerally this is not the problem because at the end of the request the models are detached - so when the page renders again - even from some saved reference - the models are attached again and the appropriate data/component hierarchies are refreshed this is kinda like the listview componet - you dont need to recreate it every time you want to show fresh data - the same instance that spans requests knows how to pull the new data whenever it renders -Igor On 8/26/06, Jaime De La Jara [EMAIL PROTECTED] wrote: Hi, playing with the phonebook example app. I ran into the problem of how can be updated the contents of a page whose instance is passed to another page constructor?. In the phonebook the back page is ListContactsPage and the page that holds the instance is EditContact. This happens when one adds another contact and the EditContact page returns to the ListContactsPage using its reference and the new contact last name is not shown in the combo corresponding to that field. Thanks.Jaime.How low will we go? Check out Yahoo! Messenger's low PC-to-Phone call rates. -Using Tomcat but need to do more? Need to support web services, security?Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___Wicket-user mailing list Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user -Using Tomcat but need to do more? Need to support web services, security?Get stuff done quickly with pre-integrated technology to make your job easierDownload IBM WebSphere Application Server v.1.0.1 based on Apache Geronimohttp://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___Wicket-user mailing listWicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user Do you Yahoo!? Get on board. You're invited to try the new Yahoo! Mail.- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Fwd: Re: refreshing the contents of page back
Ok.Jaime.Igor Vaynberg [EMAIL PROTECTED] wrote: ah, thats a bug :)mind filing a report/patch?-IgorOn 8/27/06, Jaime De La Jara [EMAIL PROTECTED] wrote:I´m sorry if I didnt explain the problem clearly, what I´m saying is that in the case of the phonebook app when I add a new contact in the EditContact page and the ListContacts is redisplayed the last name of the new contact is not added to the list of unique last names, so it seems that the model for the filters used for each field is not refreshed. Jaime.Igor Vaynberg [EMAIL PROTECTED] wrote: Date: Sat, 26 Aug 2006 19:53:27 -0700From: "Igor Vaynberg" [EMAIL PROTECTED] To: wicket-user@lists.sourceforge.netSubject: Re: [Wicket-user] refreshing the contents of page back i dont really understand what you are sayinggenerally this is not the problem because at the end of the request the models are detached - so when the page renders again - even from some saved reference - the models are attached again and the appropriate data/component hierarchies are refreshed this is kinda like the listview componet - you dont need to recreate it every time you want to show fresh data - the same instance that spans requests knows how to pull the new data whenever it renders -Igor On 8/26/06, Jaime De La Jara [EMAIL PROTECTED] wrote: Hi, playing with the phonebook example app. I ran into the problem of how can be updated the contents of a page whose instance is passed to another page constructor?. In the phonebook the back page is ListContactsPage and the page that holds the instance is EditContact. This happens when one adds another contact and the EditContact page returns to the ListContactsPage using its reference and the new contact last name is not shown in the combo corresponding to that field. Thanks.Jaime. How low will we go? Check out Yahoo! Messenger's lowPC-to-Phone call rates. -Using Tomcat but need to do more? Need to support web services, security?Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___Wicket-user mailing list Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user -Using Tomcat but need to do more? Need to support web services, security?Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___Wicket-user mailing list Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user Do you Yahoo!? Get on board. You're invited to try the new Yahoo! Mail. -Using Tomcat but need to do more? Need to support web services, security?Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___Wicket-user mailing list Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user -Using Tomcat but need to do more? Need to support web services, security?Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___Wicket-user mailing list Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user -Using Tomcat but need to do more? Need to support web services, security?Get stuff done quickly with pre-integrated technology to make your job easierDownload IBM WebSphere Application Server v.1.0.1 based on Apache Geronimohttp://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___Wicket-user mailing listWicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user Get your email and more, right on the new Yahoo.com - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.n
[Wicket-user] refreshing the contents of page back
Hi, playing with the phonebook example app. I ran into the problem of how can be updated the contents of a page whose instance is passed to another page constructor?. In the phonebook the back page is ListContactsPage and the page that holds the instance is EditContact. This happens when one adds another contact and the EditContact page returns to the ListContactsPage using its reference and the new contact last name is not shown in the combo corresponding to that field.Thanks.Jaime. How low will we go? Check out Yahoo! Messengers low PC-to-Phone call rates.- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] Session.get() behaviour
Hi, I was wondering why Session.get() throws a WicketRuntimeException if the session does not exists, in my app I define an AuthorizationStrategy and I'm also using some spring interceptors where I get a user object that is saved in the session but I had to include a try/catch block in each case to prevent a NEP in the former case. If the session is null why it does not return it?Thanks.Jaime. Do you Yahoo!? Get on board. You're invited to try the new Yahoo! Mail.- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] Re : Session.get() behaviour
I think Igor proposal, session.exists(), is correct and it could be added without any impact.Jaime.i think thats better then an npe, didnt even know we were doing that. so either this or add a session.exists() so you can test for it. -IgorOn 8/25/06, Eelco Hillenius [EMAIL PROTECTED] wrote: I thought about that myself too. I'd be fine letting RequestCycle.get(), Session.get() and Application.get() return null if the thread local is not set. What do others think of this? Eelco On 8/25/06, Jaime De La Jara [EMAIL PROTECTED] wrote: Hi, I was wondering why Session.get() throws a WicketRuntimeException if the session does not exists, in my app I define an AuthorizationStrategy and I'm also using some spring interceptors where I get a user object that is saved in the session but I had to include a try/catch block in each case to prevent a NEP in the former case. If the session is null why it does not return it? Thanks. Jaime. All-new Yahoo! Mail - Fire up a more powerful email and get things done faster.- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] phonebook application detail
Hi, I've downloaded the phonebook example app and noticed that when you add a contact it does not refresh the unique last names list, this is because the ListContacts page is saved in a EditPage instance so one can go back to this page. How can this be fixed?Thanks,Jaime.P.S. The application is great in showing how to integrate wicket with Spring and a ORM framework. I'm trying to use JDO with it. Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2¢/min or less.- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] using superclass converter for subclass instances
Hi, In a previous post I mentioned the problems I had converting simultaneously Date and Float from/to String, the explanation was on other side, since what I thought was a Date instance was a subclass returned by the JDO implementation I use. So, I thought, would not be useful (wise?) to use the same converter for instances that belong to a subclass of a class that already has a converter defined (in this case, the Date class)?. That is, instead of using the DefaultConverter, when a converter is not found, search for a superclass converter, and use the first found or the closer in the class hierarchy.Thanks,Jaime. How low will we go? Check out Yahoo! Messengers low PC-to-Phone call rates.
[Wicket-user] Re: Re: strange behaviour of TextField conversion to Float in beta3
Here is the original code to define a Date format : getApplicationSettings().setConverterFactory(new IConverterFactory() {public IConverter newConverter(final Locale locale){ final Converter converter = new Converter(locale); // String - Date DateConverter dc = new DateConverter(); dc.setDateFormat(locale, new SimpleDateFormat("dd-MM-")); converter.set(Date.class, dc); // Date - String DateToStringConverter dsc = new DateToStringConverter(); dsc.setDateFormat(locale, new SimpleDateFormat("dd-MM-") ); converter.set(String.class, dsc); (*) return converter;} } );But in this case a float value gets formatted as it werea Date.If a insert the following code in (*) : // Float - String NumberToStringConverter numberToStringConverter = new NumberToStringConverter(); DecimalFormat fmt = new DecimalFormat("###,###,###,###.#"); numberToStringConverter.setNumberFormat(locale, fmt); final StringConverter stringConverter = new StringConverter(); stringConverter.set(Float.class, numberToStringConverter); stringConverter.set(Float.TYPE, numberToStringConverter); stringConverter.set(Date.class, dsc); converter.set(String.class, stringConverter); converter.set(Float.class, new FloatConverter());I get the float value correctly formmatted but the date is displayed using Date.toString().Jaime.can you show me youre converter code?On 4/6/06, Jaime De La Jara [EMAIL PROTECTED] wrote: Yes, I use the following code : add(new TextField("montoTotal", Float.class)); I've made some tests and found that commenting the definition of the IConverterFactory for the date format and defining the format for the float field and it worked, however I cannot define the format for both types. Thanks, Jaime. did you do TextField.setType(Float.class) or create it with the constructor that takes the class? -Igor On 4/6/06, Jaime De La Jara [EMAIL PROTECTED] wrote: Hi, I've just downloaded version 1.2 beta 3 and I have a problem when editing the contents of a javabean, particularly in a case of a Float field. The relevant code is : Javabean : public class Pago { . public Float getMontoTotal() { return Float.valueOf("1234567890"); } ... } Html : td class="tit" input wicket:id="montoTotal" type="text" class="normal" size="20"/ /tdWhen the page is displayed it shows the following : 15-01-1970 in the textfield, this value corresponds to the date equivalent (aprox) to the above number in milisec. The only thing I've done that can be important to this issue is to define a new IConverterFactory to apply the same date format to the whole app. What is going on? Thanks. Jaime. Yahoo! Messenger with Voice. PC-to-Phone calls for ridiculously low rates.
[Wicket-user] Re: Re: Re: strange behaviour of TextField conversion to Float in beta3
I commented the lines that define the datetostring converterand the effect was that the date was displayed using toString()and the float value was displayed correctly.So, how can I define converters for different types, likeFloat and Date from and to String?. In a previous post I learnt that that the conversion was a two-way process, that is from type1-type2 and from type2-type1, and that was applicable to a textfield.I'm lost here.Jaime.i think the problem is that you registered your own converter for String.class so when wicket will try to display the float in the textfield it will try to format it to string, and it will use the datetostring converter you registered.-IgorOn 4/7/06, Jaime De La Jara [EMAIL PROTECTED] wrote: Here is the original code to define a Date format : getApplicationSettings().setConverterFactory(new IConverterFactory(){ public IConverter newConverter(final Locale locale) { final Converter converter = new Converter(locale); // String - Date DateConverter dc = new DateConverter(); dc.setDateFormat(locale, new SimpleDateFormat("dd-MM-")); converter.set(Date.class, dc); // Date - String DateToStringConverter dsc = new DateToStringConverter(); dsc.setDateFormat(locale, new SimpleDateFormat("dd-MM-") ); converter.set(String.class, dsc); (*) return converter; }} ); But in this case a float value gets formatted as it were a Date. If a insert the following code in (*) : // Float - String NumberToStringConverter numberToStringConverter = new NumberToStringConverter(); DecimalFormat fmt = new DecimalFormat("###,###,###,###.#"); numberToStringConverter.setNumberFormat(locale, fmt); final StringConverter stringConverter = new StringConverter(); stringConverter.set(Float.class, numberToStringConverter); stringConverter.set(Float.TYPE, numberToStringConverter); stringConverter.set(Date.class, dsc); converter.set(String.class, stringConverter); converter.set(Float.class, new FloatConverter()); I get the float value correctly formmatted but the date is displayed using Date.toString(). Jaime. can you show me youre converter code? On 4/6/06, Jaime De La Jara [EMAIL PROTECTED] wrote: Yes, I use the following code : add(new TextField("montoTotal", Float.class)); I've made some tests and found that commenting the definition of the IConverterFactory for the date format and defining the format for the float field and it worked, however I cannot define the format for both types. Thanks, Jaime. did you do TextField.setType(Float.class) or create it with the constructor that takes the class? -IgorOn 4/6/06, Jaime De La Jara [EMAIL PROTECTED] wrote: Hi, I've just downloaded version 1.2 beta 3 and I have a problem when editing the contents of a javabean, particularly in a case of a Float field. The relevant code is : Javabean : public class Pago { . public Float getMontoTotal() { return Float.valueOf("1234567890"); } ... } Html : td class="tit" input wicket:id="montoTotal" type="text" class="normal" size="20"/ /td When the page is displayed it shows the following : 15-01-1970 in the textfield, this value corresponds to the date equivalent (aprox) to the above number in milisec. The only thing I've done that can be important to this issue is to define a new IConverterFactory to apply the same date format to the whole app. What is going on? Thanks. Jaime. Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2¢/min or less.
[Wicket-user] strange behaviour of TextField conversion to Float in beta3
Hi, I've just downloaded version 1.2 beta 3 and I have a problem when editing the contents of a javabean, particularly in a case of a Float field. The relevant code is :Javabean : public class Pago {.public Float getMontoTotal(){ return Float.valueOf("1234567890"); }... }Html :td class="tit" input wicket:id="montoTotal" type="text" class="normal" size="20"/ /td When the page is displayed it shows the following : 15-01-1970 in the textfield, this value corresponds to the date equivalent (aprox) to the above number in milisec.The only thing I've done that can be important to this issue is to define a new IConverterFactory to apply the same date format to the whole app. What is going on?Thanks.Jaime. Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1/min.
[Wicket-user] Re: strange behaviour of TextField conversion to Float in beta3
Yes, I use the following code : add(new TextField("montoTotal", Float.class));I've made some tests and found that commenting the definition of the IConverterFactory for the date format and defining the format for the float field and it worked, however I cannot define the format for both types.Thanks,Jaime.did you do TextField.setType(Float.class) or create it with the constructor that takes the class?-IgorOn 4/6/06, Jaime De La Jara [EMAIL PROTECTED] wrote: Hi, I've just downloaded version 1.2 beta 3 and I have a problem when editing the contents of a javabean, particularly in a case of a Float field. The relevant code is : Javabean : public class Pago {.public Float getMontoTotal() { return Float.valueOf("1234567890");} ... } Html : td class="tit" input wicket:id="montoTotal" type="text" class="normal" size="20"/ /td When the page is displayed it shows the following : 15-01-1970 in the textfield, this value corresponds to the date equivalent (aprox) to the above number in milisec. The only thing I've done that can be important to this issue is to define a new IConverterFactory to apply the same date format to the whole app. What is going on? Thanks. Jaime. New Yahoo! Messenger with Voice. Call regular phones from your PC and save big.
Re: [Wicket-user] problem with session invalidation and back button
Not exactly, when I'm in the login page I press the back button and return to the home page (that seems ok since it was the last page), then in the home page I use a submit button but since the session was invalidated, wicket can not find info about the form being submitted. All the problem reduces to this : How can I intercept the requests so I can check the session status (I reimplemented the isInstantiationAuthorized(Class componentClass) of the IAuthorizationStrategy interface to check for authentication info but it does not work in this case).Thanks.Jaime.Johan Compagner [EMAIL PROTECTED] wrote: Let me get it straight first.You where on youre homepagethen you click on somethingwhere you invalidate the page and redirect to a login page.Then on that login page you go back to yo ure homepageand you expect the homepage to be there? You invalidated the session and all its pages. So you can't go back.If you want this behaviour then just don't invalidate the session. But clear you login info.johan On 3/27/06, Jaime De La Jara [EMAIL PROTECTED] wrote: Hi, I have included a close session link in the home page of my application (in one of the constructors), and in the onClick method of the link I invalidate the session and throw a RestartResponseException to the login page, but after I close the session using the link and press the back button in the login page I got the home page as it should be, but when I press a submit buttom in the hom e page, I get a WicketRuntimeException, since the form component is not existant in the page. What can I be doing wrong?.Thanks in advance.Jaime.New Yahoo! Messenger with Voice. Call regular phones from your PC for low, low rates. Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2¢/min or less.
Re: [Wicket-user] problem with session invalidation and back button
But, in the original case it does not show the page expired page, but shows an exception. I think that I missing something here. I commented the session.invalidate code and in this case when I resubmit the form, since the form exists, the authentication code is executed and the login page displayed. Then how can one invalidate the session and not have trouble with the browser's back button?.Jaime.no because this is an Page expired session. Nothing gets created because if you press a submit button on a page.Then that page must be there. Must be targetable. So youget an page expired page. What you could do is set youre default expired page: void setPageExpiredErrorPage(final Class pageExpiredErrorPage);On 3/28/06, Jaime De La Jara [EMAIL PROTECTED] wrote: Not exactly, when I'm in the login page I press the back button and return to the hom e page (that seems ok since it was the last page), then in the home page I use a submit button but since the session was invalidated, wicket can not find info about the form being submitted. All the problem reduces to this : How can I intercept the requests so I can check the session status (I reimplemented the isInstantiationAuthorized(Class componentClass) of the IAuthorizationStrategy interface to check for authentication info but it does not work in this case). Thanks. Jaime.Johan Compagner [EMAIL PROTECTED] wrote: Let me get it straight first.You where on youre homepagethen you click on somethingwhere you invalidate the page and redirect to a login page.Then on that login page you go back to youre homepageand you expect the homepage to be there? You invalidated the session and all its pages. So you can't go back.If you want this behaviour then just don't invalidate the session. But clear you login info.johan On 3/27/06, Jaime De La Jara [EMAIL PROTECTED] wrote: Hi, I have included a close session link in the home page of my application (in one of the constructors), and in the onClick method of the link I invalidate the session and throw a RestartResponseException to the login page, but after I close the session using the link and press the back button in the login page I got the home page as it should be, but when I press a submit buttom in t he home page, I get a WicketRuntimeException, since the form component is not existant in the page. What can I be doing wrong?.Thanks in advance.Jaime.New Yahoo! Messenger with Voice. Call regular phones from your PC for low, low rates. New Yahoo! Messenger with Voice. Call regular phones from your PC and save big.
[Wicket-user] question about date format for textfield
Hi, I've been trying to develop an application with wicket, but I don't know how to customize the date format for a textfield. I'm using the DatePickercomponent but I use a different format : dd-MM-, when I submit the form an exception is thrown because the format is not recognized, I tried to redefine the getConverter method as follows : TextField fecha = new TextField("fecha", Date.class){public IConverter getConverter() { return new IConverter() { public Object convert(Object o, Class c) { try{ return new SimpleDateFormat("dd-MM-").parse((String)o);}catch(ParseException pex) {return null;}} public void setLocale(Locale loc){}public Locale getLocale(){return Locale.getDefault(); } }; }} ;but a ClassCastException is thrown, since the method is called twice, once with a String value and once with a Date value. I don't know what is going on, any help on this would be appreciated or a simpler way to accomplish what I want to do . Thanks. Blab-away for as little as 1¢/min. Make PC-to-Phone Calls using Yahoo! Messenger with Voice.
Re: [Wicket-user] question about date format for textfield
Hi, thanks for the answer, but I don't understand why the convert method is called twice. On the other hand, is there any simpler way to work with a different date format? Just a comment I can't see my post in the mailing list, does it take too long? or I'm missing something?Thanks,Jaime. Johan Compagner [EMAIL PROTECTED] wrote: you have to test to which class the converter wants to go to: public Object convert(Object o, Class c) { try{if(c == String.class) {return new SimpleDateFormat("dd-MM-").format((Date)o);} elsereturn new SimpleDateFormat("dd-MM-").parse((String)o);} catch(ParseException pex){return null;} p; or test ofcourse if the value is an instanceof date or string. We are planning to change the converter interface for the next version of wicket.Because the current on is a bit to confusing for most people. johanOn 3/23/06, Jaime De La Jara [EMAIL PROTECTED] wrote: Hi, I've been trying to develop an application with wicket, but I don't know how to customize the date format for a textfield. I'm using the DatePickercomponent but I use a different format : dd-MM-, when I submit the form an exception is thrown because the format is not recognized, I tried to redefine the getConverter method as follows : TextField fe cha = new TextField("fecha", Date.class){public IConverter getConverter() { return new IConverter() { public Object convert(Object o, Class c) { try{ return new SimpleDateFormat("dd-MM-").parse((String)o);}catch(ParseException pex) { return null;}}public void setLocale(Locale loc) {}public Locale getLocale(){return Locale.getDefault(); } }; }} ;but a ClassCastException is thrown, since the method is called twice, once with a String value and once with a Date value. I don't know what is going on, any help on this would be appreciated or a simpler way to accomplish what I want to do . Thanks. Blab-away for as little as 1¢/min. MakePC-to-Phone Calls using Yahoo! Messenger with Voice. Yahoo! Messenger with Voice. PC-to-Phone calls for ridiculously low rates.