RE: Images not displaying
Hi James I have tried placing the img tag between wicket:link tags but still no image displaying. I have also tried the same with the DateTextField/DatePicker input text field in order to display the calendar icon, but still nothing displays. This one in particular is very odd since it is the wicket DatePicker class. I cannot display any image whether it be a img tag or a built in wicket image like with the DatePicker class. Here is my setup: HTML PAGE: form wicket:id=transactionQueryForm table tr td span wicket:id=cardNumberLabel/span: /td td input type=text wicket:id=cardNumberField size=20 / /td /tr tr td span wicket:id=dateFromLabel/span: /td td input type=text wicket:id=dateFromField/ /td /tr tr td colspan=2 align=left input type=submit name=search value=search/ /td /tr /table /form /wicket:extend JAVA CLASS: import java.util.Date; import java.util.Locale; import javax.servlet.http.HttpSession; import org.apache.wicket.datetime.StyleDateConverter; import org.apache.wicket.datetime.markup.html.form.DateTextField; import org.apache.wicket.extensions.yui.calendar.DatePicker; import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.markup.html.form.Form; import org.apache.wicket.markup.html.form.TextField; import org.apache.wicket.model.Model; import org.apache.wicket.model.PropertyModel; import org.apache.wicket.protocol.http.WebRequest; /** * @author Administrator */ public class TransactionQueryPage extends BasePage { public TransactionQueryPage() { add(new TransactionQueryForm(transactionQueryForm)); } public final class TransactionQueryForm extends Form { private Locale selectedLocale = new Locale(en); private TextField cardNumberField; private Date date = new Date(); private DateTextField dateFromField; public TransactionQueryForm(String id) { super(id); add(new Label(cardNumberLabel, Card number)); add(cardNumberField = new TextField(cardNumberField, new Model( enter a card number))); add(new Label(dateFromLabel, Date From:)); dateFromField = new DateTextField( dateFromField, new PropertyModel(this, date), new StyleDateConverter( S-, true)) { @Override public Locale getLocale() { return selectedLocale; } }; dateFromField.add(new DatePicker()); add(dateFromField); } public final void onSubmit() { // } } } JAVA APPLICATION CLASS: import org.apache.wicket.protocol.http.WebApplication; import za.co.transactionjunction.transpector.pages.IndexPage; /** * @author Administrator */ public class TranspectorApplication extends WebApplication { public TranspectorApplication() { } public ClassIndexPage getHomePage() { return IndexPage.class; } } Please help. Regards, Yazeed -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of James Carman Sent: 26 September 2008 05:16 PM To: users@wicket.apache.org Subject: Re: Images not displaying Try surrounding your img tag with wicket:link tags. On Fri, Sep 26, 2008 at 11:04 AM, Yazeed Isaacs [EMAIL PROTECTED] wrote: Hi I am trying to display a logo but nothing is displayed. Eg: img src=logo.jpg/ Files are: Index.html Index.java logo.jpg To make matters worst, I tried this with the DateTextField DatePicker classes, eg: dateFromField = new DateTextField( dateFromField, new PropertyModel(this, date), new StyleDateConverter( S-, true)) {
Re: Images not displaying
is your filter's mapping properly ends in a /* ? -igor On Sun, Sep 28, 2008 at 11:52 PM, Yazeed Isaacs [EMAIL PROTECTED] wrote: Hi James I have tried placing the img tag between wicket:link tags but still no image displaying. I have also tried the same with the DateTextField/DatePicker input text field in order to display the calendar icon, but still nothing displays. This one in particular is very odd since it is the wicket DatePicker class. I cannot display any image whether it be a img tag or a built in wicket image like with the DatePicker class. Here is my setup: HTML PAGE: form wicket:id=transactionQueryForm table tr td span wicket:id=cardNumberLabel/span: /td td input type=text wicket:id=cardNumberField size=20 / /td /tr tr td span wicket:id=dateFromLabel/span: /td td input type=text wicket:id=dateFromField/ /td /tr tr td colspan=2 align=left input type=submit name=search value=search/ /td /tr /table /form /wicket:extend JAVA CLASS: import java.util.Date; import java.util.Locale; import javax.servlet.http.HttpSession; import org.apache.wicket.datetime.StyleDateConverter; import org.apache.wicket.datetime.markup.html.form.DateTextField; import org.apache.wicket.extensions.yui.calendar.DatePicker; import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.markup.html.form.Form; import org.apache.wicket.markup.html.form.TextField; import org.apache.wicket.model.Model; import org.apache.wicket.model.PropertyModel; import org.apache.wicket.protocol.http.WebRequest; /** * @author Administrator */ public class TransactionQueryPage extends BasePage { public TransactionQueryPage() { add(new TransactionQueryForm(transactionQueryForm)); } public final class TransactionQueryForm extends Form { private Locale selectedLocale = new Locale(en); private TextField cardNumberField; private Date date = new Date(); private DateTextField dateFromField; public TransactionQueryForm(String id) { super(id); add(new Label(cardNumberLabel, Card number)); add(cardNumberField = new TextField(cardNumberField, new Model( enter a card number))); add(new Label(dateFromLabel, Date From:)); dateFromField = new DateTextField( dateFromField, new PropertyModel(this, date), new StyleDateConverter( S-, true)) { @Override public Locale getLocale() { return selectedLocale; } }; dateFromField.add(new DatePicker()); add(dateFromField); } public final void onSubmit() { // } } } JAVA APPLICATION CLASS: import org.apache.wicket.protocol.http.WebApplication; import za.co.transactionjunction.transpector.pages.IndexPage; /** * @author Administrator */ public class TranspectorApplication extends WebApplication { public TranspectorApplication() { } public ClassIndexPage getHomePage() { return IndexPage.class; } } Please help. Regards, Yazeed -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of James Carman Sent: 26 September 2008 05:16 PM To: users@wicket.apache.org Subject: Re: Images not displaying Try surrounding your img tag with wicket:link tags. On Fri, Sep 26, 2008 at 11:04 AM, Yazeed Isaacs [EMAIL PROTECTED] wrote: Hi I am trying to display a logo but nothing is displayed. Eg: img src=logo.jpg/ Files are: Index.html Index.java logo.jpg To make matters worst, I tried this with the DateTextField DatePicker classes, eg: dateFromField = new DateTextField( dateFromField, new PropertyModel(this, date), new StyleDateConverter( S-, true)) { @Override public Locale getLocale() {
RE: Images not displaying
Hi Igor Please excuse me, but I am new to wicket. :) I am not sure what you mean by filter's mapping end in a /*, please explain. Is this a mapping configuration that I must setup with the app? Regards, Yazeed -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: 29 September 2008 10:01 AM To: users@wicket.apache.org Subject: Re: Images not displaying is your filter's mapping properly ends in a /* ? -igor On Sun, Sep 28, 2008 at 11:52 PM, Yazeed Isaacs [EMAIL PROTECTED] wrote: Hi James I have tried placing the img tag between wicket:link tags but still no image displaying. I have also tried the same with the DateTextField/DatePicker input text field in order to display the calendar icon, but still nothing displays. This one in particular is very odd since it is the wicket DatePicker class. I cannot display any image whether it be a img tag or a built in wicket image like with the DatePicker class. Here is my setup: HTML PAGE: form wicket:id=transactionQueryForm table tr td span wicket:id=cardNumberLabel/span: /td td input type=text wicket:id=cardNumberField size=20 / /td /tr tr td span wicket:id=dateFromLabel/span: /td td input type=text wicket:id=dateFromField/ /td /tr tr td colspan=2 align=left input type=submit name=search value=search/ /td /tr /table /form /wicket:extend JAVA CLASS: import java.util.Date; import java.util.Locale; import javax.servlet.http.HttpSession; import org.apache.wicket.datetime.StyleDateConverter; import org.apache.wicket.datetime.markup.html.form.DateTextField; import org.apache.wicket.extensions.yui.calendar.DatePicker; import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.markup.html.form.Form; import org.apache.wicket.markup.html.form.TextField; import org.apache.wicket.model.Model; import org.apache.wicket.model.PropertyModel; import org.apache.wicket.protocol.http.WebRequest; /** * @author Administrator */ public class TransactionQueryPage extends BasePage { public TransactionQueryPage() { add(new TransactionQueryForm(transactionQueryForm)); } public final class TransactionQueryForm extends Form { private Locale selectedLocale = new Locale(en); private TextField cardNumberField; private Date date = new Date(); private DateTextField dateFromField; public TransactionQueryForm(String id) { super(id); add(new Label(cardNumberLabel, Card number)); add(cardNumberField = new TextField(cardNumberField, new Model( enter a card number))); add(new Label(dateFromLabel, Date From:)); dateFromField = new DateTextField( dateFromField, new PropertyModel(this, date), new StyleDateConverter( S-, true)) { @Override public Locale getLocale() { return selectedLocale; } }; dateFromField.add(new DatePicker()); add(dateFromField); } public final void onSubmit() { // } } } JAVA APPLICATION CLASS: import org.apache.wicket.protocol.http.WebApplication; import za.co.transactionjunction.transpector.pages.IndexPage; /** * @author Administrator */ public class TranspectorApplication extends WebApplication { public TranspectorApplication() { } public ClassIndexPage getHomePage() { return IndexPage.class; } } Please help. Regards, Yazeed -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of James Carman Sent: 26 September 2008 05:16 PM To: users@wicket.apache.org Subject: Re: Images not displaying Try surrounding your img tag with wicket:link tags. On Fri, Sep 26, 2008 at 11:04 AM, Yazeed Isaacs [EMAIL PROTECTED] wrote: Hi I am trying to display a logo but nothing is displayed. Eg: img src=logo.jpg/ Files are: Index.html Index.java logo.jpg To make matters worst, I tried this with the DateTextField DatePicker classes, eg: dateFromField = new DateTextField(
Re: WANG–Wicket Ajax Next Gene ration–being based on YUI (MD)
Igor, I should say that I was convinced already, by Matej's first response [1] to my original post on this thread, that this decision (not to mention Matej's expertise and hard work) will give us a robust, flexible and maintainable underlying infrastructure with no perceivable impact on the component or application developers' range of client-side library choices. Regads - Cemal http://www.jWeekend.co.uk http://jWeekend.co.uk [ http://www.nabble.com/forum/ViewPost.jtp?post=19169614framed=y 1 ] igor.vaynberg wrote: im not sure why you guys are making such a big deal out of this. we are talking about javascript that is entirely internal to wicket. you never see it, you never touch it. it is completely namespaced in wicket's namespace. we have chosen a library that we are comfortable working with. if we can get our stuff done faster and easier with yui then that is what we are going to use... sure, we might use it to write some high level components (eg modal window) that we ship with wicket, but those do not use any internal api. there is absolutely nothing stopping you from writing your own jquery-driven modal window component. so my question to you guys is: why does it matter to you which javascript framework we use under the hood? -igor On Sun, Sep 28, 2008 at 7:01 PM, Jörn Zaefferer [EMAIL PROTECTED] wrote: There is something new to consider when choosing a JavaScript library as Wicket's base: http://www.jondavis.net/blog/post/2008/09/jQuery-Has-Won-The-3-Year-Javascript-Framework-Battle-As-Far-As-Im-Concerned.aspx http://www.hanselman.com/blog/jQuerytoshipwithASPNETMVCandVisualStudio.aspx Jörn On Wed, Aug 27, 2008 at 1:05 AM, Matej Knopp [EMAIL PROTECTED] wrote: On Wed, Aug 27, 2008 at 12:50 AM, Jörn Zaefferer [EMAIL PROTECTED] wrote: On Tue, Aug 26, 2008 at 10:19 PM, Matej Knopp [EMAIL PROTECTED] wrote: Hi, On Tue, Aug 26, 2008 at 9:24 PM, jWeekend [EMAIL PROTECTED] wrote: Matej, What are the implications of the decision to base Wicket Ajax Next Generation on YUI in terms of choosing a Javascript library for future Wicket based web front ends? actually, there really are none. The use of YUI will be more or less internal to Wicket, so you can continue using jQuery, YUI2 or whatever else you are using. Everything in Wicket (and YUI) is namespaced so there are no conflicts. Of course there is the overhead of including two or more libraries in an application, which don't find desirable. Wicket uses only part of YUI, the compressed minified required YUI javascript is about 20kb big. I would understand the concern if I used dojo or some other behemoth with 200+ kb of compressed javascript. + there's huge number and variety of jQuery plugins for those special occasions. Unfortunately the quality of plugins varies. For actual wicket ajax implementation i prefer to stick with the core thing, and that's where YUI definitely beats jquery. I don't say that there are no plugins for jQuery that covers YUI functionality. Question is how well are those plugins supported and maintained. You are well on the point that the variety of plugins varies. I see it this way: jQuery core is small, very stable and the base for everything else JS-related. jQuery UI is the official project providing the same stability and quality for various high-level UI components (like dialogs) and also low-level components (like dragdrop, sortables). We'll see at least two major releases this year that add more components to the mix. Anything else that isn't covered by core or UI is almost always covered by some third-party plugin. While these plugin can be of bady quality (eg. no documentation/demos), they can still provide a good starting point, so that you don't have to start from scratch. Even if you do a full rewrite, the existing plugin can expose useful information like potential browser-bug-traps. Problem is that the jQuery core doesn't cut it. And rewriting plugins from scratch? Are you serious? This is exactly the reason why I decided to use YUI. The stuff that I need is there, it is supported and maintained. Anyway, as I say, this doesn't make any implication to Wicket users or 3rd party components. The reason why wicket ajax is based on another framework is to get rid of most of the low level browser specific code we have currently so that I wouldn't have to maintain it :) Whatever the framework, I think its a good idea to start with something well supported and tested. Thats why I use Wicket, though I'd like it even more with jQuery as the base framework :-) At this point, I really don't see any advantage that YUI would give me over jQuery. Also it is possible that InMethod grid will be part of Wicket 1.5 extensions which is another point for using YUI. Rewriting the grid with jquery would be a huge pain. -Matej Jörn PS: Comet support is a nice to have, but I think there a way more important things for core
RE: Images not displaying
Hi Igor You mean filter mappings in web.xml I did not have any filter mappings, so I have added them and everything is now working fine. Thanks for the help Igor. Regards, Yazeed -Original Message- From: Yazeed Isaacs Sent: 29 September 2008 11:16 AM To: users@wicket.apache.org Subject: RE: Images not displaying Hi Igor Please excuse me, but I am new to wicket. :) I am not sure what you mean by filter's mapping end in a /*, please explain. Is this a mapping configuration that I must setup with the app? Regards, Yazeed -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: 29 September 2008 10:01 AM To: users@wicket.apache.org Subject: Re: Images not displaying is your filter's mapping properly ends in a /* ? -igor On Sun, Sep 28, 2008 at 11:52 PM, Yazeed Isaacs [EMAIL PROTECTED] wrote: Hi James I have tried placing the img tag between wicket:link tags but still no image displaying. I have also tried the same with the DateTextField/DatePicker input text field in order to display the calendar icon, but still nothing displays. This one in particular is very odd since it is the wicket DatePicker class. I cannot display any image whether it be a img tag or a built in wicket image like with the DatePicker class. Here is my setup: HTML PAGE: form wicket:id=transactionQueryForm table tr td span wicket:id=cardNumberLabel/span: /td td input type=text wicket:id=cardNumberField size=20 / /td /tr tr td span wicket:id=dateFromLabel/span: /td td input type=text wicket:id=dateFromField/ /td /tr tr td colspan=2 align=left input type=submit name=search value=search/ /td /tr /table /form /wicket:extend JAVA CLASS: import java.util.Date; import java.util.Locale; import javax.servlet.http.HttpSession; import org.apache.wicket.datetime.StyleDateConverter; import org.apache.wicket.datetime.markup.html.form.DateTextField; import org.apache.wicket.extensions.yui.calendar.DatePicker; import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.markup.html.form.Form; import org.apache.wicket.markup.html.form.TextField; import org.apache.wicket.model.Model; import org.apache.wicket.model.PropertyModel; import org.apache.wicket.protocol.http.WebRequest; /** * @author Administrator */ public class TransactionQueryPage extends BasePage { public TransactionQueryPage() { add(new TransactionQueryForm(transactionQueryForm)); } public final class TransactionQueryForm extends Form { private Locale selectedLocale = new Locale(en); private TextField cardNumberField; private Date date = new Date(); private DateTextField dateFromField; public TransactionQueryForm(String id) { super(id); add(new Label(cardNumberLabel, Card number)); add(cardNumberField = new TextField(cardNumberField, new Model( enter a card number))); add(new Label(dateFromLabel, Date From:)); dateFromField = new DateTextField( dateFromField, new PropertyModel(this, date), new StyleDateConverter( S-, true)) { @Override public Locale getLocale() { return selectedLocale; } }; dateFromField.add(new DatePicker()); add(dateFromField); } public final void onSubmit() { // } } } JAVA APPLICATION CLASS: import org.apache.wicket.protocol.http.WebApplication; import za.co.transactionjunction.transpector.pages.IndexPage; /** * @author Administrator */ public class TranspectorApplication extends WebApplication { public TranspectorApplication() { } public ClassIndexPage getHomePage() { return IndexPage.class; } } Please help. Regards, Yazeed -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of James Carman Sent: 26 September 2008 05:16 PM To: users@wicket.apache.org Subject: Re: Images not displaying Try surrounding your img tag with wicket:link tags. On Fri, Sep 26, 2008 at
wicket + spring + jpa/ hibernate = lazy load exception
Hi, I'm currently struggling with the famous lazy load exception under spring + jpa with wicket. The problem is, in my case, that i pull an entity from the database using a spring-bean (@SpringBean) and JPA (hibernate). Then in the wicket class i need to walk the entity tree a bit, based on the needs of the user (preloading wont work, as i dont know the direction the user wants to walk and the whole entity tree is too complex to grab it all at once). If I use the Entity myEntity.getMyOtherConnectedEntity I get the lazy load exception (transaction already closed). So I tried to use the OpenSessionInViewFilter to solve this, but it just won't work - no reason why, as the error stays exactly the same. Currently I ended up using this: @PersistenceContext(type = PersistenceContextType.EXTENDED) private EntityManager em; However, I'm not sure if this is the way it is supposed to be? ( I read so far that this disables a big part of springs-transaction handling support but didnt see any impacts so far) Has anyone a different aproach/ solution for this using wicket + spring with JPA? Best, Korbinan PS: im on wicket 1.4-m3 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wicket + spring + jpa/ hibernate = lazy load exception
Hi Korbinian Im facing the same problems... I also use extended.. So gonna be great to see the outcome of this thread.. I think it could be something about missing usage of loadabledetachable model..? Korbinian Bachl - privat wrote: Hi, I'm currently struggling with the famous lazy load exception under spring + jpa with wicket. The problem is, in my case, that i pull an entity from the database using a spring-bean (@SpringBean) and JPA (hibernate). Then in the wicket class i need to walk the entity tree a bit, based on the needs of the user (preloading wont work, as i dont know the direction the user wants to walk and the whole entity tree is too complex to grab it all at once). If I use the Entity myEntity.getMyOtherConnectedEntity I get the lazy load exception (transaction already closed). So I tried to use the OpenSessionInViewFilter to solve this, but it just won't work - no reason why, as the error stays exactly the same. Currently I ended up using this: @PersistenceContext(type = PersistenceContextType.EXTENDED) private EntityManager em; However, I'm not sure if this is the way it is supposed to be? ( I read so far that this disables a big part of springs-transaction handling support but didnt see any impacts so far) Has anyone a different aproach/ solution for this using wicket + spring with JPA? Best, Korbinan PS: im on wicket 1.4-m3 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -Wicket for love Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
how to navigate from edit mode to view mode
Hi I have created a bookmark portlet using wicket. And the bookmark portlet includes two portlet- mode i.e. view and edit. I have deployed the basic portlet on sun portal. I have a problem with the navigation form edit mode to view mode. Do you have any good suggestion how to solve this problem? Thanks in advance Thanks and Regards, MUKESH SINGH CAPGEMINI Consultant Arrive AS T (+47) 46 47 90 16 E-post: [EMAIL PROTECTED] http://servicedesk.arrive.no
Re: WANG–Wicket Ajax Next Generation–being based on YUI (MD)
Are you really that surprised that Microsoft is not shipping YUI after the failed attempts to take over Yahoo? :) Seriously, there are technical reasons why I considered to use YUI, not political. Just because some companies use jQuery it doesn't mean Wicket should use it. Say most of the companies use JSF, does it mean we should? As I said, I really like the way YUI api is designed. Also there are things in YUI core that are only available as jQuery plugins. The plugins have different lifecycle than the core and are mantained differently. Also keep in mind that the javascript Wicket-Ajax uses is internal to Wicket. Let me give you an example where I find YUI (3) api more elegant. That's just one of many things and it is of course my personal opinion. If i want to unbind event in jQuery, i need to remember event name and the exact handler instance. For YUI, i get event handler on bind that i can just call detach on and the event is unbound. var h = Y.on(click, handleClick, element); h.detach(); Of course it is possible to mock the behavior with jQuery, but that's not really the point, is it? Another this is functionality provided in core. YUI can handle multipart Ajax uploads (well, it can't do that in 3.0 yet, but it's very likely it will be as it was supported in 2.x). For jQuery, i need to use a plugin for it. The reason why I feel so uneasy about plugins is that I've tried some. And the quality really varies. I think selectors might be the part where jQuery really shines. But that's the part not needed by Wicket at all. Plus YUI has selectors too (although maybe not that fast - I don't know, haven't profiled them). Also the new YUI3 node API resembles jQuery chaining API for those who like it. -Matej On Mon, Sep 29, 2008 at 4:01 AM, Jörn Zaefferer [EMAIL PROTECTED] wrote: There is something new to consider when choosing a JavaScript library as Wicket's base: http://www.jondavis.net/blog/post/2008/09/jQuery-Has-Won-The-3-Year-Javascript-Framework-Battle-As-Far-As-Im-Concerned.aspx http://www.hanselman.com/blog/jQuerytoshipwithASPNETMVCandVisualStudio.aspx Jörn On Wed, Aug 27, 2008 at 1:05 AM, Matej Knopp [EMAIL PROTECTED] wrote: On Wed, Aug 27, 2008 at 12:50 AM, Jörn Zaefferer [EMAIL PROTECTED] wrote: On Tue, Aug 26, 2008 at 10:19 PM, Matej Knopp [EMAIL PROTECTED] wrote: Hi, On Tue, Aug 26, 2008 at 9:24 PM, jWeekend [EMAIL PROTECTED] wrote: Matej, What are the implications of the decision to base Wicket Ajax Next Generation on YUI in terms of choosing a Javascript library for future Wicket based web front ends? actually, there really are none. The use of YUI will be more or less internal to Wicket, so you can continue using jQuery, YUI2 or whatever else you are using. Everything in Wicket (and YUI) is namespaced so there are no conflicts. Of course there is the overhead of including two or more libraries in an application, which don't find desirable. Wicket uses only part of YUI, the compressed minified required YUI javascript is about 20kb big. I would understand the concern if I used dojo or some other behemoth with 200+ kb of compressed javascript. + there's huge number and variety of jQuery plugins for those special occasions. Unfortunately the quality of plugins varies. For actual wicket ajax implementation i prefer to stick with the core thing, and that's where YUI definitely beats jquery. I don't say that there are no plugins for jQuery that covers YUI functionality. Question is how well are those plugins supported and maintained. You are well on the point that the variety of plugins varies. I see it this way: jQuery core is small, very stable and the base for everything else JS-related. jQuery UI is the official project providing the same stability and quality for various high-level UI components (like dialogs) and also low-level components (like dragdrop, sortables). We'll see at least two major releases this year that add more components to the mix. Anything else that isn't covered by core or UI is almost always covered by some third-party plugin. While these plugin can be of bady quality (eg. no documentation/demos), they can still provide a good starting point, so that you don't have to start from scratch. Even if you do a full rewrite, the existing plugin can expose useful information like potential browser-bug-traps. Problem is that the jQuery core doesn't cut it. And rewriting plugins from scratch? Are you serious? This is exactly the reason why I decided to use YUI. The stuff that I need is there, it is supported and maintained. Anyway, as I say, this doesn't make any implication to Wicket users or 3rd party components. The reason why wicket ajax is based on another framework is to get rid of most of the low level browser specific code we have currently so that I wouldn't have to maintain it :) Whatever the framework, I think its a good idea to start with something well supported and tested. Thats why I use
Re: wicket + spring + jpa/ hibernate = lazy load exception
I think it could be something about missing usage of loadabledetachable model..? not for me, as the original entity is pulled using an loadabledetachableModel via a SortedDataProvider :/ if you look around, the all called solution for this is the OpenSessionInViewFilter and the usage of bean id=transactionManager class=org.springframework.orm.jpa.JpaTransactionManager for that (latter one is used by me, too) However, the OpenSessionInViewFilter will not work with wicket, even if mapped to /* in the web.xml Best, Korbinian Nino Saturnino Martinez Vazquez Wael schrieb: Hi Korbinian Im facing the same problems... I also use extended.. So gonna be great to see the outcome of this thread.. I think it could be something about missing usage of loadabledetachable model..? Korbinian Bachl - privat wrote: Hi, I'm currently struggling with the famous lazy load exception under spring + jpa with wicket. The problem is, in my case, that i pull an entity from the database using a spring-bean (@SpringBean) and JPA (hibernate). Then in the wicket class i need to walk the entity tree a bit, based on the needs of the user (preloading wont work, as i dont know the direction the user wants to walk and the whole entity tree is too complex to grab it all at once). If I use the Entity myEntity.getMyOtherConnectedEntity I get the lazy load exception (transaction already closed). So I tried to use the OpenSessionInViewFilter to solve this, but it just won't work - no reason why, as the error stays exactly the same. Currently I ended up using this: @PersistenceContext(type = PersistenceContextType.EXTENDED) private EntityManager em; However, I'm not sure if this is the way it is supposed to be? ( I read so far that this disables a big part of springs-transaction handling support but didnt see any impacts so far) Has anyone a different aproach/ solution for this using wicket + spring with JPA? Best, Korbinan PS: im on wicket 1.4-m3 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: WANG–Wicket Ajax Next Generation–being based on YUI (MD)
It would be a big plus for me if Wicket would adopt jQuery. Drupal does that, and anyone writing a Drupal module can rely on the fact that jQuery is available. Same for Wordpress, where plugin authors can rely on the availability of jQuery. And not having to load more than one library, internal or not, is a good thing performance-wise. In response to your examples: Unbinding only particular event handlers without having a reference to the handler function can be achieved with namespaces: $(element).bind(click.somethingUnique, handleClick); $(element).unbind(click.somethingUnique); That way you don't have to keep a reference at all, while its possible to group multiple events into one namespace. This is now heavily used by most jQuery UI components when destroyed, to clean up their own event handlers without affecting any other. Multiple file upload we'll eventually have as part of jQuery UI. That would then be the same level of official and supported component that YUI provides. The descision to add new components is partly community-driven. So if you think multipart ajax uploads should be added, just ask for it. About selectors: John Resig is currently working on a new selector engine that likely outperformances any other selector engine available so far. Its developed as a standalone library, so its likely that MochKit and Prototype will use it, too. jQuery 1.3. will also provide heavy performance improvements for DOM manipulations, which I'm very exited about as that is usually where most time is spent. Its easy to avoid running certain selectors too often, but its hard to optimize DOM manipulation in clientcode. Anyway, thanks for taking the time to discuss this again. Jörn On Mon, Sep 29, 2008 at 12:54 PM, Matej Knopp [EMAIL PROTECTED] wrote: Are you really that surprised that Microsoft is not shipping YUI after the failed attempts to take over Yahoo? :) Seriously, there are technical reasons why I considered to use YUI, not political. Just because some companies use jQuery it doesn't mean Wicket should use it. Say most of the companies use JSF, does it mean we should? As I said, I really like the way YUI api is designed. Also there are things in YUI core that are only available as jQuery plugins. The plugins have different lifecycle than the core and are mantained differently. Also keep in mind that the javascript Wicket-Ajax uses is internal to Wicket. Let me give you an example where I find YUI (3) api more elegant. That's just one of many things and it is of course my personal opinion. If i want to unbind event in jQuery, i need to remember event name and the exact handler instance. For YUI, i get event handler on bind that i can just call detach on and the event is unbound. var h = Y.on(click, handleClick, element); h.detach(); Of course it is possible to mock the behavior with jQuery, but that's not really the point, is it? Another this is functionality provided in core. YUI can handle multipart Ajax uploads (well, it can't do that in 3.0 yet, but it's very likely it will be as it was supported in 2.x). For jQuery, i need to use a plugin for it. The reason why I feel so uneasy about plugins is that I've tried some. And the quality really varies. I think selectors might be the part where jQuery really shines. But that's the part not needed by Wicket at all. Plus YUI has selectors too (although maybe not that fast - I don't know, haven't profiled them). Also the new YUI3 node API resembles jQuery chaining API for those who like it. -Matej On Mon, Sep 29, 2008 at 4:01 AM, Jörn Zaefferer [EMAIL PROTECTED] wrote: There is something new to consider when choosing a JavaScript library as Wicket's base: http://www.jondavis.net/blog/post/2008/09/jQuery-Has-Won-The-3-Year-Javascript-Framework-Battle-As-Far-As-Im-Concerned.aspx http://www.hanselman.com/blog/jQuerytoshipwithASPNETMVCandVisualStudio.aspx Jörn On Wed, Aug 27, 2008 at 1:05 AM, Matej Knopp [EMAIL PROTECTED] wrote: On Wed, Aug 27, 2008 at 12:50 AM, Jörn Zaefferer [EMAIL PROTECTED] wrote: On Tue, Aug 26, 2008 at 10:19 PM, Matej Knopp [EMAIL PROTECTED] wrote: Hi, On Tue, Aug 26, 2008 at 9:24 PM, jWeekend [EMAIL PROTECTED] wrote: Matej, What are the implications of the decision to base Wicket Ajax Next Generation on YUI in terms of choosing a Javascript library for future Wicket based web front ends? actually, there really are none. The use of YUI will be more or less internal to Wicket, so you can continue using jQuery, YUI2 or whatever else you are using. Everything in Wicket (and YUI) is namespaced so there are no conflicts. Of course there is the overhead of including two or more libraries in an application, which don't find desirable. Wicket uses only part of YUI, the compressed minified required YUI javascript is about 20kb big. I would understand the concern if I used dojo or some other behemoth with 200+ kb of compressed javascript. + there's huge
Re: wicket + spring + jpa/ hibernate = lazy load exception
On Mon, Sep 29, 2008 at 7:14 AM, Korbinian Bachl - privat [EMAIL PROTECTED] wrote: However, the OpenSessionInViewFilter will not work with wicket, even if mapped to /* in the web.xml Huh? We use it and it works just fine. By the way, have you tried OpenEntityManagerInViewFilter if you're using JPA? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: WANG–Wicket Ajax Next Generation–being based on YUI (MD)
On Mon, Sep 29, 2008 at 1:18 PM, Jörn Zaefferer [EMAIL PROTECTED] wrote: It would be a big plus for me if Wicket would adopt jQuery. Drupal does that, and anyone writing a Drupal module can rely on the fact that jQuery is available. Same for Wordpress, where plugin authors can rely on the availability of jQuery. And not having to load more than one library, internal or not, is a good thing performance-wise. In response to your examples: Unbinding only particular event handlers without having a reference to the handler function can be achieved with namespaces: $(element).bind(click.somethingUnique, handleClick); $(element).unbind(click.somethingUnique); But that's not quite the same. This requires me to use generate and keep a unique string. Anyway, this is a cosmetic issue only. That way you don't have to keep a reference at all, while its possible to group multiple events into one namespace. This is now heavily used by most jQuery UI components when destroyed, to clean up their own event handlers without affecting any other. Multiple file upload we'll eventually have as part of jQuery UI. That would then be the same level of official and supported component that YUI provides. The descision to add new components is partly community-driven. So if you think multipart ajax uploads should be added, just ask for it. This is not about multiple file upload. We already have such component in Wicket. This is about support for input type=file on ajax uploads - just use hidden frame instead of xml http request. About selectors: John Resig is currently working on a new selector engine that likely outperformances any other selector engine available so far. Its developed as a standalone library, so its likely that MochKit and Prototype will use it, too. That sure is nice, but the selectors are not used in Wicket core at all. jQuery 1.3. will also provide heavy performance improvements for DOM manipulations, which I'm very exited about as that is usually where most time is spent. Its easy to avoid running certain selectors too often, but its hard to optimize DOM manipulation in clientcode. While we at this, I'd like to ask. Significant part of Wicket ajax is Wicket.replaceOuterHtml method. This was really a major pain to implement and stabilize. What it does is basically a replaceOuterHTML call for all browser but it works in totally cross browser consistent way. I.e. it allows table rows, cells etc replaced in internet explorer and it also executes embedded script tags on browsers that would normally not do that (basically all except for Firefox). So my question is, just out of curiosity, is there/will there be similar functionality provided by jQuery? Anyway, thanks for taking the time to discuss this again. Sure. Keep in mind that the decision is not carved to stone. I'm open to argument, but I'm really interested in technical aspect. Having Microsoft will use jQuery is not really a valid argument to me :) -Matej Jörn On Mon, Sep 29, 2008 at 12:54 PM, Matej Knopp [EMAIL PROTECTED] wrote: Are you really that surprised that Microsoft is not shipping YUI after the failed attempts to take over Yahoo? :) Seriously, there are technical reasons why I considered to use YUI, not political. Just because some companies use jQuery it doesn't mean Wicket should use it. Say most of the companies use JSF, does it mean we should? As I said, I really like the way YUI api is designed. Also there are things in YUI core that are only available as jQuery plugins. The plugins have different lifecycle than the core and are mantained differently. Also keep in mind that the javascript Wicket-Ajax uses is internal to Wicket. Let me give you an example where I find YUI (3) api more elegant. That's just one of many things and it is of course my personal opinion. If i want to unbind event in jQuery, i need to remember event name and the exact handler instance. For YUI, i get event handler on bind that i can just call detach on and the event is unbound. var h = Y.on(click, handleClick, element); h.detach(); Of course it is possible to mock the behavior with jQuery, but that's not really the point, is it? Another this is functionality provided in core. YUI can handle multipart Ajax uploads (well, it can't do that in 3.0 yet, but it's very likely it will be as it was supported in 2.x). For jQuery, i need to use a plugin for it. The reason why I feel so uneasy about plugins is that I've tried some. And the quality really varies. I think selectors might be the part where jQuery really shines. But that's the part not needed by Wicket at all. Plus YUI has selectors too (although maybe not that fast - I don't know, haven't profiled them). Also the new YUI3 node API resembles jQuery chaining API for those who like it. -Matej On Mon, Sep 29, 2008 at 4:01 AM, Jörn Zaefferer [EMAIL PROTECTED] wrote: There is something new to consider when choosing a JavaScript
wicket panels and parent class
Hi all, I'm a new Wicket user and am developing an application making use of Panels. The Panels are working, however I need to access some objects in the panel that are defined in the parent class and am not sure how to do this. e.g. MyProfile.java: String userId = Profile.getCurrentUserId(); add(new MyInfoPanel(myInfoPanel)); and in MyInfoPanel.java I need to be able to access userId for example. This is just a basic example, I need to access certain objects in MyInfoPanel.java that are defined in the parent class MyProfile.java cheers, Steve smime.p7s Description: S/MIME cryptographic signature
Re: wicket panels and parent class
getParent() ? Steve Swinsburg-2 wrote: Hi all, I'm a new Wicket user and am developing an application making use of Panels. The Panels are working, however I need to access some objects in the panel that are defined in the parent class and am not sure how to do this. e.g. MyProfile.java: String userId = Profile.getCurrentUserId(); add(new MyInfoPanel(myInfoPanel)); and in MyInfoPanel.java I need to be able to access userId for example. This is just a basic example, I need to access certain objects in MyInfoPanel.java that are defined in the parent class MyProfile.java cheers, Steve - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/wicket-panels-and-parent-class-tp19722417p19722473.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wicket + spring + jpa/ hibernate = lazy load exception
When using the OSIV-filter the lazyload exception may only happen if the same entity is used among different requests ... sothat it gets detached from hibernate. have a look at http://talk-on-tech.blogspot.com/2008/05/custom-reuseable-loadabledetachablemode.html ... that's the way we're doing it regards, Michael Korbinian Bachl - privat wrote: I think it could be something about missing usage of loadabledetachable model..? not for me, as the original entity is pulled using an loadabledetachableModel via a SortedDataProvider :/ if you look around, the all called solution for this is the OpenSessionInViewFilter and the usage of bean id=transactionManager class=org.springframework.orm.jpa.JpaTransactionManager for that (latter one is used by me, too) However, the OpenSessionInViewFilter will not work with wicket, even if mapped to /* in the web.xml Best, Korbinian Nino Saturnino Martinez Vazquez Wael schrieb: Hi Korbinian Im facing the same problems... I also use extended.. So gonna be great to see the outcome of this thread.. I think it could be something about missing usage of loadabledetachable model..? Korbinian Bachl - privat wrote: Hi, I'm currently struggling with the famous lazy load exception under spring + jpa with wicket. The problem is, in my case, that i pull an entity from the database using a spring-bean (@SpringBean) and JPA (hibernate). Then in the wicket class i need to walk the entity tree a bit, based on the needs of the user (preloading wont work, as i dont know the direction the user wants to walk and the whole entity tree is too complex to grab it all at once). If I use the Entity myEntity.getMyOtherConnectedEntity I get the lazy load exception (transaction already closed). So I tried to use the OpenSessionInViewFilter to solve this, but it just won't work - no reason why, as the error stays exactly the same. Currently I ended up using this: @PersistenceContext(type = PersistenceContextType.EXTENDED) private EntityManager em; However, I'm not sure if this is the way it is supposed to be? ( I read so far that this disables a big part of springs-transaction handling support but didnt see any impacts so far) Has anyone a different aproach/ solution for this using wicket + spring with JPA? Best, Korbinan PS: im on wicket 1.4-m3 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/wicket-%2B-spring-%2B-jpa--hibernate-%3D-lazy-load-exception-tp19721199p19722521.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wicket + spring + jpa/ hibernate = lazy load exception
really? - I tried it but... would you please be so nice and post the part of the web.xml where it is mapped and the corresponding part of the spring-application.xml ? what wicket version are you on? what runtime (Tomcat 6?)? Best, Korbinian James Carman schrieb: On Mon, Sep 29, 2008 at 7:14 AM, Korbinian Bachl - privat [EMAIL PROTECTED] wrote: However, the OpenSessionInViewFilter will not work with wicket, even if mapped to /* in the web.xml Huh? We use it and it works just fine. By the way, have you tried OpenEntityManagerInViewFilter if you're using JPA? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wicket panels and parent class
And then have to cast it to the class of the parent.. which kinda kills the independent component based idea of reusable panels. Why not pass along the userid when constructing? Or fetch it from the session. Michael Sparer wrote: getParent() ? Steve Swinsburg-2 wrote: Hi all, I'm a new Wicket user and am developing an application making use of Panels. The Panels are working, however I need to access some objects in the panel that are defined in the parent class and am not sure how to do this. e.g. MyProfile.java: String userId = Profile.getCurrentUserId(); add(new MyInfoPanel(myInfoPanel)); and in MyInfoPanel.java I need to be able to access userId for example. This is just a basic example, I need to access certain objects in MyInfoPanel.java that are defined in the parent class MyProfile.java cheers, Steve - Michael Sparer http://talk-on-tech.blogspot.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wicket panels and parent class
I guess I am used to the jsp:include method of including panel type objects since I am originally a JSP developer and then anything in the panel instantly has access to the variables defined in the surrounding parent. I guess I could pass along a HashMap of data to the Panel when its constructed, is this possible/recommended? cheers, Steve On 29 Sep 2008, at 12:58, Thies Edeling wrote: And then have to cast it to the class of the parent.. which kinda kills the independent component based idea of reusable panels. Why not pass along the userid when constructing? Or fetch it from the session. Michael Sparer wrote: getParent() ? Steve Swinsburg-2 wrote: Hi all, I'm a new Wicket user and am developing an application making use of Panels. The Panels are working, however I need to access some objects in the panel that are defined in the parent class and am not sure how to do this. e.g. MyProfile.java: String userId = Profile.getCurrentUserId(); add(new MyInfoPanel(myInfoPanel)); and in MyInfoPanel.java I need to be able to access userId for example. This is just a basic example, I need to access certain objects in MyInfoPanel.java that are defined in the parent class MyProfile.java cheers, Steve - Michael Sparer http://talk-on-tech.blogspot.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] smime.p7s Description: S/MIME cryptographic signature
Re: wicket panels and parent class
Your Panel is just a Java class, so give it a constructor that takes the required object(s), or provide a setter if that wouldn't be too late (ie if the values are required during the panel's construction). Or, take a look at CompoundPropeprtyModel (maybe together with ComponentPropertyModel too depending on your naming conventions). Regards - Cemal http://www.jWeekend.co.uk http://jWeekend.co.uk Steve Swinsburg-2 wrote: Hi all, I'm a new Wicket user and am developing an application making use of Panels. The Panels are working, however I need to access some objects in the panel that are defined in the parent class and am not sure how to do this. e.g. MyProfile.java: String userId = Profile.getCurrentUserId(); add(new MyInfoPanel(myInfoPanel)); and in MyInfoPanel.java I need to be able to access userId for example. This is just a basic example, I need to access certain objects in MyInfoPanel.java that are defined in the parent class MyProfile.java cheers, Steve -- View this message in context: http://www.nabble.com/wicket-panels-and-parent-class-tp19722417p19722687.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wicket panels and parent class
possible yes, recommended, no i'd say :-) if you need specific values from MyPanel then pass it via constructor, if you need values/attributes on component (e.g. isVisible) level use getParent() Steve Swinsburg-2 wrote: I guess I am used to the jsp:include method of including panel type objects since I am originally a JSP developer and then anything in the panel instantly has access to the variables defined in the surrounding parent. I guess I could pass along a HashMap of data to the Panel when its constructed, is this possible/recommended? cheers, Steve On 29 Sep 2008, at 12:58, Thies Edeling wrote: And then have to cast it to the class of the parent.. which kinda kills the independent component based idea of reusable panels. Why not pass along the userid when constructing? Or fetch it from the session. Michael Sparer wrote: getParent() ? Steve Swinsburg-2 wrote: Hi all, I'm a new Wicket user and am developing an application making use of Panels. The Panels are working, however I need to access some objects in the panel that are defined in the parent class and am not sure how to do this. e.g. MyProfile.java: String userId = Profile.getCurrentUserId(); add(new MyInfoPanel(myInfoPanel)); and in MyInfoPanel.java I need to be able to access userId for example. This is just a basic example, I need to access certain objects in MyInfoPanel.java that are defined in the parent class MyProfile.java cheers, Steve - Michael Sparer http://talk-on-tech.blogspot.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/wicket-panels-and-parent-class-tp19722417p19722714.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wicket panels and parent class
Thanks everyone, I changed my constructor to accept the object I wanted and passed it in from the parent class. It's working now. cheers, Steve --- Steve Swinsburg Portal Systems Developer Centre for e-Science Lancaster University Lancaster LA1 4YT email: [EMAIL PROTECTED] phone: +44 (0) 1524 594870 On 29 Sep 2008, at 13:08, jWeekend wrote: Your Panel is just a Java class, so give it a constructor that takes the required object(s), or provide a setter if that wouldn't be too late (ie if the values are required during the panel's construction). Or, take a look at CompoundPropeprtyModel (maybe together with ComponentPropertyModel too depending on your naming conventions). Regards - Cemal http://www.jWeekend.co.uk http://jWeekend.co.uk Steve Swinsburg-2 wrote: Hi all, I'm a new Wicket user and am developing an application making use of Panels. The Panels are working, however I need to access some objects in the panel that are defined in the parent class and am not sure how to do this. e.g. MyProfile.java: String userId = Profile.getCurrentUserId(); add(new MyInfoPanel(myInfoPanel)); and in MyInfoPanel.java I need to be able to access userId for example. This is just a basic example, I need to access certain objects in MyInfoPanel.java that are defined in the parent class MyProfile.java cheers, Steve -- View this message in context: http://www.nabble.com/wicket-panels-and-parent-class-tp19722417p19722687.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] smime.p7s Description: S/MIME cryptographic signature
Re: wicket + spring + jpa/ hibernate = lazy load exception
We don't use JPA at work, but we use OSIV (we're using straight hibernate). Anyway, for the JPA configuration, you can look at: https://wicketopia.svn.sourceforge.net/svnroot/wicketopia/trunk/jpa-archetype/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml On Mon, Sep 29, 2008 at 7:57 AM, Korbinian Bachl - privat [EMAIL PROTECTED] wrote: really? - I tried it but... would you please be so nice and post the part of the web.xml where it is mapped and the corresponding part of the spring-application.xml ? what wicket version are you on? what runtime (Tomcat 6?)? Best, Korbinian James Carman schrieb: On Mon, Sep 29, 2008 at 7:14 AM, Korbinian Bachl - privat [EMAIL PROTECTED] wrote: However, the OpenSessionInViewFilter will not work with wicket, even if mapped to /* in the web.xml Huh? We use it and it works just fine. By the way, have you tried OpenEntityManagerInViewFilter if you're using JPA? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wicket panels and parent class
Just be careful. If the object reference in the parent is retrieved from a LoadableDetachableModel, then your panel and its parent can get out of sync. On Mon, Sep 29, 2008 at 8:16 AM, Steve Swinsburg [EMAIL PROTECTED] wrote: Thanks everyone, I changed my constructor to accept the object I wanted and passed it in from the parent class. It's working now. cheers, Steve --- Steve Swinsburg Portal Systems Developer Centre for e-Science Lancaster University Lancaster LA1 4YT email: [EMAIL PROTECTED] phone: +44 (0) 1524 594870 On 29 Sep 2008, at 13:08, jWeekend wrote: Your Panel is just a Java class, so give it a constructor that takes the required object(s), or provide a setter if that wouldn't be too late (ie if the values are required during the panel's construction). Or, take a look at CompoundPropeprtyModel (maybe together with ComponentPropertyModel too depending on your naming conventions). Regards - Cemal http://www.jWeekend.co.uk http://jWeekend.co.uk Steve Swinsburg-2 wrote: Hi all, I'm a new Wicket user and am developing an application making use of Panels. The Panels are working, however I need to access some objects in the panel that are defined in the parent class and am not sure how to do this. e.g. MyProfile.java: String userId = Profile.getCurrentUserId(); add(new MyInfoPanel(myInfoPanel)); and in MyInfoPanel.java I need to be able to access userId for example. This is just a basic example, I need to access certain objects in MyInfoPanel.java that are defined in the parent class MyProfile.java cheers, Steve -- View this message in context: http://www.nabble.com/wicket-panels-and-parent-class-tp19722417p19722687.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
The Wicket difference ...?
Howdy All, Just trying to explain to some colleagues how some of Wicket works (differently than most other Web frameworks), so please correct me if I am wrong. From my understanding Wicket differs from most other Web frameworks in that it doesn't manage the creation of the object graphs representing Web pages (it's done simply through the Java new operator and composition of objects by the constructors within that super hierarchy). The positive side of this is that it removes the need for Web page factories that take strings as arguments to construct the object graphs, and thus are not easily refactored within Java IDEs. The negative side of this is that page caching now needs to be done by saving the object graph in some form, e.g. directly in the session or serialising to a file. The more common alternative, as mentioned above, is to have some sort of factory that manages the construction of the object graphs representing Web pages. As the framework can do this, as needed, it doesn't need to cache the entire object graph, it can just save the data needed to refill within a Web page. Of course, this is probably just one difference and may not be the most important aspect of Wicket. It is, however, I believe why Wicket needs to have detachable models, so that the large models don't also need to be saved. Apologies in advance for any mistakes or poor communication. Any comments or clarifications? Cheers, Ashley. -- Ashley Aitken Perth, Western Australia mrhatken at mac dot com Skype Name: MrHatken (GMT + 8 Hours!) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Travel Assistance to ApacheCon US 2008
You have until Friday to apply for this support. This is open for anyone, not just committers! If you have an interest in Apache Wicket and/or Apache ${foo} and are unable to attend because of monetary constraints, and you fit the criteria, don't hesitate to apply! Martijn On Thu, Sep 25, 2008 at 4:01 PM, Martijn Dashorst [EMAIL PROTECTED] wrote: The Travel Assistance Committee is taking in applications for those wanting to attend ApacheCon US 2008 between the 3rd and 7th November 2008 in New Orleans. The Travel Assistance Committee is looking for people who would like to be able to attend ApacheCon US 2008 who need some financial support in order to get there. There are VERY few places available and the criteria is high, that aside applications are open to all open source developers who feel that their attendance would benefit themselves, their project(s), the ASF and open source in general. Financial assistance is available for flights, accomodation and entrance fees either in full or in part, depending on circumstances. It is intended that all our ApacheCon events are covered, so it may be prudent for those in Europe and or Asia to wait until an event closer to them comes up - you are all welcome to apply for ApacheCon US of course, but there must be compelling reasons for you to attend an event further away that your home location for your application to be considered above those closer to the event location. More information can be found on the main Apache website at http://www.apache.org/travel/index.html - where you will also find a link to the application form and details for submitting. Time is very tight for this event, so applications are open now and will end on the 2nd October 2008 - to give enough time for travel arrangements to be made. Good luck to all those that will apply. Regards, The Travel Assistance Committee -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.3.4 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
OnChangeAjaxBehavior in ListView
Hi, I'm using OnChangeAjaxBehavior with a TextField. The TextField is in a table cell that is repeated using a ListView. When I change the value of one of the TextFields more than one of the underlying models get updated - the one that was supposed to be updated and all following in the list. If I modify the first TextField then all underlying models get the same value. If I modify the second then all except the first... Anyone else seen this? Wicket 1.4M3 /Anders - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wicket panels and parent class
It may not be a best practice, but if MyInfoPanel does not need to be reusable you can make it an inner class of MyProfile. Then userId can be accessed directly. Phil On Mon, Sep 29, 2008 at 6:45 AM, Steve Swinsburg [EMAIL PROTECTED] wrote: Hi all, I'm a new Wicket user and am developing an application making use of Panels. The Panels are working, however I need to access some objects in the panel that are defined in the parent class and am not sure how to do this. e.g. MyProfile.java: String userId = Profile.getCurrentUserId(); add(new MyInfoPanel(myInfoPanel)); and in MyInfoPanel.java I need to be able to access userId for example. This is just a basic example, I need to access certain objects in MyInfoPanel.java that are defined in the parent class MyProfile.java cheers, Steve -- Phil Grimm Mobile: (858) 335-3426 Skype: philgrimm336
Re: Breadcrumb + previous button
This is what I did to solve the issue: In Panel C class: // Return button. List crumbs = getBreadCrumbModel().allBreadCrumbParticipants(); IBreadCrumbParticipant p = null; for (Object obj : crumbs) { p = (IBreadCrumbParticipant) obj; if (p instanceof PanelB) { break; } } ... final IBreadCrumbParticipant participant = p; BreadCrumbLink returnBtn = new BreadCrumbLink(returnBtn, getBreadCrumbModel()) { @Override protected IBreadCrumbParticipant getParticipant(String componentId) { return participant; } }; form.add(returnBtn); Not sure if it is the best solution, but it works... Thanks, Daniel Kmus wrote: Hi, I'm working in an application that is using the Breadcrumb component and everything works as expected. Currently I'm trying to add a previous/return button in some of my modules to give the user a friendlier environment, but I don't know how to send the user to the previous panel and remove the current participant from the bread crumb bar. Right now when the user press my Previous button the breadcrumb bar prints: Panel A / Panel B / Panel C / Panel B What I want is: Panel A / Panel B I don't want to use the javascript:history.back(1) code because it doesn't feel right... Could someone help me with this? Thanks, Daniel -- View this message in context: http://www.nabble.com/Breadcrumb-%2B-previous-button-tp19696315p19726457.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
ListView - modify css for some column
Hallo community, my code looks like this: listView = new ListViewMyItem(collectionIterator, listOfMyItems) { @Override protected void populateItem(ListItemMyItem item) { MyItem myItem = (MyItem) item.getDefaultModelObject(); String name = myItem.getName(); String value = myItem.getValue(); item.add(new Label(name, name)); item.add(new Label(value, value)); } }; table trthName/ththValue/th/tr tr wicket:id=collectionIterator td/td td/td /tr /table and I need to change css class for td element in table. If I add this: item.add(new AttributeAppender(class, new ModelString(newCssClass), )); It adds this css class for all td tags. By oter words for whole row. But I need modify only some td, only some column. Could you give me some advice? Thanks a lot. -- View this message in context: http://www.nabble.com/ListView---modify-css-for-some-column-tp19726888p19726888.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ListView - modify css for some column
radovan wrote: Hallo community, my code looks like this: listView = new ListViewMyItem(collectionIterator, listOfMyItems) { @Override protected void populateItem(ListItemMyItem item) { MyItem myItem = (MyItem) item.getDefaultModelObject(); String name = myItem.getName(); String value = myItem.getValue(); item.add(new Label(name, name)); item.add(new Label(value, value)); } }; table trthName/ththValue/th/tr tr wicket:id=collectionIterator td/td td/td /tr /table and I need to change css class for td element in table. If I add this: item.add(new AttributeAppender(class, new ModelString(newCssClass), )); It adds this css class for all td tags. By oter words for whole row. But I need modify only some td, only some column. Could you give me some advice? Thanks a lot use an if statement to only add the attribute to that specific td? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wicket + spring + jpa/ hibernate = lazy load exception
Hmm, I copied it to web.xml, but result is: 2008-09-29 18:07:24,125 ERROR org.hibernate.LazyInitializationException - failed to lazily initialize a collection of role: de.xxx....xxx., no session or session was closed org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: de.xxx....xxx., no session or session was closed at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:358) at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationExceptionIfNotConnected(AbstractPersistentCollection.java:350) at org.hibernate.collection.AbstractPersistentCollection.readSize(AbstractPersistentCollection.java:97) at org.hibernate.collection.PersistentSet.size(PersistentSet.java:139) .. web.xml looks: ?xml version=1.0 encoding=UTF-8? web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 display-namewhiskas-application/display-name listener listener-classorg.springframework.web.context.ContextLoaderListener/listener-class /listener listener listener-classorg.springframework.web.context.request.RequestContextListener/listener-class /listener !-- ## Filters ## -- !-- TEST -- filter filter-nameOpenEntityManagerInViewFilter/filter-name filter-classorg.springframework.orm.jpa.support.OpenEntityManagerInViewFilter/filter-class /filter !-- Wicket Application -- filter filter-nameWhiskasApplication/filter-name filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class init-param param-nameapplicationFactoryClassName/param-name param-valueorg.apache.wicket.spring.SpringWebApplicationFactory/param-value /init-param init-param param-nameconfiguration/param-name param-valuedeployment/param-value /init-param /filter !-- ## Filter Mappings ## -- filter-mapping filter-nameOpenEntityManagerInViewFilter/filter-name url-pattern/*/url-pattern /filter-mapping filter-mapping filter-nameWhiskasApplication/filter-name url-pattern/*/url-pattern /filter-mapping /web-app so, what can be wrong there? - web.xml seems 100% fine to me. Is there anything that has to be put into the application.xml? Best, Korbinian James Carman schrieb: We don't use JPA at work, but we use OSIV (we're using straight hibernate). Anyway, for the JPA configuration, you can look at: https://wicketopia.svn.sourceforge.net/svnroot/wicketopia/trunk/jpa-archetype/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml On Mon, Sep 29, 2008 at 7:57 AM, Korbinian Bachl - privat [EMAIL PROTECTED] wrote: really? - I tried it but... would you please be so nice and post the part of the web.xml where it is mapped and the corresponding part of the spring-application.xml ? what wicket version are you on? what runtime (Tomcat 6?)? Best, Korbinian James Carman schrieb: On Mon, Sep 29, 2008 at 7:14 AM, Korbinian Bachl - privat [EMAIL PROTECTED] wrote: However, the OpenSessionInViewFilter will not work with wicket, even if mapped to /* in the web.xml Huh? We use it and it works just fine. By the way, have you tried OpenEntityManagerInViewFilter if you're using JPA? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ListView - modify css for some column
Thies Edeling wrote: radovan wrote: Hallo community, my code looks like this: listView = new ListViewMyItem(collectionIterator, listOfMyItems) { @Override protected void populateItem(ListItemMyItem item) { MyItem myItem = (MyItem) item.getDefaultModelObject(); String name = myItem.getName(); String value = myItem.getValue(); item.add(new Label(name, name)); item.add(new Label(value, value)); } }; table trthName/ththValue/th/tr tr wicket:id=collectionIterator td/td td/td /tr /table and I need to change css class for td element in table. If I add this: item.add(new AttributeAppender(class, new ModelString(newCssClass), )); It adds this css class for all td tags. By oter words for whole row. But I need modify only some td, only some column. Could you give me some advice? Thanks a lot use an if statement to only add the attribute to that specific td? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ok, but listItem is for whole row (for tr), how I get td from listItem? -- View this message in context: http://www.nabble.com/ListView---modify-css-for-some-column-tp19726888p19727084.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: The Wicket difference ...?
Ashley, Take a look at chapter 1 of Wicket In Action (free download at http://www.manning.com/dashorst/). Regards - Cemal http://www.jWeekend.co.uk http://jWeekend.co.uk Ashley Aitken wrote: Howdy All, Just trying to explain to some colleagues how some of Wicket works (differently than most other Web frameworks), so please correct me if I am wrong. From my understanding Wicket differs from most other Web frameworks in that it doesn't manage the creation of the object graphs representing Web pages (it's done simply through the Java new operator and composition of objects by the constructors within that super hierarchy). The positive side of this is that it removes the need for Web page factories that take strings as arguments to construct the object graphs, and thus are not easily refactored within Java IDEs. The negative side of this is that page caching now needs to be done by saving the object graph in some form, e.g. directly in the session or serialising to a file. The more common alternative, as mentioned above, is to have some sort of factory that manages the construction of the object graphs representing Web pages. As the framework can do this, as needed, it doesn't need to cache the entire object graph, it can just save the data needed to refill within a Web page. Of course, this is probably just one difference and may not be the most important aspect of Wicket. It is, however, I believe why Wicket needs to have detachable models, so that the large models don't also need to be saved. Apologies in advance for any mistakes or poor communication. Any comments or clarifications? Cheers, Ashley. -- Ashley Aitken Perth, Western Australia mrhatken at mac dot com Skype Name: MrHatken (GMT + 8 Hours!) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/The-Wicket-difference-...--tp19724703p19727253.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ListView - modify css for some column
you should use DataTable instead of ListView for that; there you can easily manipulate by overriding the getCSS() function of the columns. Best, Korbinian radovan schrieb: Hallo community, my code looks like this: listView = new ListViewMyItem(collectionIterator, listOfMyItems) { @Override protected void populateItem(ListItemMyItem item) { MyItem myItem = (MyItem) item.getDefaultModelObject(); String name = myItem.getName(); String value = myItem.getValue(); item.add(new Label(name, name)); item.add(new Label(value, value)); } }; table trthName/ththValue/th/tr tr wicket:id=collectionIterator td/td td/td /tr /table and I need to change css class for td element in table. If I add this: item.add(new AttributeAppender(class, new ModelString(newCssClass), )); It adds this css class for all td tags. By oter words for whole row. But I need modify only some td, only some column. Could you give me some advice? Thanks a lot. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wicket + spring + jpa/ hibernate = lazy load exception
Would you be able to create a quickstart that exhibits this behavior? If you want, you can use the JPA archetype in wicketopia (the code I referenced) to set everything up for you automatically. On Mon, Sep 29, 2008 at 12:21 PM, Korbinian Bachl - privat [EMAIL PROTECTED] wrote: Hmm, I copied it to web.xml, but result is: 2008-09-29 18:07:24,125 ERROR org.hibernate.LazyInitializationException - failed to lazily initialize a collection of role: de.xxx....xxx., no session or session was closed org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: de.xxx....xxx., no session or session was closed at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:358) at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationExceptionIfNotConnected(AbstractPersistentCollection.java:350) at org.hibernate.collection.AbstractPersistentCollection.readSize(AbstractPersistentCollection.java:97) at org.hibernate.collection.PersistentSet.size(PersistentSet.java:139) .. web.xml looks: ?xml version=1.0 encoding=UTF-8? web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 display-namewhiskas-application/display-name listener listener-classorg.springframework.web.context.ContextLoaderListener/listener-class /listener listener listener-classorg.springframework.web.context.request.RequestContextListener/listener-class /listener !-- ## Filters ## -- !-- TEST -- filter filter-nameOpenEntityManagerInViewFilter/filter-name filter-classorg.springframework.orm.jpa.support.OpenEntityManagerInViewFilter/filter-class /filter !-- Wicket Application -- filter filter-nameWhiskasApplication/filter-name filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class init-param param-nameapplicationFactoryClassName/param-name param-valueorg.apache.wicket.spring.SpringWebApplicationFactory/param-value /init-param init-param param-nameconfiguration/param-name param-valuedeployment/param-value /init-param /filter !-- ## Filter Mappings ## -- filter-mapping filter-nameOpenEntityManagerInViewFilter/filter-name url-pattern/*/url-pattern /filter-mapping filter-mapping filter-nameWhiskasApplication/filter-name url-pattern/*/url-pattern /filter-mapping /web-app so, what can be wrong there? - web.xml seems 100% fine to me. Is there anything that has to be put into the application.xml? Best, Korbinian James Carman schrieb: We don't use JPA at work, but we use OSIV (we're using straight hibernate). Anyway, for the JPA configuration, you can look at: https://wicketopia.svn.sourceforge.net/svnroot/wicketopia/trunk/jpa-archetype/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml On Mon, Sep 29, 2008 at 7:57 AM, Korbinian Bachl - privat [EMAIL PROTECTED] wrote: really? - I tried it but... would you please be so nice and post the part of the web.xml where it is mapped and the corresponding part of the spring-application.xml ? what wicket version are you on? what runtime (Tomcat 6?)? Best, Korbinian James Carman schrieb: On Mon, Sep 29, 2008 at 7:14 AM, Korbinian Bachl - privat [EMAIL PROTECTED] wrote: However, the OpenSessionInViewFilter will not work with wicket, even if mapped to /* in the web.xml Huh? We use it and it works just fine. By the way, have you tried OpenEntityManagerInViewFilter if you're using JPA? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ListView - modify css for some column
you populate all components inside the listview yourself, so just attach one to the td -igor On Mon, Sep 29, 2008 at 9:23 AM, radovan [EMAIL PROTECTED] wrote: Thies Edeling wrote: radovan wrote: Hallo community, my code looks like this: listView = new ListViewMyItem(collectionIterator, listOfMyItems) { @Override protected void populateItem(ListItemMyItem item) { MyItem myItem = (MyItem) item.getDefaultModelObject(); String name = myItem.getName(); String value = myItem.getValue(); item.add(new Label(name, name)); item.add(new Label(value, value)); } }; table trthName/ththValue/th/tr tr wicket:id=collectionIterator td/td td/td /tr /table and I need to change css class for td element in table. If I add this: item.add(new AttributeAppender(class, new ModelString(newCssClass), )); It adds this css class for all td tags. By oter words for whole row. But I need modify only some td, only some column. Could you give me some advice? Thanks a lot use an if statement to only add the attribute to that specific td? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ok, but listItem is for whole row (for tr), how I get td from listItem? -- View this message in context: http://www.nabble.com/ListView---modify-css-for-some-column-tp19726888p19727084.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: The Wicket difference ...?
Hi, On Mon, Sep 29, 2008 at 4:13 PM, Ashley Aitken [EMAIL PROTECTED] wrote: Howdy All, Just trying to explain to some colleagues how some of Wicket works (differently than most other Web frameworks), so please correct me if I am wrong. From my understanding Wicket differs from most other Web frameworks in that it doesn't manage the creation of the object graphs representing Web pages (it's done simply through the Java new operator and composition of objects by the constructors within that super hierarchy). correct The positive side of this is that it removes the need for Web page factories that take strings as arguments to construct the object graphs, and thus are not easily refactored within Java IDEs. The negative side of this is that page caching now needs to be done by saving the object graph in some form, e.g. directly in the session or serialising to a file. also correct The more common alternative, as mentioned above, is to have some sort of factory that manages the construction of the object graphs representing Web pages. As the framework can do this, as needed, it doesn't need to cache the entire object graph, it can just save the data needed to refill within a Web page. also correct. however this gets more interesting when you want that object graph to be dynamic. Frameworks that use the approach you've mentioned (such as tapestry) are usually having static component tree which can be a major flexibility limitation. Of course, this is probably just one difference and may not be the most important aspect of Wicket. It is, however, I believe why Wicket needs to have detachable models, so that the large models don't also need to be saved. correct -Matej Apologies in advance for any mistakes or poor communication. Any comments or clarifications? Cheers, Ashley. -- Ashley Aitken Perth, Western Australia mrhatken at mac dot com Skype Name: MrHatken (GMT + 8 Hours!) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to navigate from edit mode to view mode
You'll have to be more specific. What kind of problems. What works, what doesn't etc. Singh Mukesh wrote: Hi I have created a bookmark portlet using wicket. And the bookmark portlet includes two portlet- mode i.e. view and edit. I have deployed the basic portlet on sun portal. I have a problem with the navigation form edit mode to view mode. Do you have any good suggestion how to solve this problem? Thanks in advance Thanks and Regards, MUKESH SINGH CAPGEMINI Consultant Arrive AS T (+47) 46 47 90 16 E-post: [EMAIL PROTECTED] http://servicedesk.arrive.no - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Need to add tool tip for hyper link
hi , i've to add a tool tip for hyper link, if any of you come across this thing, please suggest me or give me the sample code . thanks J -- View this message in context: http://www.nabble.com/Need-to-add-tool-tip-for-hyper-link-tp19730615p19730615.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Inmethod Grid with wicket 1.3
I'd like to use inmethod grid in my charity auction project. I've got a slightly modified version of one of the grid-examples using DataGrid like so: DataGrid grid = new DefaultDataGrid(grid, AuctionApplication.get().getDao().getItems(getYear()), // returns IDataSource Arrays.asList(new IGridColumn[] { new PropertyColumn(new ResourceModel(id), id), new PropertyColumn(new ResourceModel(name), name), // I'll try editable columns here once I get basic display working... new SubmitCancelColumn(esd, new Model(Edit)), })); add(new Form(form).add(grid)); I'm getting this error at runtime I don't understand: NoSuchMethodError: org.apache.wicket.MetaDataKey: method init()V not found at com.inmethod.grid.common.AbstractGrid$4.init(AbstractGrid.java:908) at com.inmethod.grid.common.AbstractGrid.clinit(AbstractGrid.java:907) at org.firstuucolumbus.CatalogPage.init(CatalogPage.java:43) Unfortunately, I'm a total Maven newbie, so I'm guessing something must be amiss in pom.xml (below) or the way I'm using it: mvn clean install eclipse:clean eclipse:eclipse (Then I usually run Start from Eclipse) Would someone wiser in the ways of inmethod and/or Maven care to give me a hand here? Any help much appreciated. Thanks, -- Jim. project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd; modelVersion4.0.0/modelVersion groupIdorg.firstuucolumbus/groupId artifactIdauction/artifactId packagingwar/packaging version1.0-SNAPSHOT/version !-- TODO project name -- nameauction/name description/description licenses license nameThe Apache Software License, Version 2.0/name urlhttp://www.apache.org/licenses/LICENSE-2.0.txt/url distributionrepo/distribution /license /licenses dependencies !-- WICKET DEPENDENCIES -- dependency groupIdorg.apache.wicket/groupId artifactIdwicket/artifactId version${wicket.version}/version /dependency dependency groupIdorg.apache.wicket/groupId artifactIdwicket-extensions/artifactId version${wicket.version}/version /dependency !-- LOGGING DEPENDENCIES - LOG4J -- dependency groupIdorg.slf4j/groupId artifactIdslf4j-log4j12/artifactId version${slf4j.version}/version /dependency dependency groupIdlog4j/groupId artifactIdlog4j/artifactId version${log4j.version}/version /dependency !-- JUNIT DEPENDENCY FOR TESTING -- dependency groupIdjunit/groupId artifactIdjunit/artifactId version3.8.2/version scopetest/scope /dependency !-- JETTY DEPENDENCIES FOR TESTING -- dependency groupIdorg.mortbay.jetty/groupId artifactIdjetty/artifactId version${jetty.version}/version scopeprovided/scope /dependency dependency groupIdorg.mortbay.jetty/groupId artifactIdjetty-util/artifactId version${jetty.version}/version scopeprovided/scope /dependency dependency groupIdorg.mortbay.jetty/groupId artifactIdjetty-management/artifactId version${jetty.version}/version scopeprovided/scope /dependency dependency groupIdorg.mortbay.jetty/groupId artifactIdjetty-plus/artifactId version${jetty.version}/version scopeprovided/scope /dependency dependency groupIdorg.mortbay.jetty/groupId artifactIdjetty-naming/artifactId version${jetty.version}/version scopeprovided/scope /dependency
Re: Need to add tool tip for hyper link
a href=# title=Here's my tooltip tiplink/a On Mon, Sep 29, 2008 at 9:59 PM, newbie_to_wicket [EMAIL PROTECTED] wrote: hi , i've to add a tool tip for hyper link, if any of you come across this thing, please suggest me or give me the sample code . thanks J -- View this message in context: http://www.nabble.com/Need-to-add-tool-tip-for-hyper-link-tp19730615p19730615.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.3.4 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Need to add tool tip for hyper link
http://wicketstuff.org/confluence/display/STUFFWIKI/wicketstuff-minis-prototip Prototip -- View this message in context: http://www.nabble.com/Need-to-add-tool-tip-for-hyper-link-tp19730615p19731592.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: WANG–Wicket Ajax Next Generation–being based on YUI (MD)
I guess I didn't quite get the file upload example in the first place. Uploading via iframe is supported by jQuery's form plugin, which is one of the best plugins we have. We plan to add it, together with other related plugins, to jQuery UI forms (or something like that). About selectors: jQuery promotes progressive enhancement a lot, and selectors are essential for that. One example for that is that we avoid inline onclick=.. and similar stuff. I'm not sure how that would be handled by Wicket, and if using jQuery would open ways to handle things differently. I can't give you too many details on replaceOuterHtml, though that sounds like I can easily get more info on. Currently jQuery does a lot of work cleaning html input that is appended into the DOM, which seems to be basically the same usecase here. Also executing script-tags is something we cover. Could you give me an example how exactly replaceOuterHTML is currently used? About the Microsoft argument: True, from a technical perspective that doesn't matter. But its an important political aspect: I already read a few comments from people that couldn't use jQuery due to a general no open-source policy - but now that Microsoft, that had exactly that policy, is changed theirs, it could enable others to adopt it, too. Jörn PS: I'm currently sitting on a panel with PPK and guys from Prototype, Dojo, YUI and jQuery. One question was: What library would you recommend but your own?. Two of the three non-jQuery guys recommened jQuery On Mon, Sep 29, 2008 at 1:41 PM, Matej Knopp [EMAIL PROTECTED] wrote: On Mon, Sep 29, 2008 at 1:18 PM, Jörn Zaefferer [EMAIL PROTECTED] wrote: It would be a big plus for me if Wicket would adopt jQuery. Drupal does that, and anyone writing a Drupal module can rely on the fact that jQuery is available. Same for Wordpress, where plugin authors can rely on the availability of jQuery. And not having to load more than one library, internal or not, is a good thing performance-wise. In response to your examples: Unbinding only particular event handlers without having a reference to the handler function can be achieved with namespaces: $(element).bind(click.somethingUnique, handleClick); $(element).unbind(click.somethingUnique); But that's not quite the same. This requires me to use generate and keep a unique string. Anyway, this is a cosmetic issue only. That way you don't have to keep a reference at all, while its possible to group multiple events into one namespace. This is now heavily used by most jQuery UI components when destroyed, to clean up their own event handlers without affecting any other. Multiple file upload we'll eventually have as part of jQuery UI. That would then be the same level of official and supported component that YUI provides. The descision to add new components is partly community-driven. So if you think multipart ajax uploads should be added, just ask for it. This is not about multiple file upload. We already have such component in Wicket. This is about support for input type=file on ajax uploads - just use hidden frame instead of xml http request. About selectors: John Resig is currently working on a new selector engine that likely outperformances any other selector engine available so far. Its developed as a standalone library, so its likely that MochKit and Prototype will use it, too. That sure is nice, but the selectors are not used in Wicket core at all. jQuery 1.3. will also provide heavy performance improvements for DOM manipulations, which I'm very exited about as that is usually where most time is spent. Its easy to avoid running certain selectors too often, but its hard to optimize DOM manipulation in clientcode. While we at this, I'd like to ask. Significant part of Wicket ajax is Wicket.replaceOuterHtml method. This was really a major pain to implement and stabilize. What it does is basically a replaceOuterHTML call for all browser but it works in totally cross browser consistent way. I.e. it allows table rows, cells etc replaced in internet explorer and it also executes embedded script tags on browsers that would normally not do that (basically all except for Firefox). So my question is, just out of curiosity, is there/will there be similar functionality provided by jQuery? Anyway, thanks for taking the time to discuss this again. Sure. Keep in mind that the decision is not carved to stone. I'm open to argument, but I'm really interested in technical aspect. Having Microsoft will use jQuery is not really a valid argument to me :) -Matej Jörn On Mon, Sep 29, 2008 at 12:54 PM, Matej Knopp [EMAIL PROTECTED] wrote: Are you really that surprised that Microsoft is not shipping YUI after the failed attempts to take over Yahoo? :) Seriously, there are technical reasons why I considered to use YUI, not political. Just because some companies use jQuery it doesn't mean Wicket should use it. Say most of the companies use JSF, does
Re: Inmethod Grid with wicket 1.3
I don't think the grid snapshots in maven are recent enough. You should fetch it from svn and build it yourself if you want to use it. Also keep in mind that grid version for 1.3 is in the 1.3 branch of wicket stuff, not the trunk: http://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/branches/wicket-1.3.x/inmethod-grid/ -Matej On Mon, Sep 29, 2008 at 10:21 PM, Jim Pinkham [EMAIL PROTECTED] wrote: I'd like to use inmethod grid in my charity auction project. I've got a slightly modified version of one of the grid-examples using DataGrid like so: DataGrid grid = new DefaultDataGrid(grid, AuctionApplication.get().getDao().getItems(getYear()), // returns IDataSource Arrays.asList(new IGridColumn[] { new PropertyColumn(new ResourceModel(id), id), new PropertyColumn(new ResourceModel(name), name), // I'll try editable columns here once I get basic display working... new SubmitCancelColumn(esd, new Model(Edit)), })); add(new Form(form).add(grid)); I'm getting this error at runtime I don't understand: NoSuchMethodError: org.apache.wicket.MetaDataKey: method init()V not found at com.inmethod.grid.common.AbstractGrid$4.init(AbstractGrid.java:908) at com.inmethod.grid.common.AbstractGrid.clinit(AbstractGrid.java:907) at org.firstuucolumbus.CatalogPage.init(CatalogPage.java:43) Unfortunately, I'm a total Maven newbie, so I'm guessing something must be amiss in pom.xml (below) or the way I'm using it: mvn clean install eclipse:clean eclipse:eclipse (Then I usually run Start from Eclipse) Would someone wiser in the ways of inmethod and/or Maven care to give me a hand here? Any help much appreciated. Thanks, -- Jim. project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd; modelVersion4.0.0/modelVersion groupIdorg.firstuucolumbus/groupId artifactIdauction/artifactId packagingwar/packaging version1.0-SNAPSHOT/version !-- TODO project name -- nameauction/name description/description licenses license nameThe Apache Software License, Version 2.0/name urlhttp://www.apache.org/licenses/LICENSE-2.0.txt/url distributionrepo/distribution /license /licenses dependencies !-- WICKET DEPENDENCIES -- dependency groupIdorg.apache.wicket/groupId artifactIdwicket/artifactId version${wicket.version}/version /dependency dependency groupIdorg.apache.wicket/groupId artifactIdwicket-extensions/artifactId version${wicket.version}/version /dependency !-- LOGGING DEPENDENCIES - LOG4J -- dependency groupIdorg.slf4j/groupId artifactIdslf4j-log4j12/artifactId version${slf4j.version}/version /dependency dependency groupIdlog4j/groupId artifactIdlog4j/artifactId version${log4j.version}/version /dependency !-- JUNIT DEPENDENCY FOR TESTING -- dependency groupIdjunit/groupId artifactIdjunit/artifactId version3.8.2/version scopetest/scope /dependency !-- JETTY DEPENDENCIES FOR TESTING -- dependency groupIdorg.mortbay.jetty/groupId artifactIdjetty/artifactId version${jetty.version}/version scopeprovided/scope /dependency dependency groupIdorg.mortbay.jetty/groupId artifactIdjetty-util/artifactId version${jetty.version}/version scopeprovided/scope /dependency dependency groupIdorg.mortbay.jetty/groupId artifactIdjetty-management/artifactId version${jetty.version}/version scopeprovided/scope /dependency dependency groupIdorg.mortbay.jetty/groupId artifactIdjetty-plus/artifactId
Re: WANG–Wicket Ajax Next Generation–being based on YUI (MD)
On Mon, Sep 29, 2008 at 11:13 PM, Jörn Zaefferer [EMAIL PROTECTED] wrote: I guess I didn't quite get the file upload example in the first place. Uploading via iframe is supported by jQuery's form plugin, which is one of the best plugins we have. We plan to add it, together with other related plugins, to jQuery UI forms (or something like that). Well, that's what I'm talking about. It's a separate plugin. I don't know how good the plugin is. How actively it is mantained. Can I rely on it? Those are the questions I do not need to ask when dealing with YUI. About selectors: jQuery promotes progressive enhancement a lot, and selectors are essential for that. One example for that is that we avoid inline onclick=.. and similar stuff. I'm not sure how that would be handled by Wicket, and if using jQuery would open ways to handle things differently. In wicket 1.5 there won't be any inline handlers in the markup. All events will be attached separately. I can't give you too many details on replaceOuterHtml, though that sounds like I can easily get more info on. Currently jQuery does a lot of work cleaning html input that is appended into the DOM, which seems to be basically the same usecase here. Also executing script-tags is something we cover. Could you give me an example how exactly replaceOuterHTML is currently used? It is used every time Ajax request replaces component on page. Wicket.replaceOuterHTML(element, newmarkup); It replaces the element (the tag itself) with the new markup. But it takes care of some things such as when the element is a table row or cell, or if there are script tag embedded in the markup. About the Microsoft argument: True, from a technical perspective that doesn't matter. But its an important political aspect: I already read a few comments from people that couldn't use jQuery due to a general no open-source policy - but now that Microsoft, that had exactly that policy, is changed theirs, it could enable others to adopt it, too. Well, I consider YAHOO to be a player that is major enough when the political questions arise. As for Microsoft and it's no open-source policy, well, until vista they have been using BSD network stack and had no problems with that as far as i can tell :) -Matej Jörn PS: I'm currently sitting on a panel with PPK and guys from Prototype, Dojo, YUI and jQuery. One question was: What library would you recommend but your own?. Two of the three non-jQuery guys recommened jQuery On Mon, Sep 29, 2008 at 1:41 PM, Matej Knopp [EMAIL PROTECTED] wrote: On Mon, Sep 29, 2008 at 1:18 PM, Jörn Zaefferer [EMAIL PROTECTED] wrote: It would be a big plus for me if Wicket would adopt jQuery. Drupal does that, and anyone writing a Drupal module can rely on the fact that jQuery is available. Same for Wordpress, where plugin authors can rely on the availability of jQuery. And not having to load more than one library, internal or not, is a good thing performance-wise. In response to your examples: Unbinding only particular event handlers without having a reference to the handler function can be achieved with namespaces: $(element).bind(click.somethingUnique, handleClick); $(element).unbind(click.somethingUnique); But that's not quite the same. This requires me to use generate and keep a unique string. Anyway, this is a cosmetic issue only. That way you don't have to keep a reference at all, while its possible to group multiple events into one namespace. This is now heavily used by most jQuery UI components when destroyed, to clean up their own event handlers without affecting any other. Multiple file upload we'll eventually have as part of jQuery UI. That would then be the same level of official and supported component that YUI provides. The descision to add new components is partly community-driven. So if you think multipart ajax uploads should be added, just ask for it. This is not about multiple file upload. We already have such component in Wicket. This is about support for input type=file on ajax uploads - just use hidden frame instead of xml http request. About selectors: John Resig is currently working on a new selector engine that likely outperformances any other selector engine available so far. Its developed as a standalone library, so its likely that MochKit and Prototype will use it, too. That sure is nice, but the selectors are not used in Wicket core at all. jQuery 1.3. will also provide heavy performance improvements for DOM manipulations, which I'm very exited about as that is usually where most time is spent. Its easy to avoid running certain selectors too often, but its hard to optimize DOM manipulation in clientcode. While we at this, I'd like to ask. Significant part of Wicket ajax is Wicket.replaceOuterHtml method. This was really a major pain to implement and stabilize. What it does is basically a replaceOuterHTML call for all browser but it works in totally cross browser
Re: WANG–Wicket Ajax Next Generation–being based on YUI (MD)
and what happens when microsoft forks jquery and hires all of its developers to work on its proprietary version? to me this is more a risk then anything else -igor On Mon, Sep 29, 2008 at 2:13 PM, Jörn Zaefferer [EMAIL PROTECTED] wrote: I guess I didn't quite get the file upload example in the first place. Uploading via iframe is supported by jQuery's form plugin, which is one of the best plugins we have. We plan to add it, together with other related plugins, to jQuery UI forms (or something like that). About selectors: jQuery promotes progressive enhancement a lot, and selectors are essential for that. One example for that is that we avoid inline onclick=.. and similar stuff. I'm not sure how that would be handled by Wicket, and if using jQuery would open ways to handle things differently. I can't give you too many details on replaceOuterHtml, though that sounds like I can easily get more info on. Currently jQuery does a lot of work cleaning html input that is appended into the DOM, which seems to be basically the same usecase here. Also executing script-tags is something we cover. Could you give me an example how exactly replaceOuterHTML is currently used? About the Microsoft argument: True, from a technical perspective that doesn't matter. But its an important political aspect: I already read a few comments from people that couldn't use jQuery due to a general no open-source policy - but now that Microsoft, that had exactly that policy, is changed theirs, it could enable others to adopt it, too. Jörn PS: I'm currently sitting on a panel with PPK and guys from Prototype, Dojo, YUI and jQuery. One question was: What library would you recommend but your own?. Two of the three non-jQuery guys recommened jQuery On Mon, Sep 29, 2008 at 1:41 PM, Matej Knopp [EMAIL PROTECTED] wrote: On Mon, Sep 29, 2008 at 1:18 PM, Jörn Zaefferer [EMAIL PROTECTED] wrote: It would be a big plus for me if Wicket would adopt jQuery. Drupal does that, and anyone writing a Drupal module can rely on the fact that jQuery is available. Same for Wordpress, where plugin authors can rely on the availability of jQuery. And not having to load more than one library, internal or not, is a good thing performance-wise. In response to your examples: Unbinding only particular event handlers without having a reference to the handler function can be achieved with namespaces: $(element).bind(click.somethingUnique, handleClick); $(element).unbind(click.somethingUnique); But that's not quite the same. This requires me to use generate and keep a unique string. Anyway, this is a cosmetic issue only. That way you don't have to keep a reference at all, while its possible to group multiple events into one namespace. This is now heavily used by most jQuery UI components when destroyed, to clean up their own event handlers without affecting any other. Multiple file upload we'll eventually have as part of jQuery UI. That would then be the same level of official and supported component that YUI provides. The descision to add new components is partly community-driven. So if you think multipart ajax uploads should be added, just ask for it. This is not about multiple file upload. We already have such component in Wicket. This is about support for input type=file on ajax uploads - just use hidden frame instead of xml http request. About selectors: John Resig is currently working on a new selector engine that likely outperformances any other selector engine available so far. Its developed as a standalone library, so its likely that MochKit and Prototype will use it, too. That sure is nice, but the selectors are not used in Wicket core at all. jQuery 1.3. will also provide heavy performance improvements for DOM manipulations, which I'm very exited about as that is usually where most time is spent. Its easy to avoid running certain selectors too often, but its hard to optimize DOM manipulation in clientcode. While we at this, I'd like to ask. Significant part of Wicket ajax is Wicket.replaceOuterHtml method. This was really a major pain to implement and stabilize. What it does is basically a replaceOuterHTML call for all browser but it works in totally cross browser consistent way. I.e. it allows table rows, cells etc replaced in internet explorer and it also executes embedded script tags on browsers that would normally not do that (basically all except for Firefox). So my question is, just out of curiosity, is there/will there be similar functionality provided by jQuery? Anyway, thanks for taking the time to discuss this again. Sure. Keep in mind that the decision is not carved to stone. I'm open to argument, but I'm really interested in technical aspect. Having Microsoft will use jQuery is not really a valid argument to me :) -Matej Jörn On Mon, Sep 29, 2008 at 12:54 PM, Matej Knopp [EMAIL PROTECTED] wrote: Are you really that surprised that Microsoft is
Re: WANG–Wicket Ajax Next Generation–being based on YUI (MD)
On Mon, Sep 29, 2008 at 11:13 PM, Jörn Zaefferer [EMAIL PROTECTED] wrote: PS: I'm currently sitting on a panel with PPK and guys from Prototype, Dojo, YUI and jQuery. One question was: What library would you recommend but your own?. Two of the three non-jQuery guys recommened jQuery So you're saying that 75% of the leading JS framework community think jquery is second best. Please keep the jquery marketing BS and fanboyism to the jquery forums. It serves nobody any good. In fact it makes me cringe and want to -1 any and all votes for adopting anything near jquery. Martijn - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: WANG–Wicket Ajax Next Generation–being based on YUI (MD)
Okay, let's keep this focused. Here is my experimental branch. http://svn.apache.org/repos/asf/wicket/sandbox/knopp/experimental/ There is new Ajax implementation here: http://svn.apache.org/repos/asf/wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/_wicket/ajax/js/wicket-ajax-ng.js and the main AjaxBehavior here: http://svn.apache.org/repos/asf/wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/_wicket/ajax/AjaxBehavior.java What I'd like to hear is what exactly is wrong with it and how using jQuery (or any other framework for that matter) could improve things. -Matej On Mon, Sep 29, 2008 at 11:45 PM, Martijn Dashorst [EMAIL PROTECTED] wrote: On Mon, Sep 29, 2008 at 11:13 PM, Jörn Zaefferer [EMAIL PROTECTED] wrote: PS: I'm currently sitting on a panel with PPK and guys from Prototype, Dojo, YUI and jQuery. One question was: What library would you recommend but your own?. Two of the three non-jQuery guys recommened jQuery So you're saying that 75% of the leading JS framework community think jquery is second best. Please keep the jquery marketing BS and fanboyism to the jquery forums. It serves nobody any good. In fact it makes me cringe and want to -1 any and all votes for adopting anything near jquery. Martijn - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: OnChangeAjaxBehavior in ListView
On Mon, 29 Sep 2008, Anders Peterson wrote: I'm using OnChangeAjaxBehavior with a TextField. The TextField is in a table cell that is repeated using a ListView. When I change the value of one of the TextFields more than one of the underlying models get updated - the one that was supposed to be updated and all following in the list. If I modify the first TextField then all underlying models get the same value. If I modify the second then all except the first... Hello, It sounds like all your TextFields models would be connected to each other. Show us the code and we'll see. Best wishes, Timo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wicket panels and parent class
On Mon, 29 Sep 2008, James Carman wrote: Just be careful. If the object reference in the parent is retrieved from a LoadableDetachableModel, then your panel and its parent can get out of sync. Because of this, it is often better to abstract the access with IModel. Best wishes, Timo -- Timo Rantalaiho Reaktor Innovations OyURL: http://www.ri.fi/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wicket panels and parent class
On Mon, 29 Sep 2008, Michael Sparer wrote: possible yes, recommended, no i'd say :-) if you need specific values from MyPanel then pass it via constructor, if you need values/attributes on component (e.g. isVisible) level use getParent() I think that getParent() is generally a bad idea, because it adds too much coupling and makes testing difficult. Whenever you can simply pass dependencies in a constructor, or set them from the parent after construction, that's probably the best way. You can even make the object references updateable by passing and storing a model wrapping the object instead of the object itself. The visitor-based event mechanisms discussed in WICKET-1312 could be used to some extent, or you can use the visitors for pull-style stuff as well as my colleague did recently public interface SelectedUserSource { IModelUser selectedUser(); } public class UserProfile extends Panel implements SelectedUserSource {... and in calling component private IModelUser findSelectedUser() { return (IModelUser) getPage().visitChildren(SelectedUserSource.class, new IVisitor() { public Object component(Component component) { return ((SelectedUserSource) component).selectedUser(); } }): } Having the dependent class as an inner class of the dependee makes sense in trivial cases but is often just a more explicit way of doing getParent(). I think that we desperately need to find ways to make our UI (Wicket) code good object-oriented code. I for one find myself often putting way too much stuff and coupling in a component class. Best wishes, Timo -- Timo Rantalaiho Reaktor Innovations OyURL: http://www.ri.fi/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: WANG–Wicket Ajax Next Generation–being based on YUI (MD)
Wicket.replaceOuterHTML(element, newmarkup); would be this in jQuery: $(element).after(newmarkup).remove(); That inserts the new stuff after the element, then removes the element, leaving only the new content in the DOM. after() takes care of cleanup stuff for table colgroups, rows and cells, legends, options and so on. Jörn On Mon, Sep 29, 2008 at 11:31 PM, Matej Knopp [EMAIL PROTECTED] wrote: On Mon, Sep 29, 2008 at 11:13 PM, Jörn Zaefferer [EMAIL PROTECTED] wrote: I guess I didn't quite get the file upload example in the first place. Uploading via iframe is supported by jQuery's form plugin, which is one of the best plugins we have. We plan to add it, together with other related plugins, to jQuery UI forms (or something like that). Well, that's what I'm talking about. It's a separate plugin. I don't know how good the plugin is. How actively it is mantained. Can I rely on it? Those are the questions I do not need to ask when dealing with YUI. About selectors: jQuery promotes progressive enhancement a lot, and selectors are essential for that. One example for that is that we avoid inline onclick=.. and similar stuff. I'm not sure how that would be handled by Wicket, and if using jQuery would open ways to handle things differently. In wicket 1.5 there won't be any inline handlers in the markup. All events will be attached separately. I can't give you too many details on replaceOuterHtml, though that sounds like I can easily get more info on. Currently jQuery does a lot of work cleaning html input that is appended into the DOM, which seems to be basically the same usecase here. Also executing script-tags is something we cover. Could you give me an example how exactly replaceOuterHTML is currently used? It is used every time Ajax request replaces component on page. Wicket.replaceOuterHTML(element, newmarkup); It replaces the element (the tag itself) with the new markup. But it takes care of some things such as when the element is a table row or cell, or if there are script tag embedded in the markup. About the Microsoft argument: True, from a technical perspective that doesn't matter. But its an important political aspect: I already read a few comments from people that couldn't use jQuery due to a general no open-source policy - but now that Microsoft, that had exactly that policy, is changed theirs, it could enable others to adopt it, too. Well, I consider YAHOO to be a player that is major enough when the political questions arise. As for Microsoft and it's no open-source policy, well, until vista they have been using BSD network stack and had no problems with that as far as i can tell :) -Matej Jörn PS: I'm currently sitting on a panel with PPK and guys from Prototype, Dojo, YUI and jQuery. One question was: What library would you recommend but your own?. Two of the three non-jQuery guys recommened jQuery On Mon, Sep 29, 2008 at 1:41 PM, Matej Knopp [EMAIL PROTECTED] wrote: On Mon, Sep 29, 2008 at 1:18 PM, Jörn Zaefferer [EMAIL PROTECTED] wrote: It would be a big plus for me if Wicket would adopt jQuery. Drupal does that, and anyone writing a Drupal module can rely on the fact that jQuery is available. Same for Wordpress, where plugin authors can rely on the availability of jQuery. And not having to load more than one library, internal or not, is a good thing performance-wise. In response to your examples: Unbinding only particular event handlers without having a reference to the handler function can be achieved with namespaces: $(element).bind(click.somethingUnique, handleClick); $(element).unbind(click.somethingUnique); But that's not quite the same. This requires me to use generate and keep a unique string. Anyway, this is a cosmetic issue only. That way you don't have to keep a reference at all, while its possible to group multiple events into one namespace. This is now heavily used by most jQuery UI components when destroyed, to clean up their own event handlers without affecting any other. Multiple file upload we'll eventually have as part of jQuery UI. That would then be the same level of official and supported component that YUI provides. The descision to add new components is partly community-driven. So if you think multipart ajax uploads should be added, just ask for it. This is not about multiple file upload. We already have such component in Wicket. This is about support for input type=file on ajax uploads - just use hidden frame instead of xml http request. About selectors: John Resig is currently working on a new selector engine that likely outperformances any other selector engine available so far. Its developed as a standalone library, so its likely that MochKit and Prototype will use it, too. That sure is nice, but the selectors are not used in Wicket core at all. jQuery 1.3. will also provide heavy performance improvements for DOM manipulations, which I'm very exited about as that is
Re: WANG–Wicket Ajax Next Generation–being based on YUI (MD)
I'll go through a few things in the wicket-ajax-ng.js file, to give an idea how that could look like when putting it on top of jQuery. I skip all stuff where I can't guess while scanning the code whats its supposed to do. W.$ looks like it selects one or more elements by id. Selecting is completely encapsulated in the jQuery-function, so you would change the usage a bit: W.$(myID) == $(#myID).get(0) W.$(id1, id2) == $(#id1, #id2).get() Usually you won't need to reference the DOM elements, so you could remove the get(0) and get() calls. W.$$ would just use: if ($(#id).size() ) { // element exists } copyArray can be replaced with jQuery.makeArray (http://dev.jquery.com/browser/trunk/jquery/src/core.js#L1130), which is heavily optimized and takes stuff like passing window as an argument into account. iterateArray could be replaced with jQuery.each, though the symantics are slightly different. jQuery.each iterates over both objects and arrays. The GarbageCollector wouldn't be necessary: jQuery cleans up all event listeneres when removing elements from the DOM. You don't have to bother with that at all. Like I mentioned earlier, replaceOuterHtmlXXX shouldn't be necessary at all, jQuery handles that automatically for all DOM manipulation methods. mapToUrlParameters would be handled by jQuery.param. Though usually when using jQuery's ajax methods, you don't have to worry about that. For example, to post some parameters to the server, you'd just use jQuery.ajax with the data option: $.ajax({ url: ..., method: post data: { key1: value1, key2: value2 } }); And so far I've covered only jQuery core functionality. What do you think? Jörn On Mon, Sep 29, 2008 at 11:50 PM, Matej Knopp [EMAIL PROTECTED] wrote: Okay, let's keep this focused. Here is my experimental branch. http://svn.apache.org/repos/asf/wicket/sandbox/knopp/experimental/ There is new Ajax implementation here: http://svn.apache.org/repos/asf/wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/_wicket/ajax/js/wicket-ajax-ng.js and the main AjaxBehavior here: http://svn.apache.org/repos/asf/wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/_wicket/ajax/AjaxBehavior.java What I'd like to hear is what exactly is wrong with it and how using jQuery (or any other framework for that matter) could improve things. -Matej On Mon, Sep 29, 2008 at 11:45 PM, Martijn Dashorst [EMAIL PROTECTED] wrote: On Mon, Sep 29, 2008 at 11:13 PM, Jörn Zaefferer [EMAIL PROTECTED] wrote: PS: I'm currently sitting on a panel with PPK and guys from Prototype, Dojo, YUI and jQuery. One question was: What library would you recommend but your own?. Two of the three non-jQuery guys recommened jQuery So you're saying that 75% of the leading JS framework community think jquery is second best. Please keep the jquery marketing BS and fanboyism to the jquery forums. It serves nobody any good. In fact it makes me cringe and want to -1 any and all votes for adopting anything near jquery. Martijn - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
hi, how to offer download function in wicket if i have already get the InputStream for the file
hi, how to offer download function in wicket if i have already get the InputStream for the file?? i did some search, people say can use dynamicl web resource, but i didn`t see any sample for it? does anybody get some sampe for this? thanks. -- View this message in context: http://www.nabble.com/hi%2C-how-to-offer-download-function-in-wicket-if-i-have-already-get-the-InputStream-for-the-file-tp19736383p19736383.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]