Re: [Wicket-user] LoadableDetachableModel in form processing
org.hibernate.NonUniqueObjectException is a really common problem. My guess is that the DataStoreUser is being loaded once to pass it into the page constructor and again by the LoadableDetachableModel within the same Hibernate session. Same persistent object loaded into two separate instance variables in the same (Hibernate) session -- boom, NonUniqueObjectException. There are a couple of ways to fix this. The correct solution is to avoid loading the object more than once in the first place. For instance, maybe you could take a user id instead of a user object into your page constructor to remove one of the load operations. The standard solution is to use Session.merge() instead of, say, Session.saveOrUpdate() (I assume you're getting this exception when the Hibernate session flushes). In any event, this is happening because LoadableDetachableModel is working as intended and thereby revealing one of Hibernate's many quirks -- not because of a problem in Wicket. -Ryan On Feb 10, 2007, at 2:31 AM, Matthew Kwong wrote: Hi fellows, Last time I asked how to use chain in CompoundPropertyModel with LoadableDetachableModel, it worked since my page has no form (no submit). This time, I make another page and try to use the chain again, and hibernate throws org.hibernate.NonUniqueObjectException when I submit the form. Caused by: org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session: [datastore2.model.DataStoreRole#1] My Panel: public UserDetail(String id, DataStoreUser user, final Panel prevPanel) { super(id); add(new FeedbackPanel(feedback)); add(new Link(back) { public void onClick() { getParent().replaceWith(prevPanel); } }); Form form = new Form(form) { protected void onSubmit() { DataStoreUser user = (DataStoreUser) this.getModelObject(); try { getDelegate().saveUser(user); info(You have saved the user profile: + user.getFullname() + .); } catch (Exception e) { e.printStackTrace(); error(Your user profile state is stale (someone has updated the same user profile while you are on this page). Please press BACK and come back.); } } }; form.setModel(new CompoundPropertyModel(new LoadableDataStoreUserModel(getDelegate().getDataStoreUser(user.getId (); form.add(new Label(id)); form.add(new Label(username)); form.add(new RequiredTextField(firstname)); form.add(new TextField(lastname).setConvertEmptyInputStringToNull(false)); form.add(new Label(email)); form.add(new Palette(roles, new Model((Serializable)getDelegate().getDataStoreRoles()), new RoleChoiceRenderer(), 10, true)); add(form); } Is LoadableDetachableModel working for form processing? Because it is working if I only have form.setModel(new CompoundPropertyModel(getDelegate().getDataStoreUser(user.getId(; The reason why i want this loadable since I want to update the page with F5 refresh button again if someone has changed the same user in another computer. Thank you :) Matthew Kwong -- View this message in context: http://www.nabble.com/ LoadableDetachableModel-in-form-processing-tf3204839.html#a8899449 Sent from the Wicket - User mailing list archive at Nabble.com. -- --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel? cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Wicket 1.2.4 bug (?!?) - changing visibility of a button using ajax
Nah, both have different semantics: the first removes/replaces the whole markup of the component, the other only makes it invisible. There are several options to do that, so I'd rather have this outlined as an example. Martijn On 2/17/07, Johan Compagner [EMAIL PROTECTED] wrote: can't we make this behaviour somehow default in our ajax request? Then it always works i guess? johan On 2/17/07, Martijn Dashorst [EMAIL PROTECTED] wrote: Or you could target.appendJavascript( document.getElementById(' + component.getMarkupId() + ').style.display='none';); Martijn On 2/16/07, Igor Vaynberg [EMAIL PROTECTED] wrote: you cannot add button directly to the ajax target to change visibility, you have to add some enclosing component lets say you start out with a visible button you hide it and add it directly so now what wicket will try to do is to go find input id=button/ and replace that tags outer html with - which may or may not work depending on the browser. btw do you have button.setoutputmarkupid(true) ??? even if that does work lets say later you want to make the button visible again, so you add it again to the target wicket tries to go out and find a tag with id button but cant because it is no longer in the domtree of the body - so you get an error. the proper way to do this is to add button's parent, that way the parent will repaint itself without the button's tag in it, and later when you make it visible the parent will repaint itself with button's tags so everything works nicely. -igor On 2/16/07, Alex Objelean [EMAIL PROTECTED] wrote: The bug is about setVisible() method which does not work on button (and not only) components when using ajax updates. Detailed description: I have a DataView. Each line contains a description (Label component), a configuration select (DropDownChoice component) and a download button (Button component). When user changes the configuration from the DropDownChoice component, depending on the selected configuration - the download button visibility must be changed. Here is the snippet of code: protected void onUpdate(final AjaxRequestTarget target) { //find somehow my button using relative path Button button = ...; button.setVisible(false); target.addComponent(button); } This code does not perform the expected result. Interesting is that if instead of button, I try to change the visibility of a DropDownChoice component - it works! I cannot understand why it behave so different. Can you explain me? Is it a bug? Am I using a wrong approach? Thank you! -- View this message in context: http://www.nabble.com/Wicket-1.2.4-bug-%28-%21-%29---changing-visibility-of-a-button-using-ajax-tf3242268.html#a9013073 Sent from the Wicket - User mailing list archive at Nabble.com . - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net 's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- Learn Wicket at ApacheCon Europe: http://apachecon.com Join the wicket community at irc.freenode.net: ##wicket Wicket 1.2.5 will keep your server alive. Download Wicket now! http://wicketframework.org - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join
Re: [Wicket-user] LoadableDetachableModel in form processing
I should clarify that last paragraph: I don't know Wicket well enough to be sure you haven't found a bug and of course I don't know your code. I've just run into this often enough in Hibernate to make an educated guess. Let us know how it works out. -Ryan On Feb 18, 2007, at 2:08 AM, Ryan Holmes wrote: org.hibernate.NonUniqueObjectException is a really common problem. My guess is that the DataStoreUser is being loaded once to pass it into the page constructor and again by the LoadableDetachableModel within the same Hibernate session. Same persistent object loaded into two separate instance variables in the same (Hibernate) session -- boom, NonUniqueObjectException. There are a couple of ways to fix this. The correct solution is to avoid loading the object more than once in the first place. For instance, maybe you could take a user id instead of a user object into your page constructor to remove one of the load operations. The standard solution is to use Session.merge() instead of, say, Session.saveOrUpdate() (I assume you're getting this exception when the Hibernate session flushes). In any event, this is happening because LoadableDetachableModel is working as intended and thereby revealing one of Hibernate's many quirks -- not because of a problem in Wicket. -Ryan On Feb 10, 2007, at 2:31 AM, Matthew Kwong wrote: Hi fellows, Last time I asked how to use chain in CompoundPropertyModel with LoadableDetachableModel, it worked since my page has no form (no submit). This time, I make another page and try to use the chain again, and hibernate throws org.hibernate.NonUniqueObjectException when I submit the form. Caused by: org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session: [datastore2.model.DataStoreRole#1] My Panel: public UserDetail(String id, DataStoreUser user, final Panel prevPanel) { super(id); add(new FeedbackPanel(feedback)); add(new Link(back) { public void onClick() { getParent().replaceWith(prevPanel); } }); Form form = new Form(form) { protected void onSubmit() { DataStoreUser user = (DataStoreUser) this.getModelObject(); try { getDelegate().saveUser(user); info(You have saved the user profile: + user.getFullname() + .); } catch (Exception e) { e.printStackTrace(); error(Your user profile state is stale (someone has updated the same user profile while you are on this page). Please press BACK and come back.); } } }; form.setModel(new CompoundPropertyModel(new LoadableDataStoreUserModel(getDelegate().getDataStoreUser(user.getId (); form.add(new Label(id)); form.add(new Label(username)); form.add(new RequiredTextField(firstname)); form.add(new TextField(lastname).setConvertEmptyInputStringToNull(false)); form.add(new Label(email)); form.add(new Palette(roles, new Model((Serializable)getDelegate().getDataStoreRoles()), new RoleChoiceRenderer(), 10, true)); add(form); } Is LoadableDetachableModel working for form processing? Because it is working if I only have form.setModel(new CompoundPropertyModel(getDelegate().getDataStoreUser(user.getId(; The reason why i want this loadable since I want to update the page with F5 refresh button again if someone has changed the same user in another computer. Thank you :) Matthew Kwong -- View this message in context: http://www.nabble.com/ LoadableDetachableModel-in-form-processing-tf3204839.html#a8899449 Sent from the Wicket - User mailing list archive at Nabble.com. - - --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel? cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- --- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php? page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] [datetime] DateConverter
With JSR 310 on the way, you'll be ahead of your time if you support DateTime ;) While you obviously have to support java.util.Date, it sounds like a great idea to sort of promote Joda-Time by providing out of the box support for DateTime. Partly due to JSR 310, I bet you'll see more and more shops coming to the same conclusion we did recently: stop hiding Joda-Time exclusively inside complex date/time logic and just push it all the way through the app -- from persistence layer to UI. -Ryan On Feb 16, 2007, at 11:49 PM, Eelco Hillenius wrote: On 2/15/07, ChuckDeal [EMAIL PROTECTED] wrote: I was trying to use the datetime.DateTextField and it was giving me a little grief when I was trying to use DateTime objects with it. It was my understanding that that datetime project was to be built around the joda package. Here is a patch the removes the java.util.Date stuff in an attempt to be a pure DateTime converter. With the following patch in place, my code works properly (ie, no errors parsing or returning dates). Let me know if I'm on the wrong track here, please. H. Yeah, I can see your point. My - original - idea was to use Joda-time internally and have this thing work for normal java.util.Dates transparently. I think the best way to do here is to create another converter, the other one being fully based on joda time and build a separate text field for it etc. I definitively want to support normal dates, but I realize it's quite logical to expect wicket-datetime to work with joda-time all the way as well. What do you think? Eelco -- --- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php? page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] rendered pages cache
Hi, How can I cache rendered pages (the pages I want to cache are composed dynamically, but from a static content. So after composition they rarely (even never) change)? Thanks, Ittay -- View this message in context: http://www.nabble.com/rendered-pages-cache-tf3247749.html#a9028362 Sent from the Wicket - User mailing list archive at Nabble.com. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] How to include *.htc files in css files?
I have got it to work on my local installation. You need to put the .htc and blank.gif in you root webapp folder. There seems to be a problem with the way that IE handles urls for behaviours. I serve my css as a resource in wicket, which means that the url is something like: http://localhost:8080/resources/dk.frankbille.teachus.frontend.pages.BasePage/resources/main.css If I put iepngfix.htc and blank.gif in the same folder ( dk.frankbille.teachus.frontend.pages.BasePage/resources), then IE doesn't load it. It seems that IE thinks that url(iepngfix.htc) means url(/iepngfix.htc) even if you try to say url(./iepngfix.htc). So bottom line (for now) is: put iepngfix.htc and blank.gif in your webapp root. Frank P.s. Another solution could be to try writing the absolute URL for iepngfix.htc in the css/style and see if that works. Haven't tried it yet. On 2/16/07, Zágoni Elemér [EMAIL PROTECTED] wrote: Hi, I'm new to Wicket (using Wicket ver. 1.2.4). I tried to include an htc file (Internet Explorer behavior file) in a css (to fix incorrect png handling in IE). I did it like below: *img, div {behavior:url(../htc/iepngfix.htc)} the browser cannot find the referenced htc file. The strange thing is that I refer to various images (in the same css) the same way, I mean: background-image:url(../img/background.png), and the images are found. Could anyone tell me why the above technique did not work for *.htc files? Thanx in advance. -- View this message in context: http://www.nabble.com/How-to-include-*.htc-files-in-css-files--tf3238484.html#a9001326 Sent from the Wicket - User mailing list archive at Nabble.com. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Wicket 1.3 and WicketPortletServlet
I created an issue in JIRA: https://issues.apache.org/jira/browse/WICKET-295 On 2/16/07, Johan Compagner [EMAIL PROTECTED] wrote: i guess we only need to extend wicketfilter and do this: protected final IWebApplicationFactory getApplicationFactory() { return new IWebApplicationFactory(){ public WebApplication createApplication(WicketServlet servlet) { return new WebApplication(){ public Class getHomePage() { return AccessDeniedPage.class; } }; } public WebApplication createApplication(WicketFilter filter) { return new WebApplication(){ public Class getHomePage() { return AccessDeniedPage.class; } }; } }; } that does look simple johan On 2/16/07, Sean Sullivan [EMAIL PROTECTED] wrote: Are there any plans to convert the WicketPortletServlet to a filter in the wicket-1.x branch? http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/protocol/http/ portlet/ - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] rendered pages cache
http://jroller.com/page/JonathanLocke?entry=static_web_sites_in_wicket read post and comments. Ittay Dror wrote: Hi, How can I cache rendered pages (the pages I want to cache are composed dynamically, but from a static content. So after composition they rarely (even never) change)? Thanks, Ittay -- View this message in context: http://www.nabble.com/rendered-pages-cache-tf3247749.html#a9031141 Sent from the Wicket - User mailing list archive at Nabble.com. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] Download link for 1.2.x is broken
I'm trying to download the snapshot jars of Wicket 1.2.x from this page: http://incubator.apache.org/wicket/getting-wicket.html#GettingWicket- wicket125 When I click on the snapshot repository URL ( http://wicketstuff.org/ maven/repository ), I get an error that I cannot connect to the server. I do not use Maven, so I can't build from source code. --Jesse Barnum, President, 360Works http://www.360works.com (770) 234-9293 - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] wicketstuff.org down
yes the server was moved. But should be up and running now. will investigate it. johan On 2/18/07, Roland Kaercher [EMAIL PROTECTED] wrote: Hi, it seems that wicketstuff.org is down at the moment, is this a known/planned outage? regards, roland - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] How to include *.htc files in css files?
For which version did you test that Frank? Does Al's relative URL fix help here? Eelco On 2/18/07, Frank Bille [EMAIL PROTECTED] wrote: I have got it to work on my local installation. You need to put the .htc and blank.gif in you root webapp folder. There seems to be a problem with the way that IE handles urls for behaviours. I serve my css as a resource in wicket, which means that the url is something like: http://localhost:8080/resources/dk.frankbille.teachus.frontend.pages.BasePage/resources/main.css If I put iepngfix.htc and blank.gif in the same folder (dk.frankbille.teachus.frontend.pages.BasePage/resources), then IE doesn't load it. It seems that IE thinks that url(iepngfix.htc) means url(/iepngfix.htc) even if you try to say url(./iepngfix.htc). So bottom line (for now) is: put iepngfix.htc and blank.gif in your webapp root. Frank P.s. Another solution could be to try writing the absolute URL for iepngfix.htc in the css/style and see if that works. Haven't tried it yet. On 2/16/07, Zágoni Elemér [EMAIL PROTECTED] wrote: Hi, I'm new to Wicket (using Wicket ver. 1.2.4). I tried to include an htc file (Internet Explorer behavior file) in a css (to fix incorrect png handling in IE). I did it like below: *img, div {behavior:url(../htc/iepngfix.htc)} the browser cannot find the referenced htc file. The strange thing is that I refer to various images (in the same css) the same way, I mean: background-image:url(../img/background.png), and the images are found. Could anyone tell me why the above technique did not work for *.htc files? Thanx in advance. -- View this message in context: http://www.nabble.com/How-to-include-*.htc-files-in-css-files--tf3238484.html#a9001326 Sent from the Wicket - User mailing list archive at Nabble.com. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] How to include *.htc files in css files?
Oh yeah that was 1.3. So sorry no luck. It has nothing to do with how wicket handles urls, but how IE interprets url() for behavior. Frank On 2/18/07, Eelco Hillenius [EMAIL PROTECTED] wrote: For which version did you test that Frank? Does Al's relative URL fix help here? Eelco On 2/18/07, Frank Bille [EMAIL PROTECTED] wrote: I have got it to work on my local installation. You need to put the .htc and blank.gif in you root webapp folder. There seems to be a problem with the way that IE handles urls for behaviours. I serve my css as a resource in wicket, which means that the url is something like: http://localhost:8080/resources/dk.frankbille.teachus.frontend.pages.BasePage/resources/main.css If I put iepngfix.htc and blank.gif in the same folder (dk.frankbille.teachus.frontend.pages.BasePage/resources), then IE doesn't load it. It seems that IE thinks that url(iepngfix.htc) means url(/iepngfix.htc) even if you try to say url(./iepngfix.htc). So bottom line (for now) is: put iepngfix.htc and blank.gif in your webapp root. Frank P.s. Another solution could be to try writing the absolute URL for iepngfix.htc in the css/style and see if that works. Haven't tried it yet. On 2/16/07, Zágoni Elemér [EMAIL PROTECTED] wrote: Hi, I'm new to Wicket (using Wicket ver. 1.2.4). I tried to include an htc file (Internet Explorer behavior file) in a css (to fix incorrect png handling in IE). I did it like below: *img, div {behavior:url(../htc/iepngfix.htc)} the browser cannot find the referenced htc file. The strange thing is that I refer to various images (in the same css) the same way, I mean: background-image:url(../img/background.png), and the images are found. Could anyone tell me why the above technique did not work for *.htc files? Thanx in advance. -- View this message in context: http://www.nabble.com/How-to-include-*.htc-files-in-css-files--tf3238484.html#a9001326 Sent from the Wicket - User mailing list archive at Nabble.com. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Download link for 1.2.x is broken
Hi Jesse, The server has been down today. But it should be back up again: http://www.nabble.com/wicketstuff.org-down-tf3248702.html Frank On 2/18/07, Jesse Barnum [EMAIL PROTECTED] wrote: I'm trying to download the snapshot jars of Wicket 1.2.x from this page: http://incubator.apache.org/wicket/getting-wicket.html#GettingWicket- wicket125 When I click on the snapshot repository URL ( http://wicketstuff.org/ maven/repository ), I get an error that I cannot connect to the server. I do not use Maven, so I can't build from source code. --Jesse Barnum, President, 360Works http://www.360works.com (770) 234-9293 - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] rendered pages cache
i read this post already ;) i don't want to add another framework on top of wicket (reverse-caching HTTP accelerator). and my pages are not exactly static. i read several static files and combine them (i read the content from one file, a table of contents from another and add a Label component whose value is the file name). once the page is assembled, it is stateless. So what I'm looking for is saving the assembled code, so when the page is requested again, the saved data is served, instead of going through the cycle flow again. Jonathan Locke wrote: http://jroller.com/page/JonathanLocke?entry=static_web_sites_in_wicket read post and comments. Ittay Dror wrote: Hi, How can I cache rendered pages (the pages I want to cache are composed dynamically, but from a static content. So after composition they rarely (even never) change)? Thanks, Ittay -- View this message in context: http://www.nabble.com/rendered-pages-cache-tf3247749.html#a9032949 Sent from the Wicket - User mailing list archive at Nabble.com. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] rendered pages cache
i wouldnt cache the page but i would cache the concatenated result you can have a concurrenthashmap in your application keeping softreferences to the concatted text will that work? -igor On 2/18/07, Ittay Dror [EMAIL PROTECTED] wrote: i read this post already ;) i don't want to add another framework on top of wicket (reverse-caching HTTP accelerator). and my pages are not exactly static. i read several static files and combine them (i read the content from one file, a table of contents from another and add a Label component whose value is the file name). once the page is assembled, it is stateless. So what I'm looking for is saving the assembled code, so when the page is requested again, the saved data is served, instead of going through the cycle flow again. Jonathan Locke wrote: http://jroller.com/page/JonathanLocke?entry=static_web_sites_in_wicket read post and comments. Ittay Dror wrote: Hi, How can I cache rendered pages (the pages I want to cache are composed dynamically, but from a static content. So after composition they rarely (even never) change)? Thanks, Ittay -- View this message in context: http://www.nabble.com/rendered-pages-cache-tf3247749.html#a9032949 Sent from the Wicket - User mailing list archive at Nabble.com. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] rendered pages cache
how about using oscache? afaik, wicket plans to work based on a filter, not a servlet (why?), if so, will using a filter for caching conflict (the order matters here)? Ittay Dror wrote: i read this post already ;) i don't want to add another framework on top of wicket (reverse-caching HTTP accelerator). and my pages are not exactly static. i read several static files and combine them (i read the content from one file, a table of contents from another and add a Label component whose value is the file name). once the page is assembled, it is stateless. So what I'm looking for is saving the assembled code, so when the page is requested again, the saved data is served, instead of going through the cycle flow again. Jonathan Locke wrote: http://jroller.com/page/JonathanLocke?entry=static_web_sites_in_wicket read post and comments. Ittay Dror wrote: Hi, How can I cache rendered pages (the pages I want to cache are composed dynamically, but from a static content. So after composition they rarely (even never) change)? Thanks, Ittay -- View this message in context: http://www.nabble.com/rendered-pages-cache-tf3247749.html#a9033123 Sent from the Wicket - User mailing list archive at Nabble.com. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] rendered pages cache
i didn't follow. can you please elaborate? where will the map be used? igor.vaynberg wrote: i wouldnt cache the page but i would cache the concatenated result you can have a concurrenthashmap in your application keeping softreferences to the concatted text will that work? -igor On 2/18/07, Ittay Dror [EMAIL PROTECTED] wrote: i read this post already ;) i don't want to add another framework on top of wicket (reverse-caching HTTP accelerator). and my pages are not exactly static. i read several static files and combine them (i read the content from one file, a table of contents from another and add a Label component whose value is the file name). once the page is assembled, it is stateless. So what I'm looking for is saving the assembled code, so when the page is requested again, the saved data is served, instead of going through the cycle flow again. Jonathan Locke wrote: http://jroller.com/page/JonathanLocke?entry=static_web_sites_in_wicket read post and comments. Ittay Dror wrote: Hi, How can I cache rendered pages (the pages I want to cache are composed dynamically, but from a static content. So after composition they rarely (even never) change)? Thanks, Ittay -- View this message in context: http://www.nabble.com/rendered-pages-cache-tf3247749.html#a9032949 Sent from the Wicket - User mailing list archive at Nabble.com. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- View this message in context: http://www.nabble.com/rendered-pages-cache-tf3247749.html#a9033148 Sent from the Wicket - User mailing list archive at Nabble.com. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] rendered pages cache
if i got it right what you are doing is reading a bunch of files and combining the result now you dont want to use cache infront of the appserver because the page isnt really static like you said the page itself is just a label that spits out the result of the concatenated text correct? so there is little point to caching the page. what you really want to do is to cache the expensive operation which isnt creating the page but loading/concatenating that text so what you do is create a concurrenthashmap that lives in application scope, this map will house the results of your loaded+concatenated text via softreferences so the model for you label becomes like this new abstractreadonlymodel() { Object getobject() { Map map=getapplication().getcache(); Key key=..construct cache key used to identify the result String text=map.get(key); if (text==null) { text=constructcontent(); map.put(key, text); } return text; } -igor On 2/18/07, Ittay Dror [EMAIL PROTECTED] wrote: i didn't follow. can you please elaborate? where will the map be used? igor.vaynberg wrote: i wouldnt cache the page but i would cache the concatenated result you can have a concurrenthashmap in your application keeping softreferences to the concatted text will that work? -igor On 2/18/07, Ittay Dror [EMAIL PROTECTED] wrote: i read this post already ;) i don't want to add another framework on top of wicket (reverse-caching HTTP accelerator). and my pages are not exactly static. i read several static files and combine them (i read the content from one file, a table of contents from another and add a Label component whose value is the file name). once the page is assembled, it is stateless. So what I'm looking for is saving the assembled code, so when the page is requested again, the saved data is served, instead of going through the cycle flow again. Jonathan Locke wrote: http://jroller.com/page/JonathanLocke?entry=static_web_sites_in_wicket read post and comments. Ittay Dror wrote: Hi, How can I cache rendered pages (the pages I want to cache are composed dynamically, but from a static content. So after composition they rarely (even never) change)? Thanks, Ittay -- View this message in context: http://www.nabble.com/rendered-pages-cache-tf3247749.html#a9032949 Sent from the Wicket - User mailing list archive at Nabble.com. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- View this message in context: http://www.nabble.com/rendered-pages-cache-tf3247749.html#a9033148 Sent from the Wicket - User mailing list archive at Nabble.com. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] rendered pages cache
the page has an associated markup. it has place holders for the content, the table of contents and a label (name of file of content). the head tag contains references to css and javascript. i think what i'd like is for the Page to be able to save the rendered content and when called, to write the content to the servlet response, stopping the request cycle. igor.vaynberg wrote: if i got it right what you are doing is reading a bunch of files and combining the result now you dont want to use cache infront of the appserver because the page isnt really static like you said the page itself is just a label that spits out the result of the concatenated text correct? so there is little point to caching the page. what you really want to do is to cache the expensive operation which isnt creating the page but loading/concatenating that text so what you do is create a concurrenthashmap that lives in application scope, this map will house the results of your loaded+concatenated text via softreferences so the model for you label becomes like this new abstractreadonlymodel() { Object getobject() { Map map=getapplication().getcache(); Key key=..construct cache key used to identify the result String text=map.get(key); if (text==null) { text=constructcontent(); map.put(key, text); } return text; } -igor On 2/18/07, Ittay Dror [EMAIL PROTECTED] wrote: i didn't follow. can you please elaborate? where will the map be used? igor.vaynberg wrote: i wouldnt cache the page but i would cache the concatenated result you can have a concurrenthashmap in your application keeping softreferences to the concatted text will that work? -igor On 2/18/07, Ittay Dror [EMAIL PROTECTED] wrote: i read this post already ;) i don't want to add another framework on top of wicket (reverse-caching HTTP accelerator). and my pages are not exactly static. i read several static files and combine them (i read the content from one file, a table of contents from another and add a Label component whose value is the file name). once the page is assembled, it is stateless. So what I'm looking for is saving the assembled code, so when the page is requested again, the saved data is served, instead of going through the cycle flow again. Jonathan Locke wrote: http://jroller.com/page/JonathanLocke?entry=static_web_sites_in_wicket read post and comments. Ittay Dror wrote: Hi, How can I cache rendered pages (the pages I want to cache are composed dynamically, but from a static content. So after composition they rarely (even never) change)? Thanks, Ittay -- View this message in context: http://www.nabble.com/rendered-pages-cache-tf3247749.html#a9032949 Sent from the Wicket - User mailing list archive at Nabble.com. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- View this message in context: http://www.nabble.com/rendered-pages-cache-tf3247749.html#a9033148 Sent from the Wicket - User mailing list archive at Nabble.com. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash
Re: [Wicket-user] rendered pages cache
so what you really want is a shared resource and not a page :) -igor On 2/18/07, Ittay Dror [EMAIL PROTECTED] wrote: the page has an associated markup. it has place holders for the content, the table of contents and a label (name of file of content). the head tag contains references to css and javascript. i think what i'd like is for the Page to be able to save the rendered content and when called, to write the content to the servlet response, stopping the request cycle. igor.vaynberg wrote: if i got it right what you are doing is reading a bunch of files and combining the result now you dont want to use cache infront of the appserver because the page isnt really static like you said the page itself is just a label that spits out the result of the concatenated text correct? so there is little point to caching the page. what you really want to do is to cache the expensive operation which isnt creating the page but loading/concatenating that text so what you do is create a concurrenthashmap that lives in application scope, this map will house the results of your loaded+concatenated text via softreferences so the model for you label becomes like this new abstractreadonlymodel() { Object getobject() { Map map=getapplication().getcache(); Key key=..construct cache key used to identify the result String text=map.get(key); if (text==null) { text=constructcontent(); map.put(key, text); } return text; } -igor On 2/18/07, Ittay Dror [EMAIL PROTECTED] wrote: i didn't follow. can you please elaborate? where will the map be used? igor.vaynberg wrote: i wouldnt cache the page but i would cache the concatenated result you can have a concurrenthashmap in your application keeping softreferences to the concatted text will that work? -igor On 2/18/07, Ittay Dror [EMAIL PROTECTED] wrote: i read this post already ;) i don't want to add another framework on top of wicket (reverse-caching HTTP accelerator). and my pages are not exactly static. i read several static files and combine them (i read the content from one file, a table of contents from another and add a Label component whose value is the file name). once the page is assembled, it is stateless. So what I'm looking for is saving the assembled code, so when the page is requested again, the saved data is served, instead of going through the cycle flow again. Jonathan Locke wrote: http://jroller.com/page/JonathanLocke?entry=static_web_sites_in_wicket read post and comments. Ittay Dror wrote: Hi, How can I cache rendered pages (the pages I want to cache are composed dynamically, but from a static content. So after composition they rarely (even never) change)? Thanks, Ittay -- View this message in context: http://www.nabble.com/rendered-pages-cache-tf3247749.html#a9032949 Sent from the Wicket - User mailing list archive at Nabble.com. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- View this message in context: http://www.nabble.com/rendered-pages-cache-tf3247749.html#a9033148 Sent from the Wicket - User mailing list archive at Nabble.com. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT
Re: [Wicket-user] rendered pages cache
again, i don't think i follow. my page's markup looks something like: html head link ... script ... /head body div wicket:id=toc div wicket:id=title div wicket:id=content /body /html DocPage's ctor is something like: DocPage(String contentFilePath) { add(new Label(title, getTitle(contentFilePath))); add(new FileInclude(content, contentFilePath)); add(new RelativeFileInclude(toc, contentFilePath)); } RelativeFileInclude loades the TOC file (say TOC.html) and changes the links so they are relative to contentFilePath (using DOM). i use url coding strategy which takes a path like /doc/some/path/to/file.html and constructs DocPage with 'some/path/to/file.html' igor.vaynberg wrote: so what you really want is a shared resource and not a page :) -igor On 2/18/07, Ittay Dror [EMAIL PROTECTED] wrote: the page has an associated markup. it has place holders for the content, the table of contents and a label (name of file of content). the head tag contains references to css and javascript. i think what i'd like is for the Page to be able to save the rendered content and when called, to write the content to the servlet response, stopping the request cycle. igor.vaynberg wrote: if i got it right what you are doing is reading a bunch of files and combining the result now you dont want to use cache infront of the appserver because the page isnt really static like you said the page itself is just a label that spits out the result of the concatenated text correct? so there is little point to caching the page. what you really want to do is to cache the expensive operation which isnt creating the page but loading/concatenating that text so what you do is create a concurrenthashmap that lives in application scope, this map will house the results of your loaded+concatenated text via softreferences so the model for you label becomes like this new abstractreadonlymodel() { Object getobject() { Map map=getapplication().getcache(); Key key=..construct cache key used to identify the result String text=map.get(key); if (text==null) { text=constructcontent(); map.put(key, text); } return text; } -igor On 2/18/07, Ittay Dror [EMAIL PROTECTED] wrote: i didn't follow. can you please elaborate? where will the map be used? igor.vaynberg wrote: i wouldnt cache the page but i would cache the concatenated result you can have a concurrenthashmap in your application keeping softreferences to the concatted text will that work? -igor On 2/18/07, Ittay Dror [EMAIL PROTECTED] wrote: i read this post already ;) i don't want to add another framework on top of wicket (reverse-caching HTTP accelerator). and my pages are not exactly static. i read several static files and combine them (i read the content from one file, a table of contents from another and add a Label component whose value is the file name). once the page is assembled, it is stateless. So what I'm looking for is saving the assembled code, so when the page is requested again, the saved data is served, instead of going through the cycle flow again. Jonathan Locke wrote: http://jroller.com/page/JonathanLocke?entry=static_web_sites_in_wicket read post and comments. Ittay Dror wrote: Hi, How can I cache rendered pages (the pages I want to cache are composed dynamically, but from a static content. So after composition they rarely (even never) change)? Thanks, Ittay -- View this message in context: http://www.nabble.com/rendered-pages-cache-tf3247749.html#a9032949 Sent from the Wicket - User mailing list archive at Nabble.com. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- View this message in context:
Re: [Wicket-user] rendered pages cache
dont use a page create a shared resource that streams the contents see WebResource and DynamicWebResource -igor On 2/18/07, Ittay Dror [EMAIL PROTECTED] wrote: again, i don't think i follow. my page's markup looks something like: html head link ... script ... /head body div wicket:id=toc div wicket:id=title div wicket:id=content /body /html DocPage's ctor is something like: DocPage(String contentFilePath) { add(new Label(title, getTitle(contentFilePath))); add(new FileInclude(content, contentFilePath)); add(new RelativeFileInclude(toc, contentFilePath)); } RelativeFileInclude loades the TOC file (say TOC.html) and changes the links so they are relative to contentFilePath (using DOM). i use url coding strategy which takes a path like /doc/some/path/to/file.html and constructs DocPage with 'some/path/to/file.html' igor.vaynberg wrote: so what you really want is a shared resource and not a page :) -igor On 2/18/07, Ittay Dror [EMAIL PROTECTED] wrote: the page has an associated markup. it has place holders for the content, the table of contents and a label (name of file of content). the head tag contains references to css and javascript. i think what i'd like is for the Page to be able to save the rendered content and when called, to write the content to the servlet response, stopping the request cycle. igor.vaynberg wrote: if i got it right what you are doing is reading a bunch of files and combining the result now you dont want to use cache infront of the appserver because the page isnt really static like you said the page itself is just a label that spits out the result of the concatenated text correct? so there is little point to caching the page. what you really want to do is to cache the expensive operation which isnt creating the page but loading/concatenating that text so what you do is create a concurrenthashmap that lives in application scope, this map will house the results of your loaded+concatenated text via softreferences so the model for you label becomes like this new abstractreadonlymodel() { Object getobject() { Map map=getapplication().getcache(); Key key=..construct cache key used to identify the result String text=map.get(key); if (text==null) { text=constructcontent(); map.put(key, text); } return text; } -igor On 2/18/07, Ittay Dror [EMAIL PROTECTED] wrote: i didn't follow. can you please elaborate? where will the map be used? igor.vaynberg wrote: i wouldnt cache the page but i would cache the concatenated result you can have a concurrenthashmap in your application keeping softreferences to the concatted text will that work? -igor On 2/18/07, Ittay Dror [EMAIL PROTECTED] wrote: i read this post already ;) i don't want to add another framework on top of wicket (reverse-caching HTTP accelerator). and my pages are not exactly static. i read several static files and combine them (i read the content from one file, a table of contents from another and add a Label component whose value is the file name). once the page is assembled, it is stateless. So what I'm looking for is saving the assembled code, so when the page is requested again, the saved data is served, instead of going through the cycle flow again. Jonathan Locke wrote: http://jroller.com/page/JonathanLocke?entry=static_web_sites_in_wicket read post and comments. Ittay Dror wrote: Hi, How can I cache rendered pages (the pages I want to cache are composed dynamically, but from a static content. So after composition they rarely (even never) change)? Thanks, Ittay -- View this message in context: http://www.nabble.com/rendered-pages-cache-tf3247749.html#a9032949 Sent from the Wicket - User mailing list archive at Nabble.com. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user
Re: [Wicket-user] rendered pages cache
ok. thanks. but how do i create the html output? something like 'String output = htmlheadlink...? I would still like to use a template. igor.vaynberg wrote: dont use a page create a shared resource that streams the contents see WebResource and DynamicWebResource -igor On 2/18/07, Ittay Dror [EMAIL PROTECTED] wrote: again, i don't think i follow. my page's markup looks something like: html head link ... script ... /head body div wicket:id=toc div wicket:id=title div wicket:id=content /body /html DocPage's ctor is something like: DocPage(String contentFilePath) { add(new Label(title, getTitle(contentFilePath))); add(new FileInclude(content, contentFilePath)); add(new RelativeFileInclude(toc, contentFilePath)); } RelativeFileInclude loades the TOC file (say TOC.html) and changes the links so they are relative to contentFilePath (using DOM). i use url coding strategy which takes a path like /doc/some/path/to/file.html and constructs DocPage with 'some/path/to/file.html' igor.vaynberg wrote: so what you really want is a shared resource and not a page :) -igor On 2/18/07, Ittay Dror [EMAIL PROTECTED] wrote: the page has an associated markup. it has place holders for the content, the table of contents and a label (name of file of content). the head tag contains references to css and javascript. i think what i'd like is for the Page to be able to save the rendered content and when called, to write the content to the servlet response, stopping the request cycle. igor.vaynberg wrote: if i got it right what you are doing is reading a bunch of files and combining the result now you dont want to use cache infront of the appserver because the page isnt really static like you said the page itself is just a label that spits out the result of the concatenated text correct? so there is little point to caching the page. what you really want to do is to cache the expensive operation which isnt creating the page but loading/concatenating that text so what you do is create a concurrenthashmap that lives in application scope, this map will house the results of your loaded+concatenated text via softreferences so the model for you label becomes like this new abstractreadonlymodel() { Object getobject() { Map map=getapplication().getcache(); Key key=..construct cache key used to identify the result String text=map.get(key); if (text==null) { text=constructcontent(); map.put(key, text); } return text; } -igor On 2/18/07, Ittay Dror [EMAIL PROTECTED] wrote: i didn't follow. can you please elaborate? where will the map be used? igor.vaynberg wrote: i wouldnt cache the page but i would cache the concatenated result you can have a concurrenthashmap in your application keeping softreferences to the concatted text will that work? -igor On 2/18/07, Ittay Dror [EMAIL PROTECTED] wrote: i read this post already ;) i don't want to add another framework on top of wicket (reverse-caching HTTP accelerator). and my pages are not exactly static. i read several static files and combine them (i read the content from one file, a table of contents from another and add a Label component whose value is the file name). once the page is assembled, it is stateless. So what I'm looking for is saving the assembled code, so when the page is requested again, the saved data is served, instead of going through the cycle flow again. Jonathan Locke wrote: http://jroller.com/page/JonathanLocke?entry=static_web_sites_in_wicket read post and comments. Ittay Dror wrote: Hi, How can I cache rendered pages (the pages I want to cache are composed dynamically, but from a static content. So after composition they rarely (even never) change)? Thanks, Ittay -- View this message in context: http://www.nabble.com/rendered-pages-cache-tf3247749.html#a9032949 Sent from the Wicket - User mailing list archive at Nabble.com. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] rendered pages cache
your template is trivial do you really need something? if you still feel like you do use freemarker or something like that -igor On 2/18/07, Ittay Dror [EMAIL PROTECTED] wrote: ok. thanks. but how do i create the html output? something like 'String output = htmlheadlink...? I would still like to use a template. igor.vaynberg wrote: dont use a page create a shared resource that streams the contents see WebResource and DynamicWebResource -igor On 2/18/07, Ittay Dror [EMAIL PROTECTED] wrote: again, i don't think i follow. my page's markup looks something like: html head link ... script ... /head body div wicket:id=toc div wicket:id=title div wicket:id=content /body /html DocPage's ctor is something like: DocPage(String contentFilePath) { add(new Label(title, getTitle(contentFilePath))); add(new FileInclude(content, contentFilePath)); add(new RelativeFileInclude(toc, contentFilePath)); } RelativeFileInclude loades the TOC file (say TOC.html) and changes the links so they are relative to contentFilePath (using DOM). i use url coding strategy which takes a path like /doc/some/path/to/file.html and constructs DocPage with 'some/path/to/file.html' igor.vaynberg wrote: so what you really want is a shared resource and not a page :) -igor On 2/18/07, Ittay Dror [EMAIL PROTECTED] wrote: the page has an associated markup. it has place holders for the content, the table of contents and a label (name of file of content). the head tag contains references to css and javascript. i think what i'd like is for the Page to be able to save the rendered content and when called, to write the content to the servlet response, stopping the request cycle. igor.vaynberg wrote: if i got it right what you are doing is reading a bunch of files and combining the result now you dont want to use cache infront of the appserver because the page isnt really static like you said the page itself is just a label that spits out the result of the concatenated text correct? so there is little point to caching the page. what you really want to do is to cache the expensive operation which isnt creating the page but loading/concatenating that text so what you do is create a concurrenthashmap that lives in application scope, this map will house the results of your loaded+concatenated text via softreferences so the model for you label becomes like this new abstractreadonlymodel() { Object getobject() { Map map=getapplication().getcache(); Key key=..construct cache key used to identify the result String text=map.get(key); if (text==null) { text=constructcontent(); map.put(key, text); } return text; } -igor On 2/18/07, Ittay Dror [EMAIL PROTECTED] wrote: i didn't follow. can you please elaborate? where will the map be used? igor.vaynberg wrote: i wouldnt cache the page but i would cache the concatenated result you can have a concurrenthashmap in your application keeping softreferences to the concatted text will that work? -igor On 2/18/07, Ittay Dror [EMAIL PROTECTED] wrote: i read this post already ;) i don't want to add another framework on top of wicket (reverse-caching HTTP accelerator). and my pages are not exactly static. i read several static files and combine them (i read the content from one file, a table of contents from another and add a Label component whose value is the file name). once the page is assembled, it is stateless. So what I'm looking for is saving the assembled code, so when the page is requested again, the saved data is served, instead of going through the cycle flow again. Jonathan Locke wrote: http://jroller.com/page/JonathanLocke?entry=static_web_sites_in_wicket read post and comments. Ittay Dror wrote: Hi, How can I cache rendered pages (the pages I want to cache are composed dynamically, but from a static content. So after composition they rarely (even never) change)? Thanks, Ittay -- View this message in context: http://www.nabble.com/rendered-pages-cache-tf3247749.html#a9032949 Sent from the Wicket - User mailing list archive at Nabble.com . - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list
Re: [Wicket-user] [datetime] DateConverter
On 2/18/07, Ryan Holmes [EMAIL PROTECTED] wrote: With JSR 310 on the way, you'll be ahead of your time if you support DateTime ;) While you obviously have to support java.util.Date, it sounds like a great idea to sort of promote Joda-Time by providing out of the box support for DateTime. Partly due to JSR 310, I bet you'll see more and more shops coming to the same conclusion we did recently: stop hiding Joda-Time exclusively inside complex date/time logic and just push it all the way through the app -- from persistence layer to UI. I agree. I just don't want to force users to use it exclusively, but rather let them choose for themselves. I'm not sure about whether I want to make that choice explicit or transparently; the latter being nice for users I guess, but it would clutter the implementations a bit. Eelco - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] LoadableDetachableModel in form processing
Basically, while it is great that you can work directly with hibernate objects in Wicket components, there are a couple of dangers to it as well. Especially when you use with a filter that opens and closes a transaction on every (Wicket) request and/or you have implicit transactions turned on, you can be in for nasty surprises (like this one). I'm not in favor of such an approach personally, though I can understand people who use it because it saves time and make for a very easy programming model. Alternatively, you can make sure that you put any hibernate access behind dao/ service interfaces and limit transactions to those interfaces. Basically you can use a layer of services which uses a layer of daos and use the services to group access to daos and define the transaction on (e.g. using Spring's @Transaction annotation). Going one step further, you might even consider not using hibernate objects outside those service methods at all, but instead use value objects. I don't believe that's necessary, but if you do that, you'll never ever will be in trouble. My 2c, Eelco On 2/18/07, Ryan Holmes [EMAIL PROTECTED] wrote: I should clarify that last paragraph: I don't know Wicket well enough to be sure you haven't found a bug and of course I don't know your code. I've just run into this often enough in Hibernate to make an educated guess. Let us know how it works out. -Ryan On Feb 18, 2007, at 2:08 AM, Ryan Holmes wrote: org.hibernate.NonUniqueObjectException is a really common problem. My guess is that the DataStoreUser is being loaded once to pass it into the page constructor and again by the LoadableDetachableModel within the same Hibernate session. Same persistent object loaded into two separate instance variables in the same (Hibernate) session -- boom, NonUniqueObjectException. There are a couple of ways to fix this. The correct solution is to avoid loading the object more than once in the first place. For instance, maybe you could take a user id instead of a user object into your page constructor to remove one of the load operations. The standard solution is to use Session.merge() instead of, say, Session.saveOrUpdate() (I assume you're getting this exception when the Hibernate session flushes). In any event, this is happening because LoadableDetachableModel is working as intended and thereby revealing one of Hibernate's many quirks -- not because of a problem in Wicket. -Ryan On Feb 10, 2007, at 2:31 AM, Matthew Kwong wrote: Hi fellows, Last time I asked how to use chain in CompoundPropertyModel with LoadableDetachableModel, it worked since my page has no form (no submit). This time, I make another page and try to use the chain again, and hibernate throws org.hibernate.NonUniqueObjectException when I submit the form. Caused by: org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session: [datastore2.model.DataStoreRole#1] My Panel: public UserDetail(String id, DataStoreUser user, final Panel prevPanel) { super(id); add(new FeedbackPanel(feedback)); add(new Link(back) { public void onClick() { getParent().replaceWith(prevPanel); } }); Form form = new Form(form) { protected void onSubmit() { DataStoreUser user = (DataStoreUser) this.getModelObject(); try { getDelegate().saveUser(user); info(You have saved the user profile: + user.getFullname() + .); } catch (Exception e) { e.printStackTrace(); error(Your user profile state is stale (someone has updated the same user profile while you are on this page). Please press BACK and come back.); } } }; form.setModel(new CompoundPropertyModel(new LoadableDataStoreUserModel(getDelegate().getDataStoreUser(user.getId (); form.add(new Label(id)); form.add(new Label(username)); form.add(new RequiredTextField(firstname)); form.add(new TextField(lastname).setConvertEmptyInputStringToNull(false)); form.add(new Label(email)); form.add(new Palette(roles, new Model((Serializable)getDelegate().getDataStoreRoles()), new RoleChoiceRenderer(), 10, true)); add(form); } Is LoadableDetachableModel working for form processing? Because it is working if I only have form.setModel(new CompoundPropertyModel(getDelegate().getDataStoreUser(user.getId(; The reason why i want this loadable since I want to update the page with F5 refresh button again if someone has changed the same user in another computer. Thank you :) Matthew Kwong -- View this message in context: http://www.nabble.com/
Re: [Wicket-user] rendered pages cache
but if you do that you cant cache a page instance because if the user starts clicking prev/next you need to somehow refresh the page. -igor On 2/18/07, Ittay Dror [EMAIL PROTECTED] wrote: i thought about it, and i think i really need a page. the reason is that while the data is static, it doesn't mean the page layout is simple. I might want to break long content into pages, provide 'next' and 'prev' links. igor.vaynberg wrote: so what you really want is a shared resource and not a page :) -igor On 2/18/07, Ittay Dror [EMAIL PROTECTED] wrote: the page has an associated markup. it has place holders for the content, the table of contents and a label (name of file of content). the head tag contains references to css and javascript. i think what i'd like is for the Page to be able to save the rendered content and when called, to write the content to the servlet response, stopping the request cycle. igor.vaynberg wrote: if i got it right what you are doing is reading a bunch of files and combining the result now you dont want to use cache infront of the appserver because the page isnt really static like you said the page itself is just a label that spits out the result of the concatenated text correct? so there is little point to caching the page. what you really want to do is to cache the expensive operation which isnt creating the page but loading/concatenating that text so what you do is create a concurrenthashmap that lives in application scope, this map will house the results of your loaded+concatenated text via softreferences so the model for you label becomes like this new abstractreadonlymodel() { Object getobject() { Map map=getapplication().getcache(); Key key=..construct cache key used to identify the result String text=map.get(key); if (text==null) { text=constructcontent(); map.put(key, text); } return text; } -igor On 2/18/07, Ittay Dror [EMAIL PROTECTED] wrote: i didn't follow. can you please elaborate? where will the map be used? igor.vaynberg wrote: i wouldnt cache the page but i would cache the concatenated result you can have a concurrenthashmap in your application keeping softreferences to the concatted text will that work? -igor On 2/18/07, Ittay Dror [EMAIL PROTECTED] wrote: i read this post already ;) i don't want to add another framework on top of wicket (reverse-caching HTTP accelerator). and my pages are not exactly static. i read several static files and combine them (i read the content from one file, a table of contents from another and add a Label component whose value is the file name). once the page is assembled, it is stateless. So what I'm looking for is saving the assembled code, so when the page is requested again, the saved data is served, instead of going through the cycle flow again. Jonathan Locke wrote: http://jroller.com/page/JonathanLocke?entry=static_web_sites_in_wicket read post and comments. Ittay Dror wrote: Hi, How can I cache rendered pages (the pages I want to cache are composed dynamically, but from a static content. So after composition they rarely (even never) change)? Thanks, Ittay -- View this message in context: http://www.nabble.com/rendered-pages-cache-tf3247749.html#a9032949 Sent from the Wicket - User mailing list archive at Nabble.com. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- View this message in context: http://www.nabble.com/rendered-pages-cache-tf3247749.html#a9033148 Sent from the Wicket - User mailing list archive at Nabble.com. - Take Surveys. Earn Cash. Influence the Future of IT Join
[Wicket-user] An issue while using IAutoCompleteRenderer
Hi all I am trying to use a renderer which implements IAutoCompleteRenderer for auto completion on a textfield. My problem is in the case when there are no matching Strings to the input in render method [Because renderHeader always gets called ..thats what i figured] I was trying to directly implement this interface so that i cud customize the result using some html other that just li tags for example. So while it works just fine when there are inputs, the problem comes up when there are no matching results. Thats when it looks bad in the UI. My custom html shows up with no results. So i was wondering whether it was possible for wicket to figure out in any way that there are no matching results and hence shud NOT output the header and footer ? Thanks swaroop belur - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] How to include *.htc files in css files?
Let me investigate it a bit further when I'm near IE6 again. If nothing else works you have to make the URL absolute in the css. I'll create an issue to track it. Frank On 2/18/07, Eelco Hillenius [EMAIL PROTECTED] wrote: Any ideas on how this might be fixed (accept for telling people not to use a retarded browsers like IE)? Can we open an issue for it to track it? Eelco On 2/18/07, Frank Bille [EMAIL PROTECTED] wrote: Oh yeah that was 1.3. So sorry no luck. It has nothing to do with how wicket handles urls, but how IE interprets url() for behavior. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user