Re: uploaded files in page instance
fachhoch schrieb: Why are you saving the byte arrays in the page instance? I show these files to user with read-only permission , so this user can just view these files ,the owner of these files can delete them anytime , so If I go to database , upon user click , this file might have been deleted by the user , or when user tries to access this file the owner might be deleting this file , to avoid such issues I am loading all the bytes to page instance , so no concurrent access issues . to save them inside temp folders can I ask the page to give some identifier which I can use to name the folder which contains all the files ? or do I have to create my own identifier ? With this issues i would rethink my design. Why don't you mark the file as inUse in DB and if it is in use deny delete? So user can only delete file if noone has a copy in use. And as Igor posted you can't guarantee that your processing never leads to your problem described above. Page identifier: You could use the page.id + sessionId Cheers Per - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Howto accept other then first locale in HTTP header Accept-Language?
Done https://issues.apache.org/jira/browse/WICKET-2533 Cheers Per - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: uploaded files in page instance
you guys ever hear of transactional isolation? :) databases handle all this kind of neat stuff for you. -igor On Mon, Oct 19, 2009 at 11:09 PM, Per Newgro per.new...@gmx.ch wrote: fachhoch schrieb: Why are you saving the byte arrays in the page instance? I show these files to user with read-only permission , so this user can just view these files ,the owner of these files can delete them anytime , so If I go to database , upon user click , this file might have been deleted by the user , or when user tries to access this file the owner might be deleting this file , to avoid such issues I am loading all the bytes to page instance , so no concurrent access issues . to save them inside temp folders can I ask the page to give some identifier which I can use to name the folder which contains all the files ? or do I have to create my own identifier ? With this issues i would rethink my design. Why don't you mark the file as inUse in DB and if it is in use deny delete? So user can only delete file if noone has a copy in use. And as Igor posted you can't guarantee that your processing never leads to your problem described above. Page identifier: You could use the page.id + sessionId Cheers Per - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: uploaded files in page instance
Igor Vaynberg schrieb: you guys ever hear of transactional isolation? :) databases handle all this kind of neat stuff for you. -igor Oh, i didn't saw that he tried it in one transaction. I thought it are multiple stateless steps. Sorry Per - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Reporting Framework Wicket
True, Jfreechart only can produce images.. So it depends on your use case. 2009/10/18 Douglas Ferguson doug...@douglasferguson.us I thought it also brought the capability to generate pdf and word docs, which I don't think JFreeChart can do.. D On Oct 17, 2009, at 1:42 PM, nino martinez wael wrote: As I see it jasper reports are just a configurable way of using jfreecharts, not sure it that brings more understanding though :) http://images.google.dk/images?client=firefox-arls=org.mozilla%3Aen-US%3Aofficialhl=dasource=hpq=jfreechartsbtnG=S%C3%B8g+i+billedergbv=2aq=foq= 2009/10/17 Douglas Ferguson doug...@douglasferguson.us I have to admit, I've never used Jasper or NexReports, so I'm not sure I follow all of this.. On Oct 15, 2009, at 10:14 AM, Decebal Suiu wrote: Hello, We use Wicket with NextReports (http://www.next-reports.com/) and Jasper. Basically, in Wicket you will have logic for the form that will fill report parameters. For Jasper we also have a logic for edit parameters (we added more functionality to parameter definition that we could not find in any jasper designer tool). Depending on how parameters are defined (in your report designer tool) you may have to add the following business : - chained parameters (to fill children parameters if parent parameters are selected) - default values (fill default values for parameters) - hidden parameters (parameters which are substituted with their values when the report is ran by human process or by scheduler process) After the parameter values selection process , you will just have to use the api offered by your reporting framework. For example in Next it is simple as this : FluentReportRunner.report(report) .connectTo(connection) .withQueryTimeout(60) .withParameterValues(createParameterValues()) .formatAs(ReportRunner.HTML_FORMAT) .run(stream); Douglas Ferguson-2 wrote: Hey, I'm starting to look into reporting frameworks and was curious if anybody had successfully integrated with wicket? Are there any off the shelf integrations or will I have to roll my own? D/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/Reporting-Framework---Wicket-tp25894303p25910426.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: Hippo's patch for wicket ids
Works for me, your xpath must be wrong. Your syntax is ok. Either there is no a element (link) with attribute wicketpath=tablePanel_leftList_tableList_pojoList_18_nameCell_namePanel Link_name or there is no div tag inside an a element... -Original Message- From: Douglas Ferguson [mailto:doug...@douglasferguson.us] Does anybody have sample of how to do this? I'm getting this error when I try to use the wicketpath [error] Element //a [...@wicketpath = 'tablePanel_leftList_tableList_pojoList_18_nameCell_namePanelLink_name ']/div not found - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Column filtering on inmethod datagrid
I've tried to add column filtering to the inmethod datagrid by creating a new class ChoiceFilteredPropertyColumn which extends the new class FilteredPropertyColumn, which extends the inmethod PropertyColumn and implements the new interface IFilteredColumn. In other words, I've merged two sets of classes: the column classes of the inmethod datagrid package and the filtered columns that come with wicket extensions. For some reason however, this isn't working yet. At first I thought that the classes themselves weren't working properly. But then I saw that the filters ARE included in the HTML. They simply don't show up on the website itself. And I can't figure out why. I didn't see any style=display:none or anything obvious like that. Does anybody have any pointers that I could look for? (I'd love to include some code, but it's rather bulky and I have no idea what portion to include to be helpful.) Regards, Linda - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Hippo's patch for wicket ids
On Thu, Oct 15, 2009 at 1:14 PM, Per Lundholm per.lundh...@gmail.com wrote: Looks like a patch to make it easier to use Selenium to test your webapplication. Selenium is very fond of id in tags. Correct, this patch (PD) we use in order to get Selenium to work, and it works pretty well. What is basically the case is that Wicket uses a single global counter which ever increases to generate IDs. Because hierarchy can change, components are added this ID is not bound to the wicket component, leaving to a new ID the next time round. What this patch does is to tie the generated ID to the wicket component, but that's not the whole story because if anything is different in your hierarchy the paths will still change. It will work for selenium if you do everything exactly the same, but that's hard to maintain/ What you need is that when generating a ID, the ID is generated with the knowledge of the component, such that you can generate the ID based on the domain knowledge of your component. The crux is that the wicket method in the Session to generate an ID had no parameters, while if it would get the component requesting the ID, then an subclasses wicket Session instance can incorporate this knowlege. Basically the patch is just adding the parameter to that wicket method and the other 80% of the code is just making sure everything is backward compatible. How can one use this subclassing, well, for instance you have some kind of listing component on your page that enumerates items in your database. Because the content of the database changes, the hierarchy will change, rendering IDs useless. Now you could resolve this by letting the component that lists a single item explicitly set the markup ID, but if this itself is a Panel containing subitems, then you need to set the IDs of all those subitems too. That becomes nasty bit of either passing arguments or traversing the tree. However, with the patch you can put this logic in the session. When an ID needs to be generated, use the ancestor tree of the component for which the ID is needed up to a stable ID component (the one which knows which database element, and then instead of using a global counter, use a counter in that component. This was the ID has become stable, and most of the logic is where is belongs, the Session instance generating IDs. Maybe not the nicest example, because a lot of knowledge is infused in your Session class, but there are better cases available (we have a plugin system for wicket, where we can use a quite generic mechanism). It's illustrative though I hope. \Berry - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Re: Google App Engine and Wicket
On 20:59, Eelco Hillenius wrote: It's probably a good idea to have a specialized implementation of ISessionStore for App Engine that uses whatever makes sense with App Engine for medium term storage ('cause that's what it is... short term storage is the current page, which is typically local memory, and older pages are used for the duration of the session, and typically just keeping the last few in memory suffices. I tried to get started with an implementation of ISessionStore for the app engine. However, I would rather opt for the Memcache Service [1] instead of the datastore due to performance and quota issues. The MemcacheService provided by GAE is in effect a JCache implementation. Regarding a Memcache-based implementation, there rise the following questions for me (please take into account that I am rather a wicket-beginner): 1) Should the implementation be a specialization of ISessionStore or rather IPageStore? 1a) In case of ISessionStore, is it enough to implement the MemcacheSessionStore like the HTTPSessionStore, but instead of putting things into the HTTPSession, they will be put in the Memcache? 1b) In case of IPageStore, does it make sense to adopt some principles of the DiskPageStore (and basically switch the file-based saving to a cache-based saving)? 2) I digged a bit through the mailing list: Would an implementation such as 1a) affect the back/forward button behavior of the browser? Thanks in advance for your thoughts. andr [1] http://code.google.com/appengine/docs/java/memcache/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Variation of parent component isn't passed to image - Bug?
Re: Reusable components and wicket:id
Hi Tómas, What the form component RadioButtonGenerico receive as id, the validation message will use as label. The code should generate the outputs: * Field 'rapidezAtencion' is required. * Field 'explicacionClara' is required. your report output : wicket:container wicket:id=score is an generic markup or always the score id is placed on html? If so, can you send the panel html? what wicket version are you using? On Mon, Oct 19, 2009 at 5:56 PM, Tomás Rossi tro...@mecon.gov.ar wrote: Here goes the java code... RadioButtonGenerico.java (means GenericRadioButton): public class RadioButtonGenericoT extends RadioGroupT { private static final long serialVersionUID = -1725627853431547878L; public RadioButtonGenerico(String id, ListString opciones, IModelT modelo) { super(id, modelo); for (int i = 0; i opciones.size(); i++) { add(new RadioInteger(id + i, new ModelInteger(i))); } } } PanelEncuesta.java (means SurveyPanel): public class PanelEncuesta extends FormComponentPanelDatosEncuesta { private static final long serialVersionUID = -1545571698439481842L; public PanelEncuesta(String id, IModelDatosEncuesta modelo) { super(id, modelo); add(new RadioButtonGenericoDatosEncuesta(rapidezAtencion, DatosEncuesta.CALIFICACIONES, new PropertyModelDatosEncuesta(modelo, rapidezAtencion)).setRequired(true)); add(new RadioButtonGenericoDatosEncuesta(explicacionClara, DatosEncuesta.CALIFICACIONES, new PropertyModelDatosEncuesta(modelo, explicacionClara)).setRequired(true)); add(new RadioButtonGenericoDatosEncuesta(resolucionProblema, DatosEncuesta.CALIFICACIONES, new PropertyModelDatosEncuesta(modelo, resolucionProblema)).setRequired(true)); } } PantallaEncuesta.java: (means SurveyScreen): public class PantallaEncuesta extends WebPage { public PantallaEncuesta() { add(new FeedbackPanel(feedback)); add(new FormEncuesta(formEncuesta)); } public static class FormEncuesta extends FormDatosEncuesta { // (Means SurveyForm) private static final long serialVersionUID = 8582266005577827473L; // Modelo para las respuestas respecto a la atención éfonica. private final DatosEncuesta datosEncuestaTelefonico = new DatosEncuesta(); // Modelo para las respuestas respecto a la atención personal. private final DatosEncuesta datosEncuestaPersonal = new DatosEncuesta(); // Modelo para los datos optativos de la encuesta. private final DatosOptativos datosOptativos = new DatosOptativos(); private CaptchaImageResource captcha = new CaptchaImageResource(); private final ValueMap claveCaptcha = new ValueMap(); public FormEncuesta(String id) { super(id); ... add(new PanelEncuesta(panelTelefonico, new ModelDatosEncuesta(datosEncuestaTelefonico))); add(new PanelEncuesta(panelPersonal, new ModelDatosEncuesta(datosEncuestaPersonal))); ... } ... Pedro Santos escribió: Actually the panel wicket id is an parameter for panel constructor, can you some code? On Mon, Oct 19, 2009 at 5:07 PM, Tomás Rossi tro...@mecon.gov.ar wrote: Then I'm unable to use the properties file for tweaking the string in question. What is the beauty of panels if they don't prefix its internal ids automatically? Or am I getting it all wrong... :S Tom; Igor Vaynberg escribió: call radiogroup.setlabel() -igor On Mon, Oct 19, 2009 at 10:55 AM, Tomás Rossi tro...@mecon.gov.ar wrote: Hi, We are building a simple survey with Wicket. Essentially, we have a lot of RadioGroup components repeated all over the main survey page. Those components are in fact the same thing (to score some item), but obviously, they reffer to different subjects/groups. For example: Are you happy with X? In doing job A: ( ) very happy ( ) not so much ( ) sucks In doing job B: ( ) very happy ( ) not so much ( ) sucks Are you happy with Y? In doing job A: ( ) very happy ( ) not so much ( ) sucks So we decided to make a reusable component (a panel) for the score input, and repeat it as much as we needed. We also have our survey page with a feedback panel and a form. Inside that form we include the panel many times, one for each item. But the required-field-feedback shows the same wicket:id for a bunch of fields, which isn't what we want. We need a unique wicket:id for each instance of the score input. E.G. Our Panel is like this: ... tr wicket:container wicket:id=score tdinput type=radio wicket:id=optGood//td tdinput type=radio wicket:id=optNotSoMuch//td tdinput type=radio wicket:id=optSucks//td /wicket:container /tr ... And our feedback is like this: * Field 'score' is required. * Field 'score' is
Variation of parent component isn't passed to image - Bug?
Hi, I came across a problem an other group member has already written about (please have a look his post http://markmail.org/thread/auqhcd66zwsflt33#query:wicket%20image% 20parent%20variation+page:1+mid:auqhcd66zwsflt33+state:results). But he didn't get an answer. Actually the variation of a component is passed to its child component. But this doesn't work for images, because when their variation is requested they don't have a parent yet. I don't know if this is a bug or I should override some methods. Maybe anyone had to deal with this behavior before. Thanks in advance, Liz - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Re: Google App Engine and Wicket
Hi, The Terracotta SecondLevelCacheSessionStore does not contain any Terracotta specific implementation or dependencies, and should work fine on AppEngine (I haven't tested it though). All it is is an implementation of IPageStore, where the pages are serialized to byte arrays (like the disk store), and then these byte arrays are stored in the http session, rather than on disk. I have attached the file in this thread so you dont need to dig around in the terracotta svn repo. to use it do this in your application class: @Override public ISessionStore newSessionStore() { return new SecondLevelCacheSessionStore(this, new TerracottaPageStore(100)); } the 100 is the number of versions of pages you want to keep, and can be customized as you feel appropriate. http://www.nabble.com/file/p25973504/TerracottaPageStore.java TerracottaPageStore.java Regards - Richard Wilkinson Developer, jWeekend: OO Java Technologies - Development and Training http://jWeekend.com - http://richard-wilkinson.co.uk My blog: http://richard-wilkinson.co.uk -- View this message in context: http://www.nabble.com/Google-App-Engine-and-Wicket-tp23001592p25973504.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Google App Engine and Wicket
On 20.10.2009 13:30, richardwilko wrote: Hi, The Terracotta SecondLevelCacheSessionStore does not contain any Terracotta specific implementation or dependencies, and should work fine on AppEngine (I haven't tested it though). All it is is an implementation of IPageStore, where the pages are serialized to byte arrays (like the disk store), and then these byte arrays are stored in the http session, rather than on disk. I have attached the file in this thread so you dont need to dig around in the terracotta svn repo. to use it do this in your application class: @Override public ISessionStore newSessionStore() { return new SecondLevelCacheSessionStore(this, new TerracottaPageStore(100)); } the 100 is the number of versions of pages you want to keep, and can be customized as you feel appropriate. Richard, thanks a lot for providing the source to me. This is indeed a valuable starting point. I just want to make sure that there can't be any copyright issues when I modify the code due to the copyright statement in the header? regards, andr - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Google App Engine and Wicket
andr, From Wikipedia [1]: The Apache License does not require modified versions of the software to be distributed using the same license nor even that it be distributed as free/open-source software. The Apache license only requires that a notice is kept informing recipients that Apache licensed code has been used. Thus, in contrast to copyleft licenses, recipients of modified versions of Apache licensed code do not necessarily also get the above freedoms. Or considering the situation from the Apache licensees perspective, they receive the freedom to use the code in any way they want, including using it in closed source products (cf Paragraph 4). So basically you can do what you want with it, so long as you leave the notice intact. You can read more about the Apache 2 licence on the internet, I am by no means an expert. However, if you make any improvements to the code, and are in a position to do so, then contributing it back would be most welcome :) [1] http://en.wikipedia.org/wiki/Apache_License Thanks, Richard A. Maza wrote: On 20.10.2009 13:30, richardwilko wrote: Hi, The Terracotta SecondLevelCacheSessionStore does not contain any Terracotta specific implementation or dependencies, and should work fine on AppEngine (I haven't tested it though). All it is is an implementation of IPageStore, where the pages are serialized to byte arrays (like the disk store), and then these byte arrays are stored in the http session, rather than on disk. I have attached the file in this thread so you dont need to dig around in the terracotta svn repo. to use it do this in your application class: @Override public ISessionStore newSessionStore() { return new SecondLevelCacheSessionStore(this, new TerracottaPageStore(100)); } the 100 is the number of versions of pages you want to keep, and can be customized as you feel appropriate. Richard, thanks a lot for providing the source to me. This is indeed a valuable starting point. I just want to make sure that there can't be any copyright issues when I modify the code due to the copyright statement in the header? regards, andr - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - http://richard-wilkinson.co.uk My blog: http://richard-wilkinson.co.uk -- View this message in context: http://www.nabble.com/Google-App-Engine-and-Wicket-tp23001592p25974145.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Google App Engine and Wicket
Oh, sorry I just realized that it has the terracotta licence header on it, had I realized i would have removed it. That's because the version of the file i had to hand was from the terracotta forge svn repo, and code in there has to have their licence. Originally it was Apache 2 licensed and I would treat it as such. Sorry for the confusion, Richard A. MaOhza wrote: On 20.10.2009 13:30, richardwilko wrote: Hi, The Terracotta SecondLevelCacheSessionStore does not contain any Terracotta specific implementation or dependencies, and should work fine on AppEngine (I haven't tested it though). All it is is an implementation of IPageStore, where the pages are serialized to byte arrays (like the disk store), and then these byte arrays are stored in the http session, rather than on disk. I have attached the file in this thread so you dont need to dig around in the terracotta svn repo. to use it do this in your application class: @Override public ISessionStore newSessionStore() { return new SecondLevelCacheSessionStore(this, new TerracottaPageStore(100)); } the 100 is the number of versions of pages you want to keep, and can be customized as you feel appropriate. Richard, thanks a lot for providing the source to me. This is indeed a valuable starting point. I just want to make sure that there can't be any copyright issues when I modify the code due to the copyright statement in the header? regards, andr - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - http://richard-wilkinson.co.uk My blog: http://richard-wilkinson.co.uk -- View this message in context: http://www.nabble.com/Google-App-Engine-and-Wicket-tp23001592p25974473.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Google App Engine and Wicket
On 20.10.2009 14:48, richardwilko wrote: Oh, sorry I just realized that it has the terracotta licence header on it, had I realized i would have removed it. That's because the version of the file i had to hand was from the terracotta forge svn repo, and code in there has to have their licence. Originally it was Apache 2 licensed and I would treat it as such. Therefore I was asking. Thanks for the clarification. I will post a modified version of the pagestore impl for GAE Memcache to the list as soon as I have it ready. Thanks and regards, andr - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
why is the model empty?
hi, in the submit logic the getModel().getObject() is an empty string although I set it via textfield: final Button tagSubmit = new Button(tagSubmit, Model.of()) { @Override public void onSubmit() { tagTitle.getModel().getObject() // it is empty!! } } }; that's the textfield: final TextFieldString tagTitle = new TextFieldString(tagTitle, Model.of()); - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Reusable components and wicket:id
Sure, here's the markup (BTW, using Wicket 1.4.2): PanelEncuesta.html (means SurveyPanel): ... body wicket:panel table class=GrillaOpciones tr th/th thlabelMuy Bueno/label/th thlabelBueno/label/th thlabelRegular/label/th thlabelMalo/label/th thlabelNs/Nc/label/th /tr tr wicket:container wicket:id=rapidezAtencion td class=TextoItemlabelRapidez en la atención/label/td tdinput type=radio wicket:id=rapidezAtencion0//td tdinput type=radio wicket:id=rapidezAtencion1//td tdinput type=radio wicket:id=rapidezAtencion2//td tdinput type=radio wicket:id=rapidezAtencion3//td tdinput type=radio wicket:id=rapidezAtencion4//td /wicket:container /tr tr wicket:container wicket:id=explicacionClara td class=TextoItemlabelExplicaciones claras/label/td tdinput type=radio wicket:id=explicacionClara0//td tdinput type=radio wicket:id=explicacionClara1//td tdinput type=radio wicket:id=explicacionClara2//td tdinput type=radio wicket:id=explicacionClara3//td tdinput type=radio wicket:id=explicacionClara4//td /wicket:container /tr tr wicket:container wicket:id=resolucionProblema td class=TextoItemlabelResolución del problema/label/td tdinput type=radio wicket:id=resolucionProblema0//td tdinput type=radio wicket:id=resolucionProblema1//td tdinput type=radio wicket:id=resolucionProblema2//td tdinput type=radio wicket:id=resolucionProblema3//td tdinput type=radio wicket:id=resolucionProblema4//td /wicket:container /tr /table /wicket:panel /body ... PantallaEncuesta.html (means SurveyScreen): ... div class=Sector h3¿Cómo calificaría los siguientes aspectos de la atención telefónica de Informática?/h3 div wicket:id=panelTelefonicoAcá va la encuesta de atención telefónica/div !-- Here goes the panel!! -- /div div class=Sector h3¿Cómo calificaría los siguientes aspectos de la atención del personal de Informática?/h3 div wicket:id=panelPersonalAcá va la encuesta de atención personal/div !-- Here goes the panel!! -- /div ... -- Tom; Pedro Santos escribió: Hi Tómas, What the form component RadioButtonGenerico receive as id, the validation message will use as label. The code should generate the outputs: * Field 'rapidezAtencion' is required. * Field 'explicacionClara' is required. your report output : wicket:container wicket:id=score is an generic markup or always the score id is placed on html? If so, can you send the panel html? what wicket version are you using? On Mon, Oct 19, 2009 at 5:56 PM, Tomás Rossi tro...@mecon.gov.ar wrote: Here goes the java code... RadioButtonGenerico.java (means GenericRadioButton): public class RadioButtonGenericoT extends RadioGroupT { private static final long serialVersionUID = -1725627853431547878L; public RadioButtonGenerico(String id, ListString opciones, IModelT modelo) { super(id, modelo); for (int i = 0; i opciones.size(); i++) { add(new RadioInteger(id + i, new ModelInteger(i))); } } } PanelEncuesta.java (means SurveyPanel): public class PanelEncuesta extends FormComponentPanelDatosEncuesta { private static final long serialVersionUID = -1545571698439481842L; public PanelEncuesta(String id, IModelDatosEncuesta modelo) { super(id, modelo); add(new RadioButtonGenericoDatosEncuesta(rapidezAtencion, DatosEncuesta.CALIFICACIONES, new PropertyModelDatosEncuesta(modelo, rapidezAtencion)).setRequired(true)); add(new RadioButtonGenericoDatosEncuesta(explicacionClara, DatosEncuesta.CALIFICACIONES, new PropertyModelDatosEncuesta(modelo, explicacionClara)).setRequired(true)); add(new RadioButtonGenericoDatosEncuesta(resolucionProblema, DatosEncuesta.CALIFICACIONES, new PropertyModelDatosEncuesta(modelo, resolucionProblema)).setRequired(true)); } } PantallaEncuesta.java: (means SurveyScreen): public class PantallaEncuesta extends WebPage { public PantallaEncuesta() { add(new FeedbackPanel(feedback)); add(new FormEncuesta(formEncuesta)); } public static class FormEncuesta extends FormDatosEncuesta { // (Means SurveyForm) private static final long serialVersionUID = 8582266005577827473L; // Modelo para las respuestas respecto a la atención éfonica. private final DatosEncuesta datosEncuestaTelefonico = new DatosEncuesta(); // Modelo para las respuestas respecto a la atención personal. private final DatosEncuesta datosEncuestaPersonal = new DatosEncuesta(); // Modelo para los datos optativos de la encuesta. private final DatosOptativos datosOptativos = new DatosOptativos(); private CaptchaImageResource captcha = new CaptchaImageResource(); private final ValueMap claveCaptcha = new ValueMap(); public FormEncuesta(String id) { super(id); ... add(new PanelEncuesta(panelTelefonico, new
Re: why is the model empty?
Look at the HTTP request - is the value getting submitted? -- Jeremy Thomerson http://www.wickettraining.com On Tue, Oct 20, 2009 at 8:17 AM, Peter Arnulf Lustig u...@yahoo.dewrote: hi, in the submit logic the getModel().getObject() is an empty string although I set it via textfield: final Button tagSubmit = new Button(tagSubmit, Model.of()) { @Override public void onSubmit() { tagTitle.getModel().getObject() // it is empty!! } } }; that's the textfield: final TextFieldString tagTitle = new TextFieldString(tagTitle, Model.of()); - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
AW: why is the model empty?
yes! I temper the data! And it is posted to the server! - Ursprüngliche Mail Von: Jeremy Thomerson jer...@wickettraining.com An: users@wicket.apache.org Gesendet: Dienstag, den 20. Oktober 2009, 16:04:21 Uhr Betreff: Re: why is the model empty? Look at the HTTP request - is the value getting submitted? -- Jeremy Thomerson http://www.wickettraining.com On Tue, Oct 20, 2009 at 8:17 AM, Peter Arnulf Lustig u...@yahoo.dewrote: hi, in the submit logic the getModel().getObject() is an empty string although I set it via textfield: final Button tagSubmit = new Button(tagSubmit, Model.of()) { @Override public void onSubmit() { tagTitle.getModel().getObject() // it is empty!! } } }; that's the textfield: final TextFieldString tagTitle = new TextFieldString(tagTitle, Model.of()); - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: why is the model empty?
Wicket makes empty strings null by default. See one of the Application.getSettings() Martijn On Tue, Oct 20, 2009 at 4:04 PM, Jeremy Thomerson jer...@wickettraining.com wrote: Look at the HTTP request - is the value getting submitted? -- Jeremy Thomerson http://www.wickettraining.com On Tue, Oct 20, 2009 at 8:17 AM, Peter Arnulf Lustig u...@yahoo.dewrote: hi, in the submit logic the getModel().getObject() is an empty string although I set it via textfield: final Button tagSubmit = new Button(tagSubmit, Model.of()) { �...@override public void onSubmit() { tagTitle.getModel().getObject() // it is empty!! } } }; that's the textfield: final TextFieldString tagTitle = new TextFieldString(tagTitle, Model.of()); - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.4 increases type safety for web applications Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.0 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
AW: why is the model empty?
hey martijn -- But there is a string submitted! Actually it must be printed! But it is null. Is the final declaration correct? - Ursprüngliche Mail Von: Martijn Dashorst martijn.dasho...@gmail.com An: users@wicket.apache.org Gesendet: Dienstag, den 20. Oktober 2009, 16:06:22 Uhr Betreff: Re: why is the model empty? Wicket makes empty strings null by default. See one of the Application.getSettings() Martijn On Tue, Oct 20, 2009 at 4:04 PM, Jeremy Thomerson jer...@wickettraining.com wrote: Look at the HTTP request - is the value getting submitted? -- Jeremy Thomerson http://www.wickettraining.com On Tue, Oct 20, 2009 at 8:17 AM, Peter Arnulf Lustig u...@yahoo.dewrote: hi, in the submit logic the getModel().getObject() is an empty string although I set it via textfield: final Button tagSubmit = new Button(tagSubmit, Model.of()) { @Override public void onSubmit() { tagTitle.getModel().getObject() // it is empty!! } } }; that's the textfield: final TextFieldString tagTitle = new TextFieldString(tagTitle, Model.of()); - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.4 increases type safety for web applications Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.0 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: why is the model empty?
How about! creating! a quickstart! and sending it! to us! (Oh, and no need for so many exclamation points. It could be interpreted as shouting) -- Jeremy Thomerson http://www.wickettraining.com On Tue, Oct 20, 2009 at 9:16 AM, Peter Arnulf Lustig u...@yahoo.dewrote: hey martijn -- But there is a string submitted! Actually it must be printed! But it is null. Is the final declaration correct? - Ursprüngliche Mail Von: Martijn Dashorst martijn.dasho...@gmail.com An: users@wicket.apache.org Gesendet: Dienstag, den 20. Oktober 2009, 16:06:22 Uhr Betreff: Re: why is the model empty? Wicket makes empty strings null by default. See one of the Application.getSettings() Martijn On Tue, Oct 20, 2009 at 4:04 PM, Jeremy Thomerson jer...@wickettraining.com wrote: Look at the HTTP request - is the value getting submitted? -- Jeremy Thomerson http://www.wickettraining.com On Tue, Oct 20, 2009 at 8:17 AM, Peter Arnulf Lustig u...@yahoo.de wrote: hi, in the submit logic the getModel().getObject() is an empty string although I set it via textfield: final Button tagSubmit = new Button(tagSubmit, Model.of()) { @Override public void onSubmit() { tagTitle.getModel().getObject() // it is empty!! } } }; that's the textfield: final TextFieldString tagTitle = new TextFieldString(tagTitle, Model.of()); - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.4 increases type safety for web applications Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.0 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
How to reach a component in ListView
I have an abstract class that adds a ListView to the page in the constructor. In the constructors of my children, I would like to set some of the rows in the ListView invisible. How do I reach the Wicket Components that were added to a ListView from outside the Listview. e.g. public abstract ListDocumentsForObject{ public ListDocumentsForObject() { ListView documents = new ListView(documents, documentlist) { @Override protected void populateItem(ListItem item) { . Link delete = new ConfirmLink(delete) { public final class ListDocumentsForUser extends ListDocumentsForObject { public ListDocumentsForUser(...) { super(...); setAllDeleteButtonsVisible(false); -I want to set all or some of the delete links as invisible. Thanks, Pieter
Re: why is the model empty?
Sorry but when is the model object update? final TextFieldString tagTitle = new TextFieldString(tagTitle, Model.of()); just creates and in-mutable model? Or, am I missing something? Best, Ernesto On Tue, Oct 20, 2009 at 3:17 PM, Peter Arnulf Lustig u...@yahoo.dewrote: hi, in the submit logic the getModel().getObject() is an empty string although I set it via textfield: final Button tagSubmit = new Button(tagSubmit, Model.of()) { @Override public void onSubmit() { tagTitle.getModel().getObject() // it is empty!! } } }; that's the textfield: final TextFieldString tagTitle = new TextFieldString(tagTitle, Model.of()); - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to reach a component in ListView
Better to access whether or not they should be visible from within the components (inside the listview) themselves. On your links, override isVisible and have it call to some method on ListDocumentForObject that returns boolean of whether that link should be visible. Then this method could be overridden by child classes with different logic. -- Jeremy Thomerson http://www.wickettraining.com On Tue, Oct 20, 2009 at 9:21 AM, pieter claassen pie...@claassen.co.ukwrote: I have an abstract class that adds a ListView to the page in the constructor. In the constructors of my children, I would like to set some of the rows in the ListView invisible. How do I reach the Wicket Components that were added to a ListView from outside the Listview. e.g. public abstract ListDocumentsForObject{ public ListDocumentsForObject() { ListView documents = new ListView(documents, documentlist) { @Override protected void populateItem(ListItem item) { . Link delete = new ConfirmLink(delete) { public final class ListDocumentsForUser extends ListDocumentsForObject { public ListDocumentsForUser(...) { super(...); setAllDeleteButtonsVisible(false); -I want to set all or some of the delete links as invisible. Thanks, Pieter
AW: why is the model empty?
Does it maybe have something to do with my custom validation? I use setDefaultFormProcessing(false); because I have more submit buttons on one form - Ursprüngliche Mail Von: Jeremy Thomerson jer...@wickettraining.com An: users@wicket.apache.org Gesendet: Dienstag, den 20. Oktober 2009, 16:20:09 Uhr Betreff: Re: why is the model empty? How about! creating! a quickstart! and sending it! to us! (Oh, and no need for so many exclamation points. It could be interpreted as shouting) -- Jeremy Thomerson http://www.wickettraining.com On Tue, Oct 20, 2009 at 9:16 AM, Peter Arnulf Lustig u...@yahoo.dewrote: hey martijn -- But there is a string submitted! Actually it must be printed! But it is null. Is the final declaration correct? - Ursprüngliche Mail Von: Martijn Dashorst martijn.dasho...@gmail.com An: users@wicket.apache.org Gesendet: Dienstag, den 20. Oktober 2009, 16:06:22 Uhr Betreff: Re: why is the model empty? Wicket makes empty strings null by default. See one of the Application.getSettings() Martijn On Tue, Oct 20, 2009 at 4:04 PM, Jeremy Thomerson jer...@wickettraining.com wrote: Look at the HTTP request - is the value getting submitted? -- Jeremy Thomerson http://www.wickettraining.com On Tue, Oct 20, 2009 at 8:17 AM, Peter Arnulf Lustig u...@yahoo.de wrote: hi, in the submit logic the getModel().getObject() is an empty string although I set it via textfield: final Button tagSubmit = new Button(tagSubmit, Model.of()) { @Override public void onSubmit() { tagTitle.getModel().getObject() // it is empty!! } } }; that's the textfield: final TextFieldString tagTitle = new TextFieldString(tagTitle, Model.of()); - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.4 increases type safety for web applications Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.0 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: why is the model empty?
That's not an immutable model. It's equivalent to new ModelString() - which is fine for this use. Assuming the text field and the button are within a form, and that he sets the value of the textfield programmatically on the page, and submits the form, the model should be updated by the time he gets to this onSubmit method. -- Jeremy Thomerson http://www.wickettraining.com On Tue, Oct 20, 2009 at 9:24 AM, Ernesto Reinaldo Barreiro reier...@gmail.com wrote: Sorry but when is the model object update? final TextFieldString tagTitle = new TextFieldString(tagTitle, Model.of()); just creates and in-mutable model? Or, am I missing something? Best, Ernesto On Tue, Oct 20, 2009 at 3:17 PM, Peter Arnulf Lustig u...@yahoo.de wrote: hi, in the submit logic the getModel().getObject() is an empty string although I set it via textfield: final Button tagSubmit = new Button(tagSubmit, Model.of()) { @Override public void onSubmit() { tagTitle.getModel().getObject() // it is empty!! } } }; that's the textfield: final TextFieldString tagTitle = new TextFieldString(tagTitle, Model.of()); - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
AW: why is the model empty?
I tried it also with final IModelString tagTitleModel = Model.of(); (..., tagTitleModel) But it won't work! - Ursprüngliche Mail Von: Ernesto Reinaldo Barreiro reier...@gmail.com An: users@wicket.apache.org Gesendet: Dienstag, den 20. Oktober 2009, 16:24:16 Uhr Betreff: Re: why is the model empty? Sorry but when is the model object update? final TextFieldString tagTitle = new TextFieldString(tagTitle, Model.of()); just creates and in-mutable model? Or, am I missing something? Best, Ernesto On Tue, Oct 20, 2009 at 3:17 PM, Peter Arnulf Lustig u...@yahoo.dewrote: hi, in the submit logic the getModel().getObject() is an empty string although I set it via textfield: final Button tagSubmit = new Button(tagSubmit, Model.of()) { @Override public void onSubmit() { tagTitle.getModel().getObject() // it is empty!! } } }; that's the textfield: final TextFieldString tagTitle = new TextFieldString(tagTitle, Model.of()); - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: why is the model empty?
Well that part isn't shown in the code posted;-) On Tue, Oct 20, 2009 at 4:28 PM, Jeremy Thomerson jer...@wickettraining.com wrote: That's not an immutable model. It's equivalent to new ModelString() - which is fine for this use. Assuming the text field and the button are within a form, and that he sets the value of the textfield programmatically on the page, and submits the form, the model should be updated by the time he gets to this onSubmit method. -- Jeremy Thomerson http://www.wickettraining.com On Tue, Oct 20, 2009 at 9:24 AM, Ernesto Reinaldo Barreiro reier...@gmail.com wrote: Sorry but when is the model object update? final TextFieldString tagTitle = new TextFieldString(tagTitle, Model.of()); just creates and in-mutable model? Or, am I missing something? Best, Ernesto On Tue, Oct 20, 2009 at 3:17 PM, Peter Arnulf Lustig u...@yahoo.de wrote: hi, in the submit logic the getModel().getObject() is an empty string although I set it via textfield: final Button tagSubmit = new Button(tagSubmit, Model.of()) { @Override public void onSubmit() { tagTitle.getModel().getObject() // it is empty!! } } }; that's the textfield: final TextFieldString tagTitle = new TextFieldString(tagTitle, Model.of()); - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
AW: why is the model empty?
sets the value of the textfield programmatically on the page, and submits the form, the model should be updated by the time he gets to this onSubmit method. How do you mean that? I think wicket sets the model automaticly because the model is attached to the component. - Ursprüngliche Mail Von: Jeremy Thomerson jer...@wickettraining.com An: users@wicket.apache.org Gesendet: Dienstag, den 20. Oktober 2009, 16:28:31 Uhr Betreff: Re: why is the model empty? That's not an immutable model. It's equivalent to new ModelString() - which is fine for this use. Assuming the text field and the button are within a form, and that he sets the value of the textfield programmatically on the page, and submits the form, the model should be updated by the time he gets to this onSubmit method. -- Jeremy Thomerson http://www.wickettraining.com On Tue, Oct 20, 2009 at 9:24 AM, Ernesto Reinaldo Barreiro reier...@gmail.com wrote: Sorry but when is the model object update? final TextFieldString tagTitle = new TextFieldString(tagTitle, Model.of()); just creates and in-mutable model? Or, am I missing something? Best, Ernesto On Tue, Oct 20, 2009 at 3:17 PM, Peter Arnulf Lustig u...@yahoo.de wrote: hi, in the submit logic the getModel().getObject() is an empty string although I set it via textfield: final Button tagSubmit = new Button(tagSubmit, Model.of()) { @Override public void onSubmit() { tagTitle.getModel().getObject() // it is empty!! } } }; that's the textfield: final TextFieldString tagTitle = new TextFieldString(tagTitle, Model.of()); - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: why is the model empty?
Yes - that's what I'm saying. On the webpage, presumably with JS, he is saying that he is setting the value of the text field. Then when it's submitted, Wicket should update the model before he gets to onSubmit -- Jeremy Thomerson http://www.wickettraining.com On Tue, Oct 20, 2009 at 9:31 AM, Peter Arnulf Lustig u...@yahoo.dewrote: sets the value of the textfield programmatically on the page, and submits the form, the model should be updated by the time he gets to this onSubmit method. How do you mean that? I think wicket sets the model automaticly because the model is attached to the component. - Ursprüngliche Mail Von: Jeremy Thomerson jer...@wickettraining.com An: users@wicket.apache.org Gesendet: Dienstag, den 20. Oktober 2009, 16:28:31 Uhr Betreff: Re: why is the model empty? That's not an immutable model. It's equivalent to new ModelString() - which is fine for this use. Assuming the text field and the button are within a form, and that he sets the value of the textfield programmatically on the page, and submits the form, the model should be updated by the time he gets to this onSubmit method. -- Jeremy Thomerson http://www.wickettraining.com On Tue, Oct 20, 2009 at 9:24 AM, Ernesto Reinaldo Barreiro reier...@gmail.com wrote: Sorry but when is the model object update? final TextFieldString tagTitle = new TextFieldString(tagTitle, Model.of()); just creates and in-mutable model? Or, am I missing something? Best, Ernesto On Tue, Oct 20, 2009 at 3:17 PM, Peter Arnulf Lustig u...@yahoo.de wrote: hi, in the submit logic the getModel().getObject() is an empty string although I set it via textfield: final Button tagSubmit = new Button(tagSubmit, Model.of()) { @Override public void onSubmit() { tagTitle.getModel().getObject() // it is empty!! } } }; that's the textfield: final TextFieldString tagTitle = new TextFieldString(tagTitle, Model.of()); - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
AW: why is the model empty?
I am submitting a textfield in a form to wicket. Just the standard HTTP Post -- And everywhere it functions well -- I just can't get it why it won't function there. And I don't utilize any JS (Ajax etc.) for that task! It's weird. - Ursprüngliche Mail Von: Jeremy Thomerson jer...@wickettraining.com An: users@wicket.apache.org Gesendet: Dienstag, den 20. Oktober 2009, 16:40:45 Uhr Betreff: Re: why is the model empty? Yes - that's what I'm saying. On the webpage, presumably with JS, he is saying that he is setting the value of the text field. Then when it's submitted, Wicket should update the model before he gets to onSubmit -- Jeremy Thomerson http://www.wickettraining.com On Tue, Oct 20, 2009 at 9:31 AM, Peter Arnulf Lustig u...@yahoo.dewrote: sets the value of the textfield programmatically on the page, and submits the form, the model should be updated by the time he gets to this onSubmit method. How do you mean that? I think wicket sets the model automaticly because the model is attached to the component. - Ursprüngliche Mail Von: Jeremy Thomerson jer...@wickettraining.com An: users@wicket.apache.org Gesendet: Dienstag, den 20. Oktober 2009, 16:28:31 Uhr Betreff: Re: why is the model empty? That's not an immutable model. It's equivalent to new ModelString() - which is fine for this use. Assuming the text field and the button are within a form, and that he sets the value of the textfield programmatically on the page, and submits the form, the model should be updated by the time he gets to this onSubmit method. -- Jeremy Thomerson http://www.wickettraining.com On Tue, Oct 20, 2009 at 9:24 AM, Ernesto Reinaldo Barreiro reier...@gmail.com wrote: Sorry but when is the model object update? final TextFieldString tagTitle = new TextFieldString(tagTitle, Model.of()); just creates and in-mutable model? Or, am I missing something? Best, Ernesto On Tue, Oct 20, 2009 at 3:17 PM, Peter Arnulf Lustig u...@yahoo.de wrote: hi, in the submit logic the getModel().getObject() is an empty string although I set it via textfield: final Button tagSubmit = new Button(tagSubmit, Model.of()) { @Override public void onSubmit() { tagTitle.getModel().getObject() // it is empty!! } } }; that's the textfield: final TextFieldString tagTitle = new TextFieldString(tagTitle, Model.of()); - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: why is the model empty?
Well, again, the only way for me to help you more is to supply a quickstart that reproduces this. -- Jeremy Thomerson http://www.wickettraining.com On Tue, Oct 20, 2009 at 9:49 AM, Peter Arnulf Lustig u...@yahoo.dewrote: I am submitting a textfield in a form to wicket. Just the standard HTTP Post -- And everywhere it functions well -- I just can't get it why it won't function there. And I don't utilize any JS (Ajax etc.) for that task! It's weird. - Ursprüngliche Mail Von: Jeremy Thomerson jer...@wickettraining.com An: users@wicket.apache.org Gesendet: Dienstag, den 20. Oktober 2009, 16:40:45 Uhr Betreff: Re: why is the model empty? Yes - that's what I'm saying. On the webpage, presumably with JS, he is saying that he is setting the value of the text field. Then when it's submitted, Wicket should update the model before he gets to onSubmit -- Jeremy Thomerson http://www.wickettraining.com On Tue, Oct 20, 2009 at 9:31 AM, Peter Arnulf Lustig u...@yahoo.de wrote: sets the value of the textfield programmatically on the page, and submits the form, the model should be updated by the time he gets to this onSubmit method. How do you mean that? I think wicket sets the model automaticly because the model is attached to the component. - Ursprüngliche Mail Von: Jeremy Thomerson jer...@wickettraining.com An: users@wicket.apache.org Gesendet: Dienstag, den 20. Oktober 2009, 16:28:31 Uhr Betreff: Re: why is the model empty? That's not an immutable model. It's equivalent to new ModelString() - which is fine for this use. Assuming the text field and the button are within a form, and that he sets the value of the textfield programmatically on the page, and submits the form, the model should be updated by the time he gets to this onSubmit method. -- Jeremy Thomerson http://www.wickettraining.com On Tue, Oct 20, 2009 at 9:24 AM, Ernesto Reinaldo Barreiro reier...@gmail.com wrote: Sorry but when is the model object update? final TextFieldString tagTitle = new TextFieldString(tagTitle, Model.of()); just creates and in-mutable model? Or, am I missing something? Best, Ernesto On Tue, Oct 20, 2009 at 3:17 PM, Peter Arnulf Lustig u...@yahoo.de wrote: hi, in the submit logic the getModel().getObject() is an empty string although I set it via textfield: final Button tagSubmit = new Button(tagSubmit, Model.of()) { @Override public void onSubmit() { tagTitle.getModel().getObject() // it is empty!! } } }; that's the textfield: final TextFieldString tagTitle = new TextFieldString(tagTitle, Model.of()); - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
AW: why is the model empty?
ok! Line 148 is interesting. - Ursprüngliche Mail Von: Jeremy Thomerson jer...@wickettraining.com An: users@wicket.apache.org Gesendet: Dienstag, den 20. Oktober 2009, 16:50:31 Uhr Betreff: Re: why is the model empty? Well, again, the only way for me to help you more is to supply a quickstart that reproduces this. -- Jeremy Thomerson http://www.wickettraining.com On Tue, Oct 20, 2009 at 9:49 AM, Peter Arnulf Lustig u...@yahoo.dewrote: I am submitting a textfield in a form to wicket. Just the standard HTTP Post -- And everywhere it functions well -- I just can't get it why it won't function there. And I don't utilize any JS (Ajax etc.) for that task! It's weird. - Ursprüngliche Mail Von: Jeremy Thomerson jer...@wickettraining.com An: users@wicket.apache.org Gesendet: Dienstag, den 20. Oktober 2009, 16:40:45 Uhr Betreff: Re: why is the model empty? Yes - that's what I'm saying. On the webpage, presumably with JS, he is saying that he is setting the value of the text field. Then when it's submitted, Wicket should update the model before he gets to onSubmit -- Jeremy Thomerson http://www.wickettraining.com On Tue, Oct 20, 2009 at 9:31 AM, Peter Arnulf Lustig u...@yahoo.de wrote: sets the value of the textfield programmatically on the page, and submits the form, the model should be updated by the time he gets to this onSubmit method. How do you mean that? I think wicket sets the model automaticly because the model is attached to the component. - Ursprüngliche Mail Von: Jeremy Thomerson jer...@wickettraining.com An: users@wicket.apache.org Gesendet: Dienstag, den 20. Oktober 2009, 16:28:31 Uhr Betreff: Re: why is the model empty? That's not an immutable model. It's equivalent to new ModelString() - which is fine for this use. Assuming the text field and the button are within a form, and that he sets the value of the textfield programmatically on the page, and submits the form, the model should be updated by the time he gets to this onSubmit method. -- Jeremy Thomerson http://www.wickettraining.com On Tue, Oct 20, 2009 at 9:24 AM, Ernesto Reinaldo Barreiro reier...@gmail.com wrote: Sorry but when is the model object update? final TextFieldString tagTitle = new TextFieldString(tagTitle, Model.of()); just creates and in-mutable model? Or, am I missing something? Best, Ernesto On Tue, Oct 20, 2009 at 3:17 PM, Peter Arnulf Lustig u...@yahoo.de wrote: hi, in the submit logic the getModel().getObject() is an empty string although I set it via textfield: final Button tagSubmit = new Button(tagSubmit, Model.of()) { @Override public void onSubmit() { tagTitle.getModel().getObject() // it is empty!! } } }; that's the textfield: final TextFieldString tagTitle = new TextFieldString(tagTitle, Model.of()); - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package org.omikron.org; import java.util.ArrayList; import java.util.Date; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.List; import org.apache.wicket.AttributeModifier; import org.apache.wicket.PageParameters; import org.apache.wicket.ajax.AjaxRequestTarget; import org.apache.wicket.ajax.markup.html.AjaxLink; import org.apache.wicket.ajax.markup.html.form.AjaxButton; import org.apache.wicket.behavior.SimpleAttributeModifier; import org.apache.wicket.feedback.ContainerFeedbackMessageFilter; import org.apache.wicket.markup.html.WebMarkupContainer; import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.markup.html.form.Button; import org.apache.wicket.markup.html.form.Form; import org.apache.wicket.markup.html.form.IChoiceRenderer; import org.apache.wicket.markup.html.form.ListMultipleChoice; import org.apache.wicket.markup.html.form.TextArea; import org.apache.wicket.markup.html.form.TextField; import org.apache.wicket.markup.html.link.Link; import org.apache.wicket.markup.html.list.ListItem; import org.apache.wicket.markup.html.list.ListView; import
Re: why is the model empty?
Did you look at the javadoc? [1] It says: Sets the defaultFormProcessing property. When false (default is true), all validation and form updating is bypassed and the onSubmit method of that button is called directly, and the onSubmit method of the parent form is not called. A common use for this is to create a cancel button. So, yes, that would prevent the model from being updated. [1] http://fisheye6.atlassian.com/browse/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/Button.java?r=HEAD#l118 -- Jeremy Thomerson http://www.wickettraining.com On Tue, Oct 20, 2009 at 9:25 AM, Peter Arnulf Lustig u...@yahoo.dewrote: Does it maybe have something to do with my custom validation? I use setDefaultFormProcessing(false); because I have more submit buttons on one form - Ursprüngliche Mail Von: Jeremy Thomerson jer...@wickettraining.com An: users@wicket.apache.org Gesendet: Dienstag, den 20. Oktober 2009, 16:20:09 Uhr Betreff: Re: why is the model empty? How about! creating! a quickstart! and sending it! to us! (Oh, and no need for so many exclamation points. It could be interpreted as shouting) -- Jeremy Thomerson http://www.wickettraining.com On Tue, Oct 20, 2009 at 9:16 AM, Peter Arnulf Lustig u...@yahoo.de wrote: hey martijn -- But there is a string submitted! Actually it must be printed! But it is null. Is the final declaration correct? - Ursprüngliche Mail Von: Martijn Dashorst martijn.dasho...@gmail.com An: users@wicket.apache.org Gesendet: Dienstag, den 20. Oktober 2009, 16:06:22 Uhr Betreff: Re: why is the model empty? Wicket makes empty strings null by default. See one of the Application.getSettings() Martijn On Tue, Oct 20, 2009 at 4:04 PM, Jeremy Thomerson jer...@wickettraining.com wrote: Look at the HTTP request - is the value getting submitted? -- Jeremy Thomerson http://www.wickettraining.com On Tue, Oct 20, 2009 at 8:17 AM, Peter Arnulf Lustig u...@yahoo.de wrote: hi, in the submit logic the getModel().getObject() is an empty string although I set it via textfield: final Button tagSubmit = new Button(tagSubmit, Model.of()) { @Override public void onSubmit() { tagTitle.getModel().getObject() // it is empty!! } } }; that's the textfield: final TextFieldString tagTitle = new TextFieldString(tagTitle, Model.of()); - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.4 increases type safety for web applications Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.0 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
AW: why is the model empty?
mhmhm! I got this design pattern from http://cwiki.apache.org/WICKET/conditional-validation.html - Ursprüngliche Mail Von: Jeremy Thomerson jer...@wickettraining.com An: users@wicket.apache.org Gesendet: Dienstag, den 20. Oktober 2009, 16:56:38 Uhr Betreff: Re: why is the model empty? Did you look at the javadoc? [1] It says: Sets the defaultFormProcessing property. When false (default is true), all validation and form updating is bypassed and the onSubmit method of that button is called directly, and the onSubmit method of the parent form is not called. A common use for this is to create a cancel button. So, yes, that would prevent the model from being updated. [1] http://fisheye6.atlassian.com/browse/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/Button.java?r=HEAD#l118 -- Jeremy Thomerson http://www.wickettraining.com On Tue, Oct 20, 2009 at 9:25 AM, Peter Arnulf Lustig u...@yahoo.dewrote: Does it maybe have something to do with my custom validation? I use setDefaultFormProcessing(false); because I have more submit buttons on one form - Ursprüngliche Mail Von: Jeremy Thomerson jer...@wickettraining.com An: users@wicket.apache.org Gesendet: Dienstag, den 20. Oktober 2009, 16:20:09 Uhr Betreff: Re: why is the model empty? How about! creating! a quickstart! and sending it! to us! (Oh, and no need for so many exclamation points. It could be interpreted as shouting) -- Jeremy Thomerson http://www.wickettraining.com On Tue, Oct 20, 2009 at 9:16 AM, Peter Arnulf Lustig u...@yahoo.de wrote: hey martijn -- But there is a string submitted! Actually it must be printed! But it is null. Is the final declaration correct? - Ursprüngliche Mail Von: Martijn Dashorst martijn.dasho...@gmail.com An: users@wicket.apache.org Gesendet: Dienstag, den 20. Oktober 2009, 16:06:22 Uhr Betreff: Re: why is the model empty? Wicket makes empty strings null by default. See one of the Application.getSettings() Martijn On Tue, Oct 20, 2009 at 4:04 PM, Jeremy Thomerson jer...@wickettraining.com wrote: Look at the HTTP request - is the value getting submitted? -- Jeremy Thomerson http://www.wickettraining.com On Tue, Oct 20, 2009 at 8:17 AM, Peter Arnulf Lustig u...@yahoo.de wrote: hi, in the submit logic the getModel().getObject() is an empty string although I set it via textfield: final Button tagSubmit = new Button(tagSubmit, Model.of()) { @Override public void onSubmit() { tagTitle.getModel().getObject() // it is empty!! } } }; that's the textfield: final TextFieldString tagTitle = new TextFieldString(tagTitle, Model.of()); - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.4 increases type safety for web applications Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.0 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: why is the model empty?
Well, don't know what to tell you. It bypasses validation, which is required in order to set the models to their values. If you submitted akj123 in a text field that was an Integer, we could only set it after validation (which in this case means the value could not be set on the field). So, bypassing validation means that you must also bypass getting your models updated. You can call textfield.getValue() (or similar - can't remember exact name) to get the raw submitted value. -- Jeremy Thomerson http://www.wickettraining.com On Tue, Oct 20, 2009 at 10:00 AM, Peter Arnulf Lustig u...@yahoo.dewrote: mhmhm! I got this design pattern from http://cwiki.apache.org/WICKET/conditional-validation.html - Ursprüngliche Mail Von: Jeremy Thomerson jer...@wickettraining.com An: users@wicket.apache.org Gesendet: Dienstag, den 20. Oktober 2009, 16:56:38 Uhr Betreff: Re: why is the model empty? Did you look at the javadoc? [1] It says: Sets the defaultFormProcessing property. When false (default is true), all validation and form updating is bypassed and the onSubmit method of that button is called directly, and the onSubmit method of the parent form is not called. A common use for this is to create a cancel button. So, yes, that would prevent the model from being updated. [1] http://fisheye6.atlassian.com/browse/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/Button.java?r=HEAD#l118 -- Jeremy Thomerson http://www.wickettraining.com On Tue, Oct 20, 2009 at 9:25 AM, Peter Arnulf Lustig u...@yahoo.de wrote: Does it maybe have something to do with my custom validation? I use setDefaultFormProcessing(false); because I have more submit buttons on one form - Ursprüngliche Mail Von: Jeremy Thomerson jer...@wickettraining.com An: users@wicket.apache.org Gesendet: Dienstag, den 20. Oktober 2009, 16:20:09 Uhr Betreff: Re: why is the model empty? How about! creating! a quickstart! and sending it! to us! (Oh, and no need for so many exclamation points. It could be interpreted as shouting) -- Jeremy Thomerson http://www.wickettraining.com On Tue, Oct 20, 2009 at 9:16 AM, Peter Arnulf Lustig u...@yahoo.de wrote: hey martijn -- But there is a string submitted! Actually it must be printed! But it is null. Is the final declaration correct? - Ursprüngliche Mail Von: Martijn Dashorst martijn.dasho...@gmail.com An: users@wicket.apache.org Gesendet: Dienstag, den 20. Oktober 2009, 16:06:22 Uhr Betreff: Re: why is the model empty? Wicket makes empty strings null by default. See one of the Application.getSettings() Martijn On Tue, Oct 20, 2009 at 4:04 PM, Jeremy Thomerson jer...@wickettraining.com wrote: Look at the HTTP request - is the value getting submitted? -- Jeremy Thomerson http://www.wickettraining.com On Tue, Oct 20, 2009 at 8:17 AM, Peter Arnulf Lustig u...@yahoo.de wrote: hi, in the submit logic the getModel().getObject() is an empty string although I set it via textfield: final Button tagSubmit = new Button(tagSubmit, Model.of()) { @Override public void onSubmit() { tagTitle.getModel().getObject() // it is empty!! } } }; that's the textfield: final TextFieldString tagTitle = new TextFieldString(tagTitle, Model.of()); - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.4 increases type safety for web applications Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.0 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Reusable components and wicket:id
Hi Tomás, I didn't found the problem. The feedback panel get: * Field 'rapidezAtencion' is required. * Field 'explicacionClara' is required. * Field 'resolucionProblema' is required. just as expected... On Tue, Oct 20, 2009 at 12:00 PM, Tomás Rossi tro...@mecon.gov.ar wrote: Sure, here's the markup (BTW, using Wicket 1.4.2): PanelEncuesta.html (means SurveyPanel): ... body wicket:panel table class=GrillaOpciones tr th/th thlabelMuy Bueno/label/th thlabelBueno/label/th thlabelRegular/label/th thlabelMalo/label/th thlabelNs/Nc/label/th /tr tr wicket:container wicket:id=rapidezAtencion td class=TextoItemlabelRapidez en la atención/label/td tdinput type=radio wicket:id=rapidezAtencion0//td tdinput type=radio wicket:id=rapidezAtencion1//td tdinput type=radio wicket:id=rapidezAtencion2//td tdinput type=radio wicket:id=rapidezAtencion3//td tdinput type=radio wicket:id=rapidezAtencion4//td /wicket:container /tr tr wicket:container wicket:id=explicacionClara td class=TextoItemlabelExplicaciones claras/label/td tdinput type=radio wicket:id=explicacionClara0//td tdinput type=radio wicket:id=explicacionClara1//td tdinput type=radio wicket:id=explicacionClara2//td tdinput type=radio wicket:id=explicacionClara3//td tdinput type=radio wicket:id=explicacionClara4//td /wicket:container /tr tr wicket:container wicket:id=resolucionProblema td class=TextoItemlabelResolución del problema/label/td tdinput type=radio wicket:id=resolucionProblema0//td tdinput type=radio wicket:id=resolucionProblema1//td tdinput type=radio wicket:id=resolucionProblema2//td tdinput type=radio wicket:id=resolucionProblema3//td tdinput type=radio wicket:id=resolucionProblema4//td /wicket:container /tr /table /wicket:panel /body ... PantallaEncuesta.html (means SurveyScreen): ... div class=Sector h3¿Cómo calificaría los siguientes aspectos de la atención telefónica de Informática?/h3 div wicket:id=panelTelefonicoAcá va la encuesta de atención telefónica/div !-- Here goes the panel!! -- /div div class=Sector h3¿Cómo calificaría los siguientes aspectos de la atención del personal de Informática?/h3 div wicket:id=panelPersonalAcá va la encuesta de atención personal/div !-- Here goes the panel!! -- /div ... -- Tom; Pedro Santos escribió: Hi Tómas, What the form component RadioButtonGenerico receive as id, the validation message will use as label. The code should generate the outputs: * Field 'rapidezAtencion' is required. * Field 'explicacionClara' is required. your report output : wicket:container wicket:id=score is an generic markup or always the score id is placed on html? If so, can you send the panel html? what wicket version are you using? On Mon, Oct 19, 2009 at 5:56 PM, Tomás Rossi tro...@mecon.gov.ar wrote: Here goes the java code... RadioButtonGenerico.java (means GenericRadioButton): public class RadioButtonGenericoT extends RadioGroupT { private static final long serialVersionUID = -1725627853431547878L; public RadioButtonGenerico(String id, ListString opciones, IModelT modelo) { super(id, modelo); for (int i = 0; i opciones.size(); i++) { add(new RadioInteger(id + i, new ModelInteger(i))); } } } PanelEncuesta.java (means SurveyPanel): public class PanelEncuesta extends FormComponentPanelDatosEncuesta { private static final long serialVersionUID = -1545571698439481842L; public PanelEncuesta(String id, IModelDatosEncuesta modelo) { super(id, modelo); add(new RadioButtonGenericoDatosEncuesta(rapidezAtencion, DatosEncuesta.CALIFICACIONES, new PropertyModelDatosEncuesta(modelo, rapidezAtencion)).setRequired(true)); add(new RadioButtonGenericoDatosEncuesta(explicacionClara, DatosEncuesta.CALIFICACIONES, new PropertyModelDatosEncuesta(modelo, explicacionClara)).setRequired(true)); add(new RadioButtonGenericoDatosEncuesta(resolucionProblema, DatosEncuesta.CALIFICACIONES, new PropertyModelDatosEncuesta(modelo, resolucionProblema)).setRequired(true)); } } PantallaEncuesta.java: (means SurveyScreen): public class PantallaEncuesta extends WebPage { public PantallaEncuesta() { add(new FeedbackPanel(feedback)); add(new FormEncuesta(formEncuesta)); } public static class FormEncuesta extends FormDatosEncuesta { // (Means SurveyForm) private static final long serialVersionUID = 8582266005577827473L; // Modelo para las respuestas respecto a la atención éfonica. private final DatosEncuesta datosEncuestaTelefonico = new DatosEncuesta(); // Modelo para las respuestas respecto a la atención personal. private final DatosEncuesta datosEncuestaPersonal = new DatosEncuesta(); // Modelo para los datos optativos de la encuesta. private final DatosOptativos
Re: Variation of parent component isn't passed to image - Bug?
styles and variations are not passed down through the hierarchy. one must override getvariation()/getstyle() on each component that needs to be different afaik. -igor On Tue, Oct 20, 2009 at 4:00 AM, Liz Huber liz.hu...@gmx.com wrote: Hi, I came across a problem an other group member has already written about (please have a look his post http://markmail.org/thread/auqhcd66zwsflt33#query:wicket%20image% 20parent%20variation+page:1+mid:auqhcd66zwsflt33+state:results). But he didn't get an answer. Actually the variation of a component is passed to its child component. But this doesn't work for images, because when their variation is requested they don't have a parent yet. I don't know if this is a bug or I should override some methods. Maybe anyone had to deal with this behavior before. Thanks in advance, Liz - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Reusable components and wicket:id
Yes, but I have 2 panels in the same page, and get: * Field 'rapidezAtencion' is required. * Field 'explicacionClara' is required. * Field 'resolucionProblema' is required. * Field 'rapidezAtencion' is required. * Field 'explicacionClara' is required. * Field 'resolucionProblema' is required. And I want something like: * Field 'panel1-rapidezAtencion' is required. * Field 'panel1-explicacionClara' is required. * Field 'panel1-resolucionProblema' is required. * Field 'panel2-rapidezAtencion' is required. * Field 'panel2-explicacionClara' is required. * Field 'panel2-resolucionProblema' is required. So that I can change those labels with a properties file later. Tom; Pedro Santos escribió: Hi Tomás, I didn't found the problem. The feedback panel get: * Field 'rapidezAtencion' is required. * Field 'explicacionClara' is required. * Field 'resolucionProblema' is required. just as expected... On Tue, Oct 20, 2009 at 12:00 PM, Tomás Rossi tro...@mecon.gov.ar wrote: Sure, here's the markup (BTW, using Wicket 1.4.2): PanelEncuesta.html (means SurveyPanel): ... body wicket:panel table class=GrillaOpciones tr th/th thlabelMuy Bueno/label/th thlabelBueno/label/th thlabelRegular/label/th thlabelMalo/label/th thlabelNs/Nc/label/th /tr tr wicket:container wicket:id=rapidezAtencion td class=TextoItemlabelRapidez en la atención/label/td tdinput type=radio wicket:id=rapidezAtencion0//td tdinput type=radio wicket:id=rapidezAtencion1//td tdinput type=radio wicket:id=rapidezAtencion2//td tdinput type=radio wicket:id=rapidezAtencion3//td tdinput type=radio wicket:id=rapidezAtencion4//td /wicket:container /tr tr wicket:container wicket:id=explicacionClara td class=TextoItemlabelExplicaciones claras/label/td tdinput type=radio wicket:id=explicacionClara0//td tdinput type=radio wicket:id=explicacionClara1//td tdinput type=radio wicket:id=explicacionClara2//td tdinput type=radio wicket:id=explicacionClara3//td tdinput type=radio wicket:id=explicacionClara4//td /wicket:container /tr tr wicket:container wicket:id=resolucionProblema td class=TextoItemlabelResolución del problema/label/td tdinput type=radio wicket:id=resolucionProblema0//td tdinput type=radio wicket:id=resolucionProblema1//td tdinput type=radio wicket:id=resolucionProblema2//td tdinput type=radio wicket:id=resolucionProblema3//td tdinput type=radio wicket:id=resolucionProblema4//td /wicket:container /tr /table /wicket:panel /body ... PantallaEncuesta.html (means SurveyScreen): ... div class=Sector h3¿Cómo calificaría los siguientes aspectos de la atención telefónica de Informática?/h3 div wicket:id=panelTelefonicoAcá va la encuesta de atención telefónica/div !-- Here goes the panel!! -- /div div class=Sector h3¿Cómo calificaría los siguientes aspectos de la atención del personal de Informática?/h3 div wicket:id=panelPersonalAcá va la encuesta de atención personal/div !-- Here goes the panel!! -- /div ... -- Tom; Pedro Santos escribió: Hi Tómas, What the form component RadioButtonGenerico receive as id, the validation message will use as label. The code should generate the outputs: * Field 'rapidezAtencion' is required. * Field 'explicacionClara' is required. your report output : wicket:container wicket:id=score is an generic markup or always the score id is placed on html? If so, can you send the panel html? what wicket version are you using? On Mon, Oct 19, 2009 at 5:56 PM, Tomás Rossi tro...@mecon.gov.ar wrote: Here goes the java code... RadioButtonGenerico.java (means GenericRadioButton): public class RadioButtonGenericoT extends RadioGroupT { private static final long serialVersionUID = -1725627853431547878L; public RadioButtonGenerico(String id, ListString opciones, IModelT modelo) { super(id, modelo); for (int i = 0; i opciones.size(); i++) { add(new RadioInteger(id + i, new ModelInteger(i))); } } } PanelEncuesta.java (means SurveyPanel): public class PanelEncuesta extends FormComponentPanelDatosEncuesta { private static final long serialVersionUID = -1545571698439481842L; public PanelEncuesta(String id, IModelDatosEncuesta modelo) { super(id, modelo); add(new RadioButtonGenericoDatosEncuesta(rapidezAtencion, DatosEncuesta.CALIFICACIONES, new PropertyModelDatosEncuesta(modelo, rapidezAtencion)).setRequired(true)); add(new RadioButtonGenericoDatosEncuesta(explicacionClara, DatosEncuesta.CALIFICACIONES, new PropertyModelDatosEncuesta(modelo, explicacionClara)).setRequired(true)); add(new RadioButtonGenericoDatosEncuesta(resolucionProblema, DatosEncuesta.CALIFICACIONES, new PropertyModelDatosEncuesta(modelo, resolucionProblema)).setRequired(true)); } } PantallaEncuesta.java: (means SurveyScreen): public class PantallaEncuesta extends WebPage { public PantallaEncuesta() { add(new
Re: Reusable components and wicket:id
now I understand 1 - you can use different feedback panels for each panel 2 - you can write a custom model for the component label here is a draft, you can create a concrete class from, can override the form component getLabel, can set the custom model on the RadioButtonGenerico constructor... myRadioButtonGenerico.setLabel(new AbstractReadOnlyModelString() { @Override public String getObject() { return getParent().getId() + - + getId(); } }); On Tue, Oct 20, 2009 at 2:51 PM, Tomás Rossi tro...@mecon.gov.ar wrote: Yes, but I have 2 panels in the same page, and get: * Field 'rapidezAtencion' is required. * Field 'explicacionClara' is required. * Field 'resolucionProblema' is required. * Field 'rapidezAtencion' is required. * Field 'explicacionClara' is required. * Field 'resolucionProblema' is required. And I want something like: * Field 'panel1-rapidezAtencion' is required. * Field 'panel1-explicacionClara' is required. * Field 'panel1-resolucionProblema' is required. * Field 'panel2-rapidezAtencion' is required. * Field 'panel2-explicacionClara' is required. * Field 'panel2-resolucionProblema' is required. So that I can change those labels with a properties file later. Tom; Pedro Santos escribió: Hi Tomás, I didn't found the problem. The feedback panel get: * Field 'rapidezAtencion' is required. * Field 'explicacionClara' is required. * Field 'resolucionProblema' is required. just as expected... On Tue, Oct 20, 2009 at 12:00 PM, Tomás Rossi tro...@mecon.gov.ar wrote: Sure, here's the markup (BTW, using Wicket 1.4.2): PanelEncuesta.html (means SurveyPanel): ... body wicket:panel table class=GrillaOpciones tr th/th thlabelMuy Bueno/label/th thlabelBueno/label/th thlabelRegular/label/th thlabelMalo/label/th thlabelNs/Nc/label/th /tr tr wicket:container wicket:id=rapidezAtencion td class=TextoItemlabelRapidez en la atención/label/td tdinput type=radio wicket:id=rapidezAtencion0//td tdinput type=radio wicket:id=rapidezAtencion1//td tdinput type=radio wicket:id=rapidezAtencion2//td tdinput type=radio wicket:id=rapidezAtencion3//td tdinput type=radio wicket:id=rapidezAtencion4//td /wicket:container /tr tr wicket:container wicket:id=explicacionClara td class=TextoItemlabelExplicaciones claras/label/td tdinput type=radio wicket:id=explicacionClara0//td tdinput type=radio wicket:id=explicacionClara1//td tdinput type=radio wicket:id=explicacionClara2//td tdinput type=radio wicket:id=explicacionClara3//td tdinput type=radio wicket:id=explicacionClara4//td /wicket:container /tr tr wicket:container wicket:id=resolucionProblema td class=TextoItemlabelResolución del problema/label/td tdinput type=radio wicket:id=resolucionProblema0//td tdinput type=radio wicket:id=resolucionProblema1//td tdinput type=radio wicket:id=resolucionProblema2//td tdinput type=radio wicket:id=resolucionProblema3//td tdinput type=radio wicket:id=resolucionProblema4//td /wicket:container /tr /table /wicket:panel /body ... PantallaEncuesta.html (means SurveyScreen): ... div class=Sector h3¿Cómo calificaría los siguientes aspectos de la atención telefónica de Informática?/h3 div wicket:id=panelTelefonicoAcá va la encuesta de atención telefónica/div !-- Here goes the panel!! -- /div div class=Sector h3¿Cómo calificaría los siguientes aspectos de la atención del personal de Informática?/h3 div wicket:id=panelPersonalAcá va la encuesta de atención personal/div !-- Here goes the panel!! -- /div ... -- Tom; Pedro Santos escribió: Hi Tómas, What the form component RadioButtonGenerico receive as id, the validation message will use as label. The code should generate the outputs: * Field 'rapidezAtencion' is required. * Field 'explicacionClara' is required. your report output : wicket:container wicket:id=score is an generic markup or always the score id is placed on html? If so, can you send the panel html? what wicket version are you using? On Mon, Oct 19, 2009 at 5:56 PM, Tomás Rossi tro...@mecon.gov.ar wrote: Here goes the java code... RadioButtonGenerico.java (means GenericRadioButton): public class RadioButtonGenericoT extends RadioGroupT { private static final long serialVersionUID = -1725627853431547878L; public RadioButtonGenerico(String id, ListString opciones, IModelT modelo) { super(id, modelo); for (int i = 0; i opciones.size(); i++) { add(new RadioInteger(id + i, new ModelInteger(i))); } } } PanelEncuesta.java (means SurveyPanel): public class PanelEncuesta extends FormComponentPanelDatosEncuesta { private static final long serialVersionUID = -1545571698439481842L; public PanelEncuesta(String id, IModelDatosEncuesta modelo) { super(id, modelo); add(new RadioButtonGenericoDatosEncuesta(rapidezAtencion,
Re: Reusable components and wicket:id
Thanks! That worked. Though, I'd love for wicket to provide an automatic mechanism for this kind of stuff. Each instance of a reusable component could be mutually independent, even if used in the same container (at least that was my intuitive idea). Kind regards, Tom; Pedro Santos escribió: now I understand 1 - you can use different feedback panels for each panel 2 - you can write a custom model for the component label here is a draft, you can create a concrete class from, can override the form component getLabel, can set the custom model on the RadioButtonGenerico constructor... myRadioButtonGenerico.setLabel(new AbstractReadOnlyModelString() { @Override public String getObject() { return getParent().getId() + - + getId(); } }); On Tue, Oct 20, 2009 at 2:51 PM, Tomás Rossi tro...@mecon.gov.ar wrote: Yes, but I have 2 panels in the same page, and get: * Field 'rapidezAtencion' is required. * Field 'explicacionClara' is required. * Field 'resolucionProblema' is required. * Field 'rapidezAtencion' is required. * Field 'explicacionClara' is required. * Field 'resolucionProblema' is required. And I want something like: * Field 'panel1-rapidezAtencion' is required. * Field 'panel1-explicacionClara' is required. * Field 'panel1-resolucionProblema' is required. * Field 'panel2-rapidezAtencion' is required. * Field 'panel2-explicacionClara' is required. * Field 'panel2-resolucionProblema' is required. So that I can change those labels with a properties file later. Tom; Pedro Santos escribió: Hi Tomás, I didn't found the problem. The feedback panel get: * Field 'rapidezAtencion' is required. * Field 'explicacionClara' is required. * Field 'resolucionProblema' is required. just as expected... On Tue, Oct 20, 2009 at 12:00 PM, Tomás Rossi tro...@mecon.gov.ar wrote: Sure, here's the markup (BTW, using Wicket 1.4.2): PanelEncuesta.html (means SurveyPanel): ... body wicket:panel table class=GrillaOpciones tr th/th thlabelMuy Bueno/label/th thlabelBueno/label/th thlabelRegular/label/th thlabelMalo/label/th thlabelNs/Nc/label/th /tr tr wicket:container wicket:id=rapidezAtencion td class=TextoItemlabelRapidez en la atención/label/td tdinput type=radio wicket:id=rapidezAtencion0//td tdinput type=radio wicket:id=rapidezAtencion1//td tdinput type=radio wicket:id=rapidezAtencion2//td tdinput type=radio wicket:id=rapidezAtencion3//td tdinput type=radio wicket:id=rapidezAtencion4//td /wicket:container /tr tr wicket:container wicket:id=explicacionClara td class=TextoItemlabelExplicaciones claras/label/td tdinput type=radio wicket:id=explicacionClara0//td tdinput type=radio wicket:id=explicacionClara1//td tdinput type=radio wicket:id=explicacionClara2//td tdinput type=radio wicket:id=explicacionClara3//td tdinput type=radio wicket:id=explicacionClara4//td /wicket:container /tr tr wicket:container wicket:id=resolucionProblema td class=TextoItemlabelResolución del problema/label/td tdinput type=radio wicket:id=resolucionProblema0//td tdinput type=radio wicket:id=resolucionProblema1//td tdinput type=radio wicket:id=resolucionProblema2//td tdinput type=radio wicket:id=resolucionProblema3//td tdinput type=radio wicket:id=resolucionProblema4//td /wicket:container /tr /table /wicket:panel /body ... PantallaEncuesta.html (means SurveyScreen): ... div class=Sector h3¿Cómo calificaría los siguientes aspectos de la atención telefónica de Informática?/h3 div wicket:id=panelTelefonicoAcá va la encuesta de atención telefónica/div !-- Here goes the panel!! -- /div div class=Sector h3¿Cómo calificaría los siguientes aspectos de la atención del personal de Informática?/h3 div wicket:id=panelPersonalAcá va la encuesta de atención personal/div !-- Here goes the panel!! -- /div ... -- Tom; Pedro Santos escribió: Hi Tómas, What the form component RadioButtonGenerico receive as id, the validation message will use as label. The code should generate the outputs: * Field 'rapidezAtencion' is required. * Field 'explicacionClara' is required. your report output : wicket:container wicket:id=score is an generic markup or always the score id is placed on html? If so, can you send the panel html? what wicket version are you using? On Mon, Oct 19, 2009 at 5:56 PM, Tomás Rossi tro...@mecon.gov.ar wrote: Here goes the java code... RadioButtonGenerico.java (means GenericRadioButton): public class RadioButtonGenericoT extends RadioGroupT { private static final long serialVersionUID = -1725627853431547878L; public RadioButtonGenerico(String id, ListString opciones, IModelT modelo) { super(id, modelo); for (int i = 0; i opciones.size(); i++) { add(new RadioInteger(id + i, new ModelInteger(i))); } } } PanelEncuesta.java (means SurveyPanel): public class PanelEncuesta extends FormComponentPanelDatosEncuesta { private static
AjaxFallbackDefaultDataTable - modifying look
I am using the AjaxFallbackDefaultDataTable for displaying a data table on my page. I have everything working [displaying of data, sorting columns. Paging]. I know would like to change the look and feel of the data table. I would like to be able to change the navigation toolbar so that the paging links appear directly to the right of the showing 1 to 15 of X? The html file has the paging links defined as a text-align: right in the html and it can't be overwritten with css classes. This is great for narrow width tables but a table that scrolls horizontally the navigation is lost on the far right. It looks like the navigation toolbar is automatically added by the constructor of the AjaxFallbackDrfaultDataTable. Is there a way to use my own Navigation Toolbar or make the changes so I can control the layout of the navigation toolbar. Thanks.
Re: Reusable components and wicket:id
thats why formcomponents take models for labels. you can give it a resourcemodel that uses the parent's id as the resource key and achieve what you want. -igor On Tue, Oct 20, 2009 at 10:46 AM, Tomás Rossi tro...@mecon.gov.ar wrote: Thanks! That worked. Though, I'd love for wicket to provide an automatic mechanism for this kind of stuff. Each instance of a reusable component could be mutually independent, even if used in the same container (at least that was my intuitive idea). Kind regards, Tom; Pedro Santos escribió: now I understand 1 - you can use different feedback panels for each panel 2 - you can write a custom model for the component label here is a draft, you can create a concrete class from, can override the form component getLabel, can set the custom model on the RadioButtonGenerico constructor... myRadioButtonGenerico.setLabel(new AbstractReadOnlyModelString() { �...@override public String getObject() { return getParent().getId() + - + getId(); } }); On Tue, Oct 20, 2009 at 2:51 PM, Tomás Rossi tro...@mecon.gov.ar wrote: Yes, but I have 2 panels in the same page, and get: * Field 'rapidezAtencion' is required. * Field 'explicacionClara' is required. * Field 'resolucionProblema' is required. * Field 'rapidezAtencion' is required. * Field 'explicacionClara' is required. * Field 'resolucionProblema' is required. And I want something like: * Field 'panel1-rapidezAtencion' is required. * Field 'panel1-explicacionClara' is required. * Field 'panel1-resolucionProblema' is required. * Field 'panel2-rapidezAtencion' is required. * Field 'panel2-explicacionClara' is required. * Field 'panel2-resolucionProblema' is required. So that I can change those labels with a properties file later. Tom; Pedro Santos escribió: Hi Tomás, I didn't found the problem. The feedback panel get: * Field 'rapidezAtencion' is required. * Field 'explicacionClara' is required. * Field 'resolucionProblema' is required. just as expected... On Tue, Oct 20, 2009 at 12:00 PM, Tomás Rossi tro...@mecon.gov.ar wrote: Sure, here's the markup (BTW, using Wicket 1.4.2): PanelEncuesta.html (means SurveyPanel): ... body wicket:panel table class=GrillaOpciones tr th/th thlabelMuy Bueno/label/th thlabelBueno/label/th thlabelRegular/label/th thlabelMalo/label/th thlabelNs/Nc/label/th /tr tr wicket:container wicket:id=rapidezAtencion td class=TextoItemlabelRapidez en la atención/label/td tdinput type=radio wicket:id=rapidezAtencion0//td tdinput type=radio wicket:id=rapidezAtencion1//td tdinput type=radio wicket:id=rapidezAtencion2//td tdinput type=radio wicket:id=rapidezAtencion3//td tdinput type=radio wicket:id=rapidezAtencion4//td /wicket:container /tr tr wicket:container wicket:id=explicacionClara td class=TextoItemlabelExplicaciones claras/label/td tdinput type=radio wicket:id=explicacionClara0//td tdinput type=radio wicket:id=explicacionClara1//td tdinput type=radio wicket:id=explicacionClara2//td tdinput type=radio wicket:id=explicacionClara3//td tdinput type=radio wicket:id=explicacionClara4//td /wicket:container /tr tr wicket:container wicket:id=resolucionProblema td class=TextoItemlabelResolución del problema/label/td tdinput type=radio wicket:id=resolucionProblema0//td tdinput type=radio wicket:id=resolucionProblema1//td tdinput type=radio wicket:id=resolucionProblema2//td tdinput type=radio wicket:id=resolucionProblema3//td tdinput type=radio wicket:id=resolucionProblema4//td /wicket:container /tr /table /wicket:panel /body ... PantallaEncuesta.html (means SurveyScreen): ... div class=Sector h3¿Cómo calificaría los siguientes aspectos de la atención telefónica de Informática?/h3 div wicket:id=panelTelefonicoAcá va la encuesta de atención telefónica/div !-- Here goes the panel!! -- /div div class=Sector h3¿Cómo calificaría los siguientes aspectos de la atención del personal de Informática?/h3 div wicket:id=panelPersonalAcá va la encuesta de atención personal/div !-- Here goes the panel!! -- /div ... -- Tom; Pedro Santos escribió: Hi Tómas, What the form component RadioButtonGenerico receive as id, the validation message will use as label. The code should generate the outputs: * Field 'rapidezAtencion' is required. * Field 'explicacionClara' is required. your report output : wicket:container wicket:id=score is an generic markup or always the score id is placed on html? If so, can you send the panel html? what wicket version are you using? On Mon, Oct 19, 2009 at 5:56 PM, Tomás Rossi tro...@mecon.gov.ar wrote: Here goes the java code... RadioButtonGenerico.java (means GenericRadioButton): public class RadioButtonGenericoT extends RadioGroupT { private static final long serialVersionUID = -1725627853431547878L; public
Re: AjaxFallbackDefaultDataTable - modifying look
dont use the Default version of the data table, create one yourself. -igor On Tue, Oct 20, 2009 at 10:48 AM, Jeffrey Schneller jeffrey.schnel...@envisa.com wrote: I am using the AjaxFallbackDefaultDataTable for displaying a data table on my page. I have everything working [displaying of data, sorting columns. Paging]. I know would like to change the look and feel of the data table. I would like to be able to change the navigation toolbar so that the paging links appear directly to the right of the showing 1 to 15 of X? The html file has the paging links defined as a text-align: right in the html and it can't be overwritten with css classes. This is great for narrow width tables but a table that scrolls horizontally the navigation is lost on the far right. It looks like the navigation toolbar is automatically added by the constructor of the AjaxFallbackDrfaultDataTable. Is there a way to use my own Navigation Toolbar or make the changes so I can control the layout of the navigation toolbar. Thanks. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ListView for only one element. Something wrong.
Hi,Thanks for your answer. (i reed it a time ago, but i never said thanks) NM On Fri, Oct 9, 2009 at 6:51 AM, Sven Meier s...@meiers.net wrote: Hi Nicolas, use more models: -- class MyPage: private IModelList businessObjects; private MyPanel myPanel; myPanel = new MyPanel(businessObjects); this.add(myPanel); - class MyPanel(final IModelList businessObjects): this.add(new SomeComponent(new AbstractReadOnlyModel() { public Object getObject() { return businessObjects.getObject().get(0); } })); this.add(new ListView(new AbstractReadOnlyModel() { public Object getObject() { return businessObjects.getObject().subList(1, businessObjects.getObject().size()); } }) { ... }); -- HTH Sven Nicolas Melendez schrieb: Hi: Sven, thanks for replying! I've added some code below. -- class MyPage: private List businessObjectList; private MyPanel myPanel; list is populated somehow myPanel = new MyPanel(businessObjectList); this.add(myPanel); ... on some behavior - target.addComponent(myPanel); - class MyPanel(businessObjectList): this.add(SomeComponent(first element of businessObjectList)); this.add(new ListView(businessObjectList wihout first element){ ... }); -- I'm aware that as the panel receives a modelObject and not a model, then when it's refreshed it will show the previous list. So, I was thinking about myPanel receiving a PropertyModel(this, businessObjectList), but the thing is: how can it retrieve the first business object (which needs to be shown differently) in a dynamic way so when the panel is refreshed, it will take it from the new list (I could use another repeater that will loop only once, but I was hoping there's a nicer way). Thanks again, NM On Thu, Oct 8, 2009 at 7:50 PM, Sven Meier s...@meiers.net wrote: Hi Nicolas, you can just use a WebMarkupContainer and recreate its children on each request in #onBeforeRender(). But the question is: why do you need to refresh your components at all? It seems you don't use models correctly. Show us some code. Sven Nicolas Melendez wrote: Hi, i want to use a ListView to use the onpopulate method so when the panel refresh i can see the new data.But the listView has always one element and i think it was made for lots of elements. Something is wrong in the way i am thinking. Any suggestion? NM - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Reusable components and wicket:id
Wait a minute... I made a PantallaEncuesta.properties with: panelTelefonico-rapidezAtencion=Rapidez en la atención (telefónica) ... Then I expected it to yield: * Field 'Rapidez en la atención (telefónica)' is required. But it still prints: * Field 'panelTelefonico-rapidezAtencion' is required. Not what I want... What's wrong? :( Igor Vaynberg escribió: thats why formcomponents take models for labels. you can give it a resourcemodel that uses the parent's id as the resource key and achieve what you want. -igor On Tue, Oct 20, 2009 at 10:46 AM, Tomás Rossi tro...@mecon.gov.ar wrote: Thanks! That worked. Though, I'd love for wicket to provide an automatic mechanism for this kind of stuff. Each instance of a reusable component could be mutually independent, even if used in the same container (at least that was my intuitive idea). Kind regards, Tom; Pedro Santos escribió: now I understand 1 - you can use different feedback panels for each panel 2 - you can write a custom model for the component label here is a draft, you can create a concrete class from, can override the form component getLabel, can set the custom model on the RadioButtonGenerico constructor... myRadioButtonGenerico.setLabel(new AbstractReadOnlyModelString() { @Override public String getObject() { return getParent().getId() + - + getId(); } }); On Tue, Oct 20, 2009 at 2:51 PM, Tomás Rossi tro...@mecon.gov.ar wrote: Yes, but I have 2 panels in the same page, and get: * Field 'rapidezAtencion' is required. * Field 'explicacionClara' is required. * Field 'resolucionProblema' is required. * Field 'rapidezAtencion' is required. * Field 'explicacionClara' is required. * Field 'resolucionProblema' is required. And I want something like: * Field 'panel1-rapidezAtencion' is required. * Field 'panel1-explicacionClara' is required. * Field 'panel1-resolucionProblema' is required. * Field 'panel2-rapidezAtencion' is required. * Field 'panel2-explicacionClara' is required. * Field 'panel2-resolucionProblema' is required. So that I can change those labels with a properties file later. Tom; Pedro Santos escribió: Hi Tomás, I didn't found the problem. The feedback panel get: * Field 'rapidezAtencion' is required. * Field 'explicacionClara' is required. * Field 'resolucionProblema' is required. just as expected... On Tue, Oct 20, 2009 at 12:00 PM, Tomás Rossi tro...@mecon.gov.ar wrote: Sure, here's the markup (BTW, using Wicket 1.4.2): PanelEncuesta.html (means SurveyPanel): ... body wicket:panel table class=GrillaOpciones tr th/th thlabelMuy Bueno/label/th thlabelBueno/label/th thlabelRegular/label/th thlabelMalo/label/th thlabelNs/Nc/label/th /tr tr wicket:container wicket:id=rapidezAtencion td class=TextoItemlabelRapidez en la atención/label/td tdinput type=radio wicket:id=rapidezAtencion0//td tdinput type=radio wicket:id=rapidezAtencion1//td tdinput type=radio wicket:id=rapidezAtencion2//td tdinput type=radio wicket:id=rapidezAtencion3//td tdinput type=radio wicket:id=rapidezAtencion4//td /wicket:container /tr tr wicket:container wicket:id=explicacionClara td class=TextoItemlabelExplicaciones claras/label/td tdinput type=radio wicket:id=explicacionClara0//td tdinput type=radio wicket:id=explicacionClara1//td tdinput type=radio wicket:id=explicacionClara2//td tdinput type=radio wicket:id=explicacionClara3//td tdinput type=radio wicket:id=explicacionClara4//td /wicket:container /tr tr wicket:container wicket:id=resolucionProblema td class=TextoItemlabelResolución del problema/label/td tdinput type=radio wicket:id=resolucionProblema0//td tdinput type=radio wicket:id=resolucionProblema1//td tdinput type=radio wicket:id=resolucionProblema2//td tdinput type=radio wicket:id=resolucionProblema3//td tdinput type=radio wicket:id=resolucionProblema4//td /wicket:container /tr /table /wicket:panel /body ... PantallaEncuesta.html (means SurveyScreen): ... div class=Sector h3¿Cómo calificaría los siguientes aspectos de la atención telefónica de Informática?/h3 div wicket:id=panelTelefonicoAcá va la encuesta de atención telefónica/div !-- Here goes the panel!! -- /div div class=Sector h3¿Cómo calificaría los siguientes aspectos de la atención del personal de Informática?/h3 div wicket:id=panelPersonalAcá va la encuesta de atención personal/div !-- Here goes the panel!! -- /div ... -- Tom; Pedro Santos escribió: Hi Tómas, What the form component RadioButtonGenerico receive as id, the validation message will use as label. The code should generate the outputs: * Field 'rapidezAtencion' is required. * Field 'explicacionClara' is required. your report output : wicket:container wicket:id=score is an generic markup or always the score id is placed on html? If so, can you send the panel html? what wicket version are you using? On Mon, Oct 19, 2009 at 5:56
RE: AjaxFallbackDefaultDataTable - modifying look
Fair enough. Is there an example of how one should be created? -Original Message- From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] Sent: Tuesday, October 20, 2009 1:53 PM To: users@wicket.apache.org Subject: Re: AjaxFallbackDefaultDataTable - modifying look dont use the Default version of the data table, create one yourself. -igor On Tue, Oct 20, 2009 at 10:48 AM, Jeffrey Schneller jeffrey.schnel...@envisa.com wrote: I am using the AjaxFallbackDefaultDataTable for displaying a data table on my page. I have everything working [displaying of data, sorting columns. Paging]. I know would like to change the look and feel of the data table. I would like to be able to change the navigation toolbar so that the paging links appear directly to the right of the showing 1 to 15 of X? The html file has the paging links defined as a text-align: right in the html and it can't be overwritten with css classes. This is great for narrow width tables but a table that scrolls horizontally the navigation is lost on the far right. It looks like the navigation toolbar is automatically added by the constructor of the AjaxFallbackDrfaultDataTable. Is there a way to use my own Navigation Toolbar or make the changes so I can control the layout of the navigation toolbar. Thanks. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: AjaxFallbackDefaultDataTable - modifying look
example of how to create an DataTable? you can use the AjaxFallbackDefaultDataTable as an example :) On Tue, Oct 20, 2009 at 4:00 PM, Jeffrey Schneller jeffrey.schnel...@envisa.com wrote: Fair enough. Is there an example of how one should be created? -Original Message- From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] Sent: Tuesday, October 20, 2009 1:53 PM To: users@wicket.apache.org Subject: Re: AjaxFallbackDefaultDataTable - modifying look dont use the Default version of the data table, create one yourself. -igor On Tue, Oct 20, 2009 at 10:48 AM, Jeffrey Schneller jeffrey.schnel...@envisa.com wrote: I am using the AjaxFallbackDefaultDataTable for displaying a data table on my page. I have everything working [displaying of data, sorting columns. Paging]. I know would like to change the look and feel of the data table. I would like to be able to change the navigation toolbar so that the paging links appear directly to the right of the showing 1 to 15 of X? The html file has the paging links defined as a text-align: right in the html and it can't be overwritten with css classes. This is great for narrow width tables but a table that scrolls horizontally the navigation is lost on the far right. It looks like the navigation toolbar is automatically added by the constructor of the AjaxFallbackDrfaultDataTable. Is there a way to use my own Navigation Toolbar or make the changes so I can control the layout of the navigation toolbar. Thanks. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Pedro Henrique Oliveira dos Santos
RE: AjaxFallbackDefaultDataTable - modifying look
Thanks. That worked perfectly. I now have my own AjaxFallbackCustomDataTable. Jeff -Original Message- From: Pedro Santos [mailto:pedros...@gmail.com] Sent: Tuesday, October 20, 2009 2:03 PM To: users@wicket.apache.org Subject: Re: AjaxFallbackDefaultDataTable - modifying look example of how to create an DataTable? you can use the AjaxFallbackDefaultDataTable as an example :) On Tue, Oct 20, 2009 at 4:00 PM, Jeffrey Schneller jeffrey.schnel...@envisa.com wrote: Fair enough. Is there an example of how one should be created? -Original Message- From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] Sent: Tuesday, October 20, 2009 1:53 PM To: users@wicket.apache.org Subject: Re: AjaxFallbackDefaultDataTable - modifying look dont use the Default version of the data table, create one yourself. -igor On Tue, Oct 20, 2009 at 10:48 AM, Jeffrey Schneller jeffrey.schnel...@envisa.com wrote: I am using the AjaxFallbackDefaultDataTable for displaying a data table on my page. I have everything working [displaying of data, sorting columns. Paging]. I know would like to change the look and feel of the data table. I would like to be able to change the navigation toolbar so that the paging links appear directly to the right of the showing 1 to 15 of X? The html file has the paging links defined as a text-align: right in the html and it can't be overwritten with css classes. This is great for narrow width tables but a table that scrolls horizontally the navigation is lost on the far right. It looks like the navigation toolbar is automatically added by the constructor of the AjaxFallbackDrfaultDataTable. Is there a way to use my own Navigation Toolbar or make the changes so I can control the layout of the navigation toolbar. Thanks. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Pedro Henrique Oliveira dos Santos - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Model property name different than wicket:id, is possible?
Hello. I have a (i hope) reusable panel. This panel has a textField, a hiddenField and a link that open up a modalWindow. Then you can select an item from a list in the modal window and the field and hidden field completes according to the selected value. I want the hidden field to be binded with a property of the model I am using in a form (using CompoundPropertyModel). I intend to use this panel in several forms in my application, the problem I have is that the field name of the model object is different on every form, and the wicket:id is the same (because it is the same hiddenField). How can I solve this? Is there a way of having a wicket:id with a different name than a model property name? Please ask for anything you need to help me, I don't know if I was clear on my problem. Thanks in advance! Manuel.
Re: Model property name different than wicket:id, is possible?
Ok, I have found a few things but still can't figure this out. Apparently the BoundCompoundPropertyModel is what i need, but it is deprecated. And I have read the javadoc but still can't figure out how to achieve having wicket:id on HTML different than the property name in the model. The javadoc mentions CompoundPropertyModel bind method, but can't figure out how to use it. Any help? Thanks! On Tue, Oct 20, 2009 at 3:57 PM, Manuel Corrales manuelcorra...@gmail.comwrote: Hello. I have a (i hope) reusable panel. This panel has a textField, a hiddenField and a link that open up a modalWindow. Then you can select an item from a list in the modal window and the field and hidden field completes according to the selected value. I want the hidden field to be binded with a property of the model I am using in a form (using CompoundPropertyModel). I intend to use this panel in several forms in my application, the problem I have is that the field name of the model object is different on every form, and the wicket:id is the same (because it is the same hiddenField). How can I solve this? Is there a way of having a wicket:id with a different name than a model property name? Please ask for anything you need to help me, I don't know if I was clear on my problem. Thanks in advance! Manuel.
Re: Model property name different than wicket:id, is possible?
the problem I have is that the field name of the model object is different on every form, and the wicket:id is the same you has: public class ObjectThatGoesToModel{ private Object propetyThatGoesToSomeForm; private Object propetyThatGoesToOtherFormInSomeSituations; } ?? I think you can use new PropertyModel(compondedPropertyModel, propetyThatGoesToSomeForm) or new PropertyModel(compondedPropertyModel, propetyThatGoesToOtherFormInSomeSituations) On Tue, Oct 20, 2009 at 4:57 PM, Manuel Corrales manuelcorra...@gmail.comwrote: Hello. I have a (i hope) reusable panel. This panel has a textField, a hiddenField and a link that open up a modalWindow. Then you can select an item from a list in the modal window and the field and hidden field completes according to the selected value. I want the hidden field to be binded with a property of the model I am using in a form (using CompoundPropertyModel). I intend to use this panel in several forms in my application, the problem I have is that the field name of the model object is different on every form, and the wicket:id is the same (because it is the same hiddenField). How can I solve this? Is there a way of having a wicket:id with a different name than a model property name? Please ask for anything you need to help me, I don't know if I was clear on my problem. Thanks in advance! Manuel. -- Pedro Henrique Oliveira dos Santos
Secured/Constraint IDataProvider and DropDownChoice choices
Hi *, I develop WebApplication where database records belong to different organizations. I use AjaxFallbackDefaultDataTable to present tabular data. User from some organization is allowed to see his organization data only. To reach this I implement custom IDataProvider for every table. Is there some way to have generic IDataProvider which constraints shown data rows. Pagination and sorting, filtering of data should work as well :) I have the same problem with DropDownChoice. There choices depend on logged in user/organization. I read Wicket Security Wasp/Swarm tutorials but haven't found this functionality there. You can have secure model but you can't restrict list of models. Or I'm wrong? Regards Roman - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
file download using ajaxLink
I do download in traditional way here is the code public void download(String filename, byte[] filedata){ setRedirect(false); WebResponse response = (WebResponse) getResponse(); response.setAttachmentHeader(filename); response.setLastModifiedTime(Time.now()); response.setContentType(application/octet-stream); response.write( new ByteArrayInputStream(filedata)); response.close(); } item.add(new LinkVoid(download){ { add(new Label(filename, eaAuditProgramAttachment.getFileName())); } @Override public void onClick() { ((BasePage)getPage()).download(eaAuditProgramAttachment.getFileName(), eaAuditProgramAttachment.getEaBlob().getBlobData()); } }); If I replace this link with AjaxLink it will not work and I must use an ajaxlinkplease tell me how can I use ajaxLink for download
Re: Secured/Constraint IDataProvider and DropDownChoice choices
every time for every component why not for every query? On Tue, Oct 20, 2009 at 6:23 PM, Roman Ilin roman.i...@gmail.com wrote: Sure I save my user in session. The problem is that I have to implement this filter functionality every time for every component. On Tue, Oct 20, 2009 at 10:18 PM, Pedro Santos pedros...@gmail.com wrote: you can put user on session, and use this information as an filter to queries than fill the lists on your application models... On Tue, Oct 20, 2009 at 6:14 PM, Roman Ilin roman.i...@gmail.com wrote: Hi *, I develop WebApplication where database records belong to different organizations. I use AjaxFallbackDefaultDataTable to present tabular data. User from some organization is allowed to see his organization data only. To reach this I implement custom IDataProvider for every table. Is there some way to have generic IDataProvider which constraints shown data rows. Pagination and sorting, filtering of data should work as well :) I have the same problem with DropDownChoice. There choices depend on logged in user/organization. I read Wicket Security Wasp/Swarm tutorials but haven't found this functionality there. You can have secure model but you can't restrict list of models. Or I'm wrong? Regards Roman - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Pedro Henrique Oliveira dos Santos - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Pedro Henrique Oliveira dos Santos
Re: Secured/Constraint IDataProvider and DropDownChoice choices
Sorry. I do it for every query but normally every component has its own query. On Tue, Oct 20, 2009 at 10:26 PM, Pedro Santos pedros...@gmail.com wrote: every time for every component why not for every query? On Tue, Oct 20, 2009 at 6:23 PM, Roman Ilin roman.i...@gmail.com wrote: Sure I save my user in session. The problem is that I have to implement this filter functionality every time for every component. On Tue, Oct 20, 2009 at 10:18 PM, Pedro Santos pedros...@gmail.com wrote: you can put user on session, and use this information as an filter to queries than fill the lists on your application models... On Tue, Oct 20, 2009 at 6:14 PM, Roman Ilin roman.i...@gmail.com wrote: Hi *, I develop WebApplication where database records belong to different organizations. I use AjaxFallbackDefaultDataTable to present tabular data. User from some organization is allowed to see his organization data only. To reach this I implement custom IDataProvider for every table. Is there some way to have generic IDataProvider which constraints shown data rows. Pagination and sorting, filtering of data should work as well :) I have the same problem with DropDownChoice. There choices depend on logged in user/organization. I read Wicket Security Wasp/Swarm tutorials but haven't found this functionality there. You can have secure model but you can't restrict list of models. Or I'm wrong? Regards Roman - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Pedro Henrique Oliveira dos Santos - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Pedro Henrique Oliveira dos Santos - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Secured/Constraint IDataProvider and DropDownChoice choices
I had application with components that override the isVisible method testing for return session.getUser().hasAccessFor(this) but the major access logic is implemented on data access layer On Tue, Oct 20, 2009 at 6:26 PM, Pedro Santos pedros...@gmail.com wrote: every time for every component why not for every query? On Tue, Oct 20, 2009 at 6:23 PM, Roman Ilin roman.i...@gmail.com wrote: Sure I save my user in session. The problem is that I have to implement this filter functionality every time for every component. On Tue, Oct 20, 2009 at 10:18 PM, Pedro Santos pedros...@gmail.com wrote: you can put user on session, and use this information as an filter to queries than fill the lists on your application models... On Tue, Oct 20, 2009 at 6:14 PM, Roman Ilin roman.i...@gmail.com wrote: Hi *, I develop WebApplication where database records belong to different organizations. I use AjaxFallbackDefaultDataTable to present tabular data. User from some organization is allowed to see his organization data only. To reach this I implement custom IDataProvider for every table. Is there some way to have generic IDataProvider which constraints shown data rows. Pagination and sorting, filtering of data should work as well :) I have the same problem with DropDownChoice. There choices depend on logged in user/organization. I read Wicket Security Wasp/Swarm tutorials but haven't found this functionality there. You can have secure model but you can't restrict list of models. Or I'm wrong? Regards Roman - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Pedro Henrique Oliveira dos Santos - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Pedro Henrique Oliveira dos Santos -- Pedro Henrique Oliveira dos Santos
Re: Secured/Constraint IDataProvider and DropDownChoice choices
My components should stay visible all time. But data should be filtered by customer currently logged in. On Tue, Oct 20, 2009 at 10:29 PM, Pedro Santos pedros...@gmail.com wrote: I had application with components that override the isVisible method testing for return session.getUser().hasAccessFor(this) but the major access logic is implemented on data access layer On Tue, Oct 20, 2009 at 6:26 PM, Pedro Santos pedros...@gmail.com wrote: every time for every component why not for every query? On Tue, Oct 20, 2009 at 6:23 PM, Roman Ilin roman.i...@gmail.com wrote: Sure I save my user in session. The problem is that I have to implement this filter functionality every time for every component. On Tue, Oct 20, 2009 at 10:18 PM, Pedro Santos pedros...@gmail.com wrote: you can put user on session, and use this information as an filter to queries than fill the lists on your application models... On Tue, Oct 20, 2009 at 6:14 PM, Roman Ilin roman.i...@gmail.com wrote: Hi *, I develop WebApplication where database records belong to different organizations. I use AjaxFallbackDefaultDataTable to present tabular data. User from some organization is allowed to see his organization data only. To reach this I implement custom IDataProvider for every table. Is there some way to have generic IDataProvider which constraints shown data rows. Pagination and sorting, filtering of data should work as well :) I have the same problem with DropDownChoice. There choices depend on logged in user/organization. I read Wicket Security Wasp/Swarm tutorials but haven't found this functionality there. You can have secure model but you can't restrict list of models. Or I'm wrong? Regards Roman - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Pedro Henrique Oliveira dos Santos - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Pedro Henrique Oliveira dos Santos -- Pedro Henrique Oliveira dos Santos - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Page instantiated twice
Hi there. I'm bringing to life this old thread to ask whether this issue was solved and how, because I'm experiencing something alike, which makes session messsages to get lost (consummed by the first instance of the page), and consecuently not shown by the second page instance. Thanks, Esteban Vinayak Borkar wrote: Martijn, Ok. I set the getStatelessHint() to return false. Now I get java.lang.IllegalStateException: No SessionHandler or SessionManager What is the reason that wicket needs to instantiate the page twice? I can understand the second instantiation, but my guess is that the first instantiation is not to render the HTML. If I am correct about my analysis above, is there some way I can know that the instantiation does not need to populate all the components? Thanks, Vinayak Martijn Dashorst wrote: Your page is stateless, which is a holy grail for most to attend. Be happy :) Since it is stateless, Wicket has to construct the page with each request, until it is no longer stateless. If you have a form, override its getstatelesshint method and return false. Martijn On Tue, Mar 31, 2009 at 8:36 AM, Vinayak Borkar vbo...@yahoo.com wrote: Jeremy, I did that. The first time it is at org.apache.wicket.request.target.component.BookmarkableListenerInterfaceRequestTarget.processEvents(BookmarkableListenerInterfaceRequestTarget.java:127) and the second time it is at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.processEvents(BookmarkablePageRequestTarget.java:223) Does that help? Thanks, Vinayak Jeremy Thomerson wrote: Run it in debug mode, put a breakpoint in your constructor and see what's instantiating each. A lot of times it is your own code (a bad link, etc). -- Jeremy Thomerson http://www.wickettraining.com On Tue, Mar 31, 2009 at 1:30 AM, Vinayak Borkar vbo...@yahoo.com wrote: Hello, I have a form that performs a search and shows a page with results. The result page also has the same form to do a repeat search. I noticed that the SearchPage is instantiated twice when I do a search from the form on the result page. Is there a way to make sure that does not happen? The search page ends up doing the search twice. Thanks, Vinayak - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/Page-instantiated-twice-tp22799162p25982806.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Too Many Files Wicket 1.4.1
Greetings all, Recently I have been performance testing a Wicket application (1.4.1) and I am running into the dreaded Too Many Files Open issue. I have searched the mailing lists and most of the trouble around this issue seems to come from being in DEVELOPMENT mode so I made sure we were in DEPLOYMENT mode. When I run 'lsof -p | grep wicket-1.4.1.jar' I see over 1000 entries and it's growing monotonically. This seems really unusual - why would wicket need 1000 copies of this jar open? An additional bit of weirdness came up when our load tests stopped loading the embedded assets (css, js and images) in each page - this seemed to cap the number of lsof entries at 5... This is even weirder because our app serves these static items from httpd without tomcat ever knowing about them. How could our loading of embedded items really affect the number of file handles wicket needs? For completeness we are running this app on Red Hat Enterprise Linx 5 with Tomcat 6.0.20 and Java 1.6 Adam
Re: Page instantiated twice
Have you followed the suggestions in this thread? First, put a breakpoint to see what's instantiating the page - the most likely suspect for an unintended additional instantiation is a bad link, something like: new PageLink(new MyPage()); --- shouldn't do that If it's Wicket code, what code is it? Why? It might be stateless as Martijn suggested. -- Jeremy Thomerson http://www.wickettraining.com On Tue, Oct 20, 2009 at 4:23 PM, Esteban Ignacio Masoero emaso...@getsense.com.ar wrote: Hi there. I'm bringing to life this old thread to ask whether this issue was solved and how, because I'm experiencing something alike, which makes session messsages to get lost (consummed by the first instance of the page), and consecuently not shown by the second page instance. Thanks, Esteban Vinayak Borkar wrote: Martijn, Ok. I set the getStatelessHint() to return false. Now I get java.lang.IllegalStateException: No SessionHandler or SessionManager What is the reason that wicket needs to instantiate the page twice? I can understand the second instantiation, but my guess is that the first instantiation is not to render the HTML. If I am correct about my analysis above, is there some way I can know that the instantiation does not need to populate all the components? Thanks, Vinayak Martijn Dashorst wrote: Your page is stateless, which is a holy grail for most to attend. Be happy :) Since it is stateless, Wicket has to construct the page with each request, until it is no longer stateless. If you have a form, override its getstatelesshint method and return false. Martijn On Tue, Mar 31, 2009 at 8:36 AM, Vinayak Borkar vbo...@yahoo.com wrote: Jeremy, I did that. The first time it is at org.apache.wicket.request.target.component.BookmarkableListenerInterfaceRequestTarget.processEvents(BookmarkableListenerInterfaceRequestTarget.java:127) and the second time it is at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.processEvents(BookmarkablePageRequestTarget.java:223) Does that help? Thanks, Vinayak Jeremy Thomerson wrote: Run it in debug mode, put a breakpoint in your constructor and see what's instantiating each. A lot of times it is your own code (a bad link, etc). -- Jeremy Thomerson http://www.wickettraining.com On Tue, Mar 31, 2009 at 1:30 AM, Vinayak Borkar vbo...@yahoo.com wrote: Hello, I have a form that performs a search and shows a page with results. The result page also has the same form to do a repeat search. I noticed that the SearchPage is instantiated twice when I do a search from the form on the result page. Is there a way to make sure that does not happen? The search page ends up doing the search twice. Thanks, Vinayak - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/Page-instantiated-twice-tp22799162p25982806.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Page instantiated twice
You can also check your html to make sure there aren't any urls that would get loaded by the browser. i.e. link, img, etc tags.. D/ On Oct 20, 2009, at 4:39 PM, Jeremy Thomerson wrote: Have you followed the suggestions in this thread? First, put a breakpoint to see what's instantiating the page - the most likely suspect for an unintended additional instantiation is a bad link, something like: new PageLink(new MyPage()); --- shouldn't do that If it's Wicket code, what code is it? Why? It might be stateless as Martijn suggested. -- Jeremy Thomerson http://www.wickettraining.com On Tue, Oct 20, 2009 at 4:23 PM, Esteban Ignacio Masoero emaso...@getsense.com.ar wrote: Hi there. I'm bringing to life this old thread to ask whether this issue was solved and how, because I'm experiencing something alike, which makes session messsages to get lost (consummed by the first instance of the page), and consecuently not shown by the second page instance. Thanks, Esteban Vinayak Borkar wrote: Martijn, Ok. I set the getStatelessHint() to return false. Now I get java.lang.IllegalStateException: No SessionHandler or SessionManager What is the reason that wicket needs to instantiate the page twice? I can understand the second instantiation, but my guess is that the first instantiation is not to render the HTML. If I am correct about my analysis above, is there some way I can know that the instantiation does not need to populate all the components? Thanks, Vinayak Martijn Dashorst wrote: Your page is stateless, which is a holy grail for most to attend. Be happy :) Since it is stateless, Wicket has to construct the page with each request, until it is no longer stateless. If you have a form, override its getstatelesshint method and return false. Martijn On Tue, Mar 31, 2009 at 8:36 AM, Vinayak Borkar vbo...@yahoo.com wrote: Jeremy, I did that. The first time it is at org.apache.wicket.request.target.component.BookmarkableListenerInterfaceRequestTarget.processEvents (BookmarkableListenerInterfaceRequestTarget.java:127) and the second time it is at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.processEvents (BookmarkablePageRequestTarget.java:223) Does that help? Thanks, Vinayak Jeremy Thomerson wrote: Run it in debug mode, put a breakpoint in your constructor and see what's instantiating each. A lot of times it is your own code (a bad link, etc). -- Jeremy Thomerson http://www.wickettraining.com On Tue, Mar 31, 2009 at 1:30 AM, Vinayak Borkar vbo...@yahoo.com wrote: Hello, I have a form that performs a search and shows a page with results. The result page also has the same form to do a repeat search. I noticed that the SearchPage is instantiated twice when I do a search from the form on the result page. Is there a way to make sure that does not happen? The search page ends up doing the search twice. Thanks, Vinayak - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/Page-instantiated-twice- tp22799162p25982806.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Audit Trail For Fatal Error
What is pagemape error analysis environment? Or if you are just saying that this is possible, what api calls would I be interested in? D/ On Oct 20, 2009, at 3:25 PM, Pedro Santos wrote: if you serialize the pagemap object to an file and attache it on your error report email? later you can set pagemape error analysis environment to reproduce the user steps, seems possible... On Tue, Oct 20, 2009 at 6:15 PM, Douglas Ferguson doug...@douglasferguson.us wrote: I have a feature on our error page where users can submit a bug if they get a fatal error. In some cases the stack trace is not of much value with out understanding what the user was doing. I looked into the session and the pagemap but at first glance i didn't see any way of unraveling any details that may be of help in understanding their previous actions, is there something there that's maybe not apparent to me? Douglas - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Pedro Henrique Oliveira dos Santos - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Too Many Files Wicket 1.4.1
Hi Adam, You may try to debug what is the problem with https://wiki.sdn.sap.com/wiki/display/Java/JPicus El mar, 20-10-2009 a las 15:39 -0600, Adam Bender escribió: Greetings all, Recently I have been performance testing a Wicket application (1.4.1) and I am running into the dreaded Too Many Files Open issue. I have searched the mailing lists and most of the trouble around this issue seems to come from being in DEVELOPMENT mode so I made sure we were in DEPLOYMENT mode. When I run 'lsof -p | grep wicket-1.4.1.jar' I see over 1000 entries and it's growing monotonically. This seems really unusual - why would wicket need 1000 copies of this jar open? An additional bit of weirdness came up when our load tests stopped loading the embedded assets (css, js and images) in each page - this seemed to cap the number of lsof entries at 5... This is even weirder because our app serves these static items from httpd without tomcat ever knowing about them. How could our loading of embedded items really affect the number of file handles wicket needs? For completeness we are running this app on Red Hat Enterprise Linx 5 with Tomcat 6.0.20 and Java 1.6 Adam - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Page instantiated twice
El mar, 20-10-2009 a las 15:04 -0700, Douglas Ferguson escribió: You can also check your html to make sure there aren't any urls that would get loaded by the browser. i.e. link, img, etc tags.. yeah, img src= ... / will make a second request to the page. quite nasty! fortunately there is a checker for these kind of problems in wicket-devutils project D/ On Oct 20, 2009, at 4:39 PM, Jeremy Thomerson wrote: Have you followed the suggestions in this thread? First, put a breakpoint to see what's instantiating the page - the most likely suspect for an unintended additional instantiation is a bad link, something like: new PageLink(new MyPage()); --- shouldn't do that If it's Wicket code, what code is it? Why? It might be stateless as Martijn suggested. -- Jeremy Thomerson http://www.wickettraining.com On Tue, Oct 20, 2009 at 4:23 PM, Esteban Ignacio Masoero emaso...@getsense.com.ar wrote: Hi there. I'm bringing to life this old thread to ask whether this issue was solved and how, because I'm experiencing something alike, which makes session messsages to get lost (consummed by the first instance of the page), and consecuently not shown by the second page instance. Thanks, Esteban Vinayak Borkar wrote: Martijn, Ok. I set the getStatelessHint() to return false. Now I get java.lang.IllegalStateException: No SessionHandler or SessionManager What is the reason that wicket needs to instantiate the page twice? I can understand the second instantiation, but my guess is that the first instantiation is not to render the HTML. If I am correct about my analysis above, is there some way I can know that the instantiation does not need to populate all the components? Thanks, Vinayak Martijn Dashorst wrote: Your page is stateless, which is a holy grail for most to attend. Be happy :) Since it is stateless, Wicket has to construct the page with each request, until it is no longer stateless. If you have a form, override its getstatelesshint method and return false. Martijn On Tue, Mar 31, 2009 at 8:36 AM, Vinayak Borkar vbo...@yahoo.com wrote: Jeremy, I did that. The first time it is at org.apache.wicket.request.target.component.BookmarkableListenerInterfaceRequestTarget.processEvents (BookmarkableListenerInterfaceRequestTarget.java:127) and the second time it is at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.processEvents (BookmarkablePageRequestTarget.java:223) Does that help? Thanks, Vinayak Jeremy Thomerson wrote: Run it in debug mode, put a breakpoint in your constructor and see what's instantiating each. A lot of times it is your own code (a bad link, etc). -- Jeremy Thomerson http://www.wickettraining.com On Tue, Mar 31, 2009 at 1:30 AM, Vinayak Borkar vbo...@yahoo.com wrote: Hello, I have a form that performs a search and shows a page with results. The result page also has the same form to do a repeat search. I noticed that the SearchPage is instantiated twice when I do a search from the form on the result page. Is there a way to make sure that does not happen? The search page ends up doing the search twice. Thanks, Vinayak - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/Page-instantiated-twice- tp22799162p25982806.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Too Many Files Wicket 1.4.1
Hi, we also had this issue, because (I think) we are running two different wicket application in only one glassfish domain. Our resolution was, that we are running now the glassfish domains with custom init scripts with ulimit settings. Maybe this will help for you. Best Regards, Peter 2009-10-21 00:14 keltezéssel, Martin Grigorov írta: Hi Adam, You may try to debug what is the problem with https://wiki.sdn.sap.com/wiki/display/Java/JPicus El mar, 20-10-2009 a las 15:39 -0600, Adam Bender escribió: Greetings all, Recently I have been performance testing a Wicket application (1.4.1) and I am running into the dreaded Too Many Files Open issue. I have searched the mailing lists and most of the trouble around this issue seems to come from being in DEVELOPMENT mode so I made sure we were in DEPLOYMENT mode. When I run 'lsof -p | grep wicket-1.4.1.jar' I see over 1000 entries and it's growing monotonically. This seems really unusual - why would wicket need 1000 copies of this jar open? An additional bit of weirdness came up when our load tests stopped loading the embedded assets (css, js and images) in each page - this seemed to cap the number of lsof entries at 5... This is even weirder because our app serves these static items from httpd without tomcat ever knowing about them. How could our loading of embedded items really affect the number of file handles wicket needs? For completeness we are running this app on Red Hat Enterprise Linx 5 with Tomcat 6.0.20 and Java 1.6 Adam - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Too Many Files Wicket 1.4.1
deployment mode just sets a default settings profile, if you manually call getresourcesettings().setresourcepollfrequency() in your code you can still reenable the resource watcher. -igor On Tue, Oct 20, 2009 at 2:39 PM, Adam Bender a...@magpieti.com wrote: Greetings all, Recently I have been performance testing a Wicket application (1.4.1) and I am running into the dreaded Too Many Files Open issue. I have searched the mailing lists and most of the trouble around this issue seems to come from being in DEVELOPMENT mode so I made sure we were in DEPLOYMENT mode. When I run 'lsof -p | grep wicket-1.4.1.jar' I see over 1000 entries and it's growing monotonically. This seems really unusual - why would wicket need 1000 copies of this jar open? An additional bit of weirdness came up when our load tests stopped loading the embedded assets (css, js and images) in each page - this seemed to cap the number of lsof entries at 5... This is even weirder because our app serves these static items from httpd without tomcat ever knowing about them. How could our loading of embedded items really affect the number of file handles wicket needs? For completeness we are running this app on Red Hat Enterprise Linx 5 with Tomcat 6.0.20 and Java 1.6 Adam - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Too Many Files Wicket 1.4.1
I apologize for my ignorance but Im not sure I understand what re- enabling the resource watcher would accomplish in this case... Adam On Oct 20, 2009, at 4:51 PM, Igor Vaynberg wrote: deployment mode just sets a default settings profile, if you manually call getresourcesettings().setresourcepollfrequency() in your code you can still reenable the resource watcher. -igor On Tue, Oct 20, 2009 at 2:39 PM, Adam Bender a...@magpieti.com wrote: Greetings all, Recently I have been performance testing a Wicket application (1.4.1) and I am running into the dreaded Too Many Files Open issue. I have searched the mailing lists and most of the trouble around this issue seems to come from being in DEVELOPMENT mode so I made sure we were in DEPLOYMENT mode. When I run 'lsof -p | grep wicket-1.4.1.jar' I see over 1000 entries and it's growing monotonically. This seems really unusual - why would wicket need 1000 copies of this jar open? An additional bit of weirdness came up when our load tests stopped loading the embedded assets (css, js and images) in each page - this seemed to cap the number of lsof entries at 5... This is even weirder because our app serves these static items from httpd without tomcat ever knowing about them. How could our loading of embedded items really affect the number of file handles wicket needs? For completeness we are running this app on Red Hat Enterprise Linx 5 with Tomcat 6.0.20 and Java 1.6 Adam - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Too Many Files Wicket 1.4.1
Martin, I tried to run this tool but it doesn't appear to support connecting to a remote Java process which is a requirement for our environment... thanks for the tip though! Adam On Oct 20, 2009, at 4:14 PM, Martin Grigorov wrote: Hi Adam, You may try to debug what is the problem with https://wiki.sdn.sap.com/wiki/display/Java/JPicus El mar, 20-10-2009 a las 15:39 -0600, Adam Bender escribió: Greetings all, Recently I have been performance testing a Wicket application (1.4.1) and I am running into the dreaded Too Many Files Open issue. I have searched the mailing lists and most of the trouble around this issue seems to come from being in DEVELOPMENT mode so I made sure we were in DEPLOYMENT mode. When I run 'lsof -p | grep wicket-1.4.1.jar' I see over 1000 entries and it's growing monotonically. This seems really unusual - why would wicket need 1000 copies of this jar open? An additional bit of weirdness came up when our load tests stopped loading the embedded assets (css, js and images) in each page - this seemed to cap the number of lsof entries at 5... This is even weirder because our app serves these static items from httpd without tomcat ever knowing about them. How could our loading of embedded items really affect the number of file handles wicket needs? For completeness we are running this app on Red Hat Enterprise Linx 5 with Tomcat 6.0.20 and Java 1.6 Adam - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Too Many Files Wicket 1.4.1
resolution - solution... Just set the ulimit in the initscript and run it with start-stop-daemon, it will make the problem disappear (but still there would be many open files...) Peter 2009-10-21 00:38 keltezéssel, Major Péter írta: Hi, we also had this issue, because (I think) we are running two different wicket application in only one glassfish domain. Our resolution was, that we are running now the glassfish domains with custom init scripts with ulimit settings. Maybe this will help for you. Best Regards, Peter 2009-10-21 00:14 keltezéssel, Martin Grigorov írta: Hi Adam, You may try to debug what is the problem with https://wiki.sdn.sap.com/wiki/display/Java/JPicus El mar, 20-10-2009 a las 15:39 -0600, Adam Bender escribió: Greetings all, Recently I have been performance testing a Wicket application (1.4.1) and I am running into the dreaded Too Many Files Open issue. I have searched the mailing lists and most of the trouble around this issue seems to come from being in DEVELOPMENT mode so I made sure we were in DEPLOYMENT mode. When I run 'lsof -p | grep wicket-1.4.1.jar' I see over 1000 entries and it's growing monotonically. This seems really unusual - why would wicket need 1000 copies of this jar open? An additional bit of weirdness came up when our load tests stopped loading the embedded assets (css, js and images) in each page - this seemed to cap the number of lsof entries at 5... This is even weirder because our app serves these static items from httpd without tomcat ever knowing about them. How could our loading of embedded items really affect the number of file handles wicket needs? For completeness we are running this app on Red Hat Enterprise Linx 5 with Tomcat 6.0.20 and Java 1.6 Adam - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Too Many Files Wicket 1.4.1
We have run with a limit as high as 10,000 files and our tests can bring it to the limit in 20 minutes, but that still doesn't explain why so many copies of the jar are needed - and only when we are also requesting embedded assets... On Oct 20, 2009, at 5:04 PM, Major Péter wrote: resolution - solution... Just set the ulimit in the initscript and run it with start-stop- daemon, it will make the problem disappear (but still there would be many open files...) Peter 2009-10-21 00:38 keltezéssel, Major Péter írta: Hi, we also had this issue, because (I think) we are running two different wicket application in only one glassfish domain. Our resolution was, that we are running now the glassfish domains with custom init scripts with ulimit settings. Maybe this will help for you. Best Regards, Peter 2009-10-21 00:14 keltezéssel, Martin Grigorov írta: Hi Adam, You may try to debug what is the problem with https://wiki.sdn.sap.com/wiki/display/Java/JPicus El mar, 20-10-2009 a las 15:39 -0600, Adam Bender escribió: Greetings all, Recently I have been performance testing a Wicket application (1.4.1) and I am running into the dreaded Too Many Files Open issue. I have searched the mailing lists and most of the trouble around this issue seems to come from being in DEVELOPMENT mode so I made sure we were in DEPLOYMENT mode. When I run 'lsof -p | grep wicket-1.4.1.jar' I see over 1000 entries and it's growing monotonically. This seems really unusual - why would wicket need 1000 copies of this jar open? An additional bit of weirdness came up when our load tests stopped loading the embedded assets (css, js and images) in each page - this seemed to cap the number of lsof entries at 5... This is even weirder because our app serves these static items from httpd without tomcat ever knowing about them. How could our loading of embedded items really affect the number of file handles wicket needs? For completeness we are running this app on Red Hat Enterprise Linx 5 with Tomcat 6.0.20 and Java 1.6 Adam - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
OT: choose a directory where users upload images
Hi all,I am deploying an app in production and I have to create a directory where users upload images and text files in the server. They only are allowed to access this files to a wicket front page. Should I have any consideration about wicket arquitecture or tomcat architecture? Should I create a variable enviroment for accessing to this directory? Which would be the best approach? thanks in advance -- Fernando Wermus. www.linkedin.com/in/fernandowermus
Re: Page instantiated twice
First of all, thanks to all of you for your help. I haven't solved the problem, but I'm getting closer to it. (something like: new PageLink(new MyPage()); = I checked it and I'm not doing that. ) Here's what I've found out: After debugging a lot, I find out that TWO REQUESTS are made. The first one as a consecuence of the user asking for that page, and the second one because in that page the following script is added at the end of head tag: script type=text/javascript !--/*--![CDATA[/*!--*/ if (window.name=='' || (window.name.indexOf('wicket') -1 window.name!='wicket-wicket:default')) { window.location=?wicket:bookmarkablePage=wicket-6:ar.com.getsense.latamvalley.pages.LoginPage + (window.location.hash != null ? window.location.hash : ); } /*--]]*//script Can anyone tell me why is Wicket doing that? or what am I doing wrong? ||| Here's the complete detailed description about what I am doing: A UserStatusPanel that is always shown does *new Link(register)* with: @Override public void onClick() { throw new RestartResponseAtInterceptPageException(UserRegistrationPage.class); } When the user gets to the page, submmits its registration data and the page sends an email with a link like: http://localhost:8080/ua?ua=2baab43f784b5b530b5347a50490bb0a In my webApp, I've done: this.mount(new QueryStringUrlCodingStrategy(/ua, UserActivationPage.class)); When the user goes to the previous mentioned link by a new tab, the following happens: ___ GET /ua?ua=2e129db15b6d6db5342ba5d328642262 HTTP/1.1 Host: localhost:8080 Connection: keep-alive Cookie: JSESSIONID=78ehtk0o3y0w ___ === IN org.apache.wicket.RequestCycle.processEventsAndRespond() === --processor.processEvents(this); UserActivationPage is constructed, and the page activates the user UserActivationPage does: setResponsePage(LoginPage.class); --processor.respond(this); LoginPage is constructed (messages exists in session and are properly rendered to somewhere) === [I can see in firebug that the correct response reaches the browser!] Strangely, In the page, wicket adds: script type=text/javascript !--/*--![CDATA[/*!--*/ if (window.name=='' || (window.name.indexOf('wicket') -1 window.name!='wicket-wicket:default')) { window.location=?wicket:bookmarkablePage=wicket-6:ar.com.getsense.latamvalley.pages.LoginPage + (window.location.hash != null ? window.location.hash : ); } /*--]]*//script [So a new request is made!] ___ GET /ua?wicket:bookmarkablePage=wicket-6:ar.com.getsense.latamvalley.pages.LoginPage HTTP/1.1 Host: localhost:8080 ... Connection: keep-alive Referer: http://localhost:8080/ua?ua=2e129db15b6d6db5342ba5d328642262 Cookie: JSESSIONID=78ehtk0o3y0w === IN org.apache.wicket.RequestCycle.processEventsAndRespond() === --processor.processEvents(this); LoginPage is constructed (not UserActivationPage like it did before) (this time, messages from the session are gonne) --processor.respond(this); finally this page is shown without my messages :( === Thanks in advance, Esteban Martin Grigorov escribió: El mar, 20-10-2009 a las 15:04 -0700, Douglas Ferguson escribió: You can also check your html to make sure there aren't any urls that would get loaded by the browser. i.e. link, img, etc tags.. yeah, img src= ... / will make a second request to the page. quite nasty! fortunately there is a checker for these kind of problems in wicket-devutils project D/ On Oct 20, 2009, at 4:39 PM, Jeremy Thomerson wrote: Have you followed the suggestions in this thread? First, put a breakpoint to see what's instantiating the page - the most likely suspect for an unintended additional instantiation is a bad link, something like: new PageLink(new MyPage()); --- shouldn't do that If it's Wicket code, what code is it? Why? It might be stateless as Martijn suggested. -- Jeremy Thomerson http://www.wickettraining.com On Tue, Oct 20, 2009 at 4:23 PM, Esteban Ignacio Masoero emaso...@getsense.com.ar wrote: Hi there. I'm bringing to life this old thread to ask whether this issue was solved and how, because I'm experiencing something alike, which makes session messsages to get lost (consummed by the first instance of the
Re: Too Many Files Wicket 1.4.1
when you are requesting an embedded resource wicket needs to stream the file out of a jar, the way the jvm handles that is by creating a jar url connection object that streams the file. unfortunately, there is a bug in the jdk where the url connection does not have a close method and so wicket or any other java app cannot release the connection. this is addressed, afair, in jdk 7. i have many apps deployed in production and have not managed yet to run out of the handles with the limit set about 4K. not sure why this is different in your case. you mentioned tests, are those unit tests and is wicket there running in deployment mode? the resource watcher, which should be disabled, will cause the handles to run out because it continuously monitors markup files for changes (hot reloading in dev mode) and everytime it checks a markup file in a jar it creates the url connection and leaks it. by default it is disabled in deployment mode but if you manually set the poll frequency in your settings it will be reenabled. -igor On Tue, Oct 20, 2009 at 4:07 PM, Adam Bender a...@magpieti.com wrote: We have run with a limit as high as 10,000 files and our tests can bring it to the limit in 20 minutes, but that still doesn't explain why so many copies of the jar are needed - and only when we are also requesting embedded assets... On Oct 20, 2009, at 5:04 PM, Major Péter wrote: resolution - solution... Just set the ulimit in the initscript and run it with start-stop-daemon, it will make the problem disappear (but still there would be many open files...) Peter 2009-10-21 00:38 keltezéssel, Major Péter írta: Hi, we also had this issue, because (I think) we are running two different wicket application in only one glassfish domain. Our resolution was, that we are running now the glassfish domains with custom init scripts with ulimit settings. Maybe this will help for you. Best Regards, Peter 2009-10-21 00:14 keltezéssel, Martin Grigorov írta: Hi Adam, You may try to debug what is the problem with https://wiki.sdn.sap.com/wiki/display/Java/JPicus El mar, 20-10-2009 a las 15:39 -0600, Adam Bender escribió: Greetings all, Recently I have been performance testing a Wicket application (1.4.1) and I am running into the dreaded Too Many Files Open issue. I have searched the mailing lists and most of the trouble around this issue seems to come from being in DEVELOPMENT mode so I made sure we were in DEPLOYMENT mode. When I run 'lsof -p | grep wicket-1.4.1.jar' I see over 1000 entries and it's growing monotonically. This seems really unusual - why would wicket need 1000 copies of this jar open? An additional bit of weirdness came up when our load tests stopped loading the embedded assets (css, js and images) in each page - this seemed to cap the number of lsof entries at 5... This is even weirder because our app serves these static items from httpd without tomcat ever knowing about them. How could our loading of embedded items really affect the number of file handles wicket needs? For completeness we are running this app on Red Hat Enterprise Linx 5 with Tomcat 6.0.20 and Java 1.6 Adam - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Page instantiated twice
are you opening the page in a new tab? this script is part of wicket auto-multi-window support, it detects if the page has been opened in a new tab and redirects to a url that will point to the same page but in a new pagemap. -igor On Tue, Oct 20, 2009 at 4:23 PM, Esteban Masoero emaso...@getsense.com.ar wrote: First of all, thanks to all of you for your help. I haven't solved the problem, but I'm getting closer to it. (something like: new PageLink(new MyPage()); = I checked it and I'm not doing that. ) Here's what I've found out: After debugging a lot, I find out that TWO REQUESTS are made. The first one as a consecuence of the user asking for that page, and the second one because in that page the following script is added at the end of head tag: script type=text/javascript !--/*--![CDATA[/*!--*/ if (window.name=='' || (window.name.indexOf('wicket') -1 window.name!='wicket-wicket:default')) { window.location=?wicket:bookmarkablePage=wicket-6:ar.com.getsense.latamvalley.pages.LoginPage + (window.location.hash != null ? window.location.hash : ); } /*--]]*//script Can anyone tell me why is Wicket doing that? or what am I doing wrong? ||| Here's the complete detailed description about what I am doing: A UserStatusPanel that is always shown does *new Link(register)* with: �...@override public void onClick() { throw new RestartResponseAtInterceptPageException(UserRegistrationPage.class); } When the user gets to the page, submmits its registration data and the page sends an email with a link like: http://localhost:8080/ua?ua=2baab43f784b5b530b5347a50490bb0a In my webApp, I've done: this.mount(new QueryStringUrlCodingStrategy(/ua, UserActivationPage.class)); When the user goes to the previous mentioned link by a new tab, the following happens: ___ GET /ua?ua=2e129db15b6d6db5342ba5d328642262 HTTP/1.1 Host: localhost:8080 Connection: keep-alive Cookie: JSESSIONID=78ehtk0o3y0w ___ === IN org.apache.wicket.RequestCycle.processEventsAndRespond() === --processor.processEvents(this); UserActivationPage is constructed, and the page activates the user UserActivationPage does: setResponsePage(LoginPage.class); --processor.respond(this); LoginPage is constructed (messages exists in session and are properly rendered to somewhere) === [I can see in firebug that the correct response reaches the browser!] Strangely, In the page, wicket adds: script type=text/javascript !--/*--![CDATA[/*!--*/ if (window.name=='' || (window.name.indexOf('wicket') -1 window.name!='wicket-wicket:default')) { window.location=?wicket:bookmarkablePage=wicket-6:ar.com.getsense.latamvalley.pages.LoginPage + (window.location.hash != null ? window.location.hash : ); } /*--]]*//script [So a new request is made!] ___ GET /ua?wicket:bookmarkablePage=wicket-6:ar.com.getsense.latamvalley.pages.LoginPage HTTP/1.1 Host: localhost:8080 ... Connection: keep-alive Referer: http://localhost:8080/ua?ua=2e129db15b6d6db5342ba5d328642262 Cookie: JSESSIONID=78ehtk0o3y0w === IN org.apache.wicket.RequestCycle.processEventsAndRespond() === --processor.processEvents(this); LoginPage is constructed (not UserActivationPage like it did before) (this time, messages from the session are gonne) --processor.respond(this); finally this page is shown without my messages :( === Thanks in advance, Esteban Martin Grigorov escribió: El mar, 20-10-2009 a las 15:04 -0700, Douglas Ferguson escribió: You can also check your html to make sure there aren't any urls that would get loaded by the browser. i.e. link, img, etc tags.. yeah, img src= ... / will make a second request to the page. quite nasty! fortunately there is a checker for these kind of problems in wicket-devutils project D/ On Oct 20, 2009, at 4:39 PM, Jeremy Thomerson wrote: Have you followed the suggestions in this thread? First, put a breakpoint to see what's instantiating the page - the most likely suspect for an unintended additional instantiation is a bad link, something like: new PageLink(new MyPage()); --- shouldn't do that If it's Wicket code, what code is it? Why? It might be stateless as Martijn suggested. -- Jeremy Thomerson http://www.wickettraining.com On Tue, Oct 20, 2009 at 4:23 PM, Esteban
Re: Too Many Files Wicket 1.4.1
Thanks for the explanation I think that helps shed some light... The tests are actually JMeter tests driving load by emulating a web browser - the application the are testing is running in Deployment mode set up as though it were a production server. After a little more digging I have been able to determine that is only a problem on pages which use Ajax - and it looks like there is a related debug message coming from an exception handler regarding the wicket-event.js file not being accessible (URI is not hierarchical). This would actually explain why the problem only manifests when the JMeter tests are set to request embedded assets as wicket ajax pages embed requests for additional pieces of javascript - which in the case of wicket-event.js are causing exceptions to be thrown and the JVM bug you mentioned is probably preventing these resources from being cleaned up properly. Does that sound right? Adam On Oct 20, 2009, at 8:41 PM, Igor Vaynberg wrote: when you are requesting an embedded resource wicket needs to stream the file out of a jar, the way the jvm handles that is by creating a jar url connection object that streams the file. unfortunately, there is a bug in the jdk where the url connection does not have a close method and so wicket or any other java app cannot release the connection. this is addressed, afair, in jdk 7. i have many apps deployed in production and have not managed yet to run out of the handles with the limit set about 4K. not sure why this is different in your case. you mentioned tests, are those unit tests and is wicket there running in deployment mode? the resource watcher, which should be disabled, will cause the handles to run out because it continuously monitors markup files for changes (hot reloading in dev mode) and everytime it checks a markup file in a jar it creates the url connection and leaks it. by default it is disabled in deployment mode but if you manually set the poll frequency in your settings it will be reenabled. -igor On Tue, Oct 20, 2009 at 4:07 PM, Adam Bender a...@magpieti.com wrote: We have run with a limit as high as 10,000 files and our tests can bring it to the limit in 20 minutes, but that still doesn't explain why so many copies of the jar are needed - and only when we are also requesting embedded assets... On Oct 20, 2009, at 5:04 PM, Major Péter wrote: resolution - solution... Just set the ulimit in the initscript and run it with start-stop- daemon, it will make the problem disappear (but still there would be many open files...) Peter 2009-10-21 00:38 keltezéssel, Major Péter írta: Hi, we also had this issue, because (I think) we are running two different wicket application in only one glassfish domain. Our resolution was, that we are running now the glassfish domains with custom init scripts with ulimit settings. Maybe this will help for you. Best Regards, Peter 2009-10-21 00:14 keltezéssel, Martin Grigorov írta: Hi Adam, You may try to debug what is the problem with https://wiki.sdn.sap.com/wiki/display/Java/JPicus El mar, 20-10-2009 a las 15:39 -0600, Adam Bender escribió: Greetings all, Recently I have been performance testing a Wicket application (1.4.1) and I am running into the dreaded Too Many Files Open issue. I have searched the mailing lists and most of the trouble around this issue seems to come from being in DEVELOPMENT mode so I made sure we were in DEPLOYMENT mode. When I run 'lsof -p | grep wicket-1.4.1.jar' I see over 1000 entries and it's growing monotonically. This seems really unusual - why would wicket need 1000 copies of this jar open? An additional bit of weirdness came up when our load tests stopped loading the embedded assets (css, js and images) in each page - this seemed to cap the number of lsof entries at 5... This is even weirder because our app serves these static items from httpd without tomcat ever knowing about them. How could our loading of embedded items really affect the number of file handles wicket needs? For completeness we are running this app on Red Hat Enterprise Linx 5 with Tomcat 6.0.20 and Java 1.6 Adam - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org