Re: Lightweight generic busy indicator
I must say that in my experience, 'worksforme'. Whenever I have had problems with the indicator it has been because the javascript has crashed. You can debug the javascript by putting alert('Hello'); in some places you want to debug. This will quickly show you which parts of the javascript really get executed and which parts do not. ** Martin 2008/11/8 fatefree <[EMAIL PROTECTED]>: > > Hello, I put this code into my application and its very non-intrusive and > easy to use. I found a slight problem with it though that I am able to > replicate but not able to fix. > > It happens when a page using a form is loaded through the browsers url > directly, instead of through a link in the application. So for instance if a > user bookmarks a form, or opens a browser and types in the form url, when > the form is submitted the indicator displays as it should, but it does not > ever hide when the request is finished. > > In my instance I am submitting the form through ajax with validation errors, > and the validation messages come back as they should but the indicator > doesn't hide. I've tried putting the js outside of the html head tag, but it > didn't seem to help. Interestingly enough, if I type the url and go to the > form, and click refresh once, it works fine again. Almost like for some > reason it can't be used on the page that creates the users session. Any > ideas about this? > > > > Martin Makundi wrote: >> >> Hi! >> >> I put it into the Reference Library -> Ajax as "Generic Busy Indicator >> (for both Ajax and non-Ajax submits)" >> >> http://cwiki.apache.org/confluence/display/WICKET/Generic+Busy+Indicator+%28for+both+Ajax+and+non-Ajax+submits%29 >> >> > > -- > View this message in context: > http://www.nabble.com/Lightweight-generic-busy-indicator-tp17710292p20399357.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: LoadableDetachableModels with replicated data fed in through constructors.
Timo, You are the man! Thanks! long userId = MySession.get().getUser().getId() Of course! Cheers, Graeme. Timo Rantalaiho wrote: > > On Thu, 06 Nov 2008, Graeme Knight wrote: >> perform a task of getting data from a database. Each model is dependent >> on a >> couple of pieces of information (1) an identifier about the current user >> (2) >> a primary key of a parent data object. I'm trying to work out the >> mechanics > > If "the current user" means what it sounds like, I would > probably have it stored in the Wicket Session and get it > each time like this > > long userId = MySession.get().getUser().getId() > > (Or you can make your user available in a custom ThreadLocal > which is populated and depopulated in a custom RequestCycle.) > >> Now my example above is not too bad resource wize - you may only be >> talking >> about a couple of Longs being serialized ten times (not a massive hit), >> but >> what about if the objects in my LoadableDetachableModel are fairly big? > > The point of LoadableDetachableModel is to store in it only > so little data that it doesn't matter, but load the big data > again in load() on each request that needs it. The big data > is referenced directly only during the request, so it does > not get serialised. > >> Is there a way of destructing and reconstructing the model automatically >> so >> I don't need to worry about this serialization of the model private data? > > The only automatic part is that if the model is "the default > model" of a rendered component, its detach() will be called > automatically at the end of the request processing. The > wrapping models that come with Wicket also detach their > wrapped models in their own detach() (and any custom model > should in general do the same). > > Best wishes, > Timo > > -- > Timo Rantalaiho > Reaktor Innovations Oyhttp://www.ri.fi/ > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/LoadableDetachableModels-with-replicated-data-fed-in-through-constructors.-tp20374062p20402019.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: adding favicon using behavior
> > do you not use an ide? Yes I do. eclipse... A new developer in our staff added this piece of code ( response.getResponse().write(" > > -igor > > > > > On Wed, Nov 5, 2008 at 10:44 AM, Nino Saturnino Martinez Vazquez Wael < > > [EMAIL PROTECTED]> wrote: > > > >> Yup like so, just change it to link instead of meta: > >> > >> public class SiteAHeader extends AbstractBehavior implements > >> IHeaderContributor { > >> > >> public void renderHead(IHeaderResponse response) { > >> > >> response > >> .renderString(" >> content=\"description\" />"); > >> > >> } > >> > >> } > >> > >> > >> Igor Vaynberg wrote: > >> > >>> use iheadercontributor > >>> > >>> -igor > >>> > >>> On Tue, Nov 4, 2008 at 11:43 PM, Eyal Golan <[EMAIL PROTECTED]> > wrote: > >>> > >>> > Hi, > We have a behavior that is added to our main page (we use markup > inheritance). > In the behavior we add CSS links (and JS). > We want to add a favicon as well. > Here's what we did: > response.getResponse().write(" href=\"/resources/favicon.ico\"/>\n"); > > Is this the best way? > > Thanks > > -- > Eyal Golan > [EMAIL PROTECTED] > > Visit: http://jvdrums.sourceforge.net/ > LinkedIn: http://www.linkedin.com/in/egolan74 > > P Save a tree. Please don't print this e-mail unless it's really > necessary > > > > >>> > >>> - > >>> To unsubscribe, e-mail: [EMAIL PROTECTED] > >>> For additional commands, e-mail: [EMAIL PROTECTED] > >>> > >>> > >>> > >> > >> -- > >> -Wicket for love > >> > >> Nino Martinez Wael > >> Java Specialist @ Jayway DK > >> http://www.jayway.dk > >> +45 2936 7684 > >> > >> > >> > >> - > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > >> For additional commands, e-mail: [EMAIL PROTECTED] > >> > >> > > > > > > -- > > Eyal Golan > > [EMAIL PROTECTED] > > > > Visit: http://jvdrums.sourceforge.net/ > > LinkedIn: http://www.linkedin.com/in/egolan74 > > > > P Save a tree. Please don't print this e-mail unless it's really > necessary > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: Lightweight generic busy indicator
Hello, I put this code into my application and its very non-intrusive and easy to use. I found a slight problem with it though that I am able to replicate but not able to fix. It happens when a page using a form is loaded through the browsers url directly, instead of through a link in the application. So for instance if a user bookmarks a form, or opens a browser and types in the form url, when the form is submitted the indicator displays as it should, but it does not ever hide when the request is finished. In my instance I am submitting the form through ajax with validation errors, and the validation messages come back as they should but the indicator doesn't hide. I've tried putting the js outside of the html head tag, but it didn't seem to help. Interestingly enough, if I type the url and go to the form, and click refresh once, it works fine again. Almost like for some reason it can't be used on the page that creates the users session. Any ideas about this? Martin Makundi wrote: > > Hi! > > I put it into the Reference Library -> Ajax as "Generic Busy Indicator > (for both Ajax and non-Ajax submits)" > > http://cwiki.apache.org/confluence/display/WICKET/Generic+Busy+Indicator+%28for+both+Ajax+and+non-Ajax+submits%29 > > -- View this message in context: http://www.nabble.com/Lightweight-generic-busy-indicator-tp17710292p20399357.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: LoadableDetachableModels with replicated data fed in through constructors.
On Thu, 06 Nov 2008, Graeme Knight wrote: > perform a task of getting data from a database. Each model is dependent on a > couple of pieces of information (1) an identifier about the current user (2) > a primary key of a parent data object. I'm trying to work out the mechanics If "the current user" means what it sounds like, I would probably have it stored in the Wicket Session and get it each time like this long userId = MySession.get().getUser().getId() (Or you can make your user available in a custom ThreadLocal which is populated and depopulated in a custom RequestCycle.) > Now my example above is not too bad resource wize - you may only be talking > about a couple of Longs being serialized ten times (not a massive hit), but > what about if the objects in my LoadableDetachableModel are fairly big? The point of LoadableDetachableModel is to store in it only so little data that it doesn't matter, but load the big data again in load() on each request that needs it. The big data is referenced directly only during the request, so it does not get serialised. > Is there a way of destructing and reconstructing the model automatically so > I don't need to worry about this serialization of the model private data? The only automatic part is that if the model is "the default model" of a rendered component, its detach() will be called automatically at the end of the request processing. The wrapping models that come with Wicket also detach their wrapped models in their own detach() (and any custom model should in general do the same). Best wishes, Timo -- Timo Rantalaiho Reaktor Innovations Oyhttp://www.ri.fi/ > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ajax request and hibernate lazy loading
It's a matter of using the right Model: in this case you should use LoadableDetachableModels—for your list and for the selected item. The models page on the wiki has ample information, as does this excellent article by Igor: http://wicketinaction.com/2008/09/building-a-smart-entitymodel. IIRC the phonebook also shows you how to achieve this. Assuming you have "The Book", you might want to check out chapter 4 and read up on detachable models. Martijn On Fri, Nov 7, 2008 at 2:36 PM, miro <[EMAIL PROTECTED]> wrote: > > You are right this is not related to ajax and more of hibernate . > here is my object hirearchy > > EaBatchInfo has many EaBatchAuditInfo > > > In the page constructor I load List of EaBatchInfo and render my page > .By default I pull the first index from list to display EaBatchAuditInfo > from EaBatchInfo. > now when user wants to see second EaBatchInfo.EaBatchAuditInfo he > clicks on second EaBatchInfo in onclick method I try to get > EaBatchAuditInfo for second EaBatchInfo and here i get lazy loading > exception becasue the session was closed when rendering my page first time > and the new session created dosent have list of EaBatchInfo so one > solution is to have OpenSeissionView pattern in my page construction and > desctruction , are there any example of open view session pattern for a > wicket page lifetime ? > > > Martijn Dashorst wrote: >> >> I would actually keep using OSIV. >> >> To answer the question: probably you are using models wrong. If OSIV >> works for your normal requests, it works for Ajax requests. There is >> nothing different between these requests. >> >> Martijn >> >> On Fri, Nov 7, 2008 at 1:33 PM, Bruno Borges <[EMAIL PROTECTED]> >> wrote: >>> With Ajax request I would probably avoid that pattern. >>> That could lead to serious problems. >>> >>> How about having a different method to load the object with the required >>> data for that specific ajax request? >>> >>> cheers, >>> Bruno Borges >>> blog.brunoborges.com.br >>> +55 21 76727099 >>> >>> "The glory of great men should always be >>> measured by the means they have used to >>> acquire it." >>> - Francois de La Rochefoucauld >>> >>> >>> On Fri, Nov 7, 2008 at 1:27 PM, miro <[EMAIL PROTECTED]> wrote: >>> I am using hibernate and all my collections are lazy , they get loaded only when called . I am also using ajax to get collection property on click , but i am getting Lazy loading exception for ajax request where I load the collection , I am using org.springframework.orm.hibernate3.support.OpenSessionInViewFilter ,Please help mehow to use OpenSessionInViewFilterwith ajax calls ? -- View this message in context: http://www.nabble.com/ajax-request-and-hibernate-lazy-loading-tp20387124p20387124.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] >>> >> >> >> >> -- >> Become a Wicket expert, learn from the best: http://wicketinaction.com >> Apache Wicket 1.3.4 is released >> Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3. >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> > > -- > View this message in context: > http://www.nabble.com/ajax-request-and-hibernate-lazy-loading-tp20387124p20388432.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.3.4 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wicketstuff-push is over, wickestuff-dojo-1.1 is born ???
I'm currently using wicketstuff-push on a small app I have. The only bug I am aware of is related to the RemoveListener. What exactly is the issue you are having? On Thu, Nov 6, 2008 at 4:17 AM, Julien Graglia <[EMAIL PROTECTED]>wrote: > Hi, > I have read some posts (1) that seems to say that wicketstuff-push will > be replaced by a new wicketstuff-dojo-1.1 artifact. > > The post says that this artifact is in a private SVN repo, but will be > available "shortly".. > > Do you have any informations about that? > > I need to do reverse ajax with wicket (cometd...) ie. push event from a > server thread at the server initiative. It works with an old (rev 4245) > version of wicketstuff-push. The trunk seems "corrupted" : a "dojo" > folder is missing.. > > > > 1 : http://www.nabble.com/New-wicketstuff-dojo-project-td19070145.html > -- > Julien Graglia > NetCeler > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >