Re: Mounting page at root
Is it possible at all to have content at / ? Trying to mount something at / results in an error and I'm wondering of there's a workaround. By default it displays your home page (actually the page represented by the page class returned by WebApplication's getHomePage() method) if you configure WicketFilter to the /* url.
Re: Short Design Question
But that is not the problem or the question here. There is only talk that it must look nice I even heard somebody saying yes it looks nice it is a bookmarkable url but it is not really bookmarkable... (because the page state isn't preserved in the url) Whats the point for that? nothing. I agree with bookmarkable urls. And that they are nice looking is nice. What i think is that nice looking is not the key, descriptive is .. The url should say what you are looking at like www.mynewssite.com/finance johan On Feb 6, 2008 12:17 AM, Árni Hermann Reynisson [EMAIL PROTECTED] wrote: I'm not sure if this is too obvious but... The ability to copy+paste the url from one computer to another, people tend to do that, though being bookmarkable does somewhat imply that would be possible. Johan Compagner wrote: really? how often do you type an url thats not just like google.com but something more behind it? i never do, i really cant remeber that i do that. Its history or bookmarked. johan On Feb 5, 2008 6:29 PM, Eelco Hillenius [EMAIL PROTECTED] wrote: On Feb 5, 2008 1:40 AM, Johan Compagner [EMAIL PROTECTED] wrote: the question is what about the users of that client. I think nice looking urls is greatly exaggerated normal people look at the browser contents instead of the url How many times do i look at the url when i am browsing websites. I think never. I'm not too convinced. I regularly 'guess' URLs myself, and do notice a nice vs an ugly URL. You may argue I'm not a regular joe here, but who really is nowadays? I think we should keep an open mind to improvements. Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Short-Design-Question-tp15243739p15300068.html Sent from the Wicket - User mailing list archive at Nabble.comhttp://nabble.com/ . - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Ajax Feedback Problem in 1.3
can't you attach those to a jira issue. Then it is not getting lost. On Feb 6, 2008 8:16 AM, SantiagoA [EMAIL PROTECTED] wrote: http://www.nabble.com/file/p15306186/ValidationTest1.iamzip ValidationTest1.iamzip http://www.nabble.com/file/p15306186/ValidationTest2.iamzip ValidationTest2.iamzip Sorry, have to make two zips, ´cause packed to one file was too big to upload. Ok. ValidationTest1 runs with wicket 1.3.0 final and ValidationTest2 with the old 1.2.6 . Thanks for taking a look, Santiago rename your foo.zip to foo.iamzip and attach it to the email. -igor -- View this message in context: http://www.nabble.com/Ajax-Feedback-Problem-in-1.3-tp14191234p15306186.html Sent from the Wicket - User mailing list archive at Nabble.comhttp://nabble.com/ . - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
wicket support for Jasper report
hi i want to use jasperreport in wicket 1.3. i have used it with wicket 1.2. in wicket 1.2 we can set parameters in web.xml to call jasper report as servlet servlet-nameReportServlet/servlet-name servlet-classwicket.contrib.jasperreports.ReportLogin/servlet-class /servlet servlet servlet-nameImageServlet/servlet-name servlet-classwicket.contrib.jasperreports.ImageServlet/servlet-class /servlet servlet-mapping servlet-nameReportServlet/servlet-name url-pattern/report/url-pattern /servlet-mapping servlet-mapping servlet-nameImageServlet/servlet-name url-pattern/image/url-pattern /servlet-mapping how can i do it with wicket 1.3 Any suggestions ? thanks in advanced. -- View this message in context: http://www.nabble.com/wicket-support-for-Jasper-report-tp15306466p15306466.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]
AjaxFormValidatingBehavior: getting NotSerializableExc
Hello guys, I'm having a little problem with the use of AjaxFormValidatingBehavior. I add it to all my fields, using a visitor. form.visitChildren(FormComponent.class, new IVisitor() { public Object component(Component component) { if (component instanceof TextField) { component.add(new AjaxFormValidatingBehavior(form, "onkeyup") { private static final long serialVersionUID = 1L; @Override protected void onError(AjaxRequestTarget target) { super.onError(target); updateFieldsCssClasses(); } @Override protected void onSubmit(AjaxRequestTarget target) { super.onSubmit(target); updateFieldsCssClasses(); } }); } else if (component instanceof DropDownChoice || component instanceof CheckBox) { component.add(new AjaxFormValidatingBehavior(form, "onclick") { private static final long serialVersionUID = 1L; @Override protected void onError(AjaxRequestTarget target) { super.onError(target); updateFieldsCssClasses(); } @Override protected void onSubmit(AjaxRequestTarget target) { super.onSubmit(target); updateFieldsCssClasses(); } }); } return null; } }); But when this code is rendered, it throws this exception: org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException: Unable to serialize class: xxx$10 Field hierarchy is: 2 [class=xxx, path=2] ... at java.lang.Thread.run(Unknown Source) Caused by: java.io.NotSerializableException: xxx.$10 at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) However, AjaxFormValidatingBehavior implements Seriablizable... so I don't understand why Wicket complains about it... Have I miss something? PS: it works this way under at least 1.3.0 and 1.3.1 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Ajax Feedback Problem in 1.3
Okay. I made a jira issue and attach one zipfile with both examples. JIRA-Issue WICKET-1325 Hope that works. Never worked with jira before. - rename your foo.zip to foo.iamzip and attach it to the email. -igor -- View this message in context: http://www.nabble.com/Ajax-Feedback-Problem-in-1.3-tp14191234p15306477.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: AjaxFormValidatingBehavior: getting NotSerializableExc
My first guess is that the IVisitor is not serializable. Since you create two nested anonymous inner classes inside one another, the behaviors keep a reference to the IVisitor. Martijn On 2/6/08, Sébastien Piller [EMAIL PROTECTED] wrote: Hello guys, I'm having a little problem with the use of AjaxFormValidatingBehavior. I add it to all my fields, using a visitor. form.visitChildren(FormComponent.class, new IVisitor() { public Object component(Component component) { if (component instanceof TextField) { component.add(new AjaxFormValidatingBehavior(form, onkeyup) { private static final long serialVersionUID = 1L; @Override protected void onError(AjaxRequestTarget target) { super.onError(target); updateFieldsCssClasses(); } @Override protected void onSubmit(AjaxRequestTarget target) { super.onSubmit(target); updateFieldsCssClasses(); } }); } else if (component instanceof DropDownChoice || component instanceof CheckBox) { component.add(new AjaxFormValidatingBehavior(form, onclick) { private static final long serialVersionUID = 1L; @Override protected void onError(AjaxRequestTarget target) { super.onError(target); updateFieldsCssClasses(); } @Override protected void onSubmit(AjaxRequestTarget target) { super.onSubmit(target); updateFieldsCssClasses(); } }); } return null; } }); But when this code is rendered, it throws this exception: org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException: Unable to serialize class: xxx$10 Field hierarchy is: 2 [class=xxx, path=2] ... at java.lang.Thread.run(Unknown Source) Caused by: java.io.NotSerializableException: xxx.$10 at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) However, AjaxFormValidatingBehavior implements Seriablizable... so I don't understand why Wicket complains about it... Have I miss something? PS: it works this way under at least 1.3.0 and 1.3.1 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.0 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AjaxFormValidatingBehavior: getting NotSerializableExc
That's it! I'm too stupid... sorry for the disturbing ;) Martijn Dashorst a écrit : My first guess is that the IVisitor is not serializable. Since you create two nested anonymous inner classes inside one another, the behaviors keep a reference to the IVisitor. Martijn - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Some questions - mainly about session expiration and serialization
Hi to all. This is my first post, here's a quick introduction of myself. My name is Fabrizio Giudici, I'm a senior architect and I've been working with Wicket for a bit more than one year. I've recently upgraded to 1.3 (I was working with an 1.3 snapshot that dated back to a few months ago) and I've got a project that is exiting from the prototype stage and should go into production in a matter of weeks. I'm doing a final review of the code, considering that some of the older portions weren't probably very good (it is my first Wicket project) and something changed with 1.3. Here's my list of question - I apologize as I bet there's something more or less trivial, of course I've already done some searches around but I wasn't able to find good answers (or I didn't understand them ;-) : 1. I've always experienced some sudden session expiration problems with no apparent reason (I mean, the user wasn't actually sleeping). But they happened only once in a while. After upgrading to 1.3 they occur very often and they have quickly become the issue on the top of the list and I've to fix it immediately, since it's jeopardizing the acceptance tests performed by my customer. I've already searched in forums and tried some change (such as disabling versioning), but I got no benefit from it. 2. I have a modal window used to enter a date (I can't use the already provided component since this a special date) that has been working from several months. After upgrading to 1.3 it deterministically causes a session expired whenever it's closed (since this is deterministic I bet it's a different thing than the above). 3. I have still some confusion about serialization of things in sessions. I've always got some objects that are not serializable and caused tons of exceptions in log files, but no harm other than it. I'm now wondering whether they can trigger one of the above problems, and anyway before going into production I'd like to face with this issue in a definitive fashion. I know about the possibility of using detachable objects, nevertheless I need first to understand why this serialization thing can't be disabled - after all I've got no need for clustering in near future (and if I should do it, I'd probably go with Terracotta). Also, in version 1.2 I once saw that there was a UserSession (?) method that looked like it was useful for disabling serialization, and I had a mental note about using it, but it looks like it disappeared in 1.3.0. Hints? Thanks in advance.. -- Fabrizio Giudici, Ph.D. - Java Architect, Project Manager Tidalwave s.a.s. - We make Java work. Everywhere. weblogs.java.net/blog/fabriziogiudici - www.tidalwave.it/blog [EMAIL PROTECTED] - mobile: +39 348.150.6941 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
IPropertyResolver interface for property models
Hi, I'm developing custom IModel implementation which will be used as a model in forms. This model is able to record changes made by a form in the editing object (POJO). I do not store this changes directly to the base object, but they are stored somwhere inside this model (eg. in a Map of properties). Then when I try to read a property value firstly I check if this value was modified, if so then value stored inside a model is returned, if value was not modified property value from the base (original) object is returned. There are some more things in this model implementation, but they are not important in context of current message. Now I want to use standard property models to couple my IModel implementation with form and form components. But the problem is that all of these classes (AbstractPropertyModel, PropertyModel, etc.) use PropertyResolver for geting/seting property values, so it is done using reflection on object inside a model. These calls to PropertyResolver (and PropertyResolverConverter) are hardcoded in theirs implementations. If I can define my own PropertyResolver then I will be able to use these property models with my custom model. Maybe we should define IPropertyResolver interface with methods similar to these in PropertyResolver and then in PropertyModel classes define a method getPropertyResolver() which can be overriden in descending classes? Of course in the PropertyResolver all methods could not be static then. Another possible solution would be to pass IPropertyResolver implementation (or better IPropertyResolverProvider with getPropertyResolver() method) in property models constructor call to allow customization of property resolving mechanism. This is a comment to AbstractPropertyModel class: * Serves as a base class for different kinds of property models. By default, this class uses * [EMAIL PROTECTED] PropertyResolver} to resolve expressions on the target model object. Note that the * property resolver by default provides access to private members and methods. If guaranteeing * encapsulation of the target objects is a big concern, you should consider using an alternative * implementation. By default, this class uses PropertyResolver... - but there is no way to easy change this to some another resolver. The only way is to override all of these getObject(), setObject(), getObjectClass(), getPropertyField(), getPropertyGetter(), getPropertySetter() methods. Ok I know, I can do that and probably I will do, by maybe it is worth to think if extracting such interface as IPropertyResolver is a good concept? Best regards, Daniel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Block second click
Hello, I have a Link (not Ajax) on a component that does some heavyweight processing in onClick. During this processing I want to block other clicks from the same user. Is there a generic way to block multiple requests on the same link? I would prefer a solution without Ajax / JavaScript, but if that's impossible then that's okay. Thanks, Matthijs -- Matthijs Wensveen Func. Internet Integration W http://www.func.nl T +31 20 423 F +31 20 4223500 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Evaluating Wicket
Hi people, currently I'm evaluating wicket as the future framework in our company. I already found a lot of information but still there is some missing. I hope you can help me out answering these questions. * What experience do you have regarding performance of wicket applications? * Is there a way to cluster wicket applications? * Does wicket use any proprietary, non-standard technologies? * How does wicket care about session hijacking or sql injection? * Is there an easy way to implement SSO? * Can I integrate wicket applications into any content management system? If you have an answer to any of these questions don't hesitate to ignore the others - any input is welcome! Thanks in advance, René -- View this message in context: http://www.nabble.com/Evaluating-Wicket-tp15306535p15306535.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: Evaluating Wicket
Try here: http://cwiki.apache.org/WICKET/how-to-do-things-in-wicket.html As for some of the other questions, Ive answered inline.. René Samselnig wrote: Hi people, currently I'm evaluating wicket as the future framework in our company. I already found a lot of information but still there is some missing. I hope you can help me out answering these questions. * What experience do you have regarding performance of wicket applications? Theres the performace project check it out and see for yourself? http://wicket-stuff.svn.sf.net/svnroot/wicket-stuff/wicket-benchmark * Is there a way to cluster wicket applications? Sure.. Do it via the tomcat/apache2 etc... http://wicket-stuff.svn.sf.net/svnroot/wicket-stuff/wicket-cluster * Does wicket use any proprietary, non-standard technologies? * How does wicket care about session hijacking or sql injection? See the Blog http://cwiki.apache.org/WICKET/blog-tutorial.html tutorial for injection.. Session hijacking I dont know.. * Is there an easy way to implement SSO? Not sure.. http://cwiki.apache.org/DIRxINTEROP/kerberos-authentication-to-wicket.html ? * Can I integrate wicket applications into any content management system? I've done so by having wicket run in a iframe and passing parameters via urls... Also if your cms can handle portlets that might be the way to go, since wicket can run as a portlet too.. If you have an answer to any of these questions don't hesitate to ignore the others - any input is welcome! Thanks in advance, René Try to search a bit on the wiki btw, theres a lot there..:) -- 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]
Re: Mounting page at root
So I take it, it's currently not possible. oliverw wrote: Is it possible at all to have content at / ? Trying to mount something at / results in an error and I'm wondering of there's a workaround. -- View this message in context: http://www.nabble.com/Mounting-page-at-root-tp15300055p15306659.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: IPropertyResolver interface for property models
If we has such an interface then we need to rewrite most things because now its just a static method and then we need to have instances. i guess you want then to have AbstractPropertyModel to have a getPropertyResolver method that you can override and give something else back? But i still dont get what you really have What is your model object eventually where a property model works on? johan On Feb 6, 2008 1:58 PM, Daniel Stoch [EMAIL PROTECTED] wrote: Hi, I'm developing custom IModel implementation which will be used as a model in forms. This model is able to record changes made by a form in the editing object (POJO). I do not store this changes directly to the base object, but they are stored somwhere inside this model (eg. in a Map of properties). Then when I try to read a property value firstly I check if this value was modified, if so then value stored inside a model is returned, if value was not modified property value from the base (original) object is returned. There are some more things in this model implementation, but they are not important in context of current message. Now I want to use standard property models to couple my IModel implementation with form and form components. But the problem is that all of these classes (AbstractPropertyModel, PropertyModel, etc.) use PropertyResolver for geting/seting property values, so it is done using reflection on object inside a model. These calls to PropertyResolver (and PropertyResolverConverter) are hardcoded in theirs implementations. If I can define my own PropertyResolver then I will be able to use these property models with my custom model. Maybe we should define IPropertyResolver interface with methods similar to these in PropertyResolver and then in PropertyModel classes define a method getPropertyResolver() which can be overriden in descending classes? Of course in the PropertyResolver all methods could not be static then. Another possible solution would be to pass IPropertyResolver implementation (or better IPropertyResolverProvider with getPropertyResolver() method) in property models constructor call to allow customization of property resolving mechanism. This is a comment to AbstractPropertyModel class: * Serves as a base class for different kinds of property models. By default, this class uses * [EMAIL PROTECTED] PropertyResolver} to resolve expressions on the target model object. Note that the * property resolver by default provides access to private members and methods. If guaranteeing * encapsulation of the target objects is a big concern, you should consider using an alternative * implementation. By default, this class uses PropertyResolver... - but there is no way to easy change this to some another resolver. The only way is to override all of these getObject(), setObject(), getObjectClass(), getPropertyField(), getPropertyGetter(), getPropertySetter() methods. Ok I know, I can do that and probably I will do, by maybe it is worth to think if extracting such interface as IPropertyResolver is a good concept? Best regards, Daniel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wicket menus?
Hmm I beg to differ:) http://developer.yahoo.com/yui/examples/menu/example03.html Theres also an wicket integration project for this on wicketstuff.. Again; i might have misunderstood this.. regards Nino Edvin Syse wrote: That's purely a css issue, most menues are laid out using an ul and styled accordingly these days :) -- Edvin On 4. feb.. 2008, at 23.18, davout [EMAIL PROTECTED] wrote: Are there any demos to show how Wicket supports vertically orientated menus? -- View this message in context: http://www.nabble.com/Wicket-menus--tp15278751p15278751.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] -- 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]
Re: Mounting page at root
So I take it, it's currently not possible. Looks like I was not clear enough, sorry:) Configure your wicket filter to /* and return the page class you want to view as / as the home page in your application class. You don't have to mount anything, it will be displayed as /
Re: IPropertyResolver interface for property models
On Feb 6, 2008 3:45 PM, Johan Compagner [EMAIL PROTECTED] wrote: If we has such an interface then we need to rewrite most things because now its just a static method and then we need to have instances. I know that. It is not a simple change. i guess you want then to have AbstractPropertyModel to have a getPropertyResolver method that you can override and give something else back? Yes exactly. But i still dont get what you really have What is your model object eventually where a property model works on? I try to better explain this. When editing object I don't want to store changes directly to this object (eg. until form submit), but these edited values are cached in special ObjectEditor: public interface ObjectEditor extends IClusterable { Object getEditedObject(); Object getPropertyValue(String propertyExpression); void setPropertyValue(String propertyExpression, Object value); void commitChanges(); void cancelChanges(); } Sample use: Form form = new Form(formId, new EditorCompoundPropertyModel(new ObjectEditorImpl(baseObjectModel))); where: baseObjectModel is a model (or can be directly any Serializable object) with object to edit. Inside EditorCompoundPropertyModel EditorPropertyModel is created (instead of PropertyModel) which plays with ObjectEditor. When you change value in form component (eg. DropDownChoice with wantOnSelectionChangedNotifications=true) then a new value is stored in ObjectEditor (by calling setPropertyValue()) and base edited object stays unchanged. Form components to get value for display use EditorPropertyModel and this model getObject() method calls ObjectEditor.getPropertyValue() which checks if current property value has been changed: if yes then this value comes from ObjectEditor cache, otherwise it comes directly from edited object. My own implementation of IPropertyResolver would call ObjectEditor getPropertyValue/setPropertyValue methods. Such ObjectEditor allows me to track changes in my object, original object stays unchanged until I commit changes. When user press Cancel button I can revert all changes by ObjectEditor.cancelChanges(), I can edit non-serializable objects, ... My proposition with IPropertyResolver is for discussion only. It is not a thing we must have :). By now, I have already implemented my own EditorPropertyResolver and EditorCompoundPropertyResolver which play with such ObjectEditor. Daniel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Doubt in wicket and multiple views
Hi! I have one model and 4 different web applications. All webapplications is using the same model but different views. There is Different virtual hosts on the same server. Can I use wicket for this? ie Domain1.se, Domain1.com, Domain2.se, Domain2.com same server different virtual hosts same model with Wicket. -- View this message in context: http://www.nabble.com/Doubt-in-wicket-and-multiple-views-tp15306737p15306737.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: Session Expiration. UnauthorizedComponentInstantiationException. PageExpiredException. IllegalStateException. Ajax and Bookmarkable links.
Here's what we ended up doing to address this (since there didn't seem to be a consistent approach to handling the variety of scenarios from the the framework's perspective): 1. Disabled the back button by agressively expiring visited pages (negating a huge benefit of using wicket in the first place :). 2. Remove the bookmarkablePage link from the equation. 3. onRuntimeException() in our custom request cycle handles the various exceptions (PageExpired, Unauthorized,etc) 4. custom modification to our web session to prevent feedback message clearing in some cases of #3 where the message was getting too aggressively cleared. 5. we are not using the expired page setting that comes with wicket because it didn't seem to cover the variety of scenarios mentioned. We would have really liked to see this handling offered with some default mechanism in wicket (For common scenarios mentioned in my prior msg). - Matt Matt Smith-20 wrote: A co-worker and I are looking into how to provide a consistent handling of session expiration with an AuthenticatedWebApplication. If a session expires, ideally, we'd like to provide a consistent behavior of redirecting to a login page with a helpful message (i.e. - Your session expired, please re-login), re-authenticate, and then proceed to the original request regardless of what type of request is made of the server. Examples of the scenarios we'd like to handle consistently are: 1. User logs in. Session expires, then user clicks a wicket generated Page link. 2. User logs in. Session expires, then user clicks the back button in the browser and then clicks on a wicket generated component link. 3. User logs in. User performs an action which results in them being redirected to a bookmarkable page. The session expires, then user submits a form 4. User logs in. User performs an action which results in them being redirected to a bookmarkable page. The session expires, then user clicks a wicket generated link on the current page. 5. User logs in. User performs an action which results in them being redirected to a bookmarkable page. The session expires, then user triggers an AJAX request of the server. 6. User logs in. The session expires. User then triggers an AJAX request of the server. 7. User logs in. The session expires, then user gets redirected to login page (thus creating a new session). User then clicks back and clicks on a wicket generated link, gets redirected to a login page, clicks back, clicks a wicket generated link. The examples above seem to cause various behaviors in: #1. The Web app's UnauthorizedComponentInstantiation listener is fired and given the page the user was on as an argument (thus redirecting them directly to the page without a message). #2 throws an UnauthorizedComponentInstantiationException #3 throws a PageExpiredException #4 throws a PageExpiredException #5 throws a PageExpiredException #6 throws an IllegalStateException (unmatched key/value pairs). #7 A WicketRuntimeException exception is thrown (component not found in page)(because the page id in the link is referring to a different page in the current/new session than the page it referred to in the old session). It seems that using nextnumber id's (starting at 0) allows for potential overlap in id's between a new session and an old session. We are able to handle PageExpiredException consistently by overriding onRuntimeException() in our own custom RequestCycle. Is there a way we can specify some consistent behavior for the other scenarios? - Matt http://netsmith.blogspot.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Session-Expiration.-UnauthorizedComponentInstantiationException.-PageExpiredException.-IllegalStateException.-Ajax-and-Bookmarkable-links.-tp15272371p15306738.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: Doubt in wicket and multiple views
If you're looking for a way to use different layouts, templates for different virtual servers you have several options: - use the Session.setStyle() to set the style... you can do this in a custom WebRequest and by examining the server name of the request url. Then you can have different .html and .properties file per virtual host, but the same usage. - use a Border to incorporate all style information (adding css reference, the main layout, etc). I prefer this approach - I have an ancestor Page that always adds a border which border is made by a factory method I have on my subclassed webapplication. This way I can create different borders and thus different layouts and styles for different pages - or I could even have different styles based on any request parameters. The second approach can be seen in live at www.szeretgom.hu (sorry it is not available in English yet...) If you navigate to http://szeretgom.hu/portal/content/title/Wiki/ you get a different layout (which is created by a different border). A third kind of border is displayed at this URL: http://szeretgom.hu/portal/blog/pages/cserepj/ These are all handled by the same web application and it would be quite easy to modify my code to return different borders based on the request url's server name... Hope this helps... I have one model and 4 different web applications. All webapplications is using the same model but different views. There is Different virtual hosts on the same server. Can I use wicket for this? -- János Cserép - [EMAIL PROTECTED] Web: http://www.szeretgom.hu Skype: cserepj
RE: IPropertyResolver interface for property models
g.. getting late, the setter should be: public abstract void setObject(Object obj) { if (!isEquals(obj, getObject()) { editedValues.put(obj); } } Thomas -Original Message- From: Maeder Thomas [mailto:[EMAIL PROTECTED] Sent: Mittwoch, 6. Februar 2008 17:20 To: users@wicket.apache.org Subject: RE: IPropertyResolver interface for property models If I understand this correctly, you're trying to keep an overlay while editing an object. Why not do this: class OverlayModel extends Model { OverlayModel(Map editedValues, IModel underlyingModel, String propertyName) { ...remember the parameters in instance variables } public Object getObject() { if (editedValues.containsKey(propertyName)) { return editedValues.get(propertyName); } else { return underlyingModel.getObject(); } } public abstract void setObject(Object obj) { if (isEquals(obj, getObject()) { editValues.put(obj); } } } As underlying models, you would use PropertyModel instances. When you want to revert the values, you just clear the Map. Thomas -Original Message- From: Daniel Stoch [mailto:[EMAIL PROTECTED] Sent: Mittwoch, 6. Februar 2008 16:31 To: users@wicket.apache.org Subject: Re: IPropertyResolver interface for property models On Feb 6, 2008 3:45 PM, Johan Compagner [EMAIL PROTECTED] wrote: If we has such an interface then we need to rewrite most things because now its just a static method and then we need to have instances. I know that. It is not a simple change. i guess you want then to have AbstractPropertyModel to have a getPropertyResolver method that you can override and give something else back? Yes exactly. But i still dont get what you really have What is your model object eventually where a property model works on? I try to better explain this. When editing object I don't want to store changes directly to this object (eg. until form submit), but these edited values are cached in special ObjectEditor: public interface ObjectEditor extends IClusterable { Object getEditedObject(); Object getPropertyValue(String propertyExpression); void setPropertyValue(String propertyExpression, Object value); void commitChanges(); void cancelChanges(); } Sample use: Form form = new Form(formId, new EditorCompoundPropertyModel(new ObjectEditorImpl(baseObjectModel))); where: baseObjectModel is a model (or can be directly any Serializable object) with object to edit. Inside EditorCompoundPropertyModel EditorPropertyModel is created (instead of PropertyModel) which plays with ObjectEditor. When you change value in form component (eg. DropDownChoice with wantOnSelectionChangedNotifications=true) then a new value is stored in ObjectEditor (by calling setPropertyValue()) and base edited object stays unchanged. Form components to get value for display use EditorPropertyModel and this model getObject() method calls ObjectEditor.getPropertyValue() which checks if current property value has been changed: if yes then this value comes from ObjectEditor cache, otherwise it comes directly from edited object. My own implementation of IPropertyResolver would call ObjectEditor getPropertyValue/setPropertyValue methods. Such ObjectEditor allows me to track changes in my object, original object stays unchanged until I commit changes. When user press Cancel button I can revert all changes by ObjectEditor.cancelChanges(), I can edit non-serializable objects, ... My proposition with IPropertyResolver is for discussion only. It is not a thing we must have :). By now, I have already implemented my own EditorPropertyResolver and EditorCompoundPropertyResolver which play with such ObjectEditor. Daniel - 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: Block second click
On Wed, 06 Feb 2008, Matthijs Wensveen wrote: I have a Link (not Ajax) on a component that does some heavyweight processing in onClick. During this processing I want to block other clicks from the same user. Is there a generic way to block multiple requests on the same link? I would prefer a solution without Ajax / JavaScript, but if that's impossible then that's okay. Components are stateful, so maybe you could just keep the state in your Link? @Override onClick() { if (!isEnabled()) { return; // this shouldnt happen though? } try { setEnabled(false); doSomeHeavyWeightProcessing(); } finally { setEnabled(true); } } This creates a little race condition but if you can produce it you could try using a real lock mechanism. 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: Block second click
Matthijs Wensveen wrote: Hello, I have a Link (not Ajax) on a component that does some heavyweight processing in onClick. During this processing I want to block other clicks from the same user. Is there a generic way to block multiple requests on the same link? I would prefer a solution without Ajax / JavaScript, but if that's impossible then that's okay. I dont think thats possible, maybe with some meta refresh... Otherwise popup a layer with a higher z-index and that will block all until page reload, for minimal js.. Or use one of the ajax indicating stuff.. Thanks, Matthijs -- 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]
Re: Block second click
there is a mask component in wicketstuff-minis. you can write a call decorator that will bring up the mask that will cover the whole screen and prevent the user from clicking. -igor On Feb 6, 2008 4:37 AM, Matthijs Wensveen [EMAIL PROTECTED] wrote: Hello, I have a Link (not Ajax) on a component that does some heavyweight processing in onClick. During this processing I want to block other clicks from the same user. Is there a generic way to block multiple requests on the same link? I would prefer a solution without Ajax / JavaScript, but if that's impossible then that's okay. Thanks, Matthijs -- Matthijs Wensveen Func. Internet Integration W http://www.func.nl T +31 20 423 F +31 20 4223500 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problems with ResourceModel and StringResourceModel
Hi all I'm writing test cases for my wicket application (1.2.6), and I'm having problems with the ResourceModel and StringResourceModel. It seems like when loaded by a WicketTester (with startPage method) these components doesn't load the global resource file MyApplication.properties. If I put the key on a property file with the same name of the page, it works. When I run the same page in tomcat, it works fine. Thank you Marco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problems with ResourceModel and StringResourceModel
you have to make wicket tester use _your_ application subclass -igor On Feb 6, 2008 8:50 AM, Marco Aurélio Silva [EMAIL PROTECTED] wrote: Hi all I'm writing test cases for my wicket application (1.2.6), and I'm having problems with the ResourceModel and StringResourceModel. It seems like when loaded by a WicketTester (with startPage method) these components doesn't load the global resource file MyApplication.properties. If I put the key on a property file with the same name of the page, it works. When I run the same page in tomcat, it works fine. Thank you Marco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: IPropertyResolver interface for property models
Thanks for your response. Your solution looks interesting and even quite similar to mine, but... :) My ObjectEditor interface is like your Map editedValues, IModel underlyingModel coupled together. But underlyingModel in my solution holds the whole object, not a single property: Object getEditedObject() { return underlyingModel.getObject(); } I have original object and edited values stored inside one ObjectEditor instance (therefore in one model). I can have a different implementations of this interface. In your solution you must have 2 models for each property (one overlay model and one underlyingModel). Another thing is maybe less important, but EditorPropertyModel and CompoundEditorPropertyModel works the same way like standard property models when object passed to them is not an ObjectEditor. According to your concept ObjectEditor could have a method: IModel getPropertyModel(String propertyExpression); // or maybe createPropertyModel ? instead of: Object getPropertyValue(String propertyExpression); void setPropertyValue(String propertyExpression, Object value); Daniel On Feb 6, 2008 5:20 PM, Maeder Thomas [EMAIL PROTECTED] wrote: If I understand this correctly, you're trying to keep an overlay while editing an object. Why not do this: class OverlayModel extends Model { OverlayModel(Map editedValues, IModel underlyingModel, String propertyName) { ...remember the parameters in instance variables } public Object getObject() { if (editedValues.containsKey(propertyName)) { return editedValues.get(propertyName); } else { return underlyingModel.getObject(); } } public abstract void setObject(Object obj) { if (isEquals(obj, getObject()) { editValues.put(obj); } } } As underlying models, you would use PropertyModel instances. When you want to revert the values, you just clear the Map. Thomas I try to better explain this. When editing object I don't want to store changes directly to this object (eg. until form submit), but these edited values are cached in special ObjectEditor: public interface ObjectEditor extends IClusterable { Object getEditedObject(); Object getPropertyValue(String propertyExpression); void setPropertyValue(String propertyExpression, Object value); void commitChanges(); void cancelChanges(); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problems with ResourceModel and StringResourceModel
How to make it use my application subclass? WicketTester.set(Application application) trow this exception: wicket.WicketRuntimeException: Use Application.init() method for configuring your application object at wicket.Application.getSettings(Application.java:606) at wicket.Application.getDebugSettings(Application.java:449) at wicket.protocol.http.HttpSessionStore.setAttribute(HttpSessionStore.java:51) at wicket.protocol.http.AbstractHttpSessionStore.bind(AbstractHttpSessionStore.java:165) at wicket.protocol.http.MockWebApplication.setupRequestAndResponse(MockWebApplication.java:411) at wicket.util.tester.WicketTester.startPage(WicketTester.java:230) at AppTester.testHome(AppTester.java:56) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at junit.framework.TestCase.runTest(TestCase.java:164) at junit.framework.TestCase.runBare(TestCase.java:130) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:120) at junit.framework.TestSuite.runTest(TestSuite.java:230) at junit.framework.TestSuite.run(TestSuite.java:225) at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196) On Feb 6, 2008 1:55 PM, Igor Vaynberg [EMAIL PROTECTED] wrote: you have to make wicket tester use _your_ application subclass -igor On Feb 6, 2008 8:50 AM, Marco Aurélio Silva [EMAIL PROTECTED] wrote: Hi all I'm writing test cases for my wicket application (1.2.6), and I'm having problems with the ResourceModel and StringResourceModel. It seems like when loaded by a WicketTester (with startPage method) these components doesn't load the global resource file MyApplication.properties. If I put the key on a property file with the same name of the page, it works. When I run the same page in tomcat, it works fine. Thank you Marco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Some questions - mainly about session expiration and serialization
On Feb 6, 2008 4:40 AM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: 1. I've always experienced some sudden session expiration problems with no apparent reason (I mean, the user wasn't actually sleeping). But they happened only once in a while. After upgrading to 1.3 they occur very often and they have quickly become the issue on the top of the list and I've to fix it immediately, since it's jeopardizing the acceptance tests performed by my customer. I've already searched in forums and tried some change (such as disabling versioning), but I got no benefit from it. My guess is that #3 is causing it...see my answer there. 2. I have a modal window used to enter a date (I can't use the already provided component since this a special date) that has been working from several months. After upgrading to 1.3 it deterministically causes a session expired whenever it's closed (since this is deterministic I bet it's a different thing than the above). Are you using our modal window implementation or your own? 3. I have still some confusion about serialization of things in sessions. I've always got some objects that are not serializable and caused tons of exceptions in log files, but no harm other than it. I'm now wondering whether they can trigger one of the above problems, and anyway before going into production I'd like to face with this issue in a definitive fashion. I know about the possibility of using detachable objects, nevertheless I need first to understand why this serialization thing can't be disabled - after all I've got no need for clustering in near future (and if I should do it, I'd probably go with Terracotta). Also, in version 1.2 I once saw that there was a UserSession (?) method that looked like it was useful for disabling serialization, and I had a mental note about using it, but it looks like it disappeared in 1.3.0. Hints? Serialization has always been needed in wicket for things other then cluster replication. Versioning has been one of those reasons. We would use serialization mostly for cloning an object, so that we can keep a reference to its previous state for rolling back a version. With 1.3.1 this has changed dramatically. In order to free up session space (1.2 would keep x pages in session) 1.3.1 only keeps the most current page in session and spools older pages to disk via serialization. So if you hit a page that has a serialization problem and later come back to it via back button and click a link/submit a form you will get a page expired error. My recommendation is to make sure you use detachable models or make your objects serializable. In the meantime, try class MyApplication extends WebApplication { ISessionStore newSessionStore() { return new HttpSessionStore();}} that will turn off disk spooling and will make 1.3 behave more like 1.2 in that regard. -igor Thanks in advance.. -- Fabrizio Giudici, Ph.D. - Java Architect, Project Manager Tidalwave s.a.s. - We make Java work. Everywhere. weblogs.java.net/blog/fabriziogiudici - www.tidalwave.it/blog [EMAIL PROTECTED] - mobile: +39 348.150.6941 - 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: Doubt in wicket and multiple views
So long as everything runs in the same webapp, you should be able to use the same model. From a wicket application, you can always get to the request object to get to the virtual host, so you can use that info to present a different view. Mathias P.W Nilsson wrote: Hi! I have one model and 4 different web applications. All webapplications is using the same model but different views. There is Different virtual hosts on the same server. Can I use wicket for this? ie Domain1.se, Domain1.com, Domain2.se, Domain2.com same server different virtual hosts same model with Wicket. -- View this message in context: http://www.nabble.com/Doubt-in-wicket-and-multiple-views-tp15306737p15307866.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]
[wicketstuff] Accordion component?
I almost have a component ready for wicketstuff.. Should I spend the extra hour generalizing it and putting it up on wicketstuff? http://www.hedgerwow.com/360/mwd/accordion/demo.php -- 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]
localization
Hi If you have trouble localizing your backend components, domain classes etc... Look no futher:) http://code.google.com/p/jpa-translator/ (licensed under apache) Disclaimer, im one of the authors:) But it fits really great into wicket and it's plugable too... -- 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]
Re: Mounting page at root
All right. Now I feel stupid. Thanks it worked! Janos Cserep-3 wrote: Is it possible at all to have content at / ? Trying to mount something at / results in an error and I'm wondering of there's a workaround. By default it displays your home page (actually the page represented by the page class returned by WebApplication's getHomePage() method) if you configure WicketFilter to the /* url. -- View this message in context: http://www.nabble.com/Mounting-page-at-root-tp15300055p15308737.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: Evaluating Wicket
Hi, I'm myself discovering Wicket, but I'll try to nswer some of your questions ;) René Samselnig wrote: * What experience do you have regarding performance of wicket applications? I haven't built a large application with Wicket yet, but in a JPA CRUD examples I made, Wicket performs better than JSF IMO, I mean I did not made a serious benchmarking, but I can notice the difference with my bare eyes. René Samselnig wrote: * Is there a way to cluster wicket applications? Hell yes ! It's one of the major features of the 1.3 version I think. René Samselnig wrote: * Does wicket use any proprietary, non-standard technologies? Well, being an Open Source and ASF Licensed, the answer is clearly NO. René Samselnig wrote: * How does wicket care about session hijacking or sql injection? Session Hijacking: One nifty feature of Wicket is that you can pass parameters betwwen pages as Java parameters, thus not exposing them outside the runtime environment. Regarding the SQL Injection, this has absolutely nothing to do with Wicket nor any other Web Framework. JDBC solves this (using the query parameters). René Samselnig wrote: * Is there an easy way to implement SSO? Sorry, this question is not not for me. René Samselnig wrote: * Can I integrate wicket applications into any content management system? Well, this seems a bit delicate to achieve in Wicket, for the simple reason of the 1..1 relationship between a HTML page and a WebPage class ... Regards. -- View this message in context: http://www.nabble.com/Evaluating-Wicket-tp15306535p15309002.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: Evaluating Wicket
The chief advantage in my mind is that the code is all Java. I was easily (2 dozen lines of code) able to write a behavior that replicates model between related form components so that when someone types a first name into a field it is replicated to other first name fields and those fields are updated real-time via ajax. (The person who is checking into the hotel is usually the person who is picking up the tickets to the show, for example). That sort of flexibility means that I have not hit a nasty road block with Wicket. Cheers, Scott On Feb 6, 2008 8:36 AM, Maeder Thomas [EMAIL PROTECTED] wrote: Having gone trough a web framework evaluation myself in the last year, my recommendation is to actually build a small wicket application. The benefits over other web frameworks are very real, but not evident from studying the brochures. Thomas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Evaluating Wicket
Hi Rene, Some answers... * What experience do you have regarding performance of wicket applications? We're still in development, but so far performance hasn't been an issue. * Is there a way to cluster wicket applications? Yes. Same way you would cluster any webapp. Wicket also has a number of different clustering strategies available. * Does wicket use any proprietary, non-standard technologies? Wicket core depends on various OSS libraries, all commercial friendly (ASL compatible). * How does wicket care about session hijacking or sql injection? Session hijacking - not an expert on this, but if I understand correctly, this is mostly a JavaScript concern, so just be careful when you write/use Javascript components. SQL Injection - In general, Wicket's architecture makes it harder for these kinds of attacks because state is kept on the server side (as opposed to URL parameters). That being said, this really has more to do with the persistence layer that you use. So long as you shy away from assembling your own SQL query strings you should be OK. * Is there an easy way to implement SSO? Internal SSO between webapps is possible via the Servlet container, provided all webapps run in the same container. If that doesn't apply to you, you should be able to write a custom authorization strategy for Wicket. * Can I integrate wicket applications into any content management system? Depends on what you want to do here. That being said, there are several native Wicket CMS systems under development. René Samselnig wrote: Hi people, currently I'm evaluating wicket as the future framework in our company. I already found a lot of information but still there is some missing. I hope you can help me out answering these questions. * What experience do you have regarding performance of wicket applications? * Is there a way to cluster wicket applications? * Does wicket use any proprietary, non-standard technologies? * How does wicket care about session hijacking or sql injection? * Is there an easy way to implement SSO? * Can I integrate wicket applications into any content management system? If you have an answer to any of these questions don't hesitate to ignore the others - any input is welcome! Thanks in advance, René -- View this message in context: http://www.nabble.com/Evaluating-Wicket-tp15306535p15309004.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: Problems with ResourceModel and StringResourceModel
dont know about 1.2, but in 1.3 there is a constructor that takes an instance of application, so you would do new WicketTester(new MyApplication()); -igor On Feb 6, 2008 9:11 AM, Marco Aurélio Silva [EMAIL PROTECTED] wrote: How to make it use my application subclass? WicketTester.set(Application application) trow this exception: wicket.WicketRuntimeException: Use Application.init() method for configuring your application object at wicket.Application.getSettings(Application.java:606) at wicket.Application.getDebugSettings(Application.java:449) at wicket.protocol.http.HttpSessionStore.setAttribute(HttpSessionStore.java:51) at wicket.protocol.http.AbstractHttpSessionStore.bind(AbstractHttpSessionStore.java:165) at wicket.protocol.http.MockWebApplication.setupRequestAndResponse(MockWebApplication.java:411) at wicket.util.tester.WicketTester.startPage(WicketTester.java:230) at AppTester.testHome(AppTester.java:56) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at junit.framework.TestCase.runTest(TestCase.java:164) at junit.framework.TestCase.runBare(TestCase.java:130) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:120) at junit.framework.TestSuite.runTest(TestSuite.java:230) at junit.framework.TestSuite.run(TestSuite.java:225) at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196) On Feb 6, 2008 1:55 PM, Igor Vaynberg [EMAIL PROTECTED] wrote: you have to make wicket tester use _your_ application subclass -igor On Feb 6, 2008 8:50 AM, Marco Aurélio Silva [EMAIL PROTECTED] wrote: Hi all I'm writing test cases for my wicket application (1.2.6), and I'm having problems with the ResourceModel and StringResourceModel. It seems like when loaded by a WicketTester (with startPage method) these components doesn't load the global resource file MyApplication.properties. If I put the key on a property file with the same name of the page, it works. When I run the same page in tomcat, it works fine. Thank you Marco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
CompoundModel based on proxies
One of our more clever developers created a CompoundPropertyModel that uses a cglib proxy to strongly bind the mutators to the model. It looks like this: SharedPropertyModelCustomer model = new SharedPropertyModelCustomer(customer); this.setModel(model); FormComponent firstName = new CustomerNameField(firstName).setRequired(true); model.bind(firstName).to().getFirstName(); add(firstName); FormComponent lastName = new CustomerNameField(lastName).setRequired(true); model.bind(lastName).to().getLastName(); add(lastName); FormComponent addr1 = new AddressField(address1).setRequired(true); model.bind(addr1).to().getAddress().getAddress1(); add(addr1); FormComponent addr2 = new AddressField(address2); model.bind(addr2).to().getAddress().getAddress2(); add(addr2); FormComponent city = new CityField(city); model.bind(city).to().getAddress().getCity(); add(city); We're happy to share if folk like this approach. N.B. that the .to() call is for readability rather than out of any necessity. Cheers, Scott -- Scott Swank reformed mathematician - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Evaluating Wicket
Ah, just an addition about performance: Session size can be a bottleneck in performance, so one have just to be careful about what to put in his session and by using detachable models for example. -- View this message in context: http://www.nabble.com/Evaluating-Wicket-tp15306535p15309398.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: CompoundModel based on proxies
very nice! -Original Message- From: Scott Swank [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 06, 2008 12:57 PM To: Wicket User List Subject: CompoundModel based on proxies One of our more clever developers created a CompoundPropertyModel that uses a cglib proxy to strongly bind the mutators to the model. It looks like this: SharedPropertyModelCustomer model = new SharedPropertyModelCustomer(customer); this.setModel(model); FormComponent firstName = new CustomerNameField(firstName).setRequired(true); model.bind(firstName).to().getFirstName(); add(firstName); FormComponent lastName = new CustomerNameField(lastName).setRequired(true); model.bind(lastName).to().getLastName(); add(lastName); FormComponent addr1 = new AddressField(address1).setRequired(true); model.bind(addr1).to().getAddress().getAddress1(); add(addr1); FormComponent addr2 = new AddressField(address2); model.bind(addr2).to().getAddress().getAddress2(); add(addr2); FormComponent city = new CityField(city); model.bind(city).to().getAddress().getCity(); add(city); We're happy to share if folk like this approach. N.B. that the .to() call is for readability rather than out of any necessity. Cheers, Scott -- Scott Swank reformed mathematician - 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: localization
As you might have guessed we use cglib to wrap domain classes and proyx them... This approach lets you inject localizing into existing systems.. So you do this: @Translatable public class Hotel { private Long id; private String name; @Translate private String description; [...getter setter...] } Translator translator = new Translator( Locale.GERMAN ); Hotel translatedHotel = translator.translate( hotel ); translatedHotel.getDescription(); // return description in german translatedHotel.setDescription( die Beschreibung ); // persist german description And with a little code you can wrap this into your session and voila you have localizing onthe fly:) Im working on this part as we speak..:) Nino Saturnino Martinez Vazquez Wael wrote: Hi If you have trouble localizing your backend components, domain classes etc... Look no futher:) http://code.google.com/p/jpa-translator/ (licensed under apache) Disclaimer, im one of the authors:) But it fits really great into wicket and it's plugable too... -- 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]
Re: [wicketstuff] Accordion component?
Nino Saturnino Martinez Vazquez Wael schrieb: I almost have a component ready for wicketstuff.. Should I spend the extra hour generalizing it and putting it up on wicketstuff? http://www.hedgerwow.com/360/mwd/accordion/demo.php SURE! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: CompoundModel based on proxies
Scott Swank wrote: We're happy to share if folk like this approach. N.B. that the .to() call is for readability rather than out of any necessity. I'm quite interested in this. This looks like it is just crazy and clever enough to be really useful :-) Thanks! Carl-Eric - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Some questions - mainly about session expiration and serialization
Are you using our modal window implementation or your own? Wicket implementation. BTW, I have another modal window that doesn't create problem. I'll later post the code, when I'm able to cut it down. 3. I have still some confusion about serialization of things in sessions. I've always got some objects that are not serializable and caused tons of exceptions in log files, but no harm other than it. I'm now wondering whether they can trigger one of the above problems, and anyway before going into production I'd like to face with this issue in a definitive fashion. I know about the possibility of using detachable objects, nevertheless I need first to understand why this serialization thing can't be disabled - after all I've got no need for clustering in near future (and if I should do it, I'd probably go with Terracotta). Also, in version 1.2 I once saw that there was a UserSession (?) method that looked like it was useful for disabling serialization, and I had a mental note about using it, but it looks like it disappeared in 1.3.0. Hints? Serialization has always been needed in wicket for things other then cluster replication. Versioning has been one of those reasons. We would use serialization mostly for cloning an object, so that we can keep a reference to its previous state for rolling back a version. With 1.3.1 this has changed dramatically. In order to free up session space (1.2 would keep x pages in session) 1.3.1 only keeps the most current page in session and spools older pages to disk via serialization. So if you hit a page that has a serialization problem and later come back to it via back button and click a link/submit a form you will get a page expired error. My recommendation is to make sure you use detachable models or make your objects serializable. In the meantime, try class MyApplication extends WebApplication { ISessionStore newSessionStore() { return new HttpSessionStore();}} that will turn off disk spooling and will make 1.3 behave more like 1.2 in that regard. Ok, I'll try this just to see if it can at least solve immediately the problem, then go for some refactoring. My question is: but if I don't need (and don't want) page versioning, and I disable it, is serialization still necessary? -- Fabrizio Giudici, Ph.D. - Java Architect, Project Manager Tidalwave s.a.s. - We make Java work. Everywhere. weblogs.java.net/blog/fabriziogiudici - www.tidalwave.it/blog [EMAIL PROTECTED] - mobile: +39 348.150.6941
Re: localization
Translator translator = new Translator( Locale.GERMAN ); Hotel translatedHotel = translator.translate( hotel ); translatedHotel.getDescription(); // return description in german translatedHotel.setDescription( die Beschreibung ); // persist german description I think it would be very cool to extend that API to have a better wicket integration. It would be very cool if we can do the following: code BoundCompoundPropertyModel model = new TranslatableBoundCompoundPropertyModel( hotel ); TextField descriptionField = ...; model.bind( descriptionField, description ); /code Regards, Edward Yakop - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Some questions - mainly about session expiration and serialization
On Feb 6, 2008 10:28 AM, Fabrizio Giudici [EMAIL PROTECTED] wrote: Are you using our modal window implementation or your own? Wicket implementation. BTW, I have another modal window that doesn't create problem. I'll later post the code, when I'm able to cut it down. are you using it to popup a panel or a page? i think the panel popup doesnt generally work well, the page version works better. also make sure you popup the page in a different pagemap. 3. I have still some confusion about serialization of things in sessions. I've always got some objects that are not serializable and caused tons of exceptions in log files, but no harm other than it. I'm now wondering whether they can trigger one of the above problems, and anyway before going into production I'd like to face with this issue in a definitive fashion. I know about the possibility of using detachable objects, nevertheless I need first to understand why this serialization thing can't be disabled - after all I've got no need for clustering in near future (and if I should do it, I'd probably go with Terracotta). Also, in version 1.2 I once saw that there was a UserSession (?) method that looked like it was useful for disabling serialization, and I had a mental note about using it, but it looks like it disappeared in 1.3.0. Hints? Serialization has always been needed in wicket for things other then cluster replication. Versioning has been one of those reasons. We would use serialization mostly for cloning an object, so that we can keep a reference to its previous state for rolling back a version. With 1.3.1 this has changed dramatically. In order to free up session space (1.2 would keep x pages in session) 1.3.1 only keeps the most current page in session and spools older pages to disk via serialization. So if you hit a page that has a serialization problem and later come back to it via back button and click a link/submit a form you will get a page expired error. My recommendation is to make sure you use detachable models or make your objects serializable. In the meantime, try class MyApplication extends WebApplication { ISessionStore newSessionStore() { return new HttpSessionStore();}} that will turn off disk spooling and will make 1.3 behave more like 1.2 in that regard. Ok, I'll try this just to see if it can at least solve immediately the problem, then go for some refactoring. My question is: but if I don't need (and don't want) page versioning, and I disable it, is serialization still necessary? sure, you can disable the versioning completely, but then you also wont have a proper backbutton support. versioning is there for a reason... -igor -- Fabrizio Giudici, Ph.D. - Java Architect, Project Manager Tidalwave s.a.s. - We make Java work. Everywhere. weblogs.java.net/blog/fabriziogiudici - www.tidalwave.it/blog [EMAIL PROTECTED] - mobile: +39 348.150.6941 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Trouble with IE and images loaded through css
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Guys, Under the source dir that contains my page and html, I have two dirs, css and images. Inside css, I have two files, main.css and ie.css. These css files reference images, such as: main.css: a.download-but{ float:right; width:111px; height:26px; margin:0; background:url(../images/download-audio.png) no-repeat 0 0; text-indent:-px; } ie.css: * html a.download-but{ background:url(none.gif); filter:progid:dximagetransform.microsoft.alphaimageloader(src='images/download-audio.png', sizingmethod='crop'); cursor:pointer; } I have two links in the header. mainCSS and ieCSS. I have the following code in the page: WebClientInfo info = (WebClientInfo)((WebSession)Session.get()).getClientInfo(); add(new StyleSheetReference(mainCSS, getClass(), css/main.css)); StyleSheetReference ssref = new StyleSheetReference(ieCSS, getClass(), css/ie.css); add(ssref); if (!info.getProperties().getNavigatorAppName().equalsIgnoreCase(Microsoft Internet Explorer)) { ssref.setVisible(false); } My problem is that under IE, the images are not loaded. I've tried changing the image url it ../images/download-audio.png, but that didn't work. Any suggestions? - -- Philip A. Chapman Desktop and Web Application Development: Java, .NET, PostgreSQL, MySQL, MSSQL Linux, Windows 2000, Windows XP -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHqf5MAdpynRSGw3URAu+RAJ987XEjNuRFCpVHg8OWya99IsLlOQCfXQkI leINHwBSkP9cKtF2VFWiOMQ= =xUt9 -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
adding extra javascript call in CheckBox
Hi All, I was wondering if there's a way to add or decorate a javascript call in CheckBox? What I did was: new CheckBox(checkBox, new Model()) { protected void onComponentTag(ComponentTag tag) { tag.put(onclick,executeSomething();); } But it overrides the original onClick that Wicket is writing. Is there a way that I can decorate it so that I can add extra javaScript call in onClick without overriding the original click, like the buttons has this: protected IAjaxCallDecorator getAjaxCallDecorator() { return new AjaxCallDecorator() Thanks in advance and happy chinese new year! Best, Wen Tong -- The only constant in life is change. Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: adding extra javascript call in CheckBox
tag.put(onclick,executeSomething();+tag.getattributes().get(onclick)); -igor On Feb 6, 2008 10:39 AM, Beyonder Unknown [EMAIL PROTECTED] wrote: Hi All, I was wondering if there's a way to add or decorate a javascript call in CheckBox? What I did was: new CheckBox(checkBox, new Model()) { protected void onComponentTag(ComponentTag tag) { tag.put(onclick,executeSomething();); } But it overrides the original onClick that Wicket is writing. Is there a way that I can decorate it so that I can add extra javaScript call in onClick without overriding the original click, like the buttons has this: protected IAjaxCallDecorator getAjaxCallDecorator() { return new AjaxCallDecorator() Thanks in advance and happy chinese new year! Best, Wen Tong -- The only constant in life is change. Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping - 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: IPropertyResolver interface for property models
Why not just return a hashmap as the model object and have besides that hashmap your real object On 2/6/08, Daniel Stoch [EMAIL PROTECTED] wrote: On Feb 6, 2008 3:45 PM, Johan Compagner [EMAIL PROTECTED] wrote: If we has such an interface then we need to rewrite most things because now its just a static method and then we need to have instances. I know that. It is not a simple change. i guess you want then to have AbstractPropertyModel to have a getPropertyResolver method that you can override and give something else back? Yes exactly. But i still dont get what you really have What is your model object eventually where a property model works on? I try to better explain this. When editing object I don't want to store changes directly to this object (eg. until form submit), but these edited values are cached in special ObjectEditor: public interface ObjectEditor extends IClusterable { Object getEditedObject(); Object getPropertyValue(String propertyExpression); void setPropertyValue(String propertyExpression, Object value); void commitChanges(); void cancelChanges(); } Sample use: Form form = new Form(formId, new EditorCompoundPropertyModel(new ObjectEditorImpl(baseObjectModel))); where: baseObjectModel is a model (or can be directly any Serializable object) with object to edit. Inside EditorCompoundPropertyModel EditorPropertyModel is created (instead of PropertyModel) which plays with ObjectEditor. When you change value in form component (eg. DropDownChoice with wantOnSelectionChangedNotifications=true) then a new value is stored in ObjectEditor (by calling setPropertyValue()) and base edited object stays unchanged. Form components to get value for display use EditorPropertyModel and this model getObject() method calls ObjectEditor.getPropertyValue() which checks if current property value has been changed: if yes then this value comes from ObjectEditor cache, otherwise it comes directly from edited object. My own implementation of IPropertyResolver would call ObjectEditor getPropertyValue/setPropertyValue methods. Such ObjectEditor allows me to track changes in my object, original object stays unchanged until I commit changes. When user press Cancel button I can revert all changes by ObjectEditor.cancelChanges(), I can edit non-serializable objects, ... My proposition with IPropertyResolver is for discussion only. It is not a thing we must have :). By now, I have already implemented my own EditorPropertyResolver and EditorCompoundPropertyResolver which play with such ObjectEditor. Daniel - 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: [wicketstuff] Accordion component?
+1 2008/2/6, Nino Saturnino Martinez Vazquez Wael [EMAIL PROTECTED]: I almost have a component ready for wicketstuff.. Should I spend the extra hour generalizing it and putting it up on wicketstuff? http://www.hedgerwow.com/360/mwd/accordion/demo.php -- 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] -- AT(R)
Re: Evaluating Wicket
be careful only to evaluate performance in wicket in deployment mode. development mode is subject to a potentially very high level of overhead that you don't want to profile. René Samselnig wrote: Hi people, currently I'm evaluating wicket as the future framework in our company. I already found a lot of information but still there is some missing. I hope you can help me out answering these questions. * What experience do you have regarding performance of wicket applications? * Is there a way to cluster wicket applications? * Does wicket use any proprietary, non-standard technologies? * How does wicket care about session hijacking or sql injection? * Is there an easy way to implement SSO? * Can I integrate wicket applications into any content management system? If you have an answer to any of these questions don't hesitate to ignore the others - any input is welcome! Thanks in advance, René -- View this message in context: http://www.nabble.com/Evaluating-Wicket-tp15306535p15312176.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: IPropertyResolver interface for property models
This is exactly how ObjectEditor default implementation would looks like: it contains hashmap for edited values. Simple HashMap as a model is not a good solution, because you must somehow initialize it with object properties' values first. I think a better is to hide such details inside an interface (like ObjectEditor), then you can also easily cancel (revert) changes. But even using a HashMap you cannot simply use property models (normal and compound) to access values, you must implement another custom models for that. These models will be probably very similar to standard property models, the only difference is how they access object values = how their property resolver works :). Daniel On 2008-02-06, at 19:51, Johan Compagner wrote: Why not just return a hashmap as the model object and have besides that hashmap your real object On 2/6/08, Daniel Stoch [EMAIL PROTECTED] wrote: On Feb 6, 2008 3:45 PM, Johan Compagner [EMAIL PROTECTED] wrote: If we has such an interface then we need to rewrite most things because now its just a static method and then we need to have instances. I know that. It is not a simple change. i guess you want then to have AbstractPropertyModel to have a getPropertyResolver method that you can override and give something else back? Yes exactly. But i still dont get what you really have What is your model object eventually where a property model works on? I try to better explain this. When editing object I don't want to store changes directly to this object (eg. until form submit), but these edited values are cached in special ObjectEditor: public interface ObjectEditor extends IClusterable { Object getEditedObject(); Object getPropertyValue(String propertyExpression); void setPropertyValue(String propertyExpression, Object value); void commitChanges(); void cancelChanges(); } Sample use: Form form = new Form(formId, new EditorCompoundPropertyModel(new ObjectEditorImpl(baseObjectModel))); where: baseObjectModel is a model (or can be directly any Serializable object) with object to edit. Inside EditorCompoundPropertyModel EditorPropertyModel is created (instead of PropertyModel) which plays with ObjectEditor. When you change value in form component (eg. DropDownChoice with wantOnSelectionChangedNotifications=true) then a new value is stored in ObjectEditor (by calling setPropertyValue()) and base edited object stays unchanged. Form components to get value for display use EditorPropertyModel and this model getObject() method calls ObjectEditor.getPropertyValue() which checks if current property value has been changed: if yes then this value comes from ObjectEditor cache, otherwise it comes directly from edited object. My own implementation of IPropertyResolver would call ObjectEditor getPropertyValue/setPropertyValue methods. Such ObjectEditor allows me to track changes in my object, original object stays unchanged until I commit changes. When user press Cancel button I can revert all changes by ObjectEditor.cancelChanges(), I can edit non-serializable objects, ... My proposition with IPropertyResolver is for discussion only. It is not a thing we must have :). By now, I have already implemented my own EditorPropertyResolver and EditorCompoundPropertyResolver which play with such ObjectEditor. Daniel - 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: Trouble with IE and images loaded through css
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Thanks Matej. For now, I've converted to .gif until I can find a better solution. Matej Knopp wrote: Hi, I'm affraid the url for alphaimageloader needs to be absolute. IE can't handle relative urls for filters. That is a problem because in wicket all you get are relative URLs. And you probably don't want to tie your application to a specific context anyway. rant I've personally have resigned to try to force IE6 to show transparent pictures. I usually use two variants of each transparent picture - one with alpha map for sane browsers and one with transparent color for IE6. Hopefully won't be too long before IE6 share drops so low it won't be worth supporting anymore. /rant -Matej On Feb 6, 2008 7:37 PM, Philip A. Chapman [EMAIL PROTECTED] wrote: Guys, Under the source dir that contains my page and html, I have two dirs, css and images. Inside css, I have two files, main.css and ie.css. These css files reference images, such as: main.css: a.download-but{ float:right; width:111px; height:26px; margin:0; background:url(../images/download-audio.png) no-repeat 0 0; text-indent:-px; } ie.css: * html a.download-but{ background:url(none.gif); filter:progid:dximagetransform.microsoft.alphaimageloader(src='images/download-audio.png', sizingmethod='crop'); cursor:pointer; } I have two links in the header. mainCSS and ieCSS. I have the following code in the page: WebClientInfo info = (WebClientInfo)((WebSession)Session.get()).getClientInfo(); add(new StyleSheetReference(mainCSS, getClass(), css/main.css)); StyleSheetReference ssref = new StyleSheetReference(ieCSS, getClass(), css/ie.css); add(ssref); if (!info.getProperties().getNavigatorAppName().equalsIgnoreCase(Microsoft Internet Explorer)) { ssref.setVisible(false); } My problem is that under IE, the images are not loaded. I've tried changing the image url it ../images/download-audio.png, but that didn't work. Any suggestions? - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - -- Philip A. Chapman Desktop and Web Application Development: Java, .NET, PostgreSQL, MySQL, MSSQL Linux, Windows 2000, Windows XP -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHqhuZAdpynRSGw3URAj+sAJ9SQ8+Ym1799KtJ6SQ5Ypd0gsWtAACcCfl2 EMHl3j7D/Av3ubI1bF1Pq/8= =Il1L -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Reloading resource
I have seen the behavior but that seems to be endemic to windows. I have not seen that on Linux or OS X. On Wed, Feb 6, 2008 at 12:08 PM, gantini [EMAIL PROTECTED] wrote: Strangethis dosn't work for me... When wicket starts, in the tomcat console I can read: *** WARNING: Wicket is running in DEVELOPMENT mode. *** *** ^^^*** *** Do NOT deploy to your live server(s) without changing this. *** *** See Application#getConfigurationType() for more information. *** But when I modify any html file, no reload is performed :-(( Other suggest for me? G. igor.vaynberg wrote: this should automatically be happening if you run wicket in development mode. that call you do is not necessary. -igor On Feb 5, 2008 3:01 PM, gantini [EMAIL PROTECTED] wrote: Nothing to help me? gantini wrote: I'm very new with Wicket. It is possible to automatically reload resource (class and HTML file) ? I've set: @Override protected void init() { getResourceSettings().setResourcePollFrequency( Duration.ONE_SECOND ); } but this don't work for me. Thanks. -- View this message in context: http://www.nabble.com/Reloading-resource-tp15268997p15300053.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] -- View this message in context: http://www.nabble.com/Reloading-resource-tp15268997p15312660.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] -- Konstantin Ignatyev PS: If this is a typical day on planet earth, humans will add fifteen million tons of carbon to the atmosphere, destroy 115 square miles of tropical rainforest, create seventy-two miles of desert, eliminate between forty to one hundred species, erode seventy-one million tons of topsoil, add 2,700 tons of CFCs to the stratosphere, and increase their population by 263,000 Bowers, C.A. The Culture of Denial: Why the Environmental Movement Needs a Strategy for Reforming Universities and Public Schools. New York: State University of New York Press, 1997: (4) (5) (p.206)
Re: Reloading resource
Does your IDE copy the HTML files over to the classpath? Martijn On 2/6/08, gantini [EMAIL PROTECTED] wrote: Strangethis dosn't work for me... When wicket starts, in the tomcat console I can read: *** WARNING: Wicket is running in DEVELOPMENT mode. *** *** ^^^*** *** Do NOT deploy to your live server(s) without changing this. *** *** See Application#getConfigurationType() for more information. *** But when I modify any html file, no reload is performed :-(( Other suggest for me? G. igor.vaynberg wrote: this should automatically be happening if you run wicket in development mode. that call you do is not necessary. -igor On Feb 5, 2008 3:01 PM, gantini [EMAIL PROTECTED] wrote: Nothing to help me? gantini wrote: I'm very new with Wicket. It is possible to automatically reload resource (class and HTML file) ? I've set: @Override protected void init() { getResourceSettings().setResourcePollFrequency( Duration.ONE_SECOND ); } but this don't work for me. Thanks. -- View this message in context: http://www.nabble.com/Reloading-resource-tp15268997p15300053.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] -- View this message in context: http://www.nabble.com/Reloading-resource-tp15268997p15312660.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] -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.0 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Reloading resource
How do you modify the html, in what tool, how do you ensure the html gets inside the deployed and unpacked war running in tomcat? Martijn On 2/6/08, Martijn Dashorst [EMAIL PROTECTED] wrote: Does your IDE copy the HTML files over to the classpath? Martijn On 2/6/08, gantini [EMAIL PROTECTED] wrote: Strangethis dosn't work for me... When wicket starts, in the tomcat console I can read: *** WARNING: Wicket is running in DEVELOPMENT mode. *** *** ^^^*** *** Do NOT deploy to your live server(s) without changing this. *** *** See Application#getConfigurationType() for more information. *** But when I modify any html file, no reload is performed :-(( Other suggest for me? G. igor.vaynberg wrote: this should automatically be happening if you run wicket in development mode. that call you do is not necessary. -igor On Feb 5, 2008 3:01 PM, gantini [EMAIL PROTECTED] wrote: Nothing to help me? gantini wrote: I'm very new with Wicket. It is possible to automatically reload resource (class and HTML file) ? I've set: @Override protected void init() { getResourceSettings().setResourcePollFrequency( Duration.ONE_SECOND ); } but this don't work for me. Thanks. -- View this message in context: http://www.nabble.com/Reloading-resource-tp15268997p15300053.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] -- View this message in context: http://www.nabble.com/Reloading-resource-tp15268997p15312660.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] -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.0 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0 -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.0 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Trouble with IE and images loaded through css
You can have transparent pngs without alpha blending (1 bit transparency). I believe IE6 supports that. It's useful if your images need more than 255+1 color palette. -Matej On Feb 6, 2008 9:42 PM, Philip A. Chapman [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Thanks Matej. For now, I've converted to .gif until I can find a better solution. Matej Knopp wrote: Hi, I'm affraid the url for alphaimageloader needs to be absolute. IE can't handle relative urls for filters. That is a problem because in wicket all you get are relative URLs. And you probably don't want to tie your application to a specific context anyway. rant I've personally have resigned to try to force IE6 to show transparent pictures. I usually use two variants of each transparent picture - one with alpha map for sane browsers and one with transparent color for IE6. Hopefully won't be too long before IE6 share drops so low it won't be worth supporting anymore. /rant -Matej On Feb 6, 2008 7:37 PM, Philip A. Chapman [EMAIL PROTECTED] wrote: Guys, Under the source dir that contains my page and html, I have two dirs, css and images. Inside css, I have two files, main.css and ie.css. These css files reference images, such as: main.css: a.download-but{ float:right; width:111px; height:26px; margin:0; background:url(../images/download-audio.png) no-repeat 0 0; text-indent:-px; } ie.css: * html a.download-but{ background:url(none.gif); filter:progid:dximagetransform.microsoft.alphaimageloader(src='images/download-audio.png', sizingmethod='crop'); cursor:pointer; } I have two links in the header. mainCSS and ieCSS. I have the following code in the page: WebClientInfo info = (WebClientInfo)((WebSession)Session.get()).getClientInfo(); add(new StyleSheetReference(mainCSS, getClass(), css/main.css)); StyleSheetReference ssref = new StyleSheetReference(ieCSS, getClass(), css/ie.css); add(ssref); if (!info.getProperties().getNavigatorAppName().equalsIgnoreCase(Microsoft Internet Explorer)) { ssref.setVisible(false); } My problem is that under IE, the images are not loaded. I've tried changing the image url it ../images/download-audio.png, but that didn't work. Any suggestions? - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - -- Philip A. Chapman Desktop and Web Application Development: Java, .NET, PostgreSQL, MySQL, MSSQL Linux, Windows 2000, Windows XP -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHqhuZAdpynRSGw3URAj+sAJ9SQ8+Ym1799KtJ6SQ5Ypd0gsWtAACcCfl2 EMHl3j7D/Av3ubI1bF1Pq/8= =Il1L -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Resizable and reorderable grid components. http://www.inmethod.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: IPropertyResolver interface for property models
Well I forget that PropertyResolver works with maps, so custom models probably are not necessary then :). Thanks for tip. But in my application I have to use some solutions from other application layer (persistance layer), where a special mechanisms to track changes in objects are implemented. So I must make general interface for this in Wicket. Daniel On 2008-02-06, at 21:34, Daniel Stoch wrote: This is exactly how ObjectEditor default implementation would looks like: it contains hashmap for edited values. Simple HashMap as a model is not a good solution, because you must somehow initialize it with object properties' values first. I think a better is to hide such details inside an interface (like ObjectEditor), then you can also easily cancel (revert) changes. But even using a HashMap you cannot simply use property models (normal and compound) to access values, you must implement another custom models for that. These models will be probably very similar to standard property models, the only difference is how they access object values = how their property resolver works :). Daniel On 2008-02-06, at 19:51, Johan Compagner wrote: Why not just return a hashmap as the model object and have besides that hashmap your real object - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: mounted url bug or request for enhancement
I didn't see any response to this so I'm going to bump it once. -Original Message- From: Dan Kaplan [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 05, 2008 11:36 AM To: users@wicket.apache.org Subject: RE: mounted url bug or request for enhancement I made a very big typo in that last paragraph. It should have said: But my complaint is that even though it does that, you can still type /home/foo/bar into the url and it'll render *home* for you. -Original Message- From: Dan Kaplan [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 05, 2008 11:33 AM To: users@wicket.apache.org Subject: mounted url bug or request for enhancement Hello, I'm testing this sandbox webapp I made that looks like this: package web; import org.apache.wicket.protocol.http.WebApplication; public class SandboxApplication extends WebApplication { protected void init() { mountBookmarkablePage(/home, Home.class); } public Class getHomePage() { return Home.class; } } I notice that you can visit /home/foo/bar and it will render /home for you. I learned yesterday that Wicket is considering foo to be a parameter variable and bar to be a parameter value. I think that's a very unusual and error prone default, but that's not the main thing I want to talk about. If I replace my init method with this: mount(new QueryStringUrlCodingStrategy(/home, Home.class)); That should make parameters look like this: ?foo=bar But my complaint is that even though it does that, you can still type /home/foo/bar into the url and it'll render [home] for you. IMO, it should give a 404 in that situation. - 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: Reloading resource
im on windows and have never experienced this... -igor On Feb 6, 2008 12:22 PM, Konstantin Ignatyev [EMAIL PROTECTED] wrote: I have seen the behavior but that seems to be endemic to windows. I have not seen that on Linux or OS X. On Wed, Feb 6, 2008 at 12:08 PM, gantini [EMAIL PROTECTED] wrote: Strangethis dosn't work for me... When wicket starts, in the tomcat console I can read: *** WARNING: Wicket is running in DEVELOPMENT mode. *** *** ^^^*** *** Do NOT deploy to your live server(s) without changing this. *** *** See Application#getConfigurationType() for more information. *** But when I modify any html file, no reload is performed :-(( Other suggest for me? G. igor.vaynberg wrote: this should automatically be happening if you run wicket in development mode. that call you do is not necessary. -igor On Feb 5, 2008 3:01 PM, gantini [EMAIL PROTECTED] wrote: Nothing to help me? gantini wrote: I'm very new with Wicket. It is possible to automatically reload resource (class and HTML file) ? I've set: @Override protected void init() { getResourceSettings().setResourcePollFrequency( Duration.ONE_SECOND ); } but this don't work for me. Thanks. -- View this message in context: http://www.nabble.com/Reloading-resource-tp15268997p15300053.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] -- View this message in context: http://www.nabble.com/Reloading-resource-tp15268997p15312660.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] -- Konstantin Ignatyev PS: If this is a typical day on planet earth, humans will add fifteen million tons of carbon to the atmosphere, destroy 115 square miles of tropical rainforest, create seventy-two miles of desert, eliminate between forty to one hundred species, erode seventy-one million tons of topsoil, add 2,700 tons of CFCs to the stratosphere, and increase their population by 263,000 Bowers, C.A. The Culture of Denial: Why the Environmental Movement Needs a Strategy for Reforming Universities and Public Schools. New York: State University of New York Press, 1997: (4) (5) (p.206) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Reloading resource
test it out this way: go here http://wicket.apache.org/quickstart.html copy and paste the maven command to create a quickstart project find the Start class, right click and do run as java application this will start embedded jetty, go to localhost:8080, then find Index.html, edit it, and refresh the browser. do you see the changes? -igor On Feb 6, 2008 12:08 PM, gantini [EMAIL PROTECTED] wrote: Strangethis dosn't work for me... When wicket starts, in the tomcat console I can read: *** WARNING: Wicket is running in DEVELOPMENT mode. *** *** ^^^*** *** Do NOT deploy to your live server(s) without changing this. *** *** See Application#getConfigurationType() for more information. *** But when I modify any html file, no reload is performed :-(( Other suggest for me? G. igor.vaynberg wrote: this should automatically be happening if you run wicket in development mode. that call you do is not necessary. -igor On Feb 5, 2008 3:01 PM, gantini [EMAIL PROTECTED] wrote: Nothing to help me? gantini wrote: I'm very new with Wicket. It is possible to automatically reload resource (class and HTML file) ? I've set: @Override protected void init() { getResourceSettings().setResourcePollFrequency( Duration.ONE_SECOND ); } but this don't work for me. Thanks. -- View this message in context: http://www.nabble.com/Reloading-resource-tp15268997p15300053.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] -- View this message in context: http://www.nabble.com/Reloading-resource-tp15268997p15312660.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: CompoundModel based on proxies
please share for Wicket 1.4, if cglib's license is permitting, I think we should add this to core. Martijn On 2/6/08, Scott Swank [EMAIL PROTECTED] wrote: One of our more clever developers created a CompoundPropertyModel that uses a cglib proxy to strongly bind the mutators to the model. It looks like this: SharedPropertyModelCustomer model = new SharedPropertyModelCustomer(customer); this.setModel(model); FormComponent firstName = new CustomerNameField(firstName).setRequired(true); model.bind(firstName).to().getFirstName(); add(firstName); FormComponent lastName = new CustomerNameField(lastName).setRequired(true); model.bind(lastName).to().getLastName(); add(lastName); FormComponent addr1 = new AddressField(address1).setRequired(true); model.bind(addr1).to().getAddress().getAddress1(); add(addr1); FormComponent addr2 = new AddressField(address2); model.bind(addr2).to().getAddress().getAddress2(); add(addr2); FormComponent city = new CityField(city); model.bind(city).to().getAddress().getCity(); add(city); We're happy to share if folk like this approach. N.B. that the .to() call is for readability rather than out of any necessity. Cheers, Scott -- Scott Swank reformed mathematician - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.0 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: CompoundModel based on proxies
if not cglib i can rewrite that with asm, its license is very liberal and we can even embed it into wicket - at least thats what ive done for salve to avoid version conflicts with other asm versions. -igor On Feb 6, 2008 1:04 PM, Martijn Dashorst [EMAIL PROTECTED] wrote: please share for Wicket 1.4, if cglib's license is permitting, I think we should add this to core. Martijn On 2/6/08, Scott Swank [EMAIL PROTECTED] wrote: One of our more clever developers created a CompoundPropertyModel that uses a cglib proxy to strongly bind the mutators to the model. It looks like this: SharedPropertyModelCustomer model = new SharedPropertyModelCustomer(customer); this.setModel(model); FormComponent firstName = new CustomerNameField(firstName).setRequired(true); model.bind(firstName).to().getFirstName(); add(firstName); FormComponent lastName = new CustomerNameField(lastName).setRequired(true); model.bind(lastName).to().getLastName(); add(lastName); FormComponent addr1 = new AddressField(address1).setRequired(true); model.bind(addr1).to().getAddress().getAddress1(); add(addr1); FormComponent addr2 = new AddressField(address2); model.bind(addr2).to().getAddress().getAddress2(); add(addr2); FormComponent city = new CityField(city); model.bind(city).to().getAddress().getCity(); add(city); We're happy to share if folk like this approach. N.B. that the .to() call is for readability rather than out of any necessity. Cheers, Scott -- Scott Swank reformed mathematician - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.0 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0 - 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: loosely coupled panels: react to model object change
Hi, I have implemented such model (as Johan wrote) in our application. It uses observer pattern and it has methods like: addListener, removeListener and notify(Event event) (Event is an enum). Each panel register itself as a proper events listener and in onClick() you can simply call model.notify(Event.SOME_EVENT) to fire listener methods in other panels. Daniel On 2008-02-05, at 23:51, Johan Compagner wrote: What not do that in your model itself? (Observer pattern or something like that) Just like all the swing models do because of there push nature instead of pull On Feb 5, 2008 11:05 AM, Gabor Szokoli [EMAIL PROTECTED] wrote: Hi! We are trying to build our application from loosely coupled panels, sharing models here and there as needed. It works wounderfully 90% of the time: as long as the panels contain wicket components only, and no further UI logic. One panel can update a model, and the data is reflected in the components of the other panel, as it should. But sometimes one panel needs to perform an action when its model object is changed from an onClick handler on another panel. OnModelChanged is not called, because the other panel has no direct reference to this panel to perform a setObject on it, they only share a model, and do setObject on that. Where do I put my OnModelObjectChanged event handling code without sacrificing too much from my lovely loosely coupling? Any advice is warmly welcome. Gabor Szokoli - 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]
Can i assign parameters while calling the application?
Hi *, i use an application. This will be called by different urls via filters in web.xml I set a custom init-param for every filter. I can access the parameter and thus load my data based on the value. So far all ok. But i'm tired of adding always a new filter and the definition to the web.xml I would be glad if i could assign my parameter as a url-parameter. Something like http://localhost:8080/myappl?myparam=2 Is this possible? If it is - how can i access myparam? Thanks Per - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: CompoundModel based on proxies
The cglib website http://cglib.sourceforge.net/ points here for their license: http://www.apache.org/foundation/licence-FAQ.html So I don't think there are any issues. :) Are there any issues with attaching a zip file to an e-mail, or would you prefer another means? On Feb 6, 2008 1:06 PM, Igor Vaynberg [EMAIL PROTECTED] wrote: if not cglib i can rewrite that with asm, its license is very liberal and we can even embed it into wicket - at least thats what ive done for salve to avoid version conflicts with other asm versions. -igor On Feb 6, 2008 1:04 PM, Martijn Dashorst [EMAIL PROTECTED] wrote: please share for Wicket 1.4, if cglib's license is permitting, I think we should add this to core. Martijn On 2/6/08, Scott Swank [EMAIL PROTECTED] wrote: One of our more clever developers created a CompoundPropertyModel that uses a cglib proxy to strongly bind the mutators to the model. It looks like this: SharedPropertyModelCustomer model = new SharedPropertyModelCustomer(customer); this.setModel(model); FormComponent firstName = new CustomerNameField(firstName).setRequired(true); model.bind(firstName).to().getFirstName(); add(firstName); FormComponent lastName = new CustomerNameField(lastName).setRequired(true); model.bind(lastName).to().getLastName(); add(lastName); FormComponent addr1 = new AddressField(address1).setRequired(true); model.bind(addr1).to().getAddress().getAddress1(); add(addr1); FormComponent addr2 = new AddressField(address2); model.bind(addr2).to().getAddress().getAddress2(); add(addr2); FormComponent city = new CityField(city); model.bind(city).to().getAddress().getCity(); add(city); We're happy to share if folk like this approach. N.B. that the .to() call is for readability rather than out of any necessity. Cheers, Scott -- Scott Swank reformed mathematician - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.0 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0 - 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] -- Scott Swank reformed mathematician - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Reloading resource
Hi, gantini wrote: But when I modify any html file, no reload is performed :-(( This may take time, especially with HTML files (in opposition to class files change) and in an unvisible manner (again in opposition to class files change where Tomcat reloads the context). Try waiting for some seconds and keep hitting the refresh button. -- View this message in context: http://www.nabble.com/Reloading-resource-tp15268997p15312791.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: CompoundModel based on proxies
I'm quite interested too. Daniel On 2008-02-06, at 19:27, Carl-Eric Menzel wrote: Scott Swank wrote: We're happy to share if folk like this approach. N.B. that the .to() call is for readability rather than out of any necessity. I'm quite interested in this. This looks like it is just crazy and clever enough to be really useful :-) Thanks! Carl-Eric - To unsubscribe, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: CompoundModel based on proxies
jira, that way you can click the im donating attachment to the project through ASL license checkbox -igor On Feb 6, 2008 1:10 PM, Scott Swank [EMAIL PROTECTED] wrote: The cglib website http://cglib.sourceforge.net/ points here for their license: http://www.apache.org/foundation/licence-FAQ.html So I don't think there are any issues. :) Are there any issues with attaching a zip file to an e-mail, or would you prefer another means? On Feb 6, 2008 1:06 PM, Igor Vaynberg [EMAIL PROTECTED] wrote: if not cglib i can rewrite that with asm, its license is very liberal and we can even embed it into wicket - at least thats what ive done for salve to avoid version conflicts with other asm versions. -igor On Feb 6, 2008 1:04 PM, Martijn Dashorst [EMAIL PROTECTED] wrote: please share for Wicket 1.4, if cglib's license is permitting, I think we should add this to core. Martijn On 2/6/08, Scott Swank [EMAIL PROTECTED] wrote: One of our more clever developers created a CompoundPropertyModel that uses a cglib proxy to strongly bind the mutators to the model. It looks like this: SharedPropertyModelCustomer model = new SharedPropertyModelCustomer(customer); this.setModel(model); FormComponent firstName = new CustomerNameField(firstName).setRequired(true); model.bind(firstName).to().getFirstName(); add(firstName); FormComponent lastName = new CustomerNameField(lastName).setRequired(true); model.bind(lastName).to().getLastName(); add(lastName); FormComponent addr1 = new AddressField(address1).setRequired(true); model.bind(addr1).to().getAddress().getAddress1(); add(addr1); FormComponent addr2 = new AddressField(address2); model.bind(addr2).to().getAddress().getAddress2(); add(addr2); FormComponent city = new CityField(city); model.bind(city).to().getAddress().getCity(); add(city); We're happy to share if folk like this approach. N.B. that the .to() call is for readability rather than out of any necessity. Cheers, Scott -- Scott Swank reformed mathematician - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.0 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0 - 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] -- Scott Swank reformed mathematician - 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: CompoundModel based on proxies
https://issues.apache.org/jira/browse/WICKET-1327 On Feb 6, 2008 1:12 PM, Igor Vaynberg [EMAIL PROTECTED] wrote: jira, that way you can click the im donating attachment to the project through ASL license checkbox -igor On Feb 6, 2008 1:10 PM, Scott Swank [EMAIL PROTECTED] wrote: The cglib website http://cglib.sourceforge.net/ points here for their license: http://www.apache.org/foundation/licence-FAQ.html So I don't think there are any issues. :) Are there any issues with attaching a zip file to an e-mail, or would you prefer another means? On Feb 6, 2008 1:06 PM, Igor Vaynberg [EMAIL PROTECTED] wrote: if not cglib i can rewrite that with asm, its license is very liberal and we can even embed it into wicket - at least thats what ive done for salve to avoid version conflicts with other asm versions. -igor On Feb 6, 2008 1:04 PM, Martijn Dashorst [EMAIL PROTECTED] wrote: please share for Wicket 1.4, if cglib's license is permitting, I think we should add this to core. Martijn On 2/6/08, Scott Swank [EMAIL PROTECTED] wrote: One of our more clever developers created a CompoundPropertyModel that uses a cglib proxy to strongly bind the mutators to the model. It looks like this: SharedPropertyModelCustomer model = new SharedPropertyModelCustomer(customer); this.setModel(model); FormComponent firstName = new CustomerNameField(firstName).setRequired(true); model.bind(firstName).to().getFirstName(); add(firstName); FormComponent lastName = new CustomerNameField(lastName).setRequired(true); model.bind(lastName).to().getLastName(); add(lastName); FormComponent addr1 = new AddressField(address1).setRequired(true); model.bind(addr1).to().getAddress().getAddress1(); add(addr1); FormComponent addr2 = new AddressField(address2); model.bind(addr2).to().getAddress().getAddress2(); add(addr2); FormComponent city = new CityField(city); model.bind(city).to().getAddress().getCity(); add(city); We're happy to share if folk like this approach. N.B. that the .to() call is for readability rather than out of any necessity. Cheers, Scott -- Scott Swank reformed mathematician - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.0 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0 - 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] -- Scott Swank reformed mathematician - 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] -- Scott Swank reformed mathematician - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AJAX mouseover popup
Hi I am looking for some wicket code or a component that can show mouseover popups loaded by AJAX. Exactly as can be seen on this page http://www.mathertel.de/AJAXEngine/S03_AJAXControls/AJAXPopUpDemo.aspx http://www.mathertel.de/AJAXEngine/S03_AJAXControls/AJAXPopUpDemo.aspx Many thanks if someone can help. Niels -- View this message in context: http://www.nabble.com/AJAX-mouseover-popup-tp15312817p15312817.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: adding extra javascript call in CheckBox
Another thing that is confusing to me is that, why is it that when I override the onComponentTag() the name attribute in the generated markup disappear. I'm just appending function in the onClick when I override onComponentTag(). Thoughts? Thanks, Wen Tong -- The only constant in life is change. - Original Message From: Beyonder Unknown [EMAIL PROTECTED] To: users@wicket.apache.org Sent: Wednesday, February 6, 2008 1:24:16 PM Subject: Re: adding extra javascript call in CheckBox Thanks Igor! I appreciate the prompt reply. Best, Wen Tong -- The only constant in life is change. - Original Message From: Igor Vaynberg [EMAIL PROTECTED] To: users@wicket.apache.org Sent: Wednesday, February 6, 2008 10:45:52 AM Subject: Re: adding extra javascript call in CheckBox tag.put(onclick,executeSomething();+tag.getattributes().get(onclick)); -igor On Feb 6, 2008 10:39 AM, Beyonder Unknown [EMAIL PROTECTED] wrote: Hi All, I was wondering if there's a way to add or decorate a javascript call in CheckBox? What I did was: new CheckBox(checkBox, new Model()) { protected void onComponentTag(ComponentTag tag) { tag.put(onclick,executeSomething();); } But it overrides the original onClick that Wicket is writing. Is there a way that I can decorate it so that I can add extra javaScript call in onClick without overriding the original click, like the buttons has this: protected IAjaxCallDecorator getAjaxCallDecorator() { return new AjaxCallDecorator() Thanks in advance and happy chinese new year! Best, Wen Tong -- The only constant in life is change. Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping - 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] Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: adding extra javascript call in CheckBox
because you dont call super.oncomponenttag() -igor On Feb 6, 2008 2:14 PM, Beyonder Unknown [EMAIL PROTECTED] wrote: Another thing that is confusing to me is that, why is it that when I override the onComponentTag() the name attribute in the generated markup disappear. I'm just appending function in the onClick when I override onComponentTag(). Thoughts? Thanks, Wen Tong -- The only constant in life is change. - Original Message From: Beyonder Unknown [EMAIL PROTECTED] To: users@wicket.apache.org Sent: Wednesday, February 6, 2008 1:24:16 PM Subject: Re: adding extra javascript call in CheckBox Thanks Igor! I appreciate the prompt reply. Best, Wen Tong -- The only constant in life is change. - Original Message From: Igor Vaynberg [EMAIL PROTECTED] To: users@wicket.apache.org Sent: Wednesday, February 6, 2008 10:45:52 AM Subject: Re: adding extra javascript call in CheckBox tag.put(onclick,executeSomething();+tag.getattributes().get(onclick)); -igor On Feb 6, 2008 10:39 AM, Beyonder Unknown [EMAIL PROTECTED] wrote: Hi All, I was wondering if there's a way to add or decorate a javascript call in CheckBox? What I did was: new CheckBox(checkBox, new Model()) { protected void onComponentTag(ComponentTag tag) { tag.put(onclick,executeSomething();); } But it overrides the original onClick that Wicket is writing. Is there a way that I can decorate it so that I can add extra javaScript call in onClick without overriding the original click, like the buttons has this: protected IAjaxCallDecorator getAjaxCallDecorator() { return new AjaxCallDecorator() Thanks in advance and happy chinese new year! Best, Wen Tong -- The only constant in life is change. Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping - 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] Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs - 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: adding extra javascript call in CheckBox
Never mind, I noticed that it doesn't call the super.onComponentTag(). my bad. Wen Tong -- The only constant in life is change. - Original Message From: Beyonder Unknown [EMAIL PROTECTED] To: users@wicket.apache.org Sent: Wednesday, February 6, 2008 2:14:12 PM Subject: Re: adding extra javascript call in CheckBox Another thing that is confusing to me is that, why is it that when I override the onComponentTag() the name attribute in the generated markup disappear. I'm just appending function in the onClick when I override onComponentTag(). Thoughts? Thanks, Wen Tong -- The only constant in life is change. - Original Message From: Beyonder Unknown [EMAIL PROTECTED] To: users@wicket.apache.org Sent: Wednesday, February 6, 2008 1:24:16 PM Subject: Re: adding extra javascript call in CheckBox Thanks Igor! I appreciate the prompt reply. Best, Wen Tong -- The only constant in life is change. - Original Message From: Igor Vaynberg [EMAIL PROTECTED] To: users@wicket.apache.org Sent: Wednesday, February 6, 2008 10:45:52 AM Subject: Re: adding extra javascript call in CheckBox tag.put(onclick,executeSomething();+tag.getattributes().get(onclick)); -igor On Feb 6, 2008 10:39 AM, Beyonder Unknown [EMAIL PROTECTED] wrote: Hi All, I was wondering if there's a way to add or decorate a javascript call in CheckBox? What I did was: new CheckBox(checkBox, new Model()) { protected void onComponentTag(ComponentTag tag) { tag.put(onclick,executeSomething();); } But it overrides the original onClick that Wicket is writing. Is there a way that I can decorate it so that I can add extra javaScript call in onClick without overriding the original click, like the buttons has this: protected IAjaxCallDecorator getAjaxCallDecorator() { return new AjaxCallDecorator() Thanks in advance and happy chinese new year! Best, Wen Tong -- The only constant in life is change. Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping - 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] Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: CompoundModel based on proxies
Thanks! And I always thought: what happens in Vegas, stays in Vegas... Martijn On 2/6/08, Scott Swank [EMAIL PROTECTED] wrote: https://issues.apache.org/jira/browse/WICKET-1327 On Feb 6, 2008 1:12 PM, Igor Vaynberg [EMAIL PROTECTED] wrote: jira, that way you can click the im donating attachment to the project through ASL license checkbox -igor On Feb 6, 2008 1:10 PM, Scott Swank [EMAIL PROTECTED] wrote: The cglib website http://cglib.sourceforge.net/ points here for their license: http://www.apache.org/foundation/licence-FAQ.html So I don't think there are any issues. :) Are there any issues with attaching a zip file to an e-mail, or would you prefer another means? On Feb 6, 2008 1:06 PM, Igor Vaynberg [EMAIL PROTECTED] wrote: if not cglib i can rewrite that with asm, its license is very liberal and we can even embed it into wicket - at least thats what ive done for salve to avoid version conflicts with other asm versions. -igor On Feb 6, 2008 1:04 PM, Martijn Dashorst [EMAIL PROTECTED] wrote: please share for Wicket 1.4, if cglib's license is permitting, I think we should add this to core. Martijn On 2/6/08, Scott Swank [EMAIL PROTECTED] wrote: One of our more clever developers created a CompoundPropertyModel that uses a cglib proxy to strongly bind the mutators to the model. It looks like this: SharedPropertyModelCustomer model = new SharedPropertyModelCustomer(customer); this.setModel(model); FormComponent firstName = new CustomerNameField(firstName).setRequired(true); model.bind(firstName).to().getFirstName(); add(firstName); FormComponent lastName = new CustomerNameField(lastName).setRequired(true); model.bind(lastName).to().getLastName(); add(lastName); FormComponent addr1 = new AddressField(address1).setRequired(true); model.bind(addr1).to().getAddress().getAddress1(); add(addr1); FormComponent addr2 = new AddressField(address2); model.bind(addr2).to().getAddress().getAddress2(); add(addr2); FormComponent city = new CityField(city); model.bind(city).to().getAddress().getCity(); add(city); We're happy to share if folk like this approach. N.B. that the .to() call is for readability rather than out of any necessity. Cheers, Scott -- Scott Swank reformed mathematician - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.0 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0 - 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] -- Scott Swank reformed mathematician - 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] -- Scott Swank reformed mathematician - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.0 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: adding extra javascript call in CheckBox
Thanks Igor! -- The only constant in life is change. - Original Message From: Igor Vaynberg [EMAIL PROTECTED] To: users@wicket.apache.org Sent: Wednesday, February 6, 2008 2:19:44 PM Subject: Re: adding extra javascript call in CheckBox because you dont call super.oncomponenttag() -igor On Feb 6, 2008 2:14 PM, Beyonder Unknown [EMAIL PROTECTED] wrote: Another thing that is confusing to me is that, why is it that when I override the onComponentTag() the name attribute in the generated markup disappear. I'm just appending function in the onClick when I override onComponentTag(). Thoughts? Thanks, Wen Tong -- The only constant in life is change. - Original Message From: Beyonder Unknown [EMAIL PROTECTED] To: users@wicket.apache.org Sent: Wednesday, February 6, 2008 1:24:16 PM Subject: Re: adding extra javascript call in CheckBox Thanks Igor! I appreciate the prompt reply. Best, Wen Tong -- The only constant in life is change. - Original Message From: Igor Vaynberg [EMAIL PROTECTED] To: users@wicket.apache.org Sent: Wednesday, February 6, 2008 10:45:52 AM Subject: Re: adding extra javascript call in CheckBox tag.put(onclick,executeSomething();+tag.getattributes().get(onclick)); -igor On Feb 6, 2008 10:39 AM, Beyonder Unknown [EMAIL PROTECTED] wrote: Hi All, I was wondering if there's a way to add or decorate a javascript call in CheckBox? What I did was: new CheckBox(checkBox, new Model()) { protected void onComponentTag(ComponentTag tag) { tag.put(onclick,executeSomething();); } But it overrides the original onClick that Wicket is writing. Is there a way that I can decorate it so that I can add extra javaScript call in onClick without overriding the original click, like the buttons has this: protected IAjaxCallDecorator getAjaxCallDecorator() { return new AjaxCallDecorator() Thanks in advance and happy chinese new year! Best, Wen Tong -- The only constant in life is change. Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping - 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] Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs - 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] Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Passing list of POJOs to AutoCompleteTextField?
I would be happy to - what is the URL for this? (first time - new contributor). In that context - I recently grepped through the Wicket source and noticed that all the javascript event calls (onchange, onclick, etc.) are all in the code as plain strings, which is bad practice. Thus I wrote a *JavaScriptUtil* class that has String constants like CHANGE, BLUR, DRAG_DROP, etc. (and can be statically imported jdk1.5 style). The class also includes Javadoc that describes each event in detail. I thought that this might be a little contribution to Wicket if you want it. Let me know and I can submit the source (again, would need the URL and procedure). Thanks, Michael -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 05, 2008 5:31 PM To: users@wicket.apache.org Subject: Re: Passing list of POJOs to AutoCompleteTextField? please add an rfe into jira for this. -igor On Feb 5, 2008 4:38 PM, Michael Mehrle [EMAIL PROTECTED] wrote: That's exactly what I wound up doing. I wrote my custom renderer that grabs the name field of my POJO for rendering. Of course that is what I'm getting back from getModelObjectAsString(). It's a work-around and I was hoping for a more elegant way of doing this... Michael -Original Message- From: Sam Barnum [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 05, 2008 4:01 PM To: users@wicket.apache.org Subject: Re: Passing list of POJOs to AutoCompleteTextField? I don't think it is, the getMmodelObject() returns the selected String. I've gotten around this by saving the last query string sent via AJAX. When the user makes a selection, I iterate over the options for that query string one more time, and take the POJO whose rendered string matches the user-selected text. I'm probably missing something obvious, but I don't think getModelObject() is it... -- Sam Barnum 360 Works http://www.360works.com 415.865.0952 On Feb 5, 2008, at 2:12 PM, Igor Vaynberg wrote: shouldnt the pojo be availble from getmodelobject()? -igor On Jan 29, 2008 11:55 AM, Michael Mehrle [EMAIL PROTECTED] wrote: I could - if it was a simple matter of extracting the strings from the POJOs. Problem is that, once an option is selected, I need the underlying POJOs to become the model for the rest of the form. Yes, there's probably a way to hack this, but I would prefer to do this in a clean fashion. I already got the custom renderer working, so I'm making progress. Task #2 now is to grab the underlying POJO after selecting it and populate the remainder of the form. This seems to be the tough part... Again, any help would be appreciated. Thanks!! Michael -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 29, 2008 11:47 AM To: users@wicket.apache.org Subject: Re: Passing list of POJOs to AutoCompleteTextField? can you not create an iterator adapter that takes an iterator of pojos and translates the pojo to some string? -igor On Jan 29, 2008 11:14 AM, Michael Mehrle [EMAIL PROTECTED] wrote: I have a working test page containing an AutoCompleteTextField. Thus far the data feeding it has been an Iterator of strings which is being passed to its overridden getChoices method. So far so good. What I need to do now is to pass in an Iterator of POJOs instead and have the AutoCompleteTextField render the 'name' field inside each of those beans. After some digging in the Wicket source I suspect that I need to create a custom renderer that does this - am I on the right track here or would you guys suggest a different approach? Another challenge will be to populate other form fields in the page after selecting an option from the AutoCompleteTextField. By selecting an option in the dropdown I am basically selecting an entire POJO, which is supposed to be used as the model for the other remaining fields. For instance, the POJO will contain address, zip, phone, etc. fields and by selecting the appropriate name in the AutoCompleteTextField it populates all other fields with the remaining data in the underlying POJO. Hope this makes sense - I think I have an idea of how to implement this, but would appreciate any tips/insights. Thanks!! Michael - 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,
Re: Reloading resource
djo.mos wrote: Try waiting for some seconds and keep hitting the refresh button. Something wrong in my project I'm wait for some minutes, and nothing was happened -- View this message in context: http://www.nabble.com/Reloading-resource-tp15268997p15322083.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: Reloading resource
If you use any IDE other than Eclipse, you have to *make* the project in order to get the html files to refresh. Martijn On 2/7/08, gantini [EMAIL PROTECTED] wrote: djo.mos wrote: Try waiting for some seconds and keep hitting the refresh button. Something wrong in my project I'm wait for some minutes, and nothing was happened -- View this message in context: http://www.nabble.com/Reloading-resource-tp15268997p15322083.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] -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.0 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Reloading resource
I don't wont using Jetty I'm Tomcat fan :-) I'm usually use Eclipse+MyEclise+Tomcat for my web application (spring MVC). Is a Tomcat-wicket integration problem? igor.vaynberg wrote: test it out this way: go here http://wicket.apache.org/quickstart.html copy and paste the maven command to create a quickstart project find the Start class, right click and do run as java application this will start embedded jetty, go to localhost:8080, then find Index.html, edit it, and refresh the browser. do you see the changes? -igor On Feb 6, 2008 12:08 PM, gantini [EMAIL PROTECTED] wrote: Strangethis dosn't work for me... When wicket starts, in the tomcat console I can read: *** WARNING: Wicket is running in DEVELOPMENT mode. *** *** ^^^*** *** Do NOT deploy to your live server(s) without changing this. *** *** See Application#getConfigurationType() for more information. *** But when I modify any html file, no reload is performed :-(( Other suggest for me? G. igor.vaynberg wrote: this should automatically be happening if you run wicket in development mode. that call you do is not necessary. -igor On Feb 5, 2008 3:01 PM, gantini [EMAIL PROTECTED] wrote: Nothing to help me? gantini wrote: I'm very new with Wicket. It is possible to automatically reload resource (class and HTML file) ? I've set: @Override protected void init() { getResourceSettings().setResourcePollFrequency( Duration.ONE_SECOND ); } but this don't work for me. Thanks. -- View this message in context: http://www.nabble.com/Reloading-resource-tp15268997p15300053.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] -- View this message in context: http://www.nabble.com/Reloading-resource-tp15268997p15312660.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] -- View this message in context: http://www.nabble.com/Reloading-resource-tp15268997p15323736.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: Reloading resource
Windows?!!?! What's Windows? :-) No windows in my computer! I'm using ***ONLY*** Linux Konstantin Ignatyev-3 wrote: I have seen the behavior but that seems to be endemic to windows. I have not seen that on Linux or OS X. On Wed, Feb 6, 2008 at 12:08 PM, gantini [EMAIL PROTECTED] wrote: Strangethis dosn't work for me... When wicket starts, in the tomcat console I can read: *** WARNING: Wicket is running in DEVELOPMENT mode. *** *** ^^^*** *** Do NOT deploy to your live server(s) without changing this. *** *** See Application#getConfigurationType() for more information. *** But when I modify any html file, no reload is performed :-(( Other suggest for me? G. igor.vaynberg wrote: this should automatically be happening if you run wicket in development mode. that call you do is not necessary. -igor On Feb 5, 2008 3:01 PM, gantini [EMAIL PROTECTED] wrote: Nothing to help me? gantini wrote: I'm very new with Wicket. It is possible to automatically reload resource (class and HTML file) ? I've set: @Override protected void init() { getResourceSettings().setResourcePollFrequency( Duration.ONE_SECOND ); } but this don't work for me. Thanks. -- View this message in context: http://www.nabble.com/Reloading-resource-tp15268997p15300053.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] -- View this message in context: http://www.nabble.com/Reloading-resource-tp15268997p15312660.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] -- Konstantin Ignatyev PS: If this is a typical day on planet earth, humans will add fifteen million tons of carbon to the atmosphere, destroy 115 square miles of tropical rainforest, create seventy-two miles of desert, eliminate between forty to one hundred species, erode seventy-one million tons of topsoil, add 2,700 tons of CFCs to the stratosphere, and increase their population by 263,000 Bowers, C.A. The Culture of Denial: Why the Environmental Movement Needs a Strategy for Reforming Universities and Public Schools. New York: State University of New York Press, 1997: (4) (5) (p.206) -- View this message in context: http://www.nabble.com/Reloading-resource-tp15268997p15323967.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: Reloading resource
there is no tomcat-wicket integration, just like there is no jetty-wicket integration. you simply have to make your ide copy files to where tomcat loads them from when they are saved. -igor On Feb 6, 2008 3:11 PM, gantini [EMAIL PROTECTED] wrote: I don't wont using Jetty I'm Tomcat fan :-) I'm usually use Eclipse+MyEclise+Tomcat for my web application (spring MVC). Is a Tomcat-wicket integration problem? igor.vaynberg wrote: test it out this way: go here http://wicket.apache.org/quickstart.html copy and paste the maven command to create a quickstart project find the Start class, right click and do run as java application this will start embedded jetty, go to localhost:8080, then find Index.html, edit it, and refresh the browser. do you see the changes? -igor On Feb 6, 2008 12:08 PM, gantini [EMAIL PROTECTED] wrote: Strangethis dosn't work for me... When wicket starts, in the tomcat console I can read: *** WARNING: Wicket is running in DEVELOPMENT mode. *** *** ^^^*** *** Do NOT deploy to your live server(s) without changing this. *** *** See Application#getConfigurationType() for more information. *** But when I modify any html file, no reload is performed :-(( Other suggest for me? G. igor.vaynberg wrote: this should automatically be happening if you run wicket in development mode. that call you do is not necessary. -igor On Feb 5, 2008 3:01 PM, gantini [EMAIL PROTECTED] wrote: Nothing to help me? gantini wrote: I'm very new with Wicket. It is possible to automatically reload resource (class and HTML file) ? I've set: @Override protected void init() { getResourceSettings().setResourcePollFrequency( Duration.ONE_SECOND ); } but this don't work for me. Thanks. -- View this message in context: http://www.nabble.com/Reloading-resource-tp15268997p15300053.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] -- View this message in context: http://www.nabble.com/Reloading-resource-tp15268997p15312660.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] -- View this message in context: http://www.nabble.com/Reloading-resource-tp15268997p15323736.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: Reloading resource
Yes!!! I'm use Eclipe+Myeclipse. When I change an HTML file, this is automatically deployed. I've checked the file on the tomcat dir and it is changed :-( Martijn Dashorst wrote: How do you modify the html, in what tool, how do you ensure the html gets inside the deployed and unpacked war running in tomcat? Martijn On 2/6/08, Martijn Dashorst [EMAIL PROTECTED] wrote: Does your IDE copy the HTML files over to the classpath? Martijn On 2/6/08, gantini [EMAIL PROTECTED] wrote: Strangethis dosn't work for me... When wicket starts, in the tomcat console I can read: *** WARNING: Wicket is running in DEVELOPMENT mode. *** *** ^^^*** *** Do NOT deploy to your live server(s) without changing this. *** *** See Application#getConfigurationType() for more information. *** But when I modify any html file, no reload is performed :-(( Other suggest for me? G. igor.vaynberg wrote: this should automatically be happening if you run wicket in development mode. that call you do is not necessary. -igor On Feb 5, 2008 3:01 PM, gantini [EMAIL PROTECTED] wrote: Nothing to help me? gantini wrote: I'm very new with Wicket. It is possible to automatically reload resource (class and HTML file) ? I've set: @Override protected void init() { getResourceSettings().setResourcePollFrequency( Duration.ONE_SECOND ); } but this don't work for me. Thanks. -- View this message in context: http://www.nabble.com/Reloading-resource-tp15268997p15300053.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] -- View this message in context: http://www.nabble.com/Reloading-resource-tp15268997p15312660.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] -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.0 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0 -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.0 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Reloading-resource-tp15268997p15324032.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: CompoundModel based on proxies
No problem. I didn't even write a line of it. :) On Feb 6, 2008 2:30 PM, Martijn Dashorst [EMAIL PROTECTED] wrote: Thanks! And I always thought: what happens in Vegas, stays in Vegas... Martijn - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: CompoundModel based on proxies
On 2/7/08, Scott Swank [EMAIL PROTECTED] wrote: No problem. I didn't even write a line of it. :) Just for the record keeping: are you allowed to grant us the use of said model? Typically that should be done by the original copyright holder. Martijn -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.0 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: CompoundModel based on proxies
I have his approval, but I can get him if you like. Let me know either way. On Feb 6, 2008 3:22 PM, Martijn Dashorst [EMAIL PROTECTED] wrote: On 2/7/08, Scott Swank [EMAIL PROTECTED] wrote: No problem. I didn't even write a line of it. :) Just for the record keeping: are you allowed to grant us the use of said model? Typically that should be done by the original copyright holder. Martijn -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.0 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Scott Swank reformed mathematician - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Reloading resource
Using quickstart and Jetty project (with eclispe) all work correctly I think that the problem is in myeclipse+tomcat igor.vaynberg wrote: test it out this way: go here http://wicket.apache.org/quickstart.html copy and paste the maven command to create a quickstart project find the Start class, right click and do run as java application this will start embedded jetty, go to localhost:8080, then find Index.html, edit it, and refresh the browser. do you see the changes? -igor On Feb 6, 2008 12:08 PM, gantini [EMAIL PROTECTED] wrote: Strangethis dosn't work for me... When wicket starts, in the tomcat console I can read: *** WARNING: Wicket is running in DEVELOPMENT mode. *** *** ^^^*** *** Do NOT deploy to your live server(s) without changing this. *** *** See Application#getConfigurationType() for more information. *** But when I modify any html file, no reload is performed :-(( Other suggest for me? G. igor.vaynberg wrote: this should automatically be happening if you run wicket in development mode. that call you do is not necessary. -igor On Feb 5, 2008 3:01 PM, gantini [EMAIL PROTECTED] wrote: Nothing to help me? gantini wrote: I'm very new with Wicket. It is possible to automatically reload resource (class and HTML file) ? I've set: @Override protected void init() { getResourceSettings().setResourcePollFrequency( Duration.ONE_SECOND ); } but this don't work for me. Thanks. -- View this message in context: http://www.nabble.com/Reloading-resource-tp15268997p15300053.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] -- View this message in context: http://www.nabble.com/Reloading-resource-tp15268997p15312660.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] -- View this message in context: http://www.nabble.com/Reloading-resource-tp15268997p15324478.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: CompoundModel based on proxies
If he could leave a comment on the issue that would be great. If he has more ideas like this, get him to open a JIRA account :) Martijn On 2/7/08, Scott Swank [EMAIL PROTECTED] wrote: I have his approval, but I can get him if you like. Let me know either way. On Feb 6, 2008 3:22 PM, Martijn Dashorst [EMAIL PROTECTED] wrote: On 2/7/08, Scott Swank [EMAIL PROTECTED] wrote: No problem. I didn't even write a line of it. :) Just for the record keeping: are you allowed to grant us the use of said model? Typically that should be done by the original copyright holder. Martijn -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.0 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Scott Swank reformed mathematician - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.0 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Reloading resource
Resolved Incredible. the problem was caused by wrong version of slf4j-log4j12 library, version 1.0.1 instead of 1.4.2 The right libraries is slf4j-api-1.4.2 + slf4j-log4j12-1.4.2 !!! I hope this useful for other newbie of Wicket gantini wrote: I'm very new with Wicket. It is possible to automatically reload resource (class and HTML file) ? I've set: @Override protected void init() { getResourceSettings().setResourcePollFrequency( Duration.ONE_SECOND ); } but this don't work for me. Thanks. -- View this message in context: http://www.nabble.com/Reloading-resource-tp15268997p15324915.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: Passing list of POJOs to AutoCompleteTextField?
I've committed a ticket for this, should have mentioned it here: https://issues.apache.org/jira/browse/WICKET-1324 -sam On Feb 6, 2008, at 2:47 PM, Michael Mehrle wrote: I would be happy to - what is the URL for this? (first time - new contributor). In that context - I recently grepped through the Wicket source and noticed that all the javascript event calls (onchange, onclick, etc.) are all in the code as plain strings, which is bad practice. Thus I wrote a *JavaScriptUtil* class that has String constants like CHANGE, BLUR, DRAG_DROP, etc. (and can be statically imported jdk1.5 style). The class also includes Javadoc that describes each event in detail. I thought that this might be a little contribution to Wicket if you want it. Let me know and I can submit the source (again, would need the URL and procedure). Thanks, Michael -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 05, 2008 5:31 PM To: users@wicket.apache.org Subject: Re: Passing list of POJOs to AutoCompleteTextField? please add an rfe into jira for this. -igor On Feb 5, 2008 4:38 PM, Michael Mehrle [EMAIL PROTECTED] wrote: That's exactly what I wound up doing. I wrote my custom renderer that grabs the name field of my POJO for rendering. Of course that is what I'm getting back from getModelObjectAsString(). It's a work-around and I was hoping for a more elegant way of doing this... Michael -Original Message- From: Sam Barnum [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 05, 2008 4:01 PM To: users@wicket.apache.org Subject: Re: Passing list of POJOs to AutoCompleteTextField? I don't think it is, the getMmodelObject() returns the selected String. I've gotten around this by saving the last query string sent via AJAX. When the user makes a selection, I iterate over the options for that query string one more time, and take the POJO whose rendered string matches the user-selected text. I'm probably missing something obvious, but I don't think getModelObject() is it... -- Sam Barnum 360 Works http://www.360works.com 415.865.0952 On Feb 5, 2008, at 2:12 PM, Igor Vaynberg wrote: shouldnt the pojo be availble from getmodelobject()? -igor On Jan 29, 2008 11:55 AM, Michael Mehrle [EMAIL PROTECTED] wrote: I could - if it was a simple matter of extracting the strings from the POJOs. Problem is that, once an option is selected, I need the underlying POJOs to become the model for the rest of the form. Yes, there's probably a way to hack this, but I would prefer to do this in a clean fashion. I already got the custom renderer working, so I'm making progress. Task #2 now is to grab the underlying POJO after selecting it and populate the remainder of the form. This seems to be the tough part... Again, any help would be appreciated. Thanks!! Michael -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 29, 2008 11:47 AM To: users@wicket.apache.org Subject: Re: Passing list of POJOs to AutoCompleteTextField? can you not create an iterator adapter that takes an iterator of pojos and translates the pojo to some string? -igor On Jan 29, 2008 11:14 AM, Michael Mehrle [EMAIL PROTECTED] wrote: I have a working test page containing an AutoCompleteTextField. Thus far the data feeding it has been an Iterator of strings which is being passed to its overridden getChoices method. So far so good. What I need to do now is to pass in an Iterator of POJOs instead and have the AutoCompleteTextField render the 'name' field inside each of those beans. After some digging in the Wicket source I suspect that I need to create a custom renderer that does this - am I on the right track here or would you guys suggest a different approach? Another challenge will be to populate other form fields in the page after selecting an option from the AutoCompleteTextField. By selecting an option in the dropdown I am basically selecting an entire POJO, which is supposed to be used as the model for the other remaining fields. For instance, the POJO will contain address, zip, phone, etc. fields and by selecting the appropriate name in the AutoCompleteTextField it populates all other fields with the remaining data in the underlying POJO. Hope this makes sense - I think I have an idea of how to implement this, but would appreciate any tips/insights. Thanks!! Michael - 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: Reloading resource
On Feb 6, 2008 4:20 PM, gantini [EMAIL PROTECTED] wrote: Resolved Incredible. the problem was caused by wrong version of slf4j-log4j12 library, version 1.0.1 instead of 1.4.2 The right libraries is slf4j-api-1.4.2 + slf4j-log4j12-1.4.2 !!! I don't understand how that would influence reloading though... Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: CompoundModel based on proxies
like BoundCompoundPropertyModel, but safer. i think this almost might be too clever as it sacrifices some intuitiveness. also, it's filling in for a missing java feature. this should really be: boundModel.bind(component, firstName.property) (where .property, .field and .method are long-missing declarative reflections like .class) it does make me think we could be doing more with CGLIB in general. our model classes ought to be able to detect model changes better using proxies, for example. Scott Swank wrote: One of our more clever developers created a CompoundPropertyModel that uses a cglib proxy to strongly bind the mutators to the model. It looks like this: SharedPropertyModelCustomer model = new SharedPropertyModelCustomer(customer); this.setModel(model); FormComponent firstName = new CustomerNameField(firstName).setRequired(true); model.bind(firstName).to().getFirstName(); add(firstName); FormComponent lastName = new CustomerNameField(lastName).setRequired(true); model.bind(lastName).to().getLastName(); add(lastName); FormComponent addr1 = new AddressField(address1).setRequired(true); model.bind(addr1).to().getAddress().getAddress1(); add(addr1); FormComponent addr2 = new AddressField(address2); model.bind(addr2).to().getAddress().getAddress2(); add(addr2); FormComponent city = new CityField(city); model.bind(city).to().getAddress().getCity(); add(city); We're happy to share if folk like this approach. N.B. that the .to() call is for readability rather than out of any necessity. Cheers, Scott -- Scott Swank reformed mathematician - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/CompoundModel-based-on-proxies-tp15317807p15325663.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: CompoundModel based on proxies
another thing that occurs to me is that perhaps the method would be more generalized we basically made a fill-in for the missing .property feature. we could have a method like Reflection.property(expr) return a property expression string (or a compiled version of it). this makes me think there's a missing reflection package in java in general... Jonathan Locke wrote: like BoundCompoundPropertyModel, but safer. i think this almost might be too clever as it sacrifices some intuitiveness. also, it's filling in for a missing java feature. this should really be: boundModel.bind(component, firstName.property) (where .property, .field and .method are long-missing declarative reflections like .class) it does make me think we could be doing more with CGLIB in general. our model classes ought to be able to detect model changes better using proxies, for example. Scott Swank wrote: One of our more clever developers created a CompoundPropertyModel that uses a cglib proxy to strongly bind the mutators to the model. It looks like this: SharedPropertyModelCustomer model = new SharedPropertyModelCustomer(customer); this.setModel(model); FormComponent firstName = new CustomerNameField(firstName).setRequired(true); model.bind(firstName).to().getFirstName(); add(firstName); FormComponent lastName = new CustomerNameField(lastName).setRequired(true); model.bind(lastName).to().getLastName(); add(lastName); FormComponent addr1 = new AddressField(address1).setRequired(true); model.bind(addr1).to().getAddress().getAddress1(); add(addr1); FormComponent addr2 = new AddressField(address2); model.bind(addr2).to().getAddress().getAddress2(); add(addr2); FormComponent city = new CityField(city); model.bind(city).to().getAddress().getCity(); add(city); We're happy to share if folk like this approach. N.B. that the .to() call is for readability rather than out of any necessity. Cheers, Scott -- Scott Swank reformed mathematician - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/CompoundModel-based-on-proxies-tp15317807p15325688.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: CompoundModel based on proxies
i disagree. i dont think we should be doing more with cglib in core or any other bytecode magic. have you ever tried to walk code that uses bytecode generation? its a nightmare. one of my favorite things about wicket is that it is just java and its easy as hell to debug. im not really against putting something like this into extensions, or even having a new wicket-bytecode/codegen/whatever package that contains things like these... -igor On Feb 6, 2008 5:23 PM, Jonathan Locke [EMAIL PROTECTED] wrote: like BoundCompoundPropertyModel, but safer. i think this almost might be too clever as it sacrifices some intuitiveness. also, it's filling in for a missing java feature. this should really be: boundModel.bind(component, firstName.property) (where .property, .field and .method are long-missing declarative reflections like .class) it does make me think we could be doing more with CGLIB in general. our model classes ought to be able to detect model changes better using proxies, for example. Scott Swank wrote: One of our more clever developers created a CompoundPropertyModel that uses a cglib proxy to strongly bind the mutators to the model. It looks like this: SharedPropertyModelCustomer model = new SharedPropertyModelCustomer(customer); this.setModel(model); FormComponent firstName = new CustomerNameField(firstName).setRequired(true); model.bind(firstName).to().getFirstName(); add(firstName); FormComponent lastName = new CustomerNameField(lastName).setRequired(true); model.bind(lastName).to().getLastName(); add(lastName); FormComponent addr1 = new AddressField(address1).setRequired(true); model.bind(addr1).to().getAddress().getAddress1(); add(addr1); FormComponent addr2 = new AddressField(address2); model.bind(addr2).to().getAddress().getAddress2(); add(addr2); FormComponent city = new CityField(city); model.bind(city).to().getAddress().getCity(); add(city); We're happy to share if folk like this approach. N.B. that the .to() call is for readability rather than out of any necessity. Cheers, Scott -- Scott Swank reformed mathematician - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/CompoundModel-based-on-proxies-tp15317807p15325663.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: CompoundModel based on proxies
so you don't support this model then? igor.vaynberg wrote: i disagree. i dont think we should be doing more with cglib in core or any other bytecode magic. have you ever tried to walk code that uses bytecode generation? its a nightmare. one of my favorite things about wicket is that it is just java and its easy as hell to debug. im not really against putting something like this into extensions, or even having a new wicket-bytecode/codegen/whatever package that contains things like these... -igor On Feb 6, 2008 5:23 PM, Jonathan Locke [EMAIL PROTECTED] wrote: like BoundCompoundPropertyModel, but safer. i think this almost might be too clever as it sacrifices some intuitiveness. also, it's filling in for a missing java feature. this should really be: boundModel.bind(component, firstName.property) (where .property, .field and .method are long-missing declarative reflections like .class) it does make me think we could be doing more with CGLIB in general. our model classes ought to be able to detect model changes better using proxies, for example. Scott Swank wrote: One of our more clever developers created a CompoundPropertyModel that uses a cglib proxy to strongly bind the mutators to the model. It looks like this: SharedPropertyModelCustomer model = new SharedPropertyModelCustomer(customer); this.setModel(model); FormComponent firstName = new CustomerNameField(firstName).setRequired(true); model.bind(firstName).to().getFirstName(); add(firstName); FormComponent lastName = new CustomerNameField(lastName).setRequired(true); model.bind(lastName).to().getLastName(); add(lastName); FormComponent addr1 = new AddressField(address1).setRequired(true); model.bind(addr1).to().getAddress().getAddress1(); add(addr1); FormComponent addr2 = new AddressField(address2); model.bind(addr2).to().getAddress().getAddress2(); add(addr2); FormComponent city = new CityField(city); model.bind(city).to().getAddress().getCity(); add(city); We're happy to share if folk like this approach. N.B. that the .to() call is for readability rather than out of any necessity. Cheers, Scott -- Scott Swank reformed mathematician - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/CompoundModel-based-on-proxies-tp15317807p15325663.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] -- View this message in context: http://www.nabble.com/CompoundModel-based-on-proxies-tp15317807p15325860.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: CompoundModel based on proxies
i support it in a non-core module -igor On Feb 6, 2008 5:41 PM, Jonathan Locke [EMAIL PROTECTED] wrote: so you don't support this model then? igor.vaynberg wrote: i disagree. i dont think we should be doing more with cglib in core or any other bytecode magic. have you ever tried to walk code that uses bytecode generation? its a nightmare. one of my favorite things about wicket is that it is just java and its easy as hell to debug. im not really against putting something like this into extensions, or even having a new wicket-bytecode/codegen/whatever package that contains things like these... -igor On Feb 6, 2008 5:23 PM, Jonathan Locke [EMAIL PROTECTED] wrote: like BoundCompoundPropertyModel, but safer. i think this almost might be too clever as it sacrifices some intuitiveness. also, it's filling in for a missing java feature. this should really be: boundModel.bind(component, firstName.property) (where .property, .field and .method are long-missing declarative reflections like .class) it does make me think we could be doing more with CGLIB in general. our model classes ought to be able to detect model changes better using proxies, for example. Scott Swank wrote: One of our more clever developers created a CompoundPropertyModel that uses a cglib proxy to strongly bind the mutators to the model. It looks like this: SharedPropertyModelCustomer model = new SharedPropertyModelCustomer(customer); this.setModel(model); FormComponent firstName = new CustomerNameField(firstName).setRequired(true); model.bind(firstName).to().getFirstName(); add(firstName); FormComponent lastName = new CustomerNameField(lastName).setRequired(true); model.bind(lastName).to().getLastName(); add(lastName); FormComponent addr1 = new AddressField(address1).setRequired(true); model.bind(addr1).to().getAddress().getAddress1(); add(addr1); FormComponent addr2 = new AddressField(address2); model.bind(addr2).to().getAddress().getAddress2(); add(addr2); FormComponent city = new CityField(city); model.bind(city).to().getAddress().getCity(); add(city); We're happy to share if folk like this approach. N.B. that the .to() call is for readability rather than out of any necessity. Cheers, Scott -- Scott Swank reformed mathematician - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/CompoundModel-based-on-proxies-tp15317807p15325663.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] -- View this message in context: http://www.nabble.com/CompoundModel-based-on-proxies-tp15317807p15325860.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: CompoundModel based on proxies
There are additional considerations (at least in this implementation), all of which should be familiar to users of Hibernate or any proxy-based framework. 1) classes may not be final 2) methods may not be final 3) classes must have a no-method constructor Some folk may not be happy with these restrictions. - Scott On Feb 6, 2008 5:43 PM, Igor Vaynberg [EMAIL PROTECTED] wrote: i support it in a non-core module -igor On Feb 6, 2008 5:41 PM, Jonathan Locke [EMAIL PROTECTED] wrote: so you don't support this model then? igor.vaynberg wrote: i disagree. i dont think we should be doing more with cglib in core or any other bytecode magic. have you ever tried to walk code that uses bytecode generation? its a nightmare. one of my favorite things about wicket is that it is just java and its easy as hell to debug. im not really against putting something like this into extensions, or even having a new wicket-bytecode/codegen/whatever package that contains things like these... -igor On Feb 6, 2008 5:23 PM, Jonathan Locke [EMAIL PROTECTED] wrote: like BoundCompoundPropertyModel, but safer. i think this almost might be too clever as it sacrifices some intuitiveness. also, it's filling in for a missing java feature. this should really be: boundModel.bind(component, firstName.property) (where .property, .field and .method are long-missing declarative reflections like .class) it does make me think we could be doing more with CGLIB in general. our model classes ought to be able to detect model changes better using proxies, for example. Scott Swank wrote: One of our more clever developers created a CompoundPropertyModel that uses a cglib proxy to strongly bind the mutators to the model. It looks like this: SharedPropertyModelCustomer model = new SharedPropertyModelCustomer(customer); this.setModel(model); FormComponent firstName = new CustomerNameField(firstName).setRequired(true); model.bind(firstName).to().getFirstName(); add(firstName); FormComponent lastName = new CustomerNameField(lastName).setRequired(true); model.bind(lastName).to().getLastName(); add(lastName); FormComponent addr1 = new AddressField(address1).setRequired(true); model.bind(addr1).to().getAddress().getAddress1(); add(addr1); FormComponent addr2 = new AddressField(address2); model.bind(addr2).to().getAddress().getAddress2(); add(addr2); FormComponent city = new CityField(city); model.bind(city).to().getAddress().getCity(); add(city); We're happy to share if folk like this approach. N.B. that the .to() call is for readability rather than out of any necessity. Cheers, Scott -- Scott Swank reformed mathematician - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/CompoundModel-based-on-proxies-tp15317807p15325663.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] -- View this message in context: http://www.nabble.com/CompoundModel-based-on-proxies-tp15317807p15325860.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] -- Scott Swank reformed mathematician - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: CompoundModel based on proxies
If you're interested in using proxies, you could check out Apache Commons Proxy. It hasn't been released yet, but I would imagine we could get a release out the door in short order if it was wanted. The cool thing about ACP is that you can swap out the proxying technology easily (JDK proxies, CGLIB, and Javassist are currently supported). On 2/6/08, Igor Vaynberg [EMAIL PROTECTED] wrote: i support it in a non-core module -igor On Feb 6, 2008 5:41 PM, Jonathan Locke [EMAIL PROTECTED] wrote: so you don't support this model then? igor.vaynberg wrote: i disagree. i dont think we should be doing more with cglib in core or any other bytecode magic. have you ever tried to walk code that uses bytecode generation? its a nightmare. one of my favorite things about wicket is that it is just java and its easy as hell to debug. im not really against putting something like this into extensions, or even having a new wicket-bytecode/codegen/whatever package that contains things like these... -igor On Feb 6, 2008 5:23 PM, Jonathan Locke [EMAIL PROTECTED] wrote: like BoundCompoundPropertyModel, but safer. i think this almost might be too clever as it sacrifices some intuitiveness. also, it's filling in for a missing java feature. this should really be: boundModel.bind(component, firstName.property) (where .property, .field and .method are long-missing declarative reflections like .class) it does make me think we could be doing more with CGLIB in general. our model classes ought to be able to detect model changes better using proxies, for example. Scott Swank wrote: One of our more clever developers created a CompoundPropertyModel that uses a cglib proxy to strongly bind the mutators to the model. It looks like this: SharedPropertyModelCustomer model = new SharedPropertyModelCustomer(customer); this.setModel(model); FormComponent firstName = new CustomerNameField(firstName).setRequired(true); model.bind(firstName).to().getFirstName(); add(firstName); FormComponent lastName = new CustomerNameField(lastName).setRequired(true); model.bind(lastName).to().getLastName(); add(lastName); FormComponent addr1 = new AddressField(address1).setRequired(true); model.bind(addr1).to().getAddress().getAddress1(); add(addr1); FormComponent addr2 = new AddressField(address2); model.bind(addr2).to().getAddress().getAddress2(); add(addr2); FormComponent city = new CityField(city); model.bind(city).to().getAddress().getCity(); add(city); We're happy to share if folk like this approach. N.B. that the .to() call is for readability rather than out of any necessity. Cheers, Scott -- Scott Swank reformed mathematician - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/CompoundModel-based-on-proxies-tp15317807p15325663.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] -- View this message in context: http://www.nabble.com/CompoundModel-based-on-proxies-tp15317807p15325860.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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]