[Wicket-user] Re: Problem loading DatePicker inside Panel through AjaxLink
Oh, one mistake in the code I sent.- The id for newUserLink I'm using is newUser; Everything works: AjaxLink replacing the div, the panel, submit, etc. Only the datePicker JS isn't working!Regards,On 5/4/06, Bruno Borges [EMAIL PROTECTED] wrote: I'm trying to load a Form Panel's child, and this panel is been loaded through an AjaxLink.The DatePicker icon doesn't work. The calendar doesn't shows up. Is there any incompatibility between loading panels with Ajax and DatePicker within? My code looks like this:class Index extends WebPage {constructor {final Label welcome = new Label(bodyPanel, Welcome); add(welcome);AjaxLink goHome = new AjaxLink(home) {... {getPage().replace(welcome); target.addComponent(welcome);}};AjaxLink newUserLink = AjaxLink(home) { ... {UserFormPanel panel = new UserFormPanel(bodyPanel); getPage().replace(panel); target.addComponent(panel); } };add(newUserLink);add(goHome);}} class UserFormPanel extends Panel {constructor {add(new UserForm(userForm)); }}class UserForm extends Form { constructor {... // other basic fields like 'username', 'email', 'password'// Date field fieldBirthday RequiredTextField fieldBirthday = new RequiredTextField(birthday, Date.class);fieldBirthday .add(DateValidator.maximum(Calendar.getInstance().getTime()));add(fieldBirthday);// DatePicker for fieldBirthday DatePickerSettings settings = new DatePickerSettings();settings.setIfFormat(%d/%m/%Y);settings.setWeekNumbers(false);DatePicker datePicker = new DatePicker(datePicker, fieldBirthday , settings); add(datePicker);}}I can say for sure: the datepicker component was working perfectly before opening the panel through AjaxLink (actually, UserFormPanel was UserFormPage before this). Am I missing something here?Regards,-- Bruno Borges [EMAIL PROTECTED]Sun Certified Java Programmer for 1.4Sun Certified Web Component Developer for 1.4 -- Bruno Borges[EMAIL PROTECTED]Sun Certified Java Programmer for 1.4Sun Certified Web Component Developer for 1.4
[Wicket-user] Problem loading DatePicker inside Panel through AjaxLink
I'm trying to load a Form Panel's child, and this panel is been loaded through an AjaxLink.The DatePicker icon doesn't work. The calendar doesn't shows up. Is there any incompatibility between loading panels with Ajax and DatePicker within? My code looks like this:class Index extends WebPage {constructor {final Label welcome = new Label(bodyPanel, Welcome); add(welcome);AjaxLink goHome = new AjaxLink(home) {... {getPage().replace(welcome); target.addComponent(welcome);}};AjaxLink newUserLink = AjaxLink(home) { ... {UserFormPanel panel = new UserFormPanel(bodyPanel); getPage().replace(panel); target.addComponent(panel); } };add(newUserLink);add(goHome);}} class UserFormPanel extends Panel {constructor {add(new UserForm(userForm)); }}class UserForm extends Form { constructor {... // other basic fields like 'username', 'email', 'password'// Date field fieldBirthday RequiredTextField fieldBirthday = new RequiredTextField(birthday, Date.class);fieldBirthday .add(DateValidator.maximum(Calendar.getInstance().getTime()));add(fieldBirthday);// DatePicker for fieldBirthday DatePickerSettings settings = new DatePickerSettings();settings.setIfFormat(%d/%m/%Y);settings.setWeekNumbers(false);DatePicker datePicker = new DatePicker(datePicker, fieldBirthday , settings); add(datePicker);}}I can say for sure: the datepicker component was working perfectly before opening the panel through AjaxLink (actually, UserFormPanel was UserFormPage before this). Am I missing something here?Regards,-- Bruno Borges[EMAIL PROTECTED]Sun Certified Java Programmer for 1.4Sun Certified Web Component Developer for 1.4
Re: [Wicket-user] Re: Problem loading DatePicker inside Panel through AjaxLink
yes, there is a problem indeed with components that need head contribution and are added via ajax. the problem is that when the component is added via ajax its header contribution is ingored because the head section is not updated. so in case of the datepicker the js it needs is never added to the page. im not really sure what the good solution for this is. maybe we can update the head, but do browsers take that into account? will a script tag added to head via outerhtml replacement be processed by the browser? can you even use outer/innerHtml on elements in the head region of the page? any thoughts/ideas are welcome.-igorOn 5/3/06, Bruno Borges [EMAIL PROTECTED] wrote:Oh, one mistake in the code I sent.- The id for newUserLink I'm using is newUser; Everything works: AjaxLink replacing the div, the panel, submit, etc. Only the datePicker JS isn't working!Regards, On 5/4/06, Bruno Borges [EMAIL PROTECTED] wrote: I'm trying to load a Form Panel's child, and this panel is been loaded through an AjaxLink.The DatePicker icon doesn't work. The calendar doesn't shows up. Is there any incompatibility between loading panels with Ajax and DatePicker within? My code looks like this:class Index extends WebPage {constructor {final Label welcome = new Label(bodyPanel, Welcome); add(welcome);AjaxLink goHome = new AjaxLink(home) {... {getPage().replace(welcome); target.addComponent(welcome);}};AjaxLink newUserLink = AjaxLink(home) { ... {UserFormPanel panel = new UserFormPanel(bodyPanel); getPage().replace(panel); target.addComponent(panel); } };add(newUserLink);add(goHome);}} class UserFormPanel extends Panel {constructor {add(new UserForm(userForm)); }}class UserForm extends Form { constructor {... // other basic fields like 'username', 'email', 'password'// Date field fieldBirthday RequiredTextField fieldBirthday = new RequiredTextField(birthday, Date.class);fieldBirthday .add(DateValidator.maximum(Calendar.getInstance().getTime()));add(fieldBirthday);// DatePicker for fieldBirthday DatePickerSettings settings = new DatePickerSettings();settings.setIfFormat(%d/%m/%Y);settings.setWeekNumbers(false);DatePicker datePicker = new DatePicker(datePicker, fieldBirthday , settings); add(datePicker);}}I can say for sure: the datepicker component was working perfectly before opening the panel through AjaxLink (actually, UserFormPanel was UserFormPage before this). Am I missing something here?Regards,-- Bruno Borges [EMAIL PROTECTED]Sun Certified Java Programmer for 1.4Sun Certified Web Component Developer for 1.4 -- Bruno Borges[EMAIL PROTECTED] Sun Certified Java Programmer for 1.4Sun Certified Web Component Developer for 1.4
[Wicket-user] dynamic html controls
Hi I have no experience with Wicket, but from what I read about it I don't understand where does the dynamic content part come in? If I have a pair of html file and a java file how do I conditionally show/hide html form controls like I do in JSP? For example, I have a JSP page that constructs my form text fields (and labels) from a result of a select from the database? Is that possible to achieve with Wicket? Thanks Rivka
Re: [Wicket-user] dynamic html controls
You can do what is outlined here: http://wicket-wiki.org.uk/wiki/index.php/Create_dynamic_markup_hierarchies_using_panels Or - like the article says, add all visible components and use the isVisible property (or override the method) for turning them on or off. Or use Fragments, which work like panels, but have their markup definded in the same markup (HTML) file. Eelco On 5/4/06, Rivka Shisman [EMAIL PROTECTED] wrote: Hi I have no experience with Wicket, but from what I read about it I don't understand where does the dynamic content part come in? If I have a pair of html file and a java file – how do I conditionally show/hide html form controls like I do in JSP? For example, I have a JSP page that constructs my form text fields (and labels) from a result of a select from the database? Is that possible to achieve with Wicket? Thanks Rivka --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid0709bid3057dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
RE: [Wicket-user] dynamic html controls
Hi Eelco, Do you mean that I should create a panel with a link to my own servlet that shows the dynamic content? Thanks Rivka -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Eelco Hillenius Sent: Thursday, May 04, 2006 10:21 AM To: wicket-user@lists.sourceforge.net Subject: Re: [Wicket-user] dynamic html controls You can do what is outlined here: http://wicket-wiki.org.uk/wiki/index.php/Create_dynamic_markup_hierarchi es_using_panels Or - like the article says, add all visible components and use the isVisible property (or override the method) for turning them on or off. Or use Fragments, which work like panels, but have their markup definded in the same markup (HTML) file. Eelco On 5/4/06, Rivka Shisman [EMAIL PROTECTED] wrote: Hi I have no experience with Wicket, but from what I read about it I don't understand where does the dynamic content part come in? If I have a pair of html file and a java file - how do I conditionally show/hide html form controls like I do in JSP? For example, I have a JSP page that constructs my form text fields (and labels) from a result of a select from the database? Is that possible to achieve with Wicket? Thanks Rivka --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid0709bid3057dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid0709bid3057dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] Localization
Hi, just tried the wicket localization features and got some questions: - usually i have in the html things like this: h1wicket:message key=xxxheadline/wicket:message/h1 Is there a way that lets me write these like this: h1 wicket:message=xxxheadline/h1 Which seems much more convenient... - Is there an easy markup only way to get messages in attribute tags? For example, input type=submit value=Do something/ - My application is grouped in modules and I want to have one property file per module. From what I've seen it should be easy to implement a custom StringResourceLoader which just looks for a specified property file in the package and it's parent packages. Maybe this is something which might come bundled with Wicket (I couldn't find anything) because it helps a lot if you have a company translating things for you and you can hand over 1 property file instead of 20 (one for each page)? Something not localization related: - In my application I need to open a transaction for every request that's for a page (not for resources) and commit it (if sucessful) or rollback it (in case of an runtime exception). I also want to use Wicket's exception handling mechanism, that's why I won't use a servlet filter. I currently implemented this by using my own RequestCycleProcessor, which seems fine. But I needed to deactivate wicket's exception handling (so the exception bubbles up to the respond method and I can rollback) and dispatch into wicket's exception handling again. Is there a better way to achieve this? Regards, Ralf --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid0709bid3057dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Localization
On 5/4/06, Ralf Ebert [EMAIL PROTECTED] wrote: Hi, just tried the wicket localization features and got some questions: - usually i have in the html things like this: h1wicket:message key=xxxheadline/wicket:message/h1 Is there a way that lets me write these like this: h1 wicket:message=xxxheadline/h1 Which seems much more convenient... please see WicketMessageTagHandler.java. It is experimental only and disabled by default. Reason: it is realy ugly to have something like wicket:example=tag=key. AttributeModifier are much more convinent and far less ugly, IMO. - Is there an easy markup only way to get messages in attribute tags? For example, input type=submit value=Do something/ see above. I'm not aware of any other solution. - My application is grouped in modules and I want to have one property file per module. From what I've seen it should be easy to implement a custom StringResourceLoader which just looks for a specified property file in the package and it's parent packages. Maybe this is something which might come bundled with Wicket (I couldn't find anything) because it helps a lot if you have a company translating things for you and you can hand over 1 property file instead of 20 (one for each page)? That is default. Localizer implements a search hierarchy up the component tree. You only need one properties files per language per Panel which contains X number of component. Thinking ... That is not your question, isn't it? Like Application.properties is the last resort for all messages, you ask for one per java package, right? So, in addition to the my.pkg.MyPanel.properties it should look in my/pkg/Wicket.properties as well (may be Wicket.properties is not the best name). Something not localization related: - In my application I need to open a transaction for every request that's for a page (not for resources) and commit it (if sucessful) or rollback it (in case of an runtime exception). I also want to use Wicket's exception handling mechanism, that's why I won't use a servlet filter. I currently implemented this by using my own RequestCycleProcessor, which seems fine. But I needed to deactivate wicket's exception handling (so the exception bubbles up to the respond method and I can rollback) and dispatch into wicket's exception handling again. Is there a better way to achieve this? I leave that for someone else to answer Juergen Regards, Ralf --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmdlnkkid0709bid3057dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid0709bid3057dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] CSS error with Opera and wicket:border
Hi, It took me a while to track down why Opera makes my Wicket application look like crap. Here's why: when you use a css class like td.someclass and apply that class to a td tag within a table that is surrounded by wicket:border tags, Opera doesn't apply the CSS class to the td tag. If you define a general CSS class like .someclass it works (or when there are no wicket:border tags. Everything is fine when using Firefox, Safari or even IE. My question is: Can I somehow keep the wicket:border tags from showing up in the rendered markup? I'm using wicket-1.1.1. I've attached a file that demonstrates the problem (like I said: only happens with Opera). Cheers, Johannes Test1 Test2
Re: [Wicket-user] CSS error with Opera and wicket:border
some where in the the settings. ISettings.setStripWicketTag(boolean) or something like that Juergen On 5/4/06, Johannes Fahrenkrug [EMAIL PROTECTED] wrote: Hi, It took me a while to track down why Opera makes my Wicket application look like crap. Here's why: when you use a css class like td.someclass and apply that class to a td tag within a table that is surrounded by wicket:border tags, Opera doesn't apply the CSS class to the td tag. If you define a general CSS class like .someclass it works (or when there are no wicket:border tags. Everything is fine when using Firefox, Safari or even IE. My question is: Can I somehow keep the wicket:border tags from showing up in the rendered markup? I'm using wicket-1.1.1. I've attached a file that demonstrates the problem (like I said: only happens with Opera). Cheers, Johannes Test1 Test2 --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid0709bid3057dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] CSS error with Opera and wicket:border
To disable wicket-tags in the generated HTML (in Wicket 1.1.1), you add in the init()-method of your webapplication the following line: getSettings().setStripWicketTags(true); For Wicket 1.2 this line will be: getMarkupSettings().setStripWicketTags(true); BTW, as I understood from previous entries in this mailing list, as of Opera 9 (now in beta), Opera no longer is upset with the wicket-tags. Regards, Dave Johannes Fahrenkrug wrote: Hi, It took me a while to track down why Opera makes my Wicket application look like crap. Here's why: when you use a css class like td.someclass and apply that class to a td tag within a table that is surrounded by wicket:border tags, Opera doesn't apply the CSS class to the td tag. If you define a general CSS class like .someclass it works (or when there are no wicket:border tags. Everything is fine when using Firefox, Safari or even IE. My question is: Can I somehow keep the wicket:border tags from showing up in the rendered markup? I'm using wicket-1.1.1. I've attached a file that demonstrates the problem (like I said: only happens with Opera). Cheers, Johannes Test1 Test2 --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
RE: [Wicket-user] DatePicker not work for 1.2RC3 ?
I have a different problem. Its popping up, but when I select todays date it gives me 02/05/2170 ^^ for todays date. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of smallufo Sent: Wednesday, May 03, 2006 11:20 PM To: wicket-user@lists.sourceforge.net Subject: [Wicket-user] DatePicker not work for 1.2RC3 ? Hi Anybody has problem about DatePicker on 1.2 RC3 ? It worked on 1.2 RC2 , but after I upgrade to 1.2 RC3 (both wicket and wicket-extensions) , it doesn't work , the calendar doesn't pop-up anymore... Anybody has this problem too ?
RE: [Wicket-user] DatePicker not work for 1.2RC3 ?
To be more precise, with 1.2R3 my DatePicker is now popping up a calendar for the year 2170 instead of 2006. Also, with no change in configuration it is now producing dates in the form DD/MM/ whereas before it gave me /MM/DD. I dont care which format it gives me, as long as I have stability. (I dont know how to configure the format.) But I do need it to default to the current month in the current year. The lack of a DatePicker is going to be real embarrassing to me, as I was about to turn over an early version of my application for user testing. /Frank -Original Message- From: Frank Silbermann Sent: Thursday, May 04, 2006 9:10 AM To: 'wicket-user@lists.sourceforge.net' Subject: RE: [Wicket-user] DatePicker not work for 1.2RC3 ? I have a different problem. Its popping up, but when I select todays date it gives me 02/05/2170 ^^ for todays date. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of smallufo Sent: Wednesday, May 03, 2006 11:20 PM To: wicket-user@lists.sourceforge.net Subject: [Wicket-user] DatePicker not work for 1.2RC3 ? Hi Anybody has problem about DatePicker on 1.2 RC3 ? It worked on 1.2 RC2 , but after I upgrade to 1.2 RC3 (both wicket and wicket-extensions) , it doesn't work , the calendar doesn't pop-up anymore... Anybody has this problem too ?
Re: [Wicket-user] CSS error with Opera and wicket:border
Juergen, that did the trick! Thank you! - Johannes Juergen Donnerstag wrote: some where in the the settings. ISettings.setStripWicketTag(boolean) or something like that Juergen On 5/4/06, Johannes Fahrenkrug [EMAIL PROTECTED] wrote: Hi, It took me a while to track down why Opera makes my Wicket application look like crap. Here's why: when you use a css class like td.someclass and apply that class to a td tag within a table that is surrounded by wicket:border tags, Opera doesn't apply the CSS class to the td tag. If you define a general CSS class like .someclass it works (or when there are no wicket:border tags. Everything is fine when using Firefox, Safari or even IE. My question is: Can I somehow keep the wicket:border tags from showing up in the rendered markup? I'm using wicket-1.1.1. I've attached a file that demonstrates the problem (like I said: only happens with Opera). Cheers, Johannes Test1 Test2 --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=kkid0709bid3057dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] CSS error with Opera and wicket:border
Johannes Fahrenkrug schrieb: Hi, It took me a while to track down why Opera makes my Wicket application look like crap. Here's why: when you use a css class like td.someclass and apply that class to a td tag within a table that is surrounded by wicket:border tags, Opera doesn't apply the CSS class to the td tag. If you define a general CSS class like .someclass it works (or when there are no wicket:border tags. Everything is fine when using Firefox, Safari or even IE. My question is: Can I somehow keep the wicket:border tags from showing up in the rendered markup? Yes. See here: http://www.wicket-wiki.org.uk/wiki/index.php/Remove_wicket_markup But your HTML is broken. There is no doctype declaration and the style tag is incomplete. If you declare the document as XHTML, the wicket tags *should* be ignored because they are in a different namespace. If they are not ignored, this is a bug in Opera, and should be reported. Timo --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] date picker settings first day
Title: date picker settings first day the datepickersettings.setFirstDate does not work. this is due to a typo in the DatePickerSettings.toString if (getFirstDay() != 0) { b.append(\n\tfistDay : ).append(getFirstDay()).append(,); } this should read firstDay : also considering that the default for the date picker is to have monday (1) as default the if statement does not allow you to set sunday as the first day. I suggest changing the _javascript_ to have sunday as the first day by default otherwise change the if to != 1 I hope this can be fixed soon Scott
RE: [Wicket-user] date picker settings first day
Title: date picker settings first day Is there any way to prevent the DatePicker from closing when one clicks the link to change the month? When my user wants to change the date from, say, May 5th to April 30th, he has to pop-up the DatePicker twice once to change the month and once to change the day. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Lusebrink, Scott E CTR DISA GIG-CS Sent: Thursday, May 04, 2006 9:47 AM To: wicket-user@lists.sourceforge.net Subject: [Wicket-user] date picker settings first day the datepickersettings.setFirstDate does not work. this is due to a typo in the DatePickerSettings.toString if (getFirstDay() != 0) { b.append(\n\tfistDay : ).append(getFirstDay()).append(,); } this should read firstDay : also considering that the default for the date picker is to have monday (1) as default the if statement does not allow you to set sunday as the first day. I suggest changing the _javascript_ to have sunday as the first day by default otherwise change the if to != 1 I hope this can be fixed soon Scott
Re: [Wicket-user] CSS error with Opera and wicket:border
Yes. See here: http://www.wicket-wiki.org.uk/wiki/index.php/Remove_wicket_markup Thank you. But your HTML is broken. There is no doctype declaration and the style tag is incomplete. I know, it's just a demostration, not the real thing. If you declare the document as XHTML, the wicket tags *should* be ignored because they are in a different namespace. If they are not ignored, this is a bug in Opera, and should be reported. Already reported the bug, but it's fixed in Opera 9 beta. Timo --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Localization
Hi Juergen, please see WicketMessageTagHandler.java. It is experimental only and disabled by default. Reason: it is realy ugly to have something like wicket:example=tag=key. AttributeModifier are much more convinent and far less ugly, IMO. if you have a page with like, say, 20 labels with static text (like you have sometimes in complex forms for explaining things) I don't see something to win by adding AttributeModifiers to the component tree. I see localization of static text as markup issue because there is almost no logic to define there. The format you described is rather ugly, that's right: What about: div wicket:message=blaLabelbla/div (if you want to go the message as text between the tags) input type=submit wicket:message:value=Do something/ (for localizing the attribute value, probably the second : is not valid xml any more, but another separation char like _ or maybe no separation char at all could be used) This would be very helpful for quick easy localization of static content in pages, something that's missing at the moment from my point of view. Tell me what you think, if I have time I would like to implement this and contribute it... That is default. Localizer implements a search hierarchy up the component tree. You only need one properties files per language per Panel which contains X number of component. Thinking ... That is not your question, isn't it? Like Application.properties is the last resort for all messages, you ask for one per java package, right? So, in addition to the my.pkg.MyPanel.properties it should look in my/pkg/Wicket.properties as well (may be Wicket.properties is not the best name). That's what I want to do and it would be a nice feature if such a lookup strategy could be added by just setting an option and defining a name for the property file. I tried to do it quick myself but stopped after finding out that the property file name is quite tightly coupled to some class name for the moment... Regards, Ralf --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid0709bid3057dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Re: Problem loading DatePicker inside Panel through AjaxLink
Igor, I'm not sure if browsers support the update head thing (probably not), but one first step solution is to notify the component that it is been added through Ajax, so the component must generate a load function and return that function name to the Ajax call, so the Ajax JS can call that function postprocessing. Of course, the main problem still continues: how to add the .js file of DatePicker/anything else, to the html page dynamically. On 5/4/06, Igor Vaynberg [EMAIL PROTECTED] wrote: yes, there is a problem indeed with components that need head contribution and are added via ajax. the problem is that when the component is added via ajax its header contribution is ingored because the head section is not updated. so in case of the datepicker the js it needs is never added to the page. im not really sure what the good solution for this is. maybe we can update the head, but do browsers take that into account? will a script tag added to head via outerhtml replacement be processed by the browser? can you even use outer/innerHtml on elements in the head region of the page? any thoughts/ideas are welcome.-igor On 5/3/06, Bruno Borges [EMAIL PROTECTED] wrote:Oh, one mistake in the code I sent.- The id for newUserLink I'm using is newUser; Everything works: AjaxLink replacing the div, the panel, submit, etc. Only the datePicker JS isn't working!Regards, On 5/4/06, Bruno Borges [EMAIL PROTECTED] wrote: I'm trying to load a Form Panel's child, and this panel is been loaded through an AjaxLink.The DatePicker icon doesn't work. The calendar doesn't shows up. Is there any incompatibility between loading panels with Ajax and DatePicker within? My code looks like this:class Index extends WebPage {constructor {final Label welcome = new Label(bodyPanel, Welcome); add(welcome);AjaxLink goHome = new AjaxLink(home) {... {getPage().replace(welcome); target.addComponent(welcome);}};AjaxLink newUserLink = AjaxLink(home) { ... {UserFormPanel panel = new UserFormPanel(bodyPanel); getPage().replace(panel); target.addComponent(panel); } };add(newUserLink);add(goHome);}} class UserFormPanel extends Panel {constructor {add(new UserForm(userForm)); }}class UserForm extends Form { constructor {... // other basic fields like 'username', 'email', 'password'// Date field fieldBirthday RequiredTextField fieldBirthday = new RequiredTextField(birthday, Date.class);fieldBirthday .add(DateValidator.maximum(Calendar.getInstance().getTime()));add(fieldBirthday);// DatePicker for fieldBirthday DatePickerSettings settings = new DatePickerSettings();settings.setIfFormat(%d/%m/%Y);settings.setWeekNumbers(false);DatePicker datePicker = new DatePicker(datePicker, fieldBirthday , settings); add(datePicker);}}I can say for sure: the datepicker component was working perfectly before opening the panel through AjaxLink (actually, UserFormPanel was UserFormPage before this). Am I missing something here?Regards,-- Bruno Borges [EMAIL PROTECTED]Sun Certified Java Programmer for 1.4Sun Certified Web Component Developer for 1.4 -- Bruno Borges[EMAIL PROTECTED] Sun Certified Java Programmer for 1.4Sun Certified Web Component Developer for 1.4 -- Bruno Borges[EMAIL PROTECTED]Sun Certified Java Programmer for 1.4Sun Certified Web Component Developer for 1.4
Re: [Wicket-user] CSS error with Opera and wicket:border
Btw, Opera 9.0beta doesn't have this problem anymore. Hi, It took me a while to track down why Opera makes my Wicket application look like crap. Here's why: when you use a css class like td.someclass and apply that class to a td tag within a table that is surrounded by wicket:border tags, Opera doesn't apply the CSS class to the td tag. If you define a general CSS class like .someclass it works (or when there are no wicket:border tags. Everything is fine when using Firefox, Safari or even IE. My question is: Can I somehow keep the wicket:border tags from showing up in the rendered markup? I'm using wicket-1.1.1. I've attached a file that demonstrates the problem (like I said: only happens with Opera). Cheers, Johannes Test1 Test2 --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] DatePicker not work for 1.2RC3 ?
what is the ifformat string that is embedded in youre html file for that datepicker??And what does it say at first in the field itself? how is it formatted then?johan On 5/4/06, Frank Silbermann [EMAIL PROTECTED] wrote: I have a different problem. It's popping up, but when I select today's date it gives me 02/05/2170 ^^ for today's date. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of smallufo Sent: Wednesday, May 03, 2006 11:20 PM To: wicket-user@lists.sourceforge.net Subject: [Wicket-user] DatePicker not work for 1.2RC3 ? Hi Anybody has problem about DatePicker on 1.2 RC3 ? It worked on 1.2 RC2 , but after I upgrade to 1.2 RC3 (both wicket and wicket-extensions) , it doesn't work , the calendar doesn't pop-up anymore... Anybody has this problem too ?
Re: [Wicket-user] date picker settings first day
fixed it.On 5/4/06, Lusebrink, Scott E CTR DISA GIG-CS [EMAIL PROTECTED] wrote: the datepickersettings.setFirstDate does not work. this is due to a typo in the DatePickerSettings.toString if (getFirstDay() != 0) { b.append(\n\tfistDay : ).append(getFirstDay()).append(,); } this should read firstDay : also considering that the default for the date picker is to have monday (1) as default the if statement does not allow you to set sunday as the first day. I suggest changing the _javascript_ to have sunday as the first day by default otherwise change the if to != 1 I hope this can be fixed soon Scott
[Wicket-user] The other side of Wicket ...
Howdy All,I've been reading more about Wicket, particularly its integration with non-presentation aspects of an Enterprise application, e.g. the application and persistence layers. I've read about the Wicket-Spring integration, and the LazyInitProxy - where a Wicket session keeps an injected proxy to any dependencies(?). I can see mostly how this works. However, although others have proclaimed it so, it doesn't seem that elegant or easy to me. I'm wondering if people think this is a good solution or Wicket needs more work in this area (not being critical, just asking)? I must say I haven't thought much before how sessions would be managed across each request-response loop. I believe Wicket serialises the session and all the pages cached therein. I've worked with WebObjects and therein a session is sent the awake() message before the request-response loop begins, and the sleep() message after the r-r loop finishes. I guess these inherited methods could include code to serialise the session, but I have never thought how they handle not serialising all the business objects (model) managed by the O/R framework. Maybe they don't serialise the session or pages but just keep them in memory. I believe Wicket does the serialisation, at least in part, to perhaps assist with clustering (processing requests on different servers etc). I am just wondering how other frameworks handle this problem and why it seems more difficult in Wicket? Would Wicket fit in well as a Web presentation layer for an application using EJB3 (including JPA)?Best regards,Ashley.--Ashley AitkenPerth, Western Australiamrhatken at mac dot comSkype Name: MrHatken (GMT + 8 Hours!)
Re: [Wicket-user] date picker settings first day
it doesn't close at my place.I tested this in IE en FF i can press it quicly once so that it jumps one month at a time or hold it and scroll to the month i want and the release to select it.And then the datepicker still doesn't go away. johanOn 5/4/06, Frank Silbermann [EMAIL PROTECTED] wrote: Is there any way to prevent the DatePicker from closing when one clicks the link to change the month? When my user wants to change the date from, say, May 5th to April 30th, he has to pop-up the DatePicker twice – once to change the month and once to change the day. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Lusebrink, Scott E CTR DISA GIG-CS Sent: Thursday, May 04, 2006 9:47 AM To: wicket-user@lists.sourceforge.net Subject: [Wicket-user] date picker settings first day the datepickersettings.setFirstDate does not work. this is due to a typo in the DatePickerSettings.toString if (getFirstDay() != 0) { b.append(\n\tfistDay : ).append(getFirstDay()).append(,); } this should read firstDay : also considering that the default for the date picker is to have monday (1) as default the if statement does not allow you to set sunday as the first day. I suggest changing the _javascript_ to have sunday as the first day by default otherwise change the if to != 1 I hope this can be fixed soon Scott
Re: [Wicket-user] dynamic html controls
lets take your exact usecase, hiding and showing form components based on some condition.there are two basic strategies to do this:1) add all of them an then toggle visibilitythis means you add all possible formcomponents and then override isVisible() on them or call setVisible(false). this will tell wicket not to render the portion of html associated with that component. so instead of c:if condition=blahinput type=text name=comp value=${val}//c:if in jsp you would haveadd(new TextField(comp,...) { boolean isVisible() { return blah; }}and in html input type=text wicket:id=comp/2) swapping panels - this is usually used for bigger chunks of the page then formcomponents. a good analagy for this is the tabbed view. when you click a tab the body of the view has to change to show a different tab's body. each tab's body can be represented as a panel so when a tab is clicked it can swap the panel in the body of the tabbed panel with the panel of its chosing. see our TabbedPanel for example in code and in our component reference which shows a short examplehope this helps,-IgorOn 5/4/06, Rivka Shisman [EMAIL PROTECTED] wrote: Hi Eelco,Do you mean that I should create a panel with a link to my own servletthat shows the dynamic content?ThanksRivka-Original Message-From: [EMAIL PROTECTED][mailto:[EMAIL PROTECTED]] On Behalf Of EelcoHilleniusSent: Thursday, May 04, 2006 10:21 AM To: wicket-user@lists.sourceforge.netSubject: Re: [Wicket-user] dynamic html controlsYou can do what is outlined here: http://wicket-wiki.org.uk/wiki/index.php/Create_dynamic_markup_hierarchies_using_panelsOr - like the article says, add all visible components and use theisVisible property (or override the method) for turning them on or off.Or use Fragments, which work like panels, but have their markupdefinded in the same markup (HTML) file.EelcoOn 5/4/06, Rivka Shisman [EMAIL PROTECTED] wrote: Hi I have no experience with Wicket, but from what I read about it Idon't understand where does the dynamic content part come in? If I have a pair of html file and a java file - how do I conditionally show/hide html form controls like I do in JSP? For example, I have a JSP page that constructs my form text fields (and labels) from a result of a select from the database? Is that possible to achieve with Wicket? Thanks Rivka ---Using Tomcat but need to do more? Need to support web services,security?Get stuff done quickly with pre-integrated technology to make your job easierDownload IBM WebSphere Application Server v.1.0.1 based on ApacheGeronimohttp://sel.as-us.falkag.net/sel?cmd=lnkkid0709bid3057dat1642 ___Wicket-user mailing listWicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user---Using Tomcat but need to do more? Need to support web services, security?Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimohttp://sel.as-us.falkag.net/sel?cmdlnkkid0709bid3057dat1642 ___Wicket-user mailing listWicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
RE: [Wicket-user] DatePicker not work for 1.2RC3 ?
Apparently, my initial value in the old default value is confusing the DatePicker; if I reformat my initial value the DatePicker pops up the correct year and month. Since the default format apparently changed, it may not be safe for me to rely on it. What ifformat string, and how do I use it to control the DatePickers format? I dont see it used in the FormInput example: label wicket:id=dateLabel for="" class=SpellE>datePropertyDate/label input wicket:id=dateProperty id=dateProperty type=text size=40/ span wicket:id=datePicker/span /Frank -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Johan Compagner Sent: Thursday, May 04, 2006 10:30 AM To: wicket-user@lists.sourceforge.net Subject: Re: [Wicket-user] DatePicker not work for 1.2RC3 ? what is the ifformat string that is embedded in youre html file for that datepicker?? And what does it say at first in the field itself? how is it formatted then? johan On 5/4/06, Frank Silbermann [EMAIL PROTECTED] wrote: I have a different problem. It's popping up, but when I select today's date it gives me 02/05/2170 ^^ for today's date. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of smallufo Sent: Wednesday, May 03, 2006 11:20 PM To: wicket-user@lists.sourceforge.net Subject: [Wicket-user] DatePicker not work for 1.2RC3 ? Hi Anybody has problem about DatePicker on 1.2 RC3 ? It worked on 1.2 RC2 , but after I upgrade to 1.2 RC3 (both wicket and wicket-extensions) , it doesn't work , the calendar doesn't pop-up anymore... Anybody has this problem too ?
Re: [Wicket-user] Re: Problem loading DatePicker inside Panel through AjaxLink
right, and that is the main problem to solve. is a script tag legal in the middle of html? because maybe we can capture the head output and just insert it into html-Igor On 5/4/06, Bruno Borges [EMAIL PROTECTED] wrote: Igor, I'm not sure if browsers support the update head thing (probably not), but one first step solution is to notify the component that it is been added through Ajax, so the component must generate a load function and return that function name to the Ajax call, so the Ajax JS can call that function postprocessing. Of course, the main problem still continues: how to add the .js file of DatePicker/anything else, to the html page dynamically. On 5/4/06, Igor Vaynberg [EMAIL PROTECTED] wrote: yes, there is a problem indeed with components that need head contribution and are added via ajax. the problem is that when the component is added via ajax its header contribution is ingored because the head section is not updated. so in case of the datepicker the js it needs is never added to the page. im not really sure what the good solution for this is. maybe we can update the head, but do browsers take that into account? will a script tag added to head via outerhtml replacement be processed by the browser? can you even use outer/innerHtml on elements in the head region of the page? any thoughts/ideas are welcome.-igor On 5/3/06, Bruno Borges [EMAIL PROTECTED] wrote:Oh, one mistake in the code I sent.- The id for newUserLink I'm using is newUser; Everything works: AjaxLink replacing the div, the panel, submit, etc. Only the datePicker JS isn't working!Regards, On 5/4/06, Bruno Borges [EMAIL PROTECTED] wrote: I'm trying to load a Form Panel's child, and this panel is been loaded through an AjaxLink.The DatePicker icon doesn't work. The calendar doesn't shows up. Is there any incompatibility between loading panels with Ajax and DatePicker within? My code looks like this:class Index extends WebPage {constructor {final Label welcome = new Label(bodyPanel, Welcome); add(welcome);AjaxLink goHome = new AjaxLink(home) {... {getPage().replace(welcome); target.addComponent(welcome);}};AjaxLink newUserLink = AjaxLink(home) { ... {UserFormPanel panel = new UserFormPanel(bodyPanel); getPage().replace(panel); target.addComponent(panel); } };add(newUserLink);add(goHome);}} class UserFormPanel extends Panel {constructor {add(new UserForm(userForm)); }}class UserForm extends Form { constructor {... // other basic fields like 'username', 'email', 'password'// Date field fieldBirthday RequiredTextField fieldBirthday = new RequiredTextField(birthday, Date.class);fieldBirthday .add(DateValidator.maximum(Calendar.getInstance().getTime()));add(fieldBirthday);// DatePicker for fieldBirthday DatePickerSettings settings = new DatePickerSettings();settings.setIfFormat(%d/%m/%Y);settings.setWeekNumbers(false);DatePicker datePicker = new DatePicker(datePicker, fieldBirthday , settings); add(datePicker);}}I can say for sure: the datepicker component was working perfectly before opening the panel through AjaxLink (actually, UserFormPanel was UserFormPage before this). Am I missing something here?Regards,-- Bruno Borges [EMAIL PROTECTED]Sun Certified Java Programmer for 1.4Sun Certified Web Component Developer for 1.4 -- Bruno Borges[EMAIL PROTECTED] Sun Certified Java Programmer for 1.4Sun Certified Web Component Developer for 1.4 -- Bruno Borges[EMAIL PROTECTED] Sun Certified Java Programmer for 1.4Sun Certified Web Component Developer for 1.4
Re: [Wicket-user] Re: Problem loading DatePicker inside Panel through AjaxLink
Igor Vaynberg schrieb: right, and that is the main problem to solve. is a script tag legal in the middle of html? Not in XHTML :( -Igor On 5/4/06, Bruno Borges [EMAIL PROTECTED] wrote: Igor, I'm not sure if browsers support the update head thing (probably not), but one first step solution is to notify the component that it is been added through Ajax, so the component must generate a load function and return that function name to the Ajax call, so the Ajax JS can call that function postprocessing. Of course, the main problem still continues: how to add the .js file of DatePicker/anything else, to the html page dynamically. On 5/4/06, Igor Vaynberg [EMAIL PROTECTED] wrote: yes, there is a problem indeed with components that need head contribution and are added via ajax. the problem is that when the component is added via ajax its header contribution is ingored because the head section is not updated. so in case of the datepicker the js it needs is never added to the page. im not really sure what the good solution for this is. maybe we can update the head, but do browsers take that into account? will a script tag added to head via outerhtml replacement be processed by the browser? can you even use outer/innerHtml on elements in the head region of the page? any thoughts/ideas are welcome. -igor On 5/3/06, Bruno Borges [EMAIL PROTECTED] wrote: Oh, one mistake in the code I sent. - The id for newUserLink I'm using is newUser; Everything works: AjaxLink replacing the div, the panel, submit, etc. Only the datePicker JS isn't working! Regards, On 5/4/06, Bruno Borges [EMAIL PROTECTED] wrote: I'm trying to load a Form Panel's child, and this panel is been loaded through an AjaxLink. The DatePicker icon doesn't work. The calendar doesn't shows up. Is there any incompatibility between loading panels with Ajax and DatePicker within? My code looks like this: class Index extends WebPage { constructor { final Label welcome = new Label(bodyPanel, Welcome); add(welcome); AjaxLink goHome = new AjaxLink(home) { ... { getPage().replace(welcome); target.addComponent(welcome); } }; AjaxLink newUserLink = AjaxLink(home) { ... { UserFormPanel panel = new UserFormPanel(bodyPanel); getPage().replace(panel); target.addComponent(panel); } }; add(newUserLink); add(goHome); } } class UserFormPanel extends Panel { constructor { add(new UserForm(userForm)); } } class UserForm extends Form { constructor { ... // other basic fields like 'username', 'email', 'password' // Date field fieldBirthday RequiredTextField fieldBirthday = new RequiredTextField(birthday, Date.class); fieldBirthday .add(DateValidator.maximum(Calendar.getInstance ().getTime())); add(fieldBirthday); // DatePicker for fieldBirthday DatePickerSettings settings = new DatePickerSettings(); settings.setIfFormat(%d/%m/%Y); settings.setWeekNumbers(false); DatePicker datePicker = new DatePicker(datePicker, fieldBirthday , settings); add(datePicker); } } I can say for sure: the datepicker component was working perfectly before opening the panel through AjaxLink (actually, UserFormPanel was UserFormPage before this). Am I missing something here? Regards, -- Bruno Borges [EMAIL PROTECTED] Sun Certified Java Programmer for 1.4 Sun Certified Web Component Developer for 1.4 -- Bruno Borges [EMAIL PROTECTED] Sun Certified Java Programmer for 1.4 Sun Certified Web Component Developer for 1.4 -- Bruno Borges [EMAIL PROTECTED] Sun Certified Java Programmer for 1.4 Sun Certified Web Component Developer for 1.4 --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Re: Problem loading DatePicker inside Panel through AjaxLink
right, and that is the main problem to solve. is a script tag legal in the middle of html? because maybe we can capture the head output and just insert it into html script Tags in the middle of HTML are working in all browsers I ever had to use this. I'm not 100% sure if it's legal, but I think the main reason for putting JavaScript in the head is, that it is definitly loaded before any markup is using it. -Igor On 5/4/06, Bruno Borges [EMAIL PROTECTED] wrote: Igor, I'm not sure if browsers support the update head thing (probably not), but one first step solution is to notify the component that it is been added through Ajax, so the component must generate a load function and return that function name to the Ajax call, so the Ajax JS can call that function postprocessing. Of course, the main problem still continues: how to add the .js file of DatePicker/anything else, to the html page dynamically. On 5/4/06, Igor Vaynberg [EMAIL PROTECTED] wrote: yes, there is a problem indeed with components that need head contribution and are added via ajax. the problem is that when the component is added via ajax its header contribution is ingored because the head section is not updated. so in case of the datepicker the js it needs is never added to the page. im not really sure what the good solution for this is. maybe we can update the head, but do browsers take that into account? will a script tag added to head via outerhtml replacement be processed by the browser? can you even use outer/innerHtml on elements in the head region of the page? any thoughts/ideas are welcome. -igor On 5/3/06, Bruno Borges [EMAIL PROTECTED] wrote: Oh, one mistake in the code I sent. - The id for newUserLink I'm using is newUser; Everything works: AjaxLink replacing the div, the panel, submit, etc. Only the datePicker JS isn't working! Regards, On 5/4/06, Bruno Borges [EMAIL PROTECTED] wrote: I'm trying to load a Form Panel's child, and this panel is been loaded through an AjaxLink. The DatePicker icon doesn't work. The calendar doesn't shows up. Is there any incompatibility between loading panels with Ajax and DatePicker within? My code looks like this: class Index extends WebPage { constructor { final Label welcome = new Label(bodyPanel, Welcome); add(welcome); AjaxLink goHome = new AjaxLink(home) { ... { getPage().replace(welcome); target.addComponent(welcome); } }; AjaxLink newUserLink = AjaxLink(home) { ... { UserFormPanel panel = new UserFormPanel(bodyPanel); getPage().replace(panel); target.addComponent(panel); } }; add(newUserLink); add(goHome); } } class UserFormPanel extends Panel { constructor { add(new UserForm(userForm)); } } class UserForm extends Form { constructor { ... // other basic fields like 'username', 'email', 'password' // Date field fieldBirthday RequiredTextField fieldBirthday = new RequiredTextField(birthday, Date.class); fieldBirthday .add(DateValidator.maximum(Calendar.getInstance().getTime())); add(fieldBirthday); // DatePicker for fieldBirthday DatePickerSettings settings = new DatePickerSettings(); settings.setIfFormat(%d/%m/%Y); settings.setWeekNumbers(false); DatePicker datePicker = new DatePicker(datePicker, fieldBirthday , settings); add(datePicker); } } I can say for sure: the datepicker component was working perfectly before opening the panel through AjaxLink (actually, UserFormPanel was UserFormPage before this). Am I missing something here? Regards, -- Bruno Borges [EMAIL PROTECTED] Sun Certified Java Programmer for 1.4 Sun Certified Web Component Developer for 1.4 -- Bruno Borges [EMAIL PROTECTED] Sun Certified Java Programmer for 1.4 Sun Certified Web Component Developer for 1.4 --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid0709bid3057dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] The other side of Wicket ...
On 5/4/06, Ashley Aitken [EMAIL PROTECTED] wrote: Howdy All,I've been reading more about Wicket, particularly its integration with non-presentation aspects of an Enterprise application, e.g. the application and persistence layers. I've read about the Wicket-Spring integration, and the LazyInitProxy - where a Wicket session keeps an injected proxy to any dependencies(?).first lets clarify some things. the top container of components in wicket is the page. session keeps references to x number of pages for callbacks and backbutton support. so these are only serialized when replication of the session occurs. components also have models. when the user calls setModelObject() 2nd+ time we clone the model by serialization so that we can version it.so these are the two places where we do serialization.the lazy init proxies can be used as a reference either in a component or in a model and not cause any problems when serialized because they have a small footprint. what they let you avoid is serializing your ejb/spring beans because those a) are not serializable b) are most of the time very large c) need to be singletons I can see mostly how this works.However, although others have proclaimed it so, it doesn't seem that elegant or easy to me. if you are going to say something like this you can at least tell us which part of it does nto seem elegant or easy.here is how you would inject two spring beans into some panel you have: public class MyPanel extends Panel { @SpringBean private UserService userService; @SpringBean private BookService bookService; public MyPanel() { User u=userService... } }is that too difficult or too awkward?wicket is unmanged so there are difficulties that need to be overcome for injection - the biggest one being that injection needs to happen before the object's constructor is run because the dependencies can be used there. I'm wondering if people think this is a good solution or Wicket needs more work in this area (not being critical, just asking)? i think its a good solution - but then again i wrote it :) I must say I haven't thought much before how sessions would be managed across each request-response loop. I believe Wicket serialises the session and all the pages cached therein. noep, see above I am just wondering how other frameworks handle this problem and why it seems more difficult in Wicket?Would Wicket fit in well as a Web presentation layer for an application using EJB3 (including JPA)? i believe Vincent is working with ejb3 so maybe he can tell you about his experience. i think it would be trivial to create an IFieldValueFactory that can inject ejb3 beans instead of spring beans. the contribution would be welcome. the code can look identical to the spring injection@EjbBean private UserService userService;-Igor
RE: [Wicket-user] auto-submit when done picking date
Apparently, when you click the datePickers link to change the month, it writes the change immediately to the associated textbox. Since I have auto-postback _javascript_ on that input field, the postback is causing my datePicker to disappear, and the form to be submitted before the day of the month can be changed: input wicket:id=dateProperty type=text size=10 readonly class=SpellE>this.form.submit()/ span wicket:id=datePicker/span What Id really like is to post back not when the texbox changes, but rather, when the datePicker closes. Any suggestions how? Would I need to associate the datePicker with something other than a span/ tag? On which event would I put the this.form.submit() ? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Johan Compagner Sent: Thursday, May 04, 2006 10:40 AM To: wicket-user@lists.sourceforge.net Subject: Re: [Wicket-user] date picker settings first day it doesn't close at my place. I tested this in IE en FF i can press it quicly once so that it jumps one month at a time or hold it and scroll to the month i want and the release to select it. And then the datepicker still doesn't go away. johan On 5/4/06, Frank Silbermann [EMAIL PROTECTED] wrote: Is there any way to prevent the DatePicker from closing when one clicks the link to change the month? When my user wants to change the date from, say, May 5th to April 30th, he has to pop-up the DatePicker twice once to change the month and once to change the day. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Lusebrink, Scott E CTR DISA GIG-CS Sent: Thursday, May 04, 2006 9:47 AM To: wicket-user@lists.sourceforge.net Subject: [Wicket-user] date picker settings first day the datepickersettings.setFirstDate does not work. this is due to a typo in the DatePickerSettings.toString if (getFirstDay() != 0) { b.append(\n\tfistDay : ).append(getFirstDay()).append(,); } this should read firstDay : also considering that the default for the date picker is to have monday (1) as default the if statement does not allow you to set sunday as the first day. I suggest changing the _javascript_ to have sunday as the first day by default otherwise change the if to != 1 I hope this can be fixed soon Scott
Re: [Wicket-user] Re: Problem loading DatePicker inside Panel through AjaxLink
in that case i dont see how you can ever make this work in xhtml unless you refresh the entire page. A twisted solution using an invisible frame loading only JS comes to mind ;-) - Rüdiger --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid0709bid3057dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Re: Problem loading DatePicker inside Panel through AjaxLink
i guess there can be a hidden iframe, but then the loaded js will not be part of the page because frames are isolated, no?-IgorOn 5/4/06, Rüdiger Schulz [EMAIL PROTECTED] wrote: in that case i dont see how you can ever make this work in xhtml unless you refresh the entire page.A twisted solution using an invisible frame loading only JS comes tomind ;-)- Rüdiger--- Using Tomcat but need to do more? Need to support web services, security?Get stuff done quickly with pre-integrated technology to make your job easierDownload IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmdlnkkid0709bid3057dat1642___ Wicket-user mailing listWicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user
RE: [Wicket-user] dynamic html controls
Hi Igor, I still dont understand where is the servlet functionality of Wicket. What if I dont want to hand code all my textboxes in the html and instead I want to dynamically add them with out.print like possibility from a collection with unknown size that comes from the database. If I use a panel (as much as I understand what a panel is) I still need it to be a dynamically built panel. Thanks Rivka From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Igor Vaynberg Sent: Thursday, May 04, 2006 7:17 PM To: wicket-user@lists.sourceforge.net Subject: Re: [Wicket-user] dynamic html controls lets take your exact usecase, hiding and showing form components based on some condition. there are two basic strategies to do this: 1) add all of them an then toggle visibility this means you add all possible formcomponents and then override isVisible() on them or call setVisible(false). this will tell wicket not to render the portion of html associated with that component. so instead of c:if condition=blahinput type=text name=comp value=${val}//c:if in jsp you would have add(new TextField(comp,...) { boolean isVisible() { return blah; } } and in html input type=text wicket:id=comp/ 2) swapping panels - this is usually used for bigger chunks of the page then formcomponents. a good analagy for this is the tabbed view. when you click a tab the body of the view has to change to show a different tab's body. each tab's body can be represented as a panel so when a tab is clicked it can swap the panel in the body of the tabbed panel with the panel of its chosing. see our TabbedPanel for example in code and in our component reference which shows a short example hope this helps, -Igor On 5/4/06, Rivka Shisman [EMAIL PROTECTED] wrote: Hi Eelco, Do you mean that I should create a panel with a link to my own servlet that shows the dynamic content? Thanks Rivka -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Eelco Hillenius Sent: Thursday, May 04, 2006 10:21 AM To: wicket-user@lists.sourceforge.net Subject: Re: [Wicket-user] dynamic html controls You can do what is outlined here: http://wicket-wiki.org.uk/wiki/index.php/Create_dynamic_markup_hierarchi es_using_panels Or - like the article says, add all visible components and use the isVisible property (or override the method) for turning them on or off. Or use Fragments, which work like panels, but have their markup definded in the same markup (HTML) file. Eelco On 5/4/06, Rivka Shisman [EMAIL PROTECTED] wrote: Hi I have no experience with Wicket, but from what I read about it I don't understand where does the dynamic content part come in? If I have a pair of html file and a java file - how do I conditionally show/hide html form controls like I do in JSP? For example, I have a JSP page that constructs my form text fields (and labels) from a result of a select from the database? Is that possible to achieve with Wicket? Thanks Rivka --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid0709bid3057dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmdlnkkid0709bid3057dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] populating the second form in the page
I have 2 forms in my wicket page. Only the first form is visible at the beginnning. The first form has a drop down and based on the selection of the drop down, there's a database call and then the second form needs to be populated based on the model returned by the database call. My problem is, in the main contructor, I am adding the second form with an empty model and am setting secondForm.isVisible(false) Now when the selection on the first form changes I try to I do secondForm.setVisible(true). This does not work since the form is already initialized and shows up with default values. I also tried re-initializing the secondForm and doing this does not even show the secondForm. Is there a way of doing this without navigating to a different page when the selection changes.Thanks__Do You Yahoo!?Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: [Wicket-user] Re: Problem loading DatePicker inside Panel through AjaxLink
Ooops. I was wrong. I just checked some stubs with the w3 validator, and they pass without a hitch. Both XHTML 1.0 strict and transitional. XHTML 1.1 and 2.0 seem to be fine as well. Sorry. Timo Igor Vaynberg schrieb: in that case i dont see how you can ever make this work in xhtml unless you refresh the entire page. -Igor On 5/4/06, Timo Stamm [EMAIL PROTECTED] wrote: Igor Vaynberg schrieb: right, and that is the main problem to solve. is a script tag legal in the middle of html? Not in XHTML :( -Igor On 5/4/06, Bruno Borges [EMAIL PROTECTED] wrote: Igor, I'm not sure if browsers support the update head thing (probably not), but one first step solution is to notify the component that it is been added through Ajax, so the component must generate a load function and return that function name to the Ajax call, so the Ajax JS can call that function postprocessing. Of course, the main problem still continues: how to add the .js file of DatePicker/anything else, to the html page dynamically. On 5/4/06, Igor Vaynberg [EMAIL PROTECTED] wrote: yes, there is a problem indeed with components that need head contribution and are added via ajax. the problem is that when the component is added via ajax its header contribution is ingored because the head section is not updated. so in case of the datepicker the js it needs is never added to the page. im not really sure what the good solution for this is. maybe we can update the head, but do browsers take that into account? will a script tag added to head via outerhtml replacement be processed by the browser? can you even use outer/innerHtml on elements in the head region of the page? any thoughts/ideas are welcome. -igor On 5/3/06, Bruno Borges [EMAIL PROTECTED] wrote: Oh, one mistake in the code I sent. - The id for newUserLink I'm using is newUser; Everything works: AjaxLink replacing the div, the panel, submit, etc. Only the datePicker JS isn't working! Regards, On 5/4/06, Bruno Borges [EMAIL PROTECTED] wrote: I'm trying to load a Form Panel's child, and this panel is been loaded through an AjaxLink. The DatePicker icon doesn't work. The calendar doesn't shows up. Is there any incompatibility between loading panels with Ajax and DatePicker within? My code looks like this: class Index extends WebPage { constructor { final Label welcome = new Label(bodyPanel, Welcome); add(welcome); AjaxLink goHome = new AjaxLink(home) { ... { getPage().replace(welcome); target.addComponent(welcome); } }; AjaxLink newUserLink = AjaxLink(home) { ... { UserFormPanel panel = new UserFormPanel(bodyPanel); getPage().replace(panel); target.addComponent(panel); } }; add(newUserLink); add(goHome); } } class UserFormPanel extends Panel { constructor { add(new UserForm(userForm)); } } class UserForm extends Form { constructor { ... // other basic fields like 'username', 'email', 'password' // Date field fieldBirthday RequiredTextField fieldBirthday = new RequiredTextField(birthday, Date.class); fieldBirthday .add(DateValidator.maximum(Calendar.getInstance ().getTime())); add(fieldBirthday); // DatePicker for fieldBirthday DatePickerSettings settings = new DatePickerSettings(); settings.setIfFormat(%d/%m/%Y); settings.setWeekNumbers(false); DatePicker datePicker = new DatePicker(datePicker, fieldBirthday , settings); add(datePicker); } } I can say for sure: the datepicker component was working perfectly before opening the panel through AjaxLink (actually, UserFormPanel was UserFormPage before this). Am I missing something here? Regards, -- Bruno Borges [EMAIL PROTECTED] Sun Certified Java Programmer for 1.4 Sun Certified Web Component Developer for 1.4 -- Bruno Borges [EMAIL PROTECTED] Sun Certified Java Programmer for 1.4 Sun Certified Web Component Developer for 1.4 -- Bruno Borges [EMAIL PROTECTED] Sun Certified Java Programmer for 1.4 Sun Certified Web Component Developer for 1.4 --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done
Re: [Wicket-user] populating the second form in the page
just call secondForm.setModel(loaded model); secondForm.setVisible(true);-IgorOn 5/4/06, Aditya Patel [EMAIL PROTECTED] wrote:I have 2 forms in my wicket page. Only the first form is visible at the beginnning. The first form has a drop down and based on the selection of the drop down, there's a database call and then the second form needs to be populated based on the model returned by the database call. My problem is, in the main contructor, I am adding the second form with an empty model and am setting secondForm.isVisible(false) Now when the selection on the first form changes I try to I do secondForm.setVisible(true). This does not work since the form is already initialized and shows up with default values. I also tried re-initializing the secondForm and doing this does not even show the secondForm. Is there a way of doing this without navigating to a different page when the selection changes.Thanks__ Do You Yahoo!?Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: [Wicket-user] Re: Problem loading DatePicker inside Panel through AjaxLink
thanks bruno! i will try to take a look tonight and see if we can adapt these ideas.-IgorOn 5/4/06, Bruno Borges [EMAIL PROTECTED] wrote:I found some links that might be of great interest! dynamic load _javascript_ from _javascript_ http://www.activewidgets.com/_javascript_.forum.6114.15/dynamic-load-_javascript_-from-_javascript_.htmlDojo Package System http://dojo.jot.com/WikiHome/Documents/DojoPackageSystem_javascript_ Includes http://www.phpied.com/_javascript_-include/ On-Demand _javascript_http://ajaxpatterns.org/On-Demand_Javascript Hope this help!Regards On 5/4/06, Timo Stamm [EMAIL PROTECTED] wrote: Ooops. I was wrong.I just checked some stubs with the w3 validator, and they pass without ahitch. Both XHTML 1.0 strict and transitional. XHTML 1.1 and 2.0 seem tobe fine as well.Sorry.Timo Igor Vaynberg schrieb: in that case i dont see how you can ever make this work in xhtml unless you refresh the entire page. -Igor On 5/4/06, Timo Stamm [EMAIL PROTECTED] wrote: Igor Vaynberg schrieb: right, and that is the main problem to solve. is a script tag legal in the middle of html? Not in XHTML :( -IgorOn 5/4/06, Bruno Borges [EMAIL PROTECTED] wrote: Igor, I'm not sure if browsers support the update head thing (probably not), but one first step solution is to notify the component that it is been added through Ajax, so the component must generate a load function and return that function name to the Ajax call, so the Ajax JS can call that function postprocessing. Of course, the main problem still continues: how to add the .js file of DatePicker/anything else, to the html page dynamically. On 5/4/06, Igor Vaynberg [EMAIL PROTECTED] wrote: yes, there is a problem indeed with components that need head contribution and are added via ajax. the problem is that when the component is added via ajax its header contribution is ingored because the head section is not updated. so in case of the datepicker the js it needs is never added to the page. im not really sure what the good solution for this is. maybe we can update the head, but do browsers take that into account? will a script tag added to head via outerhtml replacement be processed by the browser? can you even use outer/innerHtml on elements in the head region of the page? any thoughts/ideas are welcome. -igor On 5/3/06, Bruno Borges [EMAIL PROTECTED] wrote: Oh, one mistake in the code I sent. - The id for newUserLink I'm using is newUser; Everything works: AjaxLink replacing the div, the panel, submit, etc.Only the datePicker JS isn't working! Regards, On 5/4/06, Bruno Borges [EMAIL PROTECTED] wrote: I'm trying to load a Form Panel's child, and this panel is been loaded through an AjaxLink. The DatePicker icon doesn't work. The calendar doesn't shows up. Is there any incompatibility between loading panels with Ajax and DatePicker within? My code looks like this: class Index extends WebPage { constructor { final Label welcome = new Label(bodyPanel, Welcome); add(welcome); AjaxLink goHome = new AjaxLink(home) { ... { getPage().replace(welcome); target.addComponent(welcome); } }; AjaxLink newUserLink = AjaxLink(home) { ... { UserFormPanel panel = new UserFormPanel(bodyPanel); getPage().replace(panel); target.addComponent(panel);}}; add(newUserLink); add(goHome); } } class UserFormPanel extends Panel { constructor { add(new UserForm(userForm)); } } class UserForm extends Form { constructor { ... // other basic fields like 'username', 'email', 'password' // Date field fieldBirthday RequiredTextField fieldBirthday = new RequiredTextField(birthday, Date.class); fieldBirthday .add( DateValidator.maximum(Calendar.getInstance ().getTime())); add(fieldBirthday); // DatePicker for fieldBirthday DatePickerSettings settings = new DatePickerSettings(); settings.setIfFormat(%d/%m/%Y); settings.setWeekNumbers (false); DatePicker datePicker = new DatePicker(datePicker, fieldBirthday , settings); add(datePicker); } } I can say for sure: the datepicker component was working perfectly before opening the panel through AjaxLink (actually, UserFormPanel was UserFormPage before this). Am I missing something here? Regards, -- Bruno Borges [EMAIL PROTECTED] Sun Certified Java Programmer for 1.4 Sun Certified Web Component Developer for 1.4 --Bruno Borges [EMAIL PROTECTED]Sun Certified Java Programmer for 1.4Sun Certified Web Component Developer for 1.4 -- Bruno Borges [EMAIL PROTECTED] Sun Certified Java Programmer for 1.4 Sun Certified Web Component Developer for 1.4
Re: [Wicket-user] dynamic html controls
sure you can do that, but then you yourself have to manage request parameters, yuck. the whole point of components is that they take care of all that messy stuff for you. if you still want to do that you override webcomponent.onrender () and do something like this: getResponse().write(blah);however, it seems to me you are still not thinking in terms of components.if you can give me a more defined usecase i can show you how to break it down into components for the general usecase you are talking about - ie lets say building a set of checkboxes for a collection that comes out of the database you can use our prebuilt component CheckBoxMultiChoice or you can use the more component oriented version CheckGroup/Check with CheckGroup/Check your component hierarchy would look like thisCheckGroup - manages the group of avail checkboxes| Repeater (ListView or another) - iterates over the list of items retrieved from the db | | Check - checkbox representing a single item from the db list| | | Label - a label to show text representing a single item from the db listin this way you can create a list of checkboxes for a list of variable length. does this clear things up a bit?-IgorOn 5/4/06, Rivka Shisman [EMAIL PROTECTED] wrote: Hi Igor, I still don't understand where is the servlet functionality of Wicket. What if I don't want to hand code all my textboxes in the html and instead I want to dynamically add them with "out.print" like possibility from a collection with unknown size that comes from the database. If I use a panel (as much as I understand what a panel is) I still need it to be a dynamically built panel. Thanks Rivka From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Igor Vaynberg Sent: Thursday, May 04, 2006 7:17 PM To: wicket-user@lists.sourceforge.net Subject: Re: [Wicket-user] dynamic html controls lets take your exact usecase, hiding and showing form components based on some condition. there are two basic strategies to do this: 1) add all of them an then toggle visibility this means you add all possible formcomponents and then override isVisible() on them or call setVisible(false). this will tell wicket not to render the portion of html associated with that component. so instead of c:if condition=blahinput type=text name=comp value=${val}//c:if in jsp you would have add(new TextField(comp,...) { boolean isVisible() { return blah; } } and in html input type=text wicket:id=comp/ 2) swapping panels - this is usually used for bigger chunks of the page then formcomponents. a good analagy for this is the tabbed view. when you click a tab the body of the view has to change to show a different tab's body. each tab's body can be represented as a panel so when a tab is clicked it can swap the panel in the body of the tabbed panel with the panel of its chosing. see our TabbedPanel for example in code and in our component reference which shows a short example hope this helps, -Igor On 5/4/06, Rivka Shisman [EMAIL PROTECTED] wrote: Hi Eelco, Do you mean that I should create a panel with a link to my own servlet that shows the dynamic content? Thanks Rivka -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Eelco Hillenius Sent: Thursday, May 04, 2006 10:21 AM To: wicket-user@lists.sourceforge.net Subject: Re: [Wicket-user] dynamic html controls You can do what is outlined here: http://wicket-wiki.org.uk/wiki/index.php/Create_dynamic_markup_hierarchi es_using_panels Or - like the article says, add all visible components and use the isVisible property (or override the method) for turning them on or off. Or use Fragments, which work like panels, but have their markup definded in the same markup (HTML) file. Eelco On 5/4/06, Rivka Shisman [EMAIL PROTECTED] wrote: Hi I have no experience with Wicket, but from what I read about it I don't understand where does the dynamic content part come in? If I have a pair of html file and a java file - how do I conditionally show/hide html form controls like I do in JSP? For example, I have a JSP page that constructs my form text fields (and labels) from a result of a select from the database? Is that possible to achieve with Wicket? Thanks Rivka --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid0709bid3057dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated
Re: [Wicket-user] Re: autocompletetextfield problem
yep.-IgorOn 5/4/06, Aditya [EMAIL PROTECTED] wrote: Has this been fixed. I have the same problem with wicket1.2-rc3 Thanks,will try to take a look tonight.-Igor On 5/1/06, myu at mail.dk myu at mail.dk wrote:Hi IgorWell maybe it was fixed in cvs :).I am currently running wicket 1.2-rc2.I have submitted a bug report at sf.net.Kind regards/MuratIgor Vaynberg igor.vaynberg at gmail.com wrote: if it was a known bug it wouldve been fixed :) please file a bug report.-Igor On 5/1/06, myu at mail.dk myu at mail.dk wrote: Hi all I am experiencing problem withtheAutoCompleteTextField. Somehow i am not able to select the last item in the list, which means that if i only have one item i cant select that item. Right now i have made aworkaround by adding a dummy field, so there is also at least two items in the list. I have also tried to use the wicket example with the locales but are experiencing the same problem.Am I doing something wrong or is this a know bug?? Kind regards /Murat--Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easierDownload IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___Wicket-user mailing list Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] Initial date in DatePicker component
How to set up an initial Date in a DatePicker object?I want to use DatePicker for birthday property, but I want it to load with a date 10 years before current year. How can I achieve this?Regards,-- Bruno Borges[EMAIL PROTECTED]Sun Certified Java Programmer for 1.4Sun Certified Web Component Developer for 1.4
Re: [Wicket-user] Re: autocompletetextfield problem
Hi Igor I thought that this fix wasnt included in wicket1.2-rc3. If it is then i agree with Aditya. The bug is still there :( Kind regards /Murat Igor Vaynberg [EMAIL PROTECTED] wrote: yep. -Igor On 5/4/06, Aditya [EMAIL PROTECTED] wrote: Has this been fixed. I have the same problem with wicket1.2-rc3 Thanks,will try to take a look tonight.-Igor On 5/1/06, myu at mail.dk myu at mail.dk wrote:Hi IgorWell maybe it was fixed in cvs :). I am currently running wicket 1.2-rc2.I have submitted a bug report at sf.net.Kind regards/MuratIgor Vaynberg igor.vaynberg at gmail.com wrote: if it was a known bug it wouldve been fixed :) please file a b ug report. -Igor On 5/1/06, myu at mail.dk myu at mail.dk wrote: Hi all I am experiencing problem with the AutoCompleteTextField. Somehow i am not able to select the last item in the list, which means that if i only have one item i cant select that item. Right now i have made a workaround by adding a dummy field, so there is also at least two items in the list. I have also tried to use the wicket example with the locales but are experiencing the same problem. Am I doing something wrong or is this a know bug?? Kind regards /Murat --- --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=26305 7dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Re: autocompletetextfield problem
it is fixed, but not in rc3. i did not take aditya's question in the context of rc3.-IgorOn 5/4/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:Hi IgorI thought that this fix wasnt included in wicket1.2-rc3. If it isthen i agree with Aditya. The bug is still there :(Kind regards/MuratIgor Vaynberg [EMAIL PROTECTED] wrote: yep. -Igor On 5/4/06, Aditya [EMAIL PROTECTED] wrote:Has this been fixed. I have the same problem with wicket1.2-rc3Thanks,will try to take a look tonight.-Igor On 5/1/06, myu at mail.dk myu at mail.dkwrote:Hi IgorWell maybe it was fixed in cvs :). I am currently running wicket 1.2-rc2.I have submitted a bug report at sf.net.Kind regards/MuratIgor Vaynberg igor.vaynberg at gmail.com wrote:if it was a known bug it wouldve been fixed :) please file a b ug report. -Igor On 5/1/06, myu at mail.dkmyu at mail.dk wrote: Hi all I am experiencing problem with the AutoCompleteTextField. Somehow i am not able to select the last item in the list, which means that if i only have one item i cant select that item. Right now i have made a workaround by adding a dummy field, so there is also at least two items in the list. I have also tried to use the wicketexample with the locales but are experiencing the same problem. Am I doing something wrong or is this a know bug?? Kind regards /Murat --- --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=26305 7dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user ---Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easierDownload IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___Wicket-user mailing list Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] BoundCompoundPropertyModel not setting values
Isn't this code correct?class UserForm extends Form {User user = new User(); // POJO Bean constructor {...BoundCompoundPropertyModel model = new BoundCompoundPropertyModel(user);add(new TextField(name, model)); add(new TextField(email, model)); // Can I do this? Use the same model object for different properties?}on submit {String name = user.getName ();// Why name is still null ?} } Am I missing something here? Where in the docs has some reference for Property Models ?-- Bruno Borges [EMAIL PROTECTED]Sun Certified Java Programmer for 1.4Sun Certified Web Component Developer for 1.4
Re: [Wicket-user] setSelectedField in AutoCompleteTextField is not called
as far as i can see there are no getSelectedField()/setSelectedField() methods in the AutoCompleteTextField -IgorOn 5/4/06, Aditya Patel [EMAIL PROTECTED] wrote: I am using a AutoCompleteTextField with wicket1.2rc3 and have declared it likefinal TextField field1= new AutoCompleteTextField(field1, new PropertyModel(this, selectedField)) { protected Iterator getChoices(String input) { return ... } }; public Object getSelectedField() { return selectedSupplier; } public void setSelectedField(Object supplier) { selectedSupplier = supplier; }the setSelectedFied() is never getting called when some text is getting selected.Thanks How low will we go? Check out Yahoo! Messenger's low PC-to-Phone call rates.
Re: [Wicket-user] BoundCompoundPropertyModel not setting values
Ops... sorry Igor.But one question: the Javadoc says that the BoundCompoundPropertyModel uses the name (I understand here as the id) of a component as the property name it should use to set value on model. So, I understand as: add(new TextField(name, new BoundCompountPropertyModel(userBean)));or...add(new TextField(name, new CompountPropertyModel(userBean, name))); Am I right?On 5/4/06, Igor Vaynberg [EMAIL PROTECTED] wrote:what you want is a CompoundPropertyModel not the bound variant. there is a searchbox on our wiki :)http://www.wicket-wiki.org.uk/wiki/index.php/Models -IgorOn 5/4/06, Bruno Borges [EMAIL PROTECTED] wrote: Isn't this code correct?class UserForm extends Form { User user = new User(); // POJO Bean constructor {...BoundCompoundPropertyModel model = new BoundCompoundPropertyModel(user);add(new TextField(name, model)); add(new TextField(email, model)); // Can I do this? Use the same model object for different properties?}on submit {String name = user.getName ();// Why name is still null ?} } Am I missing something here? Where in the docs has some reference for Property Models ? -- Bruno Borges [EMAIL PROTECTED]Sun Certified Java Programmer for 1.4Sun Certified Web Component Developer for 1.4 -- Bruno Borges[EMAIL PROTECTED]Sun Certified Java Programmer for 1.4Sun Certified Web Component Developer for 1.4
RE: [Wicket-user] auto-submit when done picking date
Well, is there a configuration option only to change the date when a day is chosen, but not when shifting to a new month? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Eelco Hillenius Sent: Thursday, May 04, 2006 12:23 PM To: wicket-user@lists.sourceforge.net Subject: Re: [Wicket-user] auto-submit when done picking date What I'd really like is to post back not when the texbox changes, but rather, when the datePicker closes. Any suggestions how? Would I need to associate the datePicker with something other than a span/ tag? On which event would I put the this.form.submit() ? I'm afraid you'll have to dig deeper in the javascript part of the datepicker for this. If you find something that works, and you have an idea on how this could be integrated with the component, we'll be happy to accept a patch. Eelco --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=kkid0709bid3057dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid0709bid3057dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] BoundCompoundPropertyModel not setting values
The idea is that you set a Compound/BoundCompoundPropertyModel on the parent (or further up the hierarchy) of these components. setModel(new (Bound)CompoundPropertyModel(userBean)); add(new TextField(name)); Bound and the normal CompoundPropertyModel do not differ much from each other, except that the Bound variant *additionally* gives you the option of binding to another property of the component id. That's handy when you have say 10 components to add, and just one of them has a property name that differs from the component id you want to use. In that case, you would do: BoundCompoundPropertyModel m = new BoundCompoundPropertyModel(userBean); setModel(m); TextField t = new TextField(someid); add(t); m.bind(t, name); The equivilant of what you want without these types of models is the plain property model: add(new TextField(someid, new PropertyModel(userBean, name)); Eelco So, I understand as: add(new TextField(name, new BoundCompountPropertyModel(userBean))); or... add(new TextField(name, new CompountPropertyModel(userBean, name))); Am I right? --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid0709bid3057dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] BoundCompoundPropertyModel not setting values
no thats the compound one.basically IModel has a getObject(Component c) and setObject(Component c, Object value)notice the Component argument.the compoundpropertymodel does thisgetObject(Component c) { return object's property with name c.id}and setter does the reversethe bound version lets you bind components to property paths rather then always using direct translation of component's id to the property name that the compound model uses so you can sayBoundCompoundPropertyModel m=new .Form form=new Form(form, m);TextField tf=new TextField(name);form.add(tf);m.bind(tf, firstName); so now the textfield is bound to the firstName property of whatever object is in the bound model.hope this clears things up a bitusage examples are also wrong, the advantage of the compound models are that you dont have to set them for every form component because they are inherited lets say you have a User class that has getFirstName(), getLastName()User user=getUser();Form form=new Form(form, new CompoundPropertyModel(user));form.add(new TextField(firstName)); form.add(new TextField(lastName));notice i did not set any models on the textfield components because they will inherit the compound one from the form, and their ids will be used as property expressions, so i quickly bound the textfield to the first and last name properties. -IgorOn 5/4/06, Bruno Borges [EMAIL PROTECTED] wrote: Ops... sorry Igor.But one question: the Javadoc says that the BoundCompoundPropertyModel uses the name (I understand here as the id) of a component as the property name it should use to set value on model. So, I understand as: add(new TextField(name, new BoundCompountPropertyModel(userBean)));or...add(new TextField(name, new CompountPropertyModel(userBean, name))); Am I right? On 5/4/06, Igor Vaynberg [EMAIL PROTECTED] wrote:what you want is a CompoundPropertyModel not the bound variant. there is a searchbox on our wiki :)http://www.wicket-wiki.org.uk/wiki/index.php/Models -IgorOn 5/4/06, Bruno Borges [EMAIL PROTECTED] wrote: Isn't this code correct?class UserForm extends Form { User user = new User(); // POJO Bean constructor {...BoundCompoundPropertyModel model = new BoundCompoundPropertyModel(user);add(new TextField(name, model)); add(new TextField(email, model)); // Can I do this? Use the same model object for different properties?}on submit {String name = user.getName ();// Why name is still null ?} } Am I missing something here? Where in the docs has some reference for Property Models ? -- Bruno Borges [EMAIL PROTECTED]Sun Certified Java Programmer for 1.4Sun Certified Web Component Developer for 1.4 -- Bruno Borges[EMAIL PROTECTED] Sun Certified Java Programmer for 1.4Sun Certified Web Component Developer for 1.4
Re: [Wicket-user] DatePicker not work for 1.2RC3 ?
the datepickers picks the date of the java format string.So they should always be no in sync so how java formats the string this will also be how _javascript_ formats the string.johan On 5/4/06, Frank Silbermann [EMAIL PROTECTED] wrote: Apparently, my initial value in the old default value is confusing the DatePicker; if I reformat my initial value the DatePicker pops up the correct year and month. Since the default format apparently changed, it may not be safe for me to rely on it. What ifformat string, and how do I use it to control the DatePicker's format? I don't see it used in the FormInput example: label wicket:id=dateLabel for="">datePropertyDate/label input wicket:id=dateProperty id=dateProperty type=text size=40/ span wicket:id=datePicker/span /Frank -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Johan Compagner Sent: Thursday, May 04, 2006 10:30 AM To: wicket-user@lists.sourceforge.net Subject: Re: [Wicket-user] DatePicker not work for 1.2RC3 ? what is the ifformat string that is embedded in youre html file for that datepicker?? And what does it say at first in the field itself? how is it formatted then? johan On 5/4/06, Frank Silbermann [EMAIL PROTECTED] wrote: I have a different problem. It's popping up, but when I select today's date it gives me 02/05/2170 ^^ for today's date. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of smallufo Sent: Wednesday, May 03, 2006 11:20 PM To: wicket-user@lists.sourceforge.net Subject: [Wicket-user] DatePicker not work for 1.2RC3 ? Hi Anybody has problem about DatePicker on 1.2 RC3 ? It worked on 1.2 RC2 , but after I upgrade to 1.2 RC3 (both wicket and wicket-extensions) , it doesn't work , the calendar doesn't pop-up anymore... Anybody has this problem too ?
Re: [Wicket-user] Initial date in DatePicker component
one way is let the model decide thatso if the date == null return a date that you want.johanOn 5/4/06, Bruno Borges [EMAIL PROTECTED] wrote:How to set up an initial Date in a DatePicker object? I want to use DatePicker for birthday property, but I want it to load with a date 10 years before current year. How can I achieve this?Regards,-- Bruno Borges[EMAIL PROTECTED]Sun Certified Java Programmer for 1.4Sun Certified Web Component Developer for 1.4
Re: [Wicket-user] auto-submit when done picking date
as eelco is saying. Dig into the _javascript_ of that datepicker.See how it works and if you can patch it to only set the date when you close it.the _javascript_ is not written by us. We only use it. and intergrated it into wicket. johanOn 5/4/06, Frank Silbermann [EMAIL PROTECTED] wrote: Well, is there a configuration option only to change the date when a dayis chosen, but not when shifting to a new month?-Original Message-From: [EMAIL PROTECTED][mailto:[EMAIL PROTECTED]] On Behalf Of EelcoHilleniusSent: Thursday, May 04, 2006 12:23 PM To: wicket-user@lists.sourceforge.netSubject: Re: [Wicket-user] auto-submit when done picking date What I'd really like is to post back not when the texbox changes, but rather, when the datePicker closes.Any suggestions how?Would Ineed to associate the datePicker with something other than a span/ tag?Onwhich event would I put the this.form.submit () ?I'm afraid you'll have to dig deeper in the _javascript_ part of thedatepicker for this. If you find something that works, and you have anidea on how this could be integrated with the component, we'll be happy to accept a patch.Eelco---Using Tomcat but need to do more? Need to support web services,security?Get stuff done quickly with pre-integrated technology to make your job easierDownload IBM WebSphere Application Server v.1.0.1 based on ApacheGeronimohttp://sel.as-us.falkag.net/sel?cmd=kkid0709bid3057dat1642 ___Wicket-user mailing listWicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user---Using Tomcat but need to do more? Need to support web services, security?Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimohttp://sel.as-us.falkag.net/sel?cmdlnkkid0709bid3057dat1642 ___Wicket-user mailing listWicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Localization
On 5/4/06, Ralf Ebert [EMAIL PROTECTED] wrote: Hi Juergen, please see WicketMessageTagHandler.java. It is experimental only and disabled by default. Reason: it is realy ugly to have something like wicket:example=tag=key. AttributeModifier are much more convinent and far less ugly, IMO. if you have a page with like, say, 20 labels with static text (like you have sometimes in complex forms for explaining things) I don't see something to win by adding AttributeModifiers to the component tree. I see localization of static text as markup issue because there is almost no logic to define there. The format you described is rather ugly, that's right: What about: div wicket:message=blaLabelbla/div (if you want to go the message as text between the tags) this is wicket:message value=xxxdefault/wicket:message and already available. input type=submit wicket:message:value=Do something/ (for localizing the attribute value, probably the second : is not valid xml any more, but another separation char like _ or maybe no separation char at all could be used) It is all not realy nice, isn't it? That is what we struggled with. We didn't find a syntax which we realy liked and which is standards compliant (e.g. XML namespace, schema). This would be very helpful for quick easy localization of static content in pages, something that's missing at the moment from my point of view. Tell me what you think, if I have time I would like to implement this and contribute it... your help is very much appreciated but the syntax should be right. That is default. Localizer implements a search hierarchy up the component tree. You only need one properties files per language per Panel which contains X number of component. Thinking ... That is not your question, isn't it? Like Application.properties is the last resort for all messages, you ask for one per java package, right? So, in addition to the my.pkg.MyPanel.properties it should look in my/pkg/Wicket.properties as well (may be Wicket.properties is not the best name). That's what I want to do and it would be a nice feature if such a lookup strategy could be added by just setting an option and defining a name for the property file. I tried to do it quick myself but stopped after finding out that the property file name is quite tightly coupled to some class name for the moment... It is fairly easy to add. Please see Settings.addStringResourceLoader, Application.getResourceStreamLocator and CompoundResourceStreamLocator.java Let me know if you need any more help Juergen Regards, Ralf --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmdlnkkid0709bid3057dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid0709bid3057dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Model values not getting set properly
i am affraid that you really have to debug this yourself.Isn't there any exception/warning?johanOn 5/4/06, Dipu [EMAIL PROTECTED] wrote: Hi, I updated the the wicket source tree from svn trunk and myapplication stopped functioning. For some reason the values are not getting set to the resepective model object. When i change the dependency from the wicket project to the wicket.jar ( which i buildbefore updating the source tree) every thing is working normal. strange thing is that when i run the wicket examples against the wicket source tree there is no issues but when i copy the SignIn.java to my project and run it from therevalues are not getting set as expected. Ithink it has got something to do with csome conflicting references in my class path but i don't see anything unwanted htere in my class path. Anyone any clue about this ? Thanks Dipu
Re: [Wicket-user] The other side of Wicket ...
I am just wondering how other frameworks handle this problem and why it seems more difficult in Wicket? Would Wicket fit in well as a Web presentation layer for an application using EJB3 (including JPA)? i believe Vincent is working with ejb3 so maybe he can tell you about his experience. i think it would be trivial to create an IFieldValueFactory that can inject ejb3 beans instead of spring beans. the contribution would be welcome. the code can look identical to the spring injection @EjbBean private UserService userService; -Igor I'm about 90% finished w/ a Wicket/EJB3 (JBoss) storefront solution for my company to start doing consumer web sales. In my personal opinion, Wicket + EJB3 is the holy grail of Java web development...and I'm not being dramatic. It would be hard to convince me to use another framework, going forward. The app was incredibly easy to build once I got past the few learning-curve hurdles w/ Wicket (with the help of the exceptional Wicket devs, of course ;). I'm now rapidly adding features, tweaking, and doing all of this while training a new developer who just joined the company and is not familiar w/ Java, Wicket, or even web apps development in general. My app only has one Stateful bean, the ShoppingCart, and I didn't use injection in the Wicket layer since everything I'm doing passes through a thin proxy layer...but it was trivial to make calls to the EJB, nonetheless. I keep the stub stored in a session class in Wicket which I did by simply inheriting the WebSession class. We looked at several other technologies and my first choice was JSF + JBoss Seam. It's nice...but doesn't hold a candle to Wicket IMHO. I also looked at Tapestry, Struts, WebWork, etc. - none of them had the simplicity and elegance that Wicket offers...and so far the performance exceeds my expectations. -v --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid0709bid3057dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Re: Problem loading DatePicker inside Panel through AjaxLink
Not sure I understand what needs to be done. I guess I'll wait until tomorrow until the that is how the output must look like question is solved. Juergen On 5/4/06, Igor Vaynberg [EMAIL PROTECTED] wrote: i guess in this case we need to capture the head output of the component during ajax render and dump it into the markup before the component. Juergen are you reading with us? do you think this is feasible? -Igor On 5/4/06, Rüdiger Schulz [EMAIL PROTECTED] wrote: right, and that is the main problem to solve. is a script tag legal in the middle of html? because maybe we can capture the head output and just insert it into html script Tags in the middle of HTML are working in all browsers I ever had to use this. I'm not 100% sure if it's legal, but I think the main reason for putting JavaScript in the head is, that it is definitly loaded before any markup is using it. -Igor On 5/4/06, Bruno Borges [EMAIL PROTECTED] wrote: Igor, I'm not sure if browsers support the update head thing (probably not), but one first step solution is to notify the component that it is been added through Ajax, so the component must generate a load function and return that function name to the Ajax call, so the Ajax JS can call that function postprocessing. Of course, the main problem still continues: how to add the .js file of DatePicker/anything else, to the html page dynamically. On 5/4/06, Igor Vaynberg [EMAIL PROTECTED] wrote: yes, there is a problem indeed with components that need head contribution and are added via ajax. the problem is that when the component is added via ajax its header contribution is ingored because the head section is not updated. so in case of the datepicker the js it needs is never added to the page. im not really sure what the good solution for this is. maybe we can update the head, but do browsers take that into account? will a script tag added to head via outerhtml replacement be processed by the browser? can you even use outer/innerHtml on elements in the head region of the page? any thoughts/ideas are welcome. -igor On 5/3/06, Bruno Borges [EMAIL PROTECTED] wrote: Oh, one mistake in the code I sent. - The id for newUserLink I'm using is newUser; Everything works: AjaxLink replacing the div, the panel, submit, etc. Only the datePicker JS isn't working! Regards, On 5/4/06, Bruno Borges [EMAIL PROTECTED] wrote: I'm trying to load a Form Panel's child, and this panel is been loaded through an AjaxLink. The DatePicker icon doesn't work. The calendar doesn't shows up. Is there any incompatibility between loading panels with Ajax and DatePicker within? My code looks like this: class Index extends WebPage { constructor { final Label welcome = new Label(bodyPanel, Welcome); add(welcome); AjaxLink goHome = new AjaxLink(home) { ... { getPage().replace(welcome); target.addComponent(welcome); } }; AjaxLink newUserLink = AjaxLink(home) { ... { UserFormPanel panel = new UserFormPanel(bodyPanel); getPage().replace(panel); target.addComponent(panel); } }; add(newUserLink); add(goHome); } } class UserFormPanel extends Panel { constructor { add(new UserForm(userForm)); } } class UserForm extends Form { constructor { ... // other basic fields like 'username', 'email', 'password' // Date field fieldBirthday RequiredTextField fieldBirthday = new RequiredTextField(birthday, Date.class); fieldBirthday .add(DateValidator.maximum(Calendar.getInstance().getTime())); add(fieldBirthday); // DatePicker for fieldBirthday DatePickerSettings settings = new DatePickerSettings(); settings.setIfFormat(%d/%m/%Y); settings.setWeekNumbers(false); DatePicker datePicker = new DatePicker(datePicker, fieldBirthday , settings); add(datePicker); } } I can say for sure: the datepicker component was working perfectly before opening the panel through AjaxLink (actually, UserFormPanel was UserFormPage before this). Am I missing something here? Regards, -- Bruno Borges [EMAIL PROTECTED] Sun Certified Java Programmer for 1.4 Sun Certified Web Component Developer for 1.4 -- Bruno Borges [EMAIL PROTECTED] Sun Certified Java Programmer for 1.4 Sun Certified Web Component Developer for 1.4 --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmdlnkkid0709bid3057dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user --- Using Tomcat but need
Re: [Wicket-user] Re: Problem loading DatePicker inside Panel through AjaxLink
cool..varscript=document. createElement('script'); script.type='text/_javascript_' ; script.src='snip.js'; document.getElementsByTagName('head' )[0].appendChild(script); if that works.. that should be doable.johanOn 5/4/06, Igor Vaynberg [EMAIL PROTECTED] wrote:thanks bruno! i will try to take a look tonight and see if we can adapt these ideas. -IgorOn 5/4/06, Bruno Borges [EMAIL PROTECTED] wrote:I found some links that might be of great interest! dynamic load _javascript_ from _javascript_ http://www.activewidgets.com/_javascript_.forum.6114.15/dynamic-load-_javascript_-from-_javascript_.htmlDojo Package System http://dojo.jot.com/WikiHome/Documents/DojoPackageSystem_javascript_ Includes http://www.phpied.com/_javascript_-include/ On-Demand _javascript_http://ajaxpatterns.org/On-Demand_Javascript Hope this help!Regards On 5/4/06, Timo Stamm [EMAIL PROTECTED] wrote: Ooops. I was wrong.I just checked some stubs with the w3 validator, and they pass without ahitch. Both XHTML 1.0 strict and transitional. XHTML 1.1 and 2.0 seem tobe fine as well.Sorry.Timo Igor Vaynberg schrieb: in that case i dont see how you can ever make this work in xhtml unless you refresh the entire page. -Igor On 5/4/06, Timo Stamm [EMAIL PROTECTED] wrote: Igor Vaynberg schrieb: right, and that is the main problem to solve. is a script tag legal in the middle of html? Not in XHTML :( -IgorOn 5/4/06, Bruno Borges [EMAIL PROTECTED] wrote: Igor, I'm not sure if browsers support the update head thing (probably not), but one first step solution is to notify the component that it is been added through Ajax, so the component must generate a load function and return that function name to the Ajax call, so the Ajax JS can call that function postprocessing. Of course, the main problem still continues: how to add the .js file of DatePicker/anything else, to the html page dynamically. On 5/4/06, Igor Vaynberg [EMAIL PROTECTED] wrote: yes, there is a problem indeed with components that need head contribution and are added via ajax. the problem is that when the component is added via ajax its header contribution is ingored because the head section is not updated. so in case of the datepicker the js it needs is never added to the page. im not really sure what the good solution for this is. maybe we can update the head, but do browsers take that into account? will a script tag added to head via outerhtml replacement be processed by the browser? can you even use outer/innerHtml on elements in the head region of the page? any thoughts/ideas are welcome. -igor On 5/3/06, Bruno Borges [EMAIL PROTECTED] wrote: Oh, one mistake in the code I sent. - The id for newUserLink I'm using is newUser; Everything works: AjaxLink replacing the div, the panel, submit, etc.Only the datePicker JS isn't working! Regards, On 5/4/06, Bruno Borges [EMAIL PROTECTED] wrote: I'm trying to load a Form Panel's child, and this panel is been loaded through an AjaxLink. The DatePicker icon doesn't work. The calendar doesn't shows up. Is there any incompatibility between loading panels with Ajax and DatePicker within? My code looks like this: class Index extends WebPage { constructor { final Label welcome = new Label(bodyPanel, Welcome); add(welcome); AjaxLink goHome = new AjaxLink(home) { ... { getPage().replace(welcome); target.addComponent(welcome); } }; AjaxLink newUserLink = AjaxLink(home) { ... { UserFormPanel panel = new UserFormPanel(bodyPanel); getPage().replace(panel); target.addComponent(panel);}}; add(newUserLink); add(goHome); } } class UserFormPanel extends Panel { constructor { add(new UserForm(userForm)); } } class UserForm extends Form { constructor { ... // other basic fields like 'username', 'email', 'password' // Date field fieldBirthday RequiredTextField fieldBirthday = new RequiredTextField(birthday, Date.class); fieldBirthday .add( DateValidator.maximum(Calendar.getInstance ().getTime())); add(fieldBirthday); // DatePicker for fieldBirthday DatePickerSettings settings = new DatePickerSettings(); settings.setIfFormat(%d/%m/%Y); settings.setWeekNumbers (false); DatePicker datePicker = new DatePicker(datePicker, fieldBirthday , settings); add(datePicker); } } I can say for sure: the datepicker component was working perfectly before opening the panel through AjaxLink (actually, UserFormPanel was UserFormPage before this). Am I missing something here? Regards, -- Bruno Borges [EMAIL PROTECTED] Sun Certified Java Programmer for 1.4 Sun Certified Web Component Developer for 1.4 --Bruno Borges
Re: [Wicket-user] The other side of Wicket ...
and doing all of this while training a new developer who just joinedthe company and is not familiar w/ Java, Wicket, or even web apps development in general.lucky you!!! because they are not completely infected by the mvc (struts) way of working!Because that would be much worse :)johan
[Wicket-user] Re: populating the second form in the page
secondForm.setModel(new CompoundPropertyModel(myModel)); secondForm.setVisible(true) I can see the new loaded Model getting set in Component class but when it iterates over the children for populating the values then the previous model seems to be getting called. I am using CompoundPropertyModel(myModel), is that fine ? Thanks --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Re: populating the second form in the page
are you saying that childeren of the secondform still use the old compoundpropertymodel?when you are setting a new compoundmodel in the second form?what you also could do is just do is secondForm.setModelObject (youreObject)johanOn 5/4/06, Aditya [EMAIL PROTECTED] wrote: secondForm.setModel(new CompoundPropertyModel(myModel));secondForm.setVisible(true)I can see the new loaded Model getting set in Component class but when ititerates over the children for populating the values then the previous model seems to be getting called.I am using CompoundPropertyModel(myModel), is that fine ?Thanks---Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easierDownload IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___Wicket-user mailing list Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] The other side of Wicket ...
I don't hear great things about Struts! My experience w/ Java/J2EE/Java EE before wicket was Servlets+JSP+Hibernate (and JDBC), and I've only been doing Java for about a year. I had made a living off of Microsoft technologies for years prior to that, specifically C# and the .NET framework. I guess you could say I had a far worse infection than even a reformed Struts user would have had :D Seriously though, I looked at Struts and tried to walk through a few tutorials. If I can't grasp the framework, even at a very basic, high-level after doing a couple tutorials...it's probably too complex. Just glancing over the Wicket examples was enough for me to know it was something worth pursuing. On 5/4/06, Johan Compagner [EMAIL PROTECTED] wrote: and doing all of this while training a new developer who just joined the company and is not familiar w/ Java, Wicket, or even web apps development in general. lucky you!!! because they are not completely infected by the mvc (struts) way of working! Because that would be much worse :) johan --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid0709bid3057dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
RE: [Wicket-user] The other side of Wicket ...
My great hope is that Wicket can provide great productivity and power to people who have a true mastery of object-oriented techniques, raising their pay and status above that of ordinary code-monkeys and API-memorizers. My great fear is that the market will reject Wicket because procedurally-oriented code-monkeys won't be able to use it. :-) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Vincent Jenks Sent: Thursday, May 04, 2006 3:41 PM To: wicket-user@lists.sourceforge.net Subject: Re: [Wicket-user] The other side of Wicket ... I don't hear great things about Struts! My experience w/ Java/J2EE/Java EE before wicket was Servlets+JSP+Hibernate (and JDBC), and I've only been doing Java for about a year. I had made a living off of Microsoft technologies for years prior to that, specifically C# and the .NET framework. I guess you could say I had a far worse infection than even a reformed Struts user would have had :D Seriously though, I looked at Struts and tried to walk through a few tutorials. If I can't grasp the framework, even at a very basic, high-level after doing a couple tutorials...it's probably too complex. Just glancing over the Wicket examples was enough for me to know it was something worth pursuing. On 5/4/06, Johan Compagner [EMAIL PROTECTED] wrote: and doing all of this while training a new developer who just joined the company and is not familiar w/ Java, Wicket, or even web apps development in general. lucky you!!! because they are not completely infected by the mvc (struts) way of working! Because that would be much worse :) johan --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=kkid0709bid3057dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid0709bid3057dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Re: Problem loading DatePicker inside Panel through AjaxLink
i dont think this is cool at all because it requires components to provide an alternate output unless we parse the script and link tags ourselves.-IgorOn 5/4/06, Johan Compagner [EMAIL PROTECTED] wrote: cool..varscript=document. createElement('script'); script.type='text/_javascript_' ; script.src='snip.js'; document.getElementsByTagName('head' )[0].appendChild(script); if that works.. that should be doable.johan On 5/4/06, Igor Vaynberg [EMAIL PROTECTED] wrote:thanks bruno! i will try to take a look tonight and see if we can adapt these ideas. -IgorOn 5/4/06, Bruno Borges [EMAIL PROTECTED] wrote:I found some links that might be of great interest! dynamic load _javascript_ from _javascript_ http://www.activewidgets.com/_javascript_.forum.6114.15/dynamic-load-_javascript_-from-_javascript_.htmlDojo Package System http://dojo.jot.com/WikiHome/Documents/DojoPackageSystem_javascript_ Includes http://www.phpied.com/_javascript_-include/ On-Demand _javascript_http://ajaxpatterns.org/On-Demand_Javascript Hope this help!Regards On 5/4/06, Timo Stamm [EMAIL PROTECTED] wrote: Ooops. I was wrong.I just checked some stubs with the w3 validator, and they pass without ahitch. Both XHTML 1.0 strict and transitional. XHTML 1.1 and 2.0 seem tobe fine as well.Sorry.Timo Igor Vaynberg schrieb: in that case i dont see how you can ever make this work in xhtml unless you refresh the entire page. -Igor On 5/4/06, Timo Stamm [EMAIL PROTECTED] wrote: Igor Vaynberg schrieb: right, and that is the main problem to solve. is a script tag legal in the middle of html? Not in XHTML :( -IgorOn 5/4/06, Bruno Borges [EMAIL PROTECTED] wrote: Igor, I'm not sure if browsers support the update head thing (probably not), but one first step solution is to notify the component that it is been added through Ajax, so the component must generate a load function and return that function name to the Ajax call, so the Ajax JS can call that function postprocessing. Of course, the main problem still continues: how to add the .js file of DatePicker/anything else, to the html page dynamically. On 5/4/06, Igor Vaynberg [EMAIL PROTECTED] wrote: yes, there is a problem indeed with components that need head contribution and are added via ajax. the problem is that when the component is added via ajax its header contribution is ingored because the head section is not updated. so in case of the datepicker the js it needs is never added to the page. im not really sure what the good solution for this is. maybe we can update the head, but do browsers take that into account? will a script tag added to head via outerhtml replacement be processed by the browser? can you even use outer/innerHtml on elements in the head region of the page? any thoughts/ideas are welcome. -igor On 5/3/06, Bruno Borges [EMAIL PROTECTED] wrote: Oh, one mistake in the code I sent. - The id for newUserLink I'm using is newUser; Everything works: AjaxLink replacing the div, the panel, submit, etc.Only the datePicker JS isn't working! Regards, On 5/4/06, Bruno Borges [EMAIL PROTECTED] wrote: I'm trying to load a Form Panel's child, and this panel is been loaded through an AjaxLink. The DatePicker icon doesn't work. The calendar doesn't shows up. Is there any incompatibility between loading panels with Ajax and DatePicker within? My code looks like this: class Index extends WebPage { constructor { final Label welcome = new Label(bodyPanel, Welcome); add(welcome); AjaxLink goHome = new AjaxLink(home) { ... { getPage().replace(welcome); target.addComponent(welcome); } }; AjaxLink newUserLink = AjaxLink(home) { ... { UserFormPanel panel = new UserFormPanel(bodyPanel); getPage().replace(panel); target.addComponent(panel);}}; add(newUserLink); add(goHome); } } class UserFormPanel extends Panel { constructor { add(new UserForm(userForm)); } } class UserForm extends Form { constructor { ... // other basic fields like 'username', 'email', 'password' // Date field fieldBirthday RequiredTextField fieldBirthday = new RequiredTextField(birthday, Date.class); fieldBirthday .add( DateValidator.maximum(Calendar.getInstance ().getTime())); add(fieldBirthday); // DatePicker for fieldBirthday DatePickerSettings settings = new DatePickerSettings(); settings.setIfFormat(%d/%m/%Y); settings.setWeekNumbers (false); DatePicker datePicker = new DatePicker(datePicker, fieldBirthday , settings); add(datePicker); } } I can say for sure: the datepicker component was working perfectly before opening the panel through AjaxLink (actually, UserFormPanel was UserFormPage before this). Am I missing something
Re: [Wicket-user] Re: Problem loading DatePicker inside Panel through AjaxLink
basically what we are talking about is somehow capturing the componnet's header contribution and writing it out.so take datepicker, datepicker.html has a wicket:head section. what we need to do is to somehow get that portion as a charsequence so that the ajax request target can dump it as part of component's markup. we also need to capture the head output from behaviors. i dont know how feasible it all is. this might solve _javascript_, but what about link tags for css? are those legal outside the head? and will browsers pick them up if we write them out via outerhtml?-Igor On 5/4/06, Juergen Donnerstag [EMAIL PROTECTED] wrote: Not sure I understand what needs to be done. I guess I'll wait untiltomorrow until the that is how the output must look like question issolved.JuergenOn 5/4/06, Igor Vaynberg [EMAIL PROTECTED] wrote: i guess in this case we need to capture the head output of the component during ajax render and dump it into the markup before the component. Juergen are you reading with us? do you think this is feasible? -Igor On 5/4/06, Rüdiger Schulz [EMAIL PROTECTED] wrote: right, and that is the main problem to solve. is a script tag legal in the middle of html? because maybe we can capture the head output and just insert it into html script Tags in the middle of HTML are working in all browsers I ever had to use this. I'm not 100% sure if it's legal, but I think the main reason for putting _javascript_ in the head is, that it is definitly loaded before any markup is using it. -Igor On 5/4/06, Bruno Borges [EMAIL PROTECTED] wrote: Igor, I'm not sure if browsers support the update head thing (probably not), but one first step solution is to notify the component that it is been added through Ajax, so the component must generate a load function and return that function name to the Ajax call, so the Ajax JS can call that function postprocessing.Of course, the main problem still continues: how to add the .js file of DatePicker/anything else, to the html page dynamically. On 5/4/06, Igor Vaynberg [EMAIL PROTECTED] wrote: yes, there is a problem indeed with components that need head contribution and are added via ajax. the problem is that when the component is added via ajax its header contribution is ingored because the head section is not updated. so in case of the datepicker the js it needs is never added to the page.im not really sure what the good solution for this is. maybe we can update the head, but do browsers take that into account? will a script tag added to head via outerhtml replacement be processed by the browser? can you even use outer/innerHtml on elements in the head region of the page? any thoughts/ideas are welcome. -igor On 5/3/06, Bruno Borges [EMAIL PROTECTED] wrote: Oh, one mistake in the code I sent.- The id for newUserLink I'm using is newUser;Everything works: AjaxLink replacing the div, the panel, submit, etc. Only the datePicker JS isn't working!Regards, On 5/4/06, Bruno Borges [EMAIL PROTECTED] wrote: I'm trying to load a Form Panel's child, and this panel is been loaded through an AjaxLink.The DatePicker icon doesn't work. The calendar doesn't shows up. Is there any incompatibility between loading panels with Ajax and DatePicker within?My code looks like this:class Index extends WebPage { constructor { final Label welcome = new Label(bodyPanel, Welcome); add(welcome);AjaxLink goHome = new AjaxLink(home) { ... { getPage().replace(welcome);target.addComponent(welcome);}};AjaxLink newUserLink = AjaxLink(home) { ... { UserFormPanel panel = new UserFormPanel(bodyPanel);getPage().replace(panel);target.addComponent(panel); }};add(newUserLink); add(goHome);} } class UserFormPanel extends Panel { constructor { add(new UserForm(userForm));}} class UserForm extends Form { constructor { ... // other basic fields like 'username', 'email', 'password' // Date field fieldBirthday RequiredTextField fieldBirthday = new RequiredTextField(birthday, Date.class); fieldBirthday .add(DateValidator.maximum(Calendar.getInstance ().getTime())); add(fieldBirthday);// DatePicker for fieldBirthday DatePickerSettings settings = new DatePickerSettings(); settings.setIfFormat(%d/%m/%Y); settings.setWeekNumbers(false); DatePicker datePicker = new DatePicker(datePicker, fieldBirthday , settings); add(datePicker); }} I can say for sure: the datepicker component was working perfectly before opening the panel through AjaxLink (actually, UserFormPanel was UserFormPage before this). Am I missing something here?Regards,-- Bruno Borges [EMAIL PROTECTED] Sun Certified Java Programmer for 1.4 Sun Certified Web Component Developer for 1.4 -- Bruno Borges [EMAIL PROTECTED] Sun Certified Java Programmer for 1.4 Sun
Re: [Wicket-user] Re: populating the second form in the page
it would help to see the code also.-IgorOn 5/4/06, Johan Compagner [EMAIL PROTECTED] wrote: are you saying that childeren of the secondform still use the old compoundpropertymodel? when you are setting a new compoundmodel in the second form?what you also could do is just do is secondForm.setModelObject (youreObject)johanOn 5/4/06, Aditya [EMAIL PROTECTED] wrote: secondForm.setModel(new CompoundPropertyModel(myModel));secondForm.setVisible(true)I can see the new loaded Model getting set in Component class but when ititerates over the children for populating the values then the previous model seems to be getting called.I am using CompoundPropertyModel(myModel), is that fine ?Thanks---Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easierDownload IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___Wicket-user mailing list Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] The other side of Wicket ...
Johan Compagner schrieb: and doing all of this while training a new developer who just joined the company and is not familiar w/ Java, Wicket, or even web apps development in general. lucky you!!! because they are not completely infected by the mvc (struts) way of working! MVC is not Struts! (MVC is *much* older.) I wouldn't even say that Struts is MVC. Timo --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] The other side of Wicket ...
Frank Silbermann schrieb: My great hope is that Wicket can provide great productivity and power to people who have a true mastery of object-oriented techniques, raising their pay and status above that of ordinary code-monkeys and API-memorizers. My great fear is that the market will reject Wicket because procedurally-oriented code-monkeys won't be able to use it. The better for us. We can offer better quality for the same price *and* go home early :) --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] The other side of Wicket ...
MVC is not Struts! (MVC is *much* older.) I wouldn't even say that Struts is MVC. You might even argue that Swing isn't the MVC as it was proposed. But yeah, that's why I try to keep calling those frameworks 'model 2' instead. Eelco --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid0709bid3057dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] The other side of Wicket ...
On 5/4/06, Vincent Jenks [EMAIL PROTECTED] wrote: I don't hear great things about Struts! My experience w/ Java/J2EE/Java EE before wicket was Servlets+JSP+Hibernate (and JDBC), and I've only been doing Java for about a year. I had made a living off of Microsoft technologies for years prior to that, specifically C# and the .NET framework. Actually, .NET isn't that bad. Way better than Struts or any other model 2 framework imo. It's component oriented, and personally I think they even did that in a better way (because simpler) than JSF. JSF and .NET or very close cousins. Not something I would like to do without IDEs that support it though, and I've seen people doing .NET with word pad because VS crashed on their files. Eelco --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid0709bid3057dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] Re: The other side of Wicket ...
Timo Stamm wrote: MVC is not Struts! (MVC is *much* older.) I wouldn't even say that Struts is MVC. Yeah, but, it's a lost cause. The word anyway. The concept is enshrined in component based frameworks, so we can confidently roll our eyes whenever those Rails barbarians describe the activities of a single request cycle as MVC. Maybe we should come up with a secret MVC handshake, or gang sign. Nathan --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Re: The other side of Wicket ...
with all the talent in this thread its amazing how fast it can deteriorate :)-IgorOn 5/4/06, Nathan Hamblen [EMAIL PROTECTED] wrote:Timo Stamm wrote: MVC is not Struts! (MVC is *much* older.) I wouldn't even say that Struts is MVC.Yeah, but, it's a lost cause. The word anyway. The concept is enshrinedin component based frameworks, so we can confidently roll our eyeswhenever those Rails barbarians describe the activities of a single request cycle as MVC.Maybe we should come up with a secret MVC handshake, or gang sign.Nathan---Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easierDownload IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___Wicket-user mailing list Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] The other side of Wicket ...
Oh yeah, just jokes, .NET is a pretty great technology...though it still requires far more work than the EJB3+Wicket combo. MS's tools are great, they have a snazzy IDE...but I still prefer Eclipse...perhaps because of its open nature and breadth of industry support both pro amateur. The tools are also the problemyou can't rely on much else outside of MS's visual studio tools to do the job. I personally hate WYSIWYG environments and writing asp.net pages, controls, etc. w/o the editor can be quite tedious. JSF's similarity to ASP.NET is one reason I didn't want to use it...not to mention all of the strange issues I had heard of w/ JSF 1.1. .NET has it's place...but now that EJB3 is a finalized spec...I doubt it can keep up w/ Java EE 5 and beyond in a one-on-one comparison. On 5/4/06, Eelco Hillenius [EMAIL PROTECTED] wrote: On 5/4/06, Vincent Jenks [EMAIL PROTECTED] wrote: I don't hear great things about Struts! My experience w/ Java/J2EE/Java EE before wicket was Servlets+JSP+Hibernate (and JDBC), and I've only been doing Java for about a year. I had made a living off of Microsoft technologies for years prior to that, specifically C# and the .NET framework. Actually, .NET isn't that bad. Way better than Struts or any other model 2 framework imo. It's component oriented, and personally I think they even did that in a better way (because simpler) than JSF. JSF and .NET or very close cousins. Not something I would like to do without IDEs that support it though, and I've seen people doing .NET with word pad because VS crashed on their files. Eelco --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmdlnkkid0709bid3057dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid0709bid3057dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Re: Problem loading DatePicker inside Panel through AjaxLink
Looks like there's no problem adding styles. http://www.dynamicdrive.com/forums/archive/index.php/t-3459.htmlThis URL is not quite what it should be for, but demonstrates how CSS's can be changed without reloading a page. And I'm sure the same way new .js files can be added to a Head section dynamically, css can be either. :) On 5/4/06, Igor Vaynberg [EMAIL PROTECTED] wrote: basically what we are talking about is somehow capturing the componnet's header contribution and writing it out.so take datepicker, datepicker.html has a wicket:head section. what we need to do is to somehow get that portion as a charsequence so that the ajax request target can dump it as part of component's markup. we also need to capture the head output from behaviors. i dont know how feasible it all is. this might solve _javascript_, but what about link tags for css? are those legal outside the head? and will browsers pick them up if we write them out via outerhtml? -Igor On 5/4/06, Juergen Donnerstag [EMAIL PROTECTED] wrote: Not sure I understand what needs to be done. I guess I'll wait untiltomorrow until the that is how the output must look like question issolved.JuergenOn 5/4/06, Igor Vaynberg [EMAIL PROTECTED] wrote: i guess in this case we need to capture the head output of the component during ajax render and dump it into the markup before the component. Juergen are you reading with us? do you think this is feasible? -Igor On 5/4/06, Rüdiger Schulz [EMAIL PROTECTED] wrote: right, and that is the main problem to solve. is a script tag legal in the middle of html? because maybe we can capture the head output and just insert it into html script Tags in the middle of HTML are working in all browsers I ever had to use this. I'm not 100% sure if it's legal, but I think the main reason for putting _javascript_ in the head is, that it is definitly loaded before any markup is using it. -Igor On 5/4/06, Bruno Borges [EMAIL PROTECTED] wrote: Igor, I'm not sure if browsers support the update head thing (probably not), but one first step solution is to notify the component that it is been added through Ajax, so the component must generate a load function and return that function name to the Ajax call, so the Ajax JS can call that function postprocessing.Of course, the main problem still continues: how to add the .js file of DatePicker/anything else, to the html page dynamically. On 5/4/06, Igor Vaynberg [EMAIL PROTECTED] wrote: yes, there is a problem indeed with components that need head contribution and are added via ajax. the problem is that when the component is added via ajax its header contribution is ingored because the head section is not updated. so in case of the datepicker the js it needs is never added to the page.im not really sure what the good solution for this is. maybe we can update the head, but do browsers take that into account? will a script tag added to head via outerhtml replacement be processed by the browser? can you even use outer/innerHtml on elements in the head region of the page? any thoughts/ideas are welcome. -igor On 5/3/06, Bruno Borges [EMAIL PROTECTED] wrote: Oh, one mistake in the code I sent.- The id for newUserLink I'm using is newUser;Everything works: AjaxLink replacing the div, the panel, submit, etc. Only the datePicker JS isn't working!Regards, On 5/4/06, Bruno Borges [EMAIL PROTECTED] wrote: I'm trying to load a Form Panel's child, and this panel is been loaded through an AjaxLink.The DatePicker icon doesn't work. The calendar doesn't shows up. Is there any incompatibility between loading panels with Ajax and DatePicker within?My code looks like this:class Index extends WebPage { constructor { final Label welcome = new Label(bodyPanel, Welcome); add(welcome);AjaxLink goHome = new AjaxLink(home) { ... { getPage().replace(welcome);target.addComponent(welcome);}};AjaxLink newUserLink = AjaxLink(home) { ... { UserFormPanel panel = new UserFormPanel(bodyPanel);getPage().replace(panel);target.addComponent(panel); }};add(newUserLink); add(goHome);} } class UserFormPanel extends Panel { constructor { add(new UserForm(userForm));}} class UserForm extends Form { constructor { ... // other basic fields like 'username', 'email', 'password' // Date field fieldBirthday RequiredTextField fieldBirthday = new RequiredTextField(birthday, Date.class); fieldBirthday .add(DateValidator.maximum(Calendar.getInstance ().getTime())); add(fieldBirthday);// DatePicker for fieldBirthday DatePickerSettings settings = new DatePickerSettings(); settings.setIfFormat(%d/%m/%Y); settings.setWeekNumbers(false); DatePicker datePicker = new DatePicker(datePicker, fieldBirthday , settings); add(datePicker); }} I can say for sure: the datepicker component was
[Wicket-user] Re: The other side of Wicket ...
Hi Vincent (et al.),I'm about 90% finished w/ a Wicket/EJB3 (JBoss) storefront solution for my company to start doing consumer web sales. In my personal opinion, Wicket + EJB3 is the holy grail of Java web development...and I'm not being dramatic. It would be hard to convince me to use another framework, going forward. That's a glowing report for Wicket integration with EJB3.Thanks for explaining how well your application development went. Cheers,Ashley.--Ashley AitkenPerth, Western Australiamrhatken at mac dot comSkype Name: MrHatken (GMT + 8 Hours!)