Re: JPA best-practices?
Chris Colman wrote: The obvious benefit in such an approach is that your POJO model and the services that you provide to implement business rules etc., remain completely portable to different persistence engines - ie., no vendor lock in. well, i thought that was JPA was all about !? No, definitely not! JPA was all about creating a standard that Hibernate could conform to. Remember there *already* was a standard for Java persistence: JDO. JDO implementations such as JPOX and others implement both JDO (obviously) and JPA but it is not possible for Hibernate to provide all the features of JDO and so it could never implement the JDO standard - hence a less powerful standard had to be created so that Hibernate could play the standards game. It seems it's also possible for a few other ORM tools to conform to that standard. Apart from Hibernate and JPOX you've got TopLink, Cayenne and others. Which would you rather depend on; exPOJO or JPA? /Anders - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multi-file upload and ListView together
you could try with a simpler model? and see if that works? (so just new Model()) On Nov 13, 2007 8:22 AM, Franklin Antony [EMAIL PROTECTED] wrote: Thanks Igor but it doesnt seem to work still. Just some more hints: I have the listview on a form and the form is on the page. The uploads collection object is on the form. It keeps telling me that there is no such uploads object on the page and so I changed the call from MultiFileUploadField ff=new MultiFileUploadField(file_input,new PropertyModel(this,uploads),3); to MultiFileUploadField ff=new MultiFileUploadField(file_input,new PropertyModel(MyForm.this,uploads),3); Still doest work. So now i add the collections uploads directly to the page and make call like this MultiFileUploadField ff=new MultiFileUploadField(file_input,new PropertyModel(MyPage.this,uploads),3); Now there is some light in this direction. Only the last set of files in the listview go inside the uploads collection. I really wish if someone could shed some light on this. Wicket has been so easy to use up to now. But I am getting confused with how it will handle the model in case of reapeaters. I need all the repeaters to use the same collections object. Thanks for all the help Igor, Franklin igor.vaynberg wrote: did you call listview.setreuseitems(true) it is usually easier if you provide a quickstart... -igor On Nov 12, 2007 7:28 AM, Franklin Antony [EMAIL PROTECTED] wrote: Dear Friends, I am having a problem with putting MultiFileUploadField inside a ListView. I am following the example, but somehow the uploads collection is not getting populated with the files. However when I directly add the MultiFileUploadField on a form everything seems to work. Could someone please shed some light on this. Here is some code snippet List ls = Arrays.asList(new String[]{Passport }); ListView pl = new ListView(plist,ls) { protected void populateItem(ListItem arg0) { MultiFileUploadField ff=new MultiFileUploadField(file_input,new PropertyModel(this,uploads),3); fileUploadList.add(ff); fileUpload.add(ff); arg0.add(ff); } }; And the listview is on a form and the collections(uploads) is on the form to just as in the example. I am sure its something with the component hierarchy. But not sure how to call the uploads correctly. I think there is something wrong with the expression. Thanks, Franklin -- View this message in context: http://www.nabble.com/Multi-file-upload-and-ListView-together-tf4791788.html#a13707621 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Multi-file-upload-and-ListView-together-tf4791788.html#a13720963 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: Multi-file upload and ListView together
I need to give it a Model that holds a collection so I did something like this Model mode = new Model() { Object getObject() { Collection holder = new ArrayList(); return holder; } } Then I do this. MultiFileUploadField ff=new MultiFileUploadField(file_input,model,3); Still it gives problems. I still dont know how will I get a handle on all the files I have added. Please correct me if I am wrong somewhere Again this is a MultiFileUploadField in a ListView which is on a From. I just want to know where should I define my collections. Should be on the Page or Form or somewhere else. Thanks, Franklin. Johan Compagner wrote: you could try with a simpler model? and see if that works? (so just new Model()) On Nov 13, 2007 8:22 AM, Franklin Antony [EMAIL PROTECTED] wrote: Thanks Igor but it doesnt seem to work still. Just some more hints: I have the listview on a form and the form is on the page. The uploads collection object is on the form. It keeps telling me that there is no such uploads object on the page and so I changed the call from MultiFileUploadField ff=new MultiFileUploadField(file_input,new PropertyModel(this,uploads),3); to MultiFileUploadField ff=new MultiFileUploadField(file_input,new PropertyModel(MyForm.this,uploads),3); Still doest work. So now i add the collections uploads directly to the page and make call like this MultiFileUploadField ff=new MultiFileUploadField(file_input,new PropertyModel(MyPage.this,uploads),3); Now there is some light in this direction. Only the last set of files in the listview go inside the uploads collection. I really wish if someone could shed some light on this. Wicket has been so easy to use up to now. But I am getting confused with how it will handle the model in case of reapeaters. I need all the repeaters to use the same collections object. Thanks for all the help Igor, Franklin igor.vaynberg wrote: did you call listview.setreuseitems(true) it is usually easier if you provide a quickstart... -igor On Nov 12, 2007 7:28 AM, Franklin Antony [EMAIL PROTECTED] wrote: Dear Friends, I am having a problem with putting MultiFileUploadField inside a ListView. I am following the example, but somehow the uploads collection is not getting populated with the files. However when I directly add the MultiFileUploadField on a form everything seems to work. Could someone please shed some light on this. Here is some code snippet List ls = Arrays.asList(new String[]{Passport }); ListView pl = new ListView(plist,ls) { protected void populateItem(ListItem arg0) { MultiFileUploadField ff=new MultiFileUploadField(file_input,new PropertyModel(this,uploads),3); fileUploadList.add(ff); fileUpload.add(ff); arg0.add(ff); } }; And the listview is on a form and the collections(uploads) is on the form to just as in the example. I am sure its something with the component hierarchy. But not sure how to call the uploads correctly. I think there is something wrong with the expression. Thanks, Franklin -- View this message in context: http://www.nabble.com/Multi-file-upload-and-ListView-together-tf4791788.html#a13707621 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Multi-file-upload-and-ListView-together-tf4791788.html#a13720963 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] -- View this message in context: http://www.nabble.com/Multi-file-upload-and-ListView-together-tf4791788.html#a13722270 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: Serialization of pages in a cluster/load-balancer environment ?
So replication of serialized pages (on the disk) is also taken care of, for which one doesnt need to worry about nything..? igor.vaynberg wrote: afaik the current pagestore will save the page to disk after its been replicated...or was that another pagestore subclass you were working on matej? so that way every node you replicate to has a full copy of all the pages from the source node. -igor On Nov 12, 2007 6:06 PM, mfs [EMAIL PROTECTED] wrote: I am talking of the scenario where the old page instances (and their model) are serialized to the disk ? how would those be synchronised on the other machine/server in the cluster ? Farhan. igor.vaynberg wrote: wicket stores its pages in session, so if your sessions are replicated within the cluster you should have no problem -igor On Nov 12, 2007 4:42 PM, mfs [EMAIL PROTECTED] wrote: Hi Guys, Another question relating to the serialization of pages, so lets say we have multiple instance of an application deployed in a load-balancing environment, now lets stay in case of wizard type use-case if subsequent requests get forwarded to different server (based on load sharing), would the serialized page-components and the model data be synchronized to the other servers in the cluster ? given the default implementation of the page-store..? how would that work ? Thanks and Regards, Farhan. -- View this message in context: http://www.nabble.com/Serialization-of-pages-in-a-cluster-load-balancer-environment---tf4795023.html#a13717677 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/Serialization-of-pages-in-a-cluster-load-balancer-environment---tf4795023.html#a13718547 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/Serialization-of-pages-in-a-cluster-load-balancer-environment---tf4795023.html#a13722291 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: Strange behavior with DropDownChoice and PropertyModel
Timo Rantalaiho wrote: What's the point of this method? And why is it calling modelChanging and modelChanged? I think that normally you don't call them themselves, just override them to react when the framework calls them. Best wishes, Timo Well, I use this method to edit a record. The form is bound with the field formTarget. When called, it loads data in formTarget from the parameter. If I don't call modelChanging/modelChanged, some components like DropDownChoices aren't properly inited, and they select old cached values. I don't know if it is a bug or if I wrote something wrong... -- View this message in context: http://www.nabble.com/Strange-behavior-with-DropDownChoice-and-PropertyModel-tf4778358.html#a13722626 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: question about HybridUrlCodingStrategy
Turns out I had a listview on the page which was generating new versions of the page. Setting setReuseItems(true) solved the versioning problem. (Which was basically the only real problem I was having). Regards, Sebastiaan Sebastiaan van Erk wrote: Hi, Thanks for the reply! Actually, in some cases the page is not stateless all the time (which is why I use that strategy), i.e. it starts out on a stateless form. Another reason why I use it on non-stateless pages is because the URL looks so much better. ;-) Anyway, I do use Link, so yes that would make it stateful I guess. I would like to do it in a non-stateful manner, but I don't really know how. Currently my ChangeLocaleLink looks like this: public class ChangeLocaleLink extends Link { private final Locale locale; public ChangeLocaleLink(final String id, final Locale locale) { super(id); this.locale = locale; add(new ContextImage(flagImage, new Model(images/flag_ + locale + .gif))); } @Override public void onClick() { getSession().setLocale(locale); } @Override public boolean isEnabled() { return getSession().getLocale() != locale; } } Regards, Sebastiaan Matej Knopp wrote: If the page is stateless, why are you using hybrid url coding strategy for it? You should just mount it. Also, even more important thing, is the page really stateless? Stateless pages don't have versions. Link is not a stateless component so if you use it on a page, it will make it statefull. As for why the locale changes version, I don't know. How does your link's onClick handler look like? -Matej On Nov 12, 2007 6:33 PM, Sebastiaan van Erk [EMAIL PROTECTED] wrote: Hi, I have a page mounted using the hybrid coding strategy. In the page I have a language link, to change the locale in the session (to show another language). Now what happens is, I have http://mysite/mypage.1.1 (in Dutch) click English link http://mysite/mypage.1.2 (in English) click browser back button http://mysite/mypage.1.1 (in Dutch) click browser reload button http://mysite/mypage.1.1 (in English!) I was wondering if I could make it switch language without changing the page version, since it seems that it makes no difference anyhow: the language is determined by the session and not by the page version (as proved by the reload above). Furthermore, the page is *stateless*, so I was wondering how I could keep it that way even with the language link. The problem is that the language link is in the base page and knows nothing about the real page (if it's bookmarkable, mounted, etc). I currently use a Link and just set the locale on the web session... Regards, Sebastiaan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] smime.p7s Description: S/MIME Cryptographic Signature
Re: Multi-file upload and ListView together
Dear All, I am badly in need to implement this. Therefore I am placing the code here I really didnt want to do this. I have a feeling I am placing the collections in the wrong place. import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.Date; import java.util.Iterator; import java.util.List; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.wicket.Application; import org.apache.wicket.Component; import org.apache.wicket.PageParameters; import org.apache.wicket.extensions.ajax.markup.html.form.upload.UploadProgressBar; import org.apache.wicket.markup.html.WebPage; import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.markup.html.form.Form; import org.apache.wicket.markup.html.form.TextField; import org.apache.wicket.markup.html.form.upload.FileUpload; import org.apache.wicket.markup.html.form.upload.FileUploadField; import org.apache.wicket.markup.html.form.upload.MultiFileUploadField; import org.apache.wicket.markup.html.link.BookmarkablePageLink; import org.apache.wicket.markup.html.link.Link; import org.apache.wicket.markup.html.link.PopupSettings; import org.apache.wicket.markup.html.list.ListItem; import org.apache.wicket.markup.html.list.ListView; import org.apache.wicket.markup.html.list.PageableListView; import org.apache.wicket.markup.html.panel.FeedbackPanel; import org.apache.wicket.model.IModel; import org.apache.wicket.model.LoadableDetachableModel; import org.apache.wicket.model.Model; import org.apache.wicket.model.PropertyModel; import org.apache.wicket.util.file.Files; import org.apache.wicket.util.file.Folder; import org.apache.wicket.util.lang.Bytes; import org.apache.wicket.util.tester.DummyHomePage; import com.datelservices.domain.Attachment; import com.datelservices.util.upload.dao.PassportDocDAO; public class FileUploadPage extends WebPage{ public List fileUpload = new ArrayList(); public Collection pageUploads = new ArrayList(); public Collection getPageUploads() { return pageUploads; } PropertyModel pmPage ; private class FileUploadForm extends Form { private Collection formUploads = new ArrayList(); PropertyModel pmForm =new PropertyModel(this,formUploads); public Collection getFormUploads() { return formUploads; } public FileUploadForm(String name) { super(name); setMultiPart(true); List ls = Arrays.asList(new String[]{Passport ,Scan ,Many More }); //FileListView pl = new FileListView(plist,ls); ListView pl = new ListView(plist,ls) { protected void populateItem(ListItem arg0) { MultiFileUploadField ff=new MultiFileUploadField(file_input,new PropertyModel(FileUploadPage.this,pageUploads),3); arg0.add(ff); arg0.add(new Label(lbb,arg0.getModelObjectAsString())); } }; pl.setReuseItems(true); add(pl); // Set maximum size double maxLimit = ((UploadApplication)Application.get()).getConfigProperty().getMaxFileUploadSize(); System.out.println(File upload limit is + maxLimit); setMaxSize(Bytes.kilobytes(maxLimit)); } /** * @see org.apache.wicket.markup.html.form.Form#onSubmit() */ protected void onSubmit() { System.out.println($$$uploads1+getFormUploads().iterator().hasNext()); //System.out.println($$$uploads2+((ArrayList)pmPage.getObject()).size()); //System.out.println($$$uploads2.1+((ArrayList)FileUploadPage.this.pmPage.getObject()).size()); //System.out.println($$$uploads3+((ArrayList)pmForm.getObject()).size()); System.out.println($$$uploads5+fileUpload.size()); System.out.println($$$uploads99+FileUploadForm.this.formUploads.size()); System.out.println($$$uploads99+FileUploadPage.this.pageUploads.size()); System.out.println(getting iterator); //Iterator it = ((ArrayList)FileUploadPage.this.pm.getObject()).iterator(); Iterator it =
RE: JPA best-practices?
Chris Colman wrote: It seems it's also possible for a few other ORM tools to conform to that standard. Apart from Hibernate and JPOX you've got TopLink, Cayenne and others. That's my point. Which would you rather depend on; exPOJO or JPA? Two different things: exPOJO is a lightweight, dependency injection framework with support for the exposed POJO domain model pattern for highly productive app development. It provides a very concise and simple interface declaring the essential generic services of a transparent persistence engine. 'Transparent' is the key word here so the interface needs only be extremely minimal but this generic interface is massively powerful. Out of the box it has JDO and Hibernate implementations of this interface and others (including JPA) can be supported in under 60 minutes if required. JPA is a different thing altogether - it's an ORM standard. The trouble is that it had to make compromises to allow certain popular ORMs to implement it. exPOJO does not try to be another ORM standard. It just takes the best the exposed domain model pattern has to offer and uses that such that the only components with engine specific references are the repository components that you build that have engine specific queries in them. All the rest can be handled generically. /Anders - 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: Problem with DefaultDataTable filtering?
bwahahahahaha. ahem. To each his own, I suppose. On Nov 13, 2007 12:26 AM, Eelco Hillenius [EMAIL PROTECTED] wrote: On Nov 12, 2007 6:33 PM, anita nichols [EMAIL PROTECTED] wrote: Please unsubscribe Nah. Nick is a good guy. Let's keep him around ;-) Eelco - 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]
AbstractAjaxTimerBehavior question
I have a page with an AbstractAjaxTimerBehavior that I only use between button clicks. (The work after a button click takes a while and I use this behavior to update a progress bar while the work is happening) I was wondering if either a) Is there a way to restart a timer behavior after I stop it? or b) When the timer behavior is active, it always scrolls to the focused component when it is called, this is aggravating if you have a large page and cant get to the bottom because it pops back to the top every 5 seconds... Is there a way to keep the window from scrolling to the last focused component (or unfocus all components) when the onTimer is called? Or c) Is there a totally different/better way to approach my problem? Thanks for any advice!! -Clay
Re: Disabling serialization/storage of pages in session?
I think your example should be simplified to include only Page A. Imagine the Facebook profile page: - You can add a wall post and after that you land on the same page with the new post shown on top. - This (in Wicket's way) should create 2 versions of your FB profile page. One with the posted message (v2) and the one before that (v1). - Now a back link from v2 should (if you have used PageMap) bring you to the version 1 state of the profile page. Johan, Please correct me if I am wrong. - Aqeel mfs wrote: In what context are you refering to the back button here...Lets say we have two page instances of type Page-A through which we landed on Page-B which has a back button on it, now clicking the back butoon should load the Page A from the pageMap since its last accessed instance of Page-A...isnt it ? Why do you say that pressing the back button once will load the page from the disk... Johan Compagner wrote: if you press the back button only once then the page needs to come from disk. So if your users never use the back button then yes you only need to have the last accessed page in the pagemap. johan On Nov 9, 2007 10:36 PM, mfs [EMAIL PROTECTED] wrote: I agree..and i would say its mostly the nature of the applications which would help determining whether storing the data in the wicket session would be a good idea or not... Further i believe that 99% of the times one just comes to the need of accessing the last page-instances (lets say through back button link or otherwise doing a refresh if on the same page)...i still couldnt think of scenarios where the older page-instances (which are being serialized) would come to help...If someone could discuss/point some of those sceanrio/use-cases..that would be helpful..and would be able to better justify the wicket's default behavior of serializing. Thanks and Regards, Farhan. Gwyn wrote: Hi, It's not hard to do it with Wicket, but I'm fairly sure that for the typical web-app, the metrics showed that the a re-request to database wasn't a big issue, whereas the gain in terms of reducing the session size was, especially where it needs replicating. As such, the recommendation is as it is, but it's not one-size-fits-all, and if you have a large enough percentage of non-DB-cachable operations in the DB-layer, you can store the results in the session, etc, without much of a problem. It's not going to be so built-in as to be trivial, though, as we want to make it clear that anyone doing that is going against the flow. On 09 November 2007, 9:03:31 AM, serban.balamaci wrote: sb Most database expensive operations come from the result of stored sb procedures(my current experience at least). A cache solution can be sb implemented by caching the method results with spring(in case of using sb spring) but is a heavy(difficult) thing to maintain that cache per user - sb http session is a nice and easy storage for that-. sb Eelco Hillenius wrote: You should use a second level cache to cache objects and queries from your database; and that's not Wicket's job, Wicket is a Web framework. For example, use Hibernate + ehcache. Yep. That way you'll avoid redundancy in caching, and have caching regardless of whatever UI framework you're using. and using e.g. ehcache can do things for you like limit the RAM cache and overflow to disk. Etc. Eelco -- /Gwyn - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Disabling-serialization-storage-of-pages-in-session--tf4768006.html#a13675586 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] -- View this message in context: http://www.nabble.com/Disabling-serialization-storage-of-pages-in-session--tf4768006.html#a13726523 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Firefox : Refresh problem
I seem to be having a refresh problem with the main page of my wicket application. I am displaying a number of panels that are wrapped in a ListView. The contents of each panel is build up from the database. If I refresh the page with either (F5 or clicking the refresh button, or holding down shift+refresh button), then it works fine, for a little while (15 min if I had to guess). After that, if I take any action to refresh the page, then it doesn't refresh the page. However, if I close the current tab, and open a new tab, then the updated data is displayed. I am guessing that either the page and/or session times out, and Firefox does not refresh the page properly. I did consider placing a meta-refresh tag in the page, which would refresh the page every 5 minutes or so. - wicket 1.2.6 - tomcat 5.5.20 - hibernate 3.2 - spring 2.0.7 Any suggestions would be welcome -- View this message in context: http://www.nabble.com/Firefox-%3A-Refresh-problem-tf4798170.html#a13727041 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
data tables and debugging session serialization
I'm having some strange behavior with a DataTable and the back button. When I back up to the page with the DT, it rerenders fine, but all my object state is gone. I click a link and the object is there but not the ID in the the object so that I get hibernate errors trying to load without an ID. I have some suspicions about my model objects but I'm not sure how to watch what gets stored in the session and what gets pulled back out when the page is rerendered due to the back button. Anyone have an idea of how I might track this down? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JPA best-practices?
Al Maw schrieb: Hi Al Subclass WebRequestCycle, and construct it with an EntityManager. thanks! That may well be an alternative to the common ServletFilter-pattern. One question: isn´t it a little better to have the ThreadLocal Holder for the EntityManager separate from the RequestCycle, but notified of its events? Somewhat a 'listener' that registers itself ? This would decouple things as well as make configuration at runtime easier. (The 'Favor decoration over inheritance' thing.) What am i missing? -- THOMAS DAILY GmbH Adlerstraße 19 79098 Freiburg Deutschland T + 49 761 3 85 59 0 F + 49 761 3 85 59 550 E [EMAIL PROTECTED] www.thomas-daily.de Geschäftsführer/Managing Directors: Wendy Thomas, Susanne Larbig Handelsregister Freiburg i.Br., HRB 3947 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Apache Wicket 1.3.0-rc1 released!
Philip A. Chapman schrieb: +1 GENERICS! me too ;) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JPA best-practices?
Uwe Schäfer wrote: Subclass WebRequestCycle, and construct it with an EntityManager. thanks! That may well be an alternative to the common ServletFilter-pattern. Well, err, yes. ;-) One question: isn´t it a little better to have the ThreadLocal Holder for the EntityManager separate from the RequestCycle, but notified of its events? Somewhat a 'listener' that registers itself ? If you have one, then sure. Whatever feels cleanest to you. There is no single best way with all this stuff. My DAOs actually use Spring's HibernateTemplate, so getting hold of a session in there is done using sessionFactory.getCurrentSession(). It's a bit different in your case with JPA stuff. This would decouple things as well as make configuration at runtime easier. (The 'Favor decoration over inheritance' thing.) What am i missing? Nothing, it sounds like. ;-) Regards, Al - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: data tables and debugging session serialization
please unsubscribe :) On Nov 13, 2007 8:59 AM, Evan Chooly [EMAIL PROTECTED] wrote: I'm having some strange behavior with a DataTable and the back button. When I back up to the page with the DT, it rerenders fine, but all my object state is gone. I click a link and the object is there but not the ID in the the object so that I get hibernate errors trying to load without an ID. I have some suspicions about my model objects but I'm not sure how to watch what gets stored in the session and what gets pulled back out when the page is rerendered due to the back button. Anyone have an idea of how I might track this down? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
something unclear on page encodings in different character sets
Hi, I had a small question on the use of different character sets in resource encodings It seems that the parse() function of the MarkupParser contains this code xmlParser.parse(markupResourceData.getResource().getInputStream(), markupSettings.getDefaultMarkupEncoding()); So the defaultMarkupEncoding in the settings determines how any html resource (page) should be dealt with. All resources that inherit from AbstractResourceStream contain the method getCharset(). Wouldn't it be an option to use this method to determine how the resourcestream should be dealt with? -- View this message in context: http://www.nabble.com/something-unclear-on-page-encodings-in-different-character-sets-tf4798696.html#a13728623 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Wicket Meetup AMSTERDAM in 2 weeks!
Hi all, Here's a reminder that the Amsterdam Meetup is in slightly more than 2 weeks time! If you'd like to know more about Wicket, feel free to join us! The meetup is in an informal setting, with over 35 attendees already, and will give you some fast-paced insight in what Wicket exactly is and how to use it. Attending is simple: simply add your name to the wiki page and you're all set! http://cwiki.apache.org/WICKET/community-meetups.html Thanks to our sponsors, the meetup is free for all. We've been trying to make this meeting as low-barrier as possible, to give everyone an opportunity to dive into Wicket and get to know the people behind this excellent web framework. See you all in Amsterdam on November 30th ! -- Arjé Cahn --- Some background on the Wicket meetup: The Amsterdam meetup is meant for everyone interested in Wicket, on all different expertise levels. If you want to get started with Wicket, or you need some more background information, are an expert committer, or even when you've never even touched a single line of code, you're more than welcome! Ideas for sessions include: - Ask-a-committer (bring your code and get some advice from the committers) - Maurice Marrink: Help on Wicket stuff projects. If anyone has any questions / problems about / with wasp or swarm they can not / will not ask on the mailing list, they are free to ask me on the conference and I'll do my best assist them. If they bring there projects with them it will be even easier to do so. - Martin Funk: I could throw in a 10 minute presentation about wicket-contrib-gmap2. - Ate Douma: I can answer Everything you always wanted to know but were afraid to ask about Wicket Portlet support, as well as provide a presentation/demo if there is enough interest for it - Based on Ruby meetup successes, we could split the sessions in two: an Experienced track and a Beginners track, for those people that are interested in Wicket but need the right arguments to sell it to their bosses. Possibly rename this to Is Wicket suitable for my CMS/Webapp/?. - Wouter: I'd like a 'best practices' discussion on some of the topics that have passed on the list recently. - codestr0m (C. Bergström): Put together a plan for a simple two node terracotta demo. If a real tc guru can come maybe some q/a If you have any other ideas, feel free to add them to the list!
Re: Disabling serialization/storage of pages in session?
its pretty accurate yes but a back link on V2 to V1 is a pretty special made thing Because there is normally not really a link to a previous page. Because on the javaside you don't know that really. But you can ask for a specific page version if you want. johan On Nov 13, 2007 3:07 PM, Aqeel [EMAIL PROTECTED] wrote: I think your example should be simplified to include only Page A. Imagine the Facebook profile page: - You can add a wall post and after that you land on the same page with the new post shown on top. - This (in Wicket's way) should create 2 versions of your FB profile page. One with the posted message (v2) and the one before that (v1). - Now a back link from v2 should (if you have used PageMap) bring you to the version 1 state of the profile page. Johan, Please correct me if I am wrong. - Aqeel mfs wrote: In what context are you refering to the back button here...Lets say we have two page instances of type Page-A through which we landed on Page-B which has a back button on it, now clicking the back butoon should load the Page A from the pageMap since its last accessed instance of Page-A...isnt it ? Why do you say that pressing the back button once will load the page from the disk... Johan Compagner wrote: if you press the back button only once then the page needs to come from disk. So if your users never use the back button then yes you only need to have the last accessed page in the pagemap. johan On Nov 9, 2007 10:36 PM, mfs [EMAIL PROTECTED] wrote: I agree..and i would say its mostly the nature of the applications which would help determining whether storing the data in the wicket session would be a good idea or not... Further i believe that 99% of the times one just comes to the need of accessing the last page-instances (lets say through back button link or otherwise doing a refresh if on the same page)...i still couldnt think of scenarios where the older page-instances (which are being serialized) would come to help...If someone could discuss/point some of those sceanrio/use-cases..that would be helpful..and would be able to better justify the wicket's default behavior of serializing. Thanks and Regards, Farhan. Gwyn wrote: Hi, It's not hard to do it with Wicket, but I'm fairly sure that for the typical web-app, the metrics showed that the a re-request to database wasn't a big issue, whereas the gain in terms of reducing the session size was, especially where it needs replicating. As such, the recommendation is as it is, but it's not one-size-fits-all, and if you have a large enough percentage of non-DB-cachable operations in the DB-layer, you can store the results in the session, etc, without much of a problem. It's not going to be so built-in as to be trivial, though, as we want to make it clear that anyone doing that is going against the flow. On 09 November 2007, 9:03:31 AM, serban.balamaci wrote: sb Most database expensive operations come from the result of stored sb procedures(my current experience at least). A cache solution can be sb implemented by caching the method results with spring(in case of using sb spring) but is a heavy(difficult) thing to maintain that cache per user - sb http session is a nice and easy storage for that-. sb Eelco Hillenius wrote: You should use a second level cache to cache objects and queries from your database; and that's not Wicket's job, Wicket is a Web framework. For example, use Hibernate + ehcache. Yep. That way you'll avoid redundancy in caching, and have caching regardless of whatever UI framework you're using. and using e.g. ehcache can do things for you like limit the RAM cache and overflow to disk. Etc. Eelco -- /Gwyn - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Disabling-serialization-storage-of-pages-in-session--tf4768006.html#a13675586 Sent from the Wicket - User mailing list archive at Nabble.com http://nabble.com/http://nabble.com/ . - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Disabling-serialization-storage-of-pages-in-session--tf4768006.html#a13726523 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: ResourceStream
+++ Johan Compagner [wicket-users] [Tue, Nov 06, 2007 at 05:40:37PM +0100]: On 11/5/07, Andrew MacKenzie [EMAIL PROTECTED] wrote: Wicket 1.2 I've created my own implmentation of AbstractResourceStream to fetch the content for some pages from another location (they are generated by another site). One thing I'm not sure of is how often wicket will re-fetch this resource from my code. I notice a lastModifiedTime() function I have to implement, and I wonder if wicket uses that to determine a timeout? Does wicket do caching here or should I? wicket doesn't do the caching of the result of the AbstractResourceStream Wicket only passes that lastmodifiedtime to the browser, which should on his turn do the caching. I'm good with that... So if you are sure that your stuff doesn't have to be updated a lot then you should cache it For every different client/browser we will call the data. Well, I've got it up and running, but it appears that Wicket is caching 'something' because it is only requesting the content once (the first time it's hit). Even if the requests come from different browsers. Is there any documentation on how the resources are stored and used? Can I force wicket to 'refresh' content? I've tried both deployment and development mode, and they seem to behave the same. Here's my code from the Application for reference (maybe I'm setting this up incorrectly?): CompoundResourceStreamLocator locator = (CompoundResourceStreamLocator) getResourceSettings().getResourceStreamLocator(); locator.add(0, new MyResourceLocator()); Remember, wicket 1.2. -- // Andrew MacKenzie | http://www.edespot.com // GPG public key: http://www.edespot.com/~amackenz/public.key // If my theory of relativity is proven successful, Germany will claim // me as a German and France will declare that I am a citizen of the // world. Should my theory prove untrue, France will say that I am a // German and Germany will declare that I am a Jew. // -- Albert Einstein pgpAKSsB1WHN9.pgp Description: PGP signature
Problem deploying the app as portlet in Jetspeed
Hi all, I tried to deploy my application as portlet in jetspeed and it's complaining about Initialization failure I can't find anything useful in the logs I am using Jetspeed 2.1.2 and my app is build against the wicket trunk. I have given the following in my portlet.xml init-param nameServletContextProvider/name valueorg.apache.jetspeed.portlet.ServletContextProviderImpl/value /init-param init-param namePortletResourceURLFactory/name valueorg.apache.jetspeed.portlet.PortletResourceURLFactoryImpl/value /init-param and the following in web.xml servlet servlet-nameJetspeedContainer/servlet-name display-nameJetspeed Container/display-name descriptionMVC Servlet for Jetspeed Portlet Applications/description servlet-classorg.apache.jetspeed.container.JetspeedContainerServlet/servlet-class init-param param-namecontextName/param-name param-valueFAB/param-value /init-param load-on-startup100/load-on-startup /servlet servlet-mapping servlet-nameJetspeedContainer/servlet-name url-pattern/container/*/url-pattern /servlet-mapping has anyone seen this before ? Regards Dipu - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Doubleclicking on a refreshable Ajax button
Hi everyone! I'm having a problem with an ajax button and I'd like to ask for help X-) I have a DataTable with a Button, a text field and a label on every row. My objective is to be able to insert data into the text field, then click on the button and have an ajax call which 1) renders the label according to the input and 2) hides the button. Everything is fine as long as I press the button a single time, but if (by accident) I doubleclick, I get an exception like: WicketMessage: component frmDettaglio:dettaglio:tabella:rows:1:cells:1:cell:button not found on page it.ibc.moduli.movimenti.DettaglioMovimenti[id = 4], listener interface = [RequestListenerInterface name=IBehaviorListener, method=public abstract void org.apache.wicket.behavior.IBehaviorListener.onRequest()] Root cause: org.apache.wicket.WicketRuntimeException: component frmDettaglio:dettaglio:tabella:rows:1:cells:1:cell:button not found on page it.ibc.moduli.movimenti.DettaglioMovimenti[id = 4], listener interface = [RequestListenerInterface name=IBehaviorListener, method=public abstract void org.apache.wicket.behavior.IBehaviorListener.onRequest()] at org.apache.wicket.request.AbstractRequestCycleProcessor.resolveListenerInterfaceTarget(AbstractRequestCycleProcessor.java:394) at org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(AbstractRequestCycleProcessor.java:440) at org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:139) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1091) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1177) at org.apache.wicket.RequestCycle.request(RequestCycle.java:500) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:261) at org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:126) I think this is because there are two ajax calls, and since the first one alters the DOM (or maybe the serverside state - the button needs to be hidden) the second one can't find the new button anymore.. Is there a way to suppress one of the two calls? Many thanks for your attention! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Add fields Dynamically
Hi I need to add fields to a page dynamically. I neet do build something like a survey where the questions and answers are stored on the database, so they can be changed by the administrator because this I can't create the HTML file with the fields Is there a way to do this? Thank you Marco
Error Page
Hi, I've a question which is a little bit offtopic. I'm using a tomcat webserver and configured a error-page for error 404. In case such a error occures, do I have the possibilty to find out which page was originally requested by the user??? My error page is a .jsp so I'm able to access the HttpServletRequest, but I've also extended the WicketServlet class, so I'm also able to access anything there. Any ideas? -- View this message in context: http://www.nabble.com/Error-Page-tf4799850.html#a13732233 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: Add fields Dynamically
Thank you Nick, I will look for this mail! On Nov 13, 2007 4:00 PM, Nick Heudecker [EMAIL PROTECTED] wrote: Hi Marco, This question has been asked a few times on the list. The solution is to create a panel for each question type. This is exactly what I did for the surveys on Eventful. On Nov 13, 2007 12:58 PM, Marco Aurélio Silva [EMAIL PROTECTED] wrote: Hi I need to add fields to a page dynamically. I neet do build something like a survey where the questions and answers are stored on the database, so they can be changed by the administrator because this I can't create the HTML file with the fields Is there a way to do this? Thank you Marco -- Nick Heudecker Professional Wicket Training Consulting http://www.systemmobile.com Eventful - Intelligent Event Management http://www.eventfulhq.com
Re: ResourceStream
+++ Andrew MacKenzie [wicket-users] [Tue, Nov 13, 2007 at 11:45:46AM -0500]: Well, I've got it up and running, but it appears that Wicket is caching 'something' because it is only requesting the content once (the first time it's hit). Even if the requests come from different browsers. I've been digging a bit more - looks like wicket *does* cache things, and polls at configurable intervals to determine whether the resource has changed. For me this is less than ideal.. I had assumed that every request to wicket for a resource would result in my AbstractResourceStream being invoked for the body. My problem is that my ResourceStream is similar to wicket.util.resource.UrlResourceStream only it also sends along cookie information. This is because the remote resource will be different for each user (will display the user's login name). If this is cached at all there is a possibility of another user seeing the wrong content. I can minimize this by making the polling interval very short, but there is always the possibility. Can I tell wicket to ignore the polling and always query the resource for the content? -- // Andrew MacKenzie | http://www.edespot.com // GPG public key: http://www.edespot.com/~amackenz/public.key // Persons attempting to find a motive in this narrative will be prosecuted; // persons attempting to find a moral in it will be banished; persons attempting // to find a plot in it will be shot. By Order of the Author // -- Mark Twain, Tom Sawyer pgpP616PS3cIO.pgp Description: PGP signature
Re: Add fields Dynamically
Marco Aurélio Silva wrote: So, I can create a panel to each type of answer (input, dropDown, radio...) but how to add dynamic number of panels? Look at the Repeater examples at http://wicketstuff.org/wicket13 . Regards, Al - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Serialization of pages in a cluster/load-balancer environment ?
No. The old pages (serialized to disk) are only saved on one node, unless you have some kind of distributed page store. In the (possibly near) future we might support automatic replication of page store. It's on my todo list :) -Matej On Nov 13, 2007 10:17 AM, mfs [EMAIL PROTECTED] wrote: So replication of serialized pages (on the disk) is also taken care of, for which one doesnt need to worry about nything..? igor.vaynberg wrote: afaik the current pagestore will save the page to disk after its been replicated...or was that another pagestore subclass you were working on matej? so that way every node you replicate to has a full copy of all the pages from the source node. -igor On Nov 12, 2007 6:06 PM, mfs [EMAIL PROTECTED] wrote: I am talking of the scenario where the old page instances (and their model) are serialized to the disk ? how would those be synchronised on the other machine/server in the cluster ? Farhan. igor.vaynberg wrote: wicket stores its pages in session, so if your sessions are replicated within the cluster you should have no problem -igor On Nov 12, 2007 4:42 PM, mfs [EMAIL PROTECTED] wrote: Hi Guys, Another question relating to the serialization of pages, so lets say we have multiple instance of an application deployed in a load-balancing environment, now lets stay in case of wizard type use-case if subsequent requests get forwarded to different server (based on load sharing), would the serialized page-components and the model data be synchronized to the other servers in the cluster ? given the default implementation of the page-store..? how would that work ? Thanks and Regards, Farhan. -- View this message in context: http://www.nabble.com/Serialization-of-pages-in-a-cluster-load-balancer-environment---tf4795023.html#a13717677 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/Serialization-of-pages-in-a-cluster-load-balancer-environment---tf4795023.html#a13718547 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/Serialization-of-pages-in-a-cluster-load-balancer-environment---tf4795023.html#a13722291 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: TreeModel error
Thanks for the issue. Looks like a bug in AbstractTree. -Matej On Nov 12, 2007 5:47 AM, Doug Leeper [EMAIL PROTECTED] wrote: JIRA issue created ( http://issues.apache.org/jira/browse/WICKET-1148 WICKET-1148 ) -- View this message in context: http://www.nabble.com/TreeModel-error-tf4788794.html#a13699743 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: data tables and debugging session serialization
Using Wicket 1.3? Try setting break points in DiskPageStore (#getPage for instance) and see if that gets you any further. Eelco On Nov 13, 2007 6:59 AM, Evan Chooly [EMAIL PROTECTED] wrote: I'm having some strange behavior with a DataTable and the back button. When I back up to the page with the DT, it rerenders fine, but all my object state is gone. I click a link and the object is there but not the ID in the the object so that I get hibernate errors trying to load without an ID. I have some suspicions about my model objects but I'm not sure how to watch what gets stored in the session and what gets pulled back out when the page is rerendered due to the back button. Anyone have an idea of how I might track this down? Thanks. - 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: data tables and debugging session serialization
You have something transient in your model. Or something implementing Externalizable without properly serializing the properties. -Matej On Nov 13, 2007 3:59 PM, Evan Chooly [EMAIL PROTECTED] wrote: I'm having some strange behavior with a DataTable and the back button. When I back up to the page with the DT, it rerenders fine, but all my object state is gone. I click a link and the object is there but not the ID in the the object so that I get hibernate errors trying to load without an ID. I have some suspicions about my model objects but I'm not sure how to watch what gets stored in the session and what gets pulled back out when the page is rerendered due to the back button. Anyone have an idea of how I might track this down? Thanks. - 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: Add fields Dynamically
You could create a panel with a question and its answers. Then add such a panel repeatedly, perhaps with a ListView. - Scott On Nov 13, 2007 10:58 AM, Marco Aurélio Silva [EMAIL PROTECTED] wrote: Hi I need to add fields to a page dynamically. I neet do build something like a survey where the questions and answers are stored on the database, so they can be changed by the administrator because this I can't create the HTML file with the fields Is there a way to do this? Thank you Marco -- Scott Swank reformed mathematician - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Add fields Dynamically
Yeah, either way, this is readily solvable with panels and some form of repeater. On Nov 13, 2007 1:51 PM, Scott Swank [EMAIL PROTECTED] wrote: You could create a panel with a question and its answers. Then add such a panel repeatedly, perhaps with a ListView. - Scott On Nov 13, 2007 10:58 AM, Marco Aurélio Silva [EMAIL PROTECTED] wrote: Hi I need to add fields to a page dynamically. I neet do build something like a survey where the questions and answers are stored on the database, so they can be changed by the administrator because this I can't create the HTML file with the fields Is there a way to do this? Thank you Marco -- Scott Swank reformed mathematician - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Nick Heudecker Professional Wicket Training Consulting http://www.systemmobile.com Eventful - Intelligent Event Management http://www.eventfulhq.com
Re: Add fields Dynamically
Ok, thanks, I will try! On Nov 13, 2007 4:53 PM, Nick Heudecker [EMAIL PROTECTED] wrote: Yeah, either way, this is readily solvable with panels and some form of repeater. On Nov 13, 2007 1:51 PM, Scott Swank [EMAIL PROTECTED] wrote: You could create a panel with a question and its answers. Then add such a panel repeatedly, perhaps with a ListView. - Scott On Nov 13, 2007 10:58 AM, Marco Aurélio Silva [EMAIL PROTECTED] wrote: Hi I need to add fields to a page dynamically. I neet do build something like a survey where the questions and answers are stored on the database, so they can be changed by the administrator because this I can't create the HTML file with the fields Is there a way to do this? Thank you Marco -- Scott Swank reformed mathematician - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Nick Heudecker Professional Wicket Training Consulting http://www.systemmobile.com Eventful - Intelligent Event Management http://www.eventfulhq.com
Re: How To Change Page Store Size in DiskPageStore?
as long as your server doesn't crash and isn't terminate by a kill -9 no files are leaked.. When that does happen then yes you have to clean it up. If you dont care about those files after a restart then in the script that starts your webcontainer you will just remove all the files in the work dir. I don't think wicket can do much about it. johan On Nov 13, 2007 10:41 PM, Chris Lintz [EMAIL PROTECTED] wrote: All, I have submitted a Jira on this topic. I will leave it to the great minds to debate. In any case, it appears restarting the container cannot notify the HttpSessionListeners that are bound to the page store files. It would be nice if the framework can cleanup what I consider a leak of the cache files it created. Otherwise folks like myself living in an high traffic site are forced to generate script look for old page store cache files. https://issues.apache.org/jira/browse/WICKET-1158 Johan Compagner wrote: And from top of my head there is no api to get all the current session id's from an instance when the instance does start up.. But we could ditch ALL the directories it can find in the temp directory the page store uses when starting up, right? No we can't do that, If you as you should terminate your web container gracefully then the web container will save all the sessions to disk. Then if you restart it again all the sessions are loaded again. And yes the application works just as it was never restarted. But if we throw away all the page stores. Then we loose all the data of sessions that are currently active. The only thing i can think of is having some check that only deletes things that are not touched for X hours or days. johan -- View this message in context: http://www.nabble.com/How-To-Change-Page-Store-Size-in-DiskPageStore--tf4768072.html#a13735298 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]
Injecting services into Resources using wicket-spring-annotations
Hi, I have a web app where I'm using wicket-spring-annotations to inject services into members of the Component hierarchy. This works great. I now find myself needing access to those services from within DynamicWebResources. IIUC, since Resources aren't part of the Component hierarchy, they won't have SpringBean's set and, sure enough, my services are null when I test this. So, what is the recommended way to access services from DynamicWebResources? I could initialize the ApplicationContext from within my WebApplication subclass and then acquire the needed bean and inject it into the Resource at the time it is constructed and added to the shared resources. This wouldn't be a huge deal, but it would mean moving some configuration from my various web.xml's into my WebApplication subclass, so I wanted to check if I was missing something or if support for SpringBean's in Resources was coming or available in more recent versions of Wicket. FYI, I'm using Wicket 1.2.6. If this is a new feature in newer versions the answer could be I need to update. TIA, Enrique - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ResourceStream
ahh wait your are not talking about Resource (the class and then the SharedResources) But you are talking about what the IResourceSteamLocator does return for Markup and other kind of (classpath) Resources? Yes those are cached in 1.2 we didn't cache properties files yet, But the Localizer does now. but in 1.2 we already did have the MarkupCache. And that one polls your streams for the last modified time and if that is different it will clear the cache. but what do you cache (or don't you want to cache)? is it markup? johan On Nov 13, 2007 8:03 PM, Andrew MacKenzie [EMAIL PROTECTED] wrote: +++ Andrew MacKenzie [wicket-users] [Tue, Nov 13, 2007 at 11:45:46AM -0500]: Well, I've got it up and running, but it appears that Wicket is caching 'something' because it is only requesting the content once (the first time it's hit). Even if the requests come from different browsers. I've been digging a bit more - looks like wicket *does* cache things, and polls at configurable intervals to determine whether the resource has changed. For me this is less than ideal.. I had assumed that every request to wicket for a resource would result in my AbstractResourceStream being invoked for the body. My problem is that my ResourceStream is similar to wicket.util.resource.UrlResourceStream only it also sends along cookie information. This is because the remote resource will be different for each user (will display the user's login name). If this is cached at all there is a possibility of another user seeing the wrong content. I can minimize this by making the polling interval very short, but there is always the possibility. Can I tell wicket to ignore the polling and always query the resource for the content? -- // Andrew MacKenzie | http://www.edespot.com // GPG public key: http://www.edespot.com/~amackenz/public.key // Persons attempting to find a motive in this narrative will be prosecuted; // persons attempting to find a moral in it will be banished; persons attempting // to find a plot in it will be shot. By Order of the Author // -- Mark Twain, Tom Sawyer
Re: Injecting services into Resources using wicket-spring-annotations
in the resource's constructor add this line: InjectorHolder.getInjector().inject(this); then you can use that class just like a component -igor On Nov 13, 2007 2:15 PM, Enrique Rodriguez [EMAIL PROTECTED] wrote: Hi, I have a web app where I'm using wicket-spring-annotations to inject services into members of the Component hierarchy. This works great. I now find myself needing access to those services from within DynamicWebResources. IIUC, since Resources aren't part of the Component hierarchy, they won't have SpringBean's set and, sure enough, my services are null when I test this. So, what is the recommended way to access services from DynamicWebResources? I could initialize the ApplicationContext from within my WebApplication subclass and then acquire the needed bean and inject it into the Resource at the time it is constructed and added to the shared resources. This wouldn't be a huge deal, but it would mean moving some configuration from my various web.xml's into my WebApplication subclass, so I wanted to check if I was missing something or if support for SpringBean's in Resources was coming or available in more recent versions of Wicket. FYI, I'm using Wicket 1.2.6. If this is a new feature in newer versions the answer could be I need to update. TIA, Enrique - 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]
Leaf menus stop responding after collapse and expand
I have an application which is modeled on ajax SimpleTreePage example. Navigation is handled by overriding the onNodeLinkClicked of the LinkTree class. There are tree levels of nesting in the menu, the second level has multiple leaf nodes. Everything works as expected until I collapse and expand the second level menu. Thereafter, the highest leaf node under that node stops responding to mouse clicks, but other leaf nodes still work. This might be a bug. -- View this message in context: http://www.nabble.com/Leaf-menus-stop-responding-after-collapse-and-expand-tf4801262.html#a13737055 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Using the WicketTester WITHOUT rendering a response on submit
Hi all, I've been evaluating Wicket and I'm excited about using it. As part of my evaluation I have been investigating how easy it would be to test my pages, especially those containing forms. So my testing evaluation set out to answer these questions: 1. Can I use Guice injection in a way that I can test my forms without the need for a test database. 2. Can I test that my forms initialize properly -- test that the form renders with correct values given a model with know values. 3. Can I test that my model is updated properly when I submit the form and that my (mock) dao is called to perform the save. 4. Can I test that the response page is what I expect when when I first render and when i submit my form Happily I can report that I was able to do the first three items by using the testing examples provided on the wiki and a little ingenuity. I figured out how to extend the WicketTester to do Guice injection (pretty simple) with a little playing around. Then I was able to mock my DAO (using JMock) which then gets injected by Guice via my GuiceWicketTester. This is great: my tests can run without a backend DB. I was getting pretty excited, but now I'm kind of stuck on #4 because I have a case in my testing that, when an existing object is modified on my form, then submitted, my response page is different than my request page. My test would actually pass, but when the response page renders IT fails. So, call me crazy, but it occurs to me that it would be nice if I could unit test just my page, verifying that when the code in my page finishes executing everything is what I expect. I don't really care if the response page renders properly (I'll test that in a unit test for that page), I just want to know that the logic in my page in sending off to the new page. Does anyone have an idea for me? I've been looking at WickeTester to see if I could override it somehow to prevent it from rendering the response page, but I'm a still new to Wicket and its RequestCycle processing and so I'm fumbling around a bit. Thanks for any help, matt clevenger See code below: import ... public class PartDetailPageTest extends TestCase { ... private class MockModuleT extends AbstractModule{ private T mock; private ClassT type; public MockModule(ClassT type, Mockery mockery){ this.mock = mockery.mock(type); this.type = type; } public T getmock(){ return mock; } public void configure(){ bind(type).toInstance(mock); } } private class GuiceWicketTester extends WicketTester{ public GuiceWicketTester(Module[] modules){ super(); GuiceComponentInjector gci = new GuiceComponentInjector(getApplication(), modules); getApplication().addComponentInstantiationListener(gci); } } @Before public void setUp(){ mockery = new Mockery(); module = new MockModulePartDAO(PartDAO.class, mockery); tester = new GuiceWicketTester(new Module[]{module}); } @Test public void testSubmitExistingPart(){ // setup for modifying a part (part has an id -- found by dao) setUp(); final Part part = new MockPart(10); final PartDAO mockDAO = module.getmock(); mockery.checking(new Expectations(){{ one(mockDAO).findPart(part.getId()); will(returnValue(part)); one(mockDAO).save(with(same(part))); }}); PageParameters params = new PageParameters(id=+ part.getId()); Page page = new PartDetailPage(params); tester.startPage(page); // simulate entry of part data FormTester formTester = tester.newFormTester(inputForm); formTester.setValue(barcode, barcode123); formTester.setValue(name, nameXYZ); formTester.setValue(description, descriptionXYZ); formTester.submit(); // I never get to the check below // verify move to list page tester.assertRenderedPage(PartListPage.class); } } Here is part of interest in the class under test: ... private boolean isNewPart() { Integer id = getPartModel().getId(); return ((id == null) || (id == 0)); } private Part getPartModel(){ Part part = (Part) getModel().getObject(); return part; } public void onSubmit()
Re: Leaf menus stop responding after collapse and expand
On Nov 13, 2007 3:31 PM, yadubi [EMAIL PROTECTED] wrote: I have an application which is modeled on ajax SimpleTreePage example. Navigation is handled by overriding the onNodeLinkClicked of the LinkTree class. There are tree levels of nesting in the menu, the second level has multiple leaf nodes. Everything works as expected until I collapse and expand the second level menu. Thereafter, the highest leaf node under that node stops responding to mouse clicks, but other leaf nodes still work. This might be a bug. Did you check what happens in the Ajax debug panel and/ or with FireFox's Firebug? Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: CheckGroup not selecting according to model
The CheckGroup model needs to have the collection of objects you want checked, not the Check object. On Nov 13, 2007 6:13 PM, Nick Busey [EMAIL PROTECTED] wrote: So I've got an object called ExternalContact with a selected Boolean and corresponding getters and setters. ExternalContact contact = (ExternalContact) item.getModelObject(); contact.setSelected(true); Check check = new Check(selected, new Model(contact)); However my check boxes are not being output checked as they should. They are unselected, and a dom inspection shows they are, in fact, not selected. ExternalContact contact = (ExternalContact) item.getModelObject(); contact.setSelected(true); Check check = new Check(selected, new PropertyModel(contact, selected)); Doesn't work either. Any thoughts? -- View this message in context: http://www.nabble.com/CheckGroup-not-selecting-according-to-model-tf4801412.html#a13737526 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Nick Heudecker Professional Wicket Training Consulting http://www.systemmobile.com Eventful - Intelligent Event Management http://www.eventfulhq.com
DropdownChoice, Ajax, and LoadableDetachableModel
Hello, I have two Dropdowns: Countries and Regions. When changing Countries, it goes to database and refresh the Regions with Ajax nicely. The first time the page loads, it will get the selected country from the database, and should show the regions but I don't really know how to do this. Normally, I can do with LoadableDetachableModel, and then assigning the ModelValue that corresponds, but with the Ajax behaviour I'm totally lost. Here is my code: countryWork.add(new AjaxFormComponentUpdatingBehavior(onchange) { protected void onUpdate(AjaxRequestTarget target) { target.addComponent(regionWork); regions = getRegionDaoInterface().getRegions(professionalInfo.getCountryWork().getCountryID()); if (regions.size()==0) regionWork.setEnabled(false); else regionWork.setEnabled(true); } }); Model regionModelChoices = new AbstractReadOnlyModel() { public Object getObject(Component component) { if (professionalInfo.getCountryWork()!=null) regions = getRegionDaoInterface().getRegions(professionalInfo.getCountryWork().getCountryID()); if (regions==null || regions.size()==0) regionWork.setEnabled(false); else regionWork.setEnabled(true); return regions; } }; How to load regions from a given country the first time the page loads without losing the ajax behaviour? As always, thank you very very much for your support, help, and time. Oskar -- View this message in context: http://www.nabble.com/DropdownChoice%2C-Ajax%2C-and-LoadableDetachableModel-tf4801900.html#a13739163 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: DropdownChoice, Ajax, and LoadableDetachableModel
there is no difference between a regular page load and ajax see here http://wicketstuff.org/wicket13/ajax/choice.1 -igor On Nov 13, 2007 7:13 PM, Toscano [EMAIL PROTECTED] wrote: Hello, I have two Dropdowns: Countries and Regions. When changing Countries, it goes to database and refresh the Regions with Ajax nicely. The first time the page loads, it will get the selected country from the database, and should show the regions but I don't really know how to do this. Normally, I can do with LoadableDetachableModel, and then assigning the ModelValue that corresponds, but with the Ajax behaviour I'm totally lost. Here is my code: countryWork.add(new AjaxFormComponentUpdatingBehavior(onchange) { protected void onUpdate(AjaxRequestTarget target) { target.addComponent(regionWork); regions = getRegionDaoInterface().getRegions(professionalInfo.getCountryWork().getCountryID()); if (regions.size()==0) regionWork.setEnabled(false); else regionWork.setEnabled(true); } }); Model regionModelChoices = new AbstractReadOnlyModel() { public Object getObject(Component component) { if (professionalInfo.getCountryWork()!=null) regions = getRegionDaoInterface().getRegions(professionalInfo.getCountryWork().getCountryID()); if (regions==null || regions.size()==0) regionWork.setEnabled(false); else regionWork.setEnabled(true); return regions; } }; How to load regions from a given country the first time the page loads without losing the ajax behaviour? As always, thank you very very much for your support, help, and time. Oskar -- View this message in context: http://www.nabble.com/DropdownChoice%2C-Ajax%2C-and-LoadableDetachableModel-tf4801900.html#a13739163 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: DropdownChoice, Ajax, and LoadableDetachableModel
Hello Igor, Thank you for your message. My code was taken from that example, but the problem was a different one. Finally I found the solution, was as simply as change the AbstractReadOnlyModel for the LoadableDetachableModel. Thanks anyways! Oskar igor.vaynberg wrote: there is no difference between a regular page load and ajax see here http://wicketstuff.org/wicket13/ajax/choice.1 -igor On Nov 13, 2007 7:13 PM, Toscano [EMAIL PROTECTED] wrote: Hello, I have two Dropdowns: Countries and Regions. When changing Countries, it goes to database and refresh the Regions with Ajax nicely. The first time the page loads, it will get the selected country from the database, and should show the regions but I don't really know how to do this. Normally, I can do with LoadableDetachableModel, and then assigning the ModelValue that corresponds, but with the Ajax behaviour I'm totally lost. Here is my code: countryWork.add(new AjaxFormComponentUpdatingBehavior(onchange) { protected void onUpdate(AjaxRequestTarget target) { target.addComponent(regionWork); regions = getRegionDaoInterface().getRegions(professionalInfo.getCountryWork().getCountryID()); if (regions.size()==0) regionWork.setEnabled(false); else regionWork.setEnabled(true); } }); Model regionModelChoices = new AbstractReadOnlyModel() { public Object getObject(Component component) { if (professionalInfo.getCountryWork()!=null) regions = getRegionDaoInterface().getRegions(professionalInfo.getCountryWork().getCountryID()); if (regions==null || regions.size()==0) regionWork.setEnabled(false); else regionWork.setEnabled(true); return regions; } }; How to load regions from a given country the first time the page loads without losing the ajax behaviour? As always, thank you very very much for your support, help, and time. Oskar -- View this message in context: http://www.nabble.com/DropdownChoice%2C-Ajax%2C-and-LoadableDetachableModel-tf4801900.html#a13739163 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/DropdownChoice%2C-Ajax%2C-and-LoadableDetachableModel-tf4801900.html#a13739470 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
framework dependencies
Hello everyone, I have been using wicket 1.2.6 with Spring and hibernate for the past month or so. Seems like a standard configuration. So to summarize here is my configuration that used to work: 1. Wicket 1.2.6 2. Wicket-extensions 1.2.6 3. Wicket-spring 1.2.6 4. Spring 2.0.6 5. Hibernate 3 This configuration used to work, today it stopped after I tried to rework the dependencies on my end. I am getting errors such as below. I think this is dependency related, and I am not sure at this point what got screwed up. Has anyone seen this? Thanks java.sql.SQLException: Closed Resultset: next at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146) at oracle.jdbc.driver.OracleResultSetImpl.next(OracleResultSetImpl.java:175) at org.apache.commons.dbcp.DelegatingResultSet.next(DelegatingResultSet.java:16 9) at org.hibernate.impl.IteratorImpl.postNext(IteratorImpl.java:83) at org.hibernate.impl.IteratorImpl.next(IteratorImpl.java:120) at wicket.extensions.markup.html.repeater.data.DataViewBase$ModelIterator.next( DataViewBase.java:129) at wicket.extensions.markup.html.repeater.pageable.AbstractPageableView$CappedI teratorAdapter.next(AbstractPageableView.java:386) at wicket.extensions.markup.html.repeater.refreshing.DefaultItemReuseStrategy$1 .next(DefaultItemReuseStrategy.java:71) at wicket.extensions.markup.html.repeater.refreshing.RefreshingView.addItems(Re freshingView.java:191) at wicket.extensions.markup.html.repeater.refreshing.RefreshingView.internalOnA ttach(RefreshingView.java:117) at wicket.Component.internalAttach(Component.java:2572)
Re: framework dependencies
This doesn't seem to be related to dependencies, certainly not anything Wicket related. Did you update Hibernate and/ or your JDBC driver recently? Btw, if you're just starting out with Wicket, I'd recommend you pick up Wicket 1.3. Eelco On Nov 13, 2007 10:23 PM, Yevgeni Kovelman [EMAIL PROTECTED] wrote: Hello everyone, I have been using wicket 1.2.6 with Spring and hibernate for the past month or so. Seems like a standard configuration. So to summarize here is my configuration that used to work: 1. Wicket 1.2.6 2. Wicket-extensions 1.2.6 3. Wicket-spring 1.2.6 4. Spring 2.0.6 5. Hibernate 3 This configuration used to work, today it stopped after I tried to rework the dependencies on my end. I am getting errors such as below. I think this is dependency related, and I am not sure at this point what got screwed up. Has anyone seen this? Thanks java.sql.SQLException: Closed Resultset: next at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146) at oracle.jdbc.driver.OracleResultSetImpl.next(OracleResultSetImpl.java:175) at org.apache.commons.dbcp.DelegatingResultSet.next(DelegatingResultSet.java:16 9) at org.hibernate.impl.IteratorImpl.postNext(IteratorImpl.java:83) at org.hibernate.impl.IteratorImpl.next(IteratorImpl.java:120) at wicket.extensions.markup.html.repeater.data.DataViewBase$ModelIterator.next( DataViewBase.java:129) at wicket.extensions.markup.html.repeater.pageable.AbstractPageableView$CappedI teratorAdapter.next(AbstractPageableView.java:386) at wicket.extensions.markup.html.repeater.refreshing.DefaultItemReuseStrategy$1 .next(DefaultItemReuseStrategy.java:71) at wicket.extensions.markup.html.repeater.refreshing.RefreshingView.addItems(Re freshingView.java:191) at wicket.extensions.markup.html.repeater.refreshing.RefreshingView.internalOnA ttach(RefreshingView.java:117) at wicket.Component.internalAttach(Component.java:2572) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: framework dependencies
Eelco, I've been using oracle jdbc driver for about 3 weeks consistently as well as libraries below. Then I spent a few days building up my dataset programmatically and decided to create a list of dependencies for the project, that's when all the hell broke loose. I thought perhaps there is some incompatibility with the latest wicket-spring and spring 2.0.6, then tried hibernate 3.0/3.1/3.2. Maybe I've been at it too long and just not seeing the problem. As far as 1.3, I've been building my prototype using 1.2.6, and since 1.3 is still beta, I thought I'd wait it out. Nothing stops me from switching, I just need to figure this issue out :) -Original Message- From: Eelco Hillenius [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 13, 2007 10:33 PM To: users@wicket.apache.org Subject: Re: framework dependencies This doesn't seem to be related to dependencies, certainly not anything Wicket related. Did you update Hibernate and/ or your JDBC driver recently? Btw, if you're just starting out with Wicket, I'd recommend you pick up Wicket 1.3. Eelco On Nov 13, 2007 10:23 PM, Yevgeni Kovelman [EMAIL PROTECTED] wrote: Hello everyone, I have been using wicket 1.2.6 with Spring and hibernate for the past month or so. Seems like a standard configuration. So to summarize here is my configuration that used to work: 1. Wicket 1.2.6 2. Wicket-extensions 1.2.6 3. Wicket-spring 1.2.6 4. Spring 2.0.6 5. Hibernate 3 This configuration used to work, today it stopped after I tried to rework the dependencies on my end. I am getting errors such as below. I think this is dependency related, and I am not sure at this point what got screwed up. Has anyone seen this? Thanks java.sql.SQLException: Closed Resultset: next at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146) at oracle.jdbc.driver.OracleResultSetImpl.next(OracleResultSetImpl.java:175) at org.apache.commons.dbcp.DelegatingResultSet.next(DelegatingResultSet.java:16 9) at org.hibernate.impl.IteratorImpl.postNext(IteratorImpl.java:83) at org.hibernate.impl.IteratorImpl.next(IteratorImpl.java:120) at wicket.extensions.markup.html.repeater.data.DataViewBase$ModelIterator.next( DataViewBase.java:129) at wicket.extensions.markup.html.repeater.pageable.AbstractPageableView$CappedI teratorAdapter.next(AbstractPageableView.java:386) at wicket.extensions.markup.html.repeater.refreshing.DefaultItemReuseStrategy$1 .next(DefaultItemReuseStrategy.java:71) at wicket.extensions.markup.html.repeater.refreshing.RefreshingView.addItems(Re freshingView.java:191) at wicket.extensions.markup.html.repeater.refreshing.RefreshingView.internalOnA ttach(RefreshingView.java:117) at wicket.Component.internalAttach(Component.java:2572) - 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: framework dependencies
On Nov 13, 2007 10:52 PM, Yevgeni Kovelman [EMAIL PROTECTED] wrote: Eelco, I've been using oracle jdbc driver for about 3 weeks consistently as well as libraries below. Then I spent a few days building up my dataset programmatically and decided to create a list of dependencies for the project, that's when all the hell broke loose. I thought perhaps there is some incompatibility with the latest wicket-spring and spring 2.0.6, then tried hibernate 3.0/3.1/3.2. Maybe I've been at it too long and just not seeing the problem. It's just that the stack trace points to the JDBC driver, which can be a bug in the driver, a bug in how the driver is used (unlikely) or some problem with your database connection. Make sure your result set is not shared for instance. I'm afraid I can't help you much based on this stack trace: please use your debugger and/ or think about whether you might have concurrency issues or database problems. Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ResourceStream
in 1.3 you can override some methods of your page that shouldn't me cached. don't know from top of my head what the 1.2 methods are but in 1.3: * public* MarkupStream getAssociatedMarkupStream(*final* *boolean*throwException) (of the MarkupContainer) and then make the call: * return*getApplication().getMarkupSettings().getMarkupCache().getMarkupStream( *this*,*true*, throwException); that true should take care that it always is reloaded. On Nov 13, 2007 11:55 PM, Andrew MacKenzie [EMAIL PROTECTED] wrote: +++ Johan Compagner [wicket-users] [Tue, Nov 13, 2007 at 11:40:07PM +0100]: ahh wait your are not talking about Resource (the class and then the SharedResources) But you are talking about what the IResourceSteamLocator does return for Markup and other kind of (classpath) Resources? Yes, sorry for the confusion - I didn't realize there were so many things called Resource. Yes those are cached in 1.2 we didn't cache properties files yet, But the Localizer does now. but in 1.2 we already did have the MarkupCache. And that one polls your streams for the last modified time and if that is different it will clear the cache. but what do you cache (or don't you want to cache)? is it markup? Yes - I don't want the markup cached. I'd like for Wicket to always try to fetch it new on every new request. I've found that I can tell wicket to poll very frequently via .setResourcePollFrequency, but this will only 'mitigate' my issue, not solve it. -- // Andrew MacKenzie | http://www.edespot.com // GPG public key: http://www.edespot.com/~amackenz/public.key // If my theory of relativity is proven successful, Germany will claim // me as a German and France will declare that I am a citizen of the // world. Should my theory prove untrue, France will say that I am a // German and Germany will declare that I am a Jew. // -- Albert Einstein