Re: [Wicket-user] Compare JSP Vs Wicket
for bookmarkable pages see pageparamer constructor, else RequestCycle.get.getRequest().getParameters(). But you should be looking at what you are trying to do.. think differently On 8/9/07, Edi [EMAIL PROTECTED] wrote: Please send me all your suggestions. including the below question In jsp, I can pass the values using query string for eg. form action=actionJSP.jsp?userName=edipassword=edi using request.getParameter(userName); I can get the userName. using request.getParameter(password); I can get the password. In wicket, how can we do that? And send all notes regarding Compare JSP Vs Wicket Thanking You. -- View this message in context: http://www.nabble.com/Compare-JSP-Vs-Wicket-tf4242739.html#a12072743 Sent from the Wicket - User (OLD) mailing list archive at Nabble.com. - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ IMPORTANT NOTICE: This mailing list is shutting down. Please subscribe to the Apache Wicket user list. Send a message to: users-subscribe at wicket.apache.org and follow the instructions. ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ IMPORTANT NOTICE: This mailing list is shutting down. Please subscribe to the Apache Wicket user list. Send a message to: users-subscribe at wicket.apache.org and follow the instructions. ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] closing ServletResponse stream/writer
i can remove the close() on it. But i am curious what you want to write afterwards because how do you know what to get the writer or the outputstream? because for the redirect strategy we just use the outpustream (bytes) instead of the writer (strings) and you can't use the output and the writer in one request. if you want to append or do stuff or replace stuff wicket has special support for that with IResponseFilters johan On 7/19/07, jan_bar [EMAIL PROTECTED] wrote: Thans for the answer, but I never said that BufferedHttpServletResponse is handled by container. In my opinion, BufferedHttpServletResponse should not call servletResponse.getOutputStream().close(), as pointed in my first quesion. There can be other filters up the chain who want to write to the response. Besides that, wicket is incosistent. For instance WebResponse uses httpServletResponse.getWriter(), but never calls close() on it. Regards, Jan -- Jan Bares http://jan.vegetband.cz Jean-Baptiste Quenot [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] * jan_bar: the ServletResponse javadoc doesn't state if and when one should call getWriter().close() or getOutputStream().close(). I have a filter that writes comments after the request was processed. Wicket sometimes closes the response and sometimes not. For instance BufferedHttpServletResponse.writeTo(HttpServletResponse servletResponse) calls: final OutputStream out = servletResponse.getOutputStream(); out.write(this.byteBuffer); out.close(); FYI BufferedHttpServletResponse is not directly handled by the servlet container, it is a wrapper around the real response for the REDIRECT_TO_BUFFER RenderStrategy. -- Jean-Baptiste Quenot aka John Banana Qwerty http://caraldi.com/jbq/ - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Overriding ID attributes
i just always overwrite getMarkupId() but a setter is also fine to have. We store it anyway. johan On 7/18/07, Igor Vaynberg [EMAIL PROTECTED] wrote: On 7/18/07, mperham [EMAIL PROTECTED] wrote: We are migrating our existing application from UI framework XXX to Wicket and we have a boatload of UI automated tests which depend on the ID attribute of our form inputs to drive the tests. I'm trying to figure out how to get Wicket to use the exact same IDs when it generates the HTML as with our old system. Here's an example of the generated HTML where I have a DropDown within a Form: td class=label divlabel for=form_selBusinessServiceBusiness Service/label/div /td td class=input select name=selBusinessService id=form_selBusinessService option selected=selected value=Choose One/option option value=http://www.test-sdk/sdkl#Fetch_COB;Fetch COB/option option value=http://www.test-sdk/sdkl#Status_Visibility;Status Visibility/option option value=http://www.test-sdk/sdkl#Claims_Submission;Claims Submission/option /select /td Now the actual ID of the select should be selBusinessService and that's the wicket:id of the component in Java but Wicket prepends the component hierarchy, I guess, when auto-generating the id attribute in HTML. Now I can use an AttributeModifier to adjust the value of the ID but the SimpleFormComponentLabel does NOT reflect that change in the for attribute. Is it possible to do this? Can I completely override Wicket's ID handling and just have it use my specified ID? not right now, but creating setMarkupId() wont be very difficult. please add a jira request. -igor mike -- View this message in context: http://www.nabble.com/Overriding-ID-attributes-tf4105343.html#a11675275 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] closing ServletResponse stream/writer
ahh ok, We have ResponseFilter in wicket build in that do that. johan On 7/19/07, jan_bar [EMAIL PROTECTED] wrote: Thanks for your care. I have a filter that appends some statistics (request processing time, date, ...) as comment to response of text/html content: final String stats = String.format(!--%s (%d[ms])--, new Date(), responseTime); try { try { response.getOutputStream().println(stats); } catch(IllegalStateException e) { // try writer response.getWriter().println(stats); } } catch (IOException e) { LOG.warn(Cannot write to response, e); } -- Jan Bares http://jan.vegetband.cz Johan Compagner [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] i can remove the close() on it. But i am curious what you want to write afterwards because how do you know what to get the writer or the outputstream? because for the redirect strategy we just use the outpustream (bytes) instead of the writer (strings) and you can't use the output and the writer in one request. if you want to append or do stuff or replace stuff wicket has special support for that with IResponseFilters johan On 7/19/07, jan_bar [EMAIL PROTECTED] wrote: Thans for the answer, but I never said that BufferedHttpServletResponse is handled by container. In my opinion, BufferedHttpServletResponse should not call servletResponse.getOutputStream().close(), as pointed in my first quesion. There can be other filters up the chain who want to write to the response. Besides that, wicket is incosistent. For instance WebResponse uses httpServletResponse.getWriter(), but never calls close() on it. Regards, Jan -- Jan Bares http://jan.vegetband.cz Jean-Baptiste Quenot [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] * jan_bar: the ServletResponse javadoc doesn't state if and when one should call getWriter().close() or getOutputStream().close(). I have a filter that writes comments after the request was processed. Wicket sometimes closes the response and sometimes not. For instance BufferedHttpServletResponse.writeTo(HttpServletResponse servletResponse) calls: final OutputStream out = servletResponse.getOutputStream(); out.write(this.byteBuffer); out.close(); FYI BufferedHttpServletResponse is not directly handled by the servlet container, it is a wrapper around the real response for the REDIRECT_TO_BUFFER RenderStrategy. -- Jean-Baptiste Quenot aka John Banana Qwerty http://caraldi.com/jbq/ - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] feature suggestion component instantiation
i can see the value of having the model in the authorizationstrategy this is pretty handy. But the problem is with wrapmodels because we just can't give those to the outside world withing a constructor of a component because we have a big warning in the wrapOnAssigment(Component) call that in that method you shouldn't really touch the component because it is not fully constructed yet. But we can't have it that the component is still not fully constructed in the getObject() call of the wrapped model. So i am +1 for such a change except that the model param will be null of not given and null if it is wrapped model. johan On 7/18/07, Maurice Marrink [EMAIL PROTECTED] wrote: Hi, In my project we often have the case where a user initially is allowed to construct a certain component (pages mostly) but whether he really can depends on the model of the page. So my request / suggestion is to enhance IAuthorizationStrategy with the following method isInstantiationAuthorized(Class, IModel). whether this methods is made available next to isInstantiationAuthorized(Class) or replaces it is not important. As far as i can see the following changes need to be made -Application.notifyComponentInstantiationListeners needs to be upgraded to receive the model to, or the component should not call notify untill the model has been set on the component (which happens on the next line) -the default listener needs to pass the model to the strategy. For regular models this should not be a problem but IWrapModels might have a problem when accessing anything else from the component but the id. Not passing the wrappedmodel but the original model is imo not an option because the main point of passing the model is to be able to use the getObject method. What do you think? Maurice - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] feature suggestion component instantiation
cant you test this with the render action check? that is always done also if the model is changed johan On 7/18/07, Maurice Marrink [EMAIL PROTECTED] wrote: True you can't do setModel(foo) and expect your instantiation check to work. Which imho is perfectly logical if you want to use your model in the instantiation check you need to pass it in the constructor. As for the example We have a search page for students, uppon clicking on one of those students, you go to a detail page for that student. that page also contains several tabs to go to other relevant pages for the student (like it's school grades). on these pages we made a quicksearch function with contains amongst other things 2 buttons to navigate forth and back between the searchresults of the search page, while keeping the same view. Suppose i have sufficient rights to see the detail pages of all students but only enough rights to see the grades of my own students. So if i make the search wide enough to get all students and then select one of my own, going to the grades. That's fine. But if i then navigate to another student i am not allowed to see the grades (creating a new instance of the grades page in the process) i need to know if the page in combination with the student is allowed, because the page itself is basically allowed. Maurice On 7/18/07, Eelco Hillenius [EMAIL PROTECTED] wrote: I don't think I agree with that. MyComponent c = new MyComponent(); c.setModel(foo) wouldn't work for starters, and you can even set models mutliple times. Not to mention the other problems you mentioned in this thread. And finally, it would just invite people to go crazy with this functionality. But give us a good example of where using the model to determine an access restriction would actually be useful? Eelco - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] stateless wicket?
not directly as a session attribute but hold on to through the pagemap. johan On 7/13/07, Igor Vaynberg [EMAIL PROTECTED] wrote: hrm, i thought the current page is stored in session? -igor On 7/13/07, Eelco Hillenius [EMAIL PROTECTED] wrote: I have a question regarding this... I understand that in 1.3 , previous page states are serialized to the file system and only the current page state stays in HttpSession. How would this work in a clustered web container that synchronizes the HttpSession object to other nodes? Do you lose the history? no. think about it - you replicate the current page every request - which means each node can save them to disk also. Except for the fact that the pages aren't actually set as sessions attributes to start with... Eelco - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] stateless ajax behavior
there is a huge mismatch. ok the very simple once could be, But every ajax request that does this: AjaxRequestTarget.addComponent(othercomponentthentherequestone) can't really be used stateless. Because that means that the page that is now in memory on the server has a specific state and that specific state (partial change) is now pushed to the client. The next time a request comes in for that component or it childs that you just rerendered and the page is not in memory how would you find that component? Because it can be that the default construction of that page displays another component completely that you just replaced on the server side and then rendered on the client. For example think about the ajax tabpanel. That will never work correctly without pushing somestate somewhere on the server. default when you make the Page with the ajax tabpanel you will have tab 1 selected then you press another tab and tab3 is selected and then rendered if you then press something on tab3 and the complete page must be constructed then tab1 is again selected so it can't find anything you request for. Also if you use real ajax and you really have 1 page constantly then the overhead on the server is very light. johan On 7/13/07, Andrew Klochkov [EMAIL PROTECTED] wrote: Johan Compagner wrote: do you have examples what kind of ajax request you make? Because i still think that partial page updates with ajax is just a complete mismatch with stateless pages. Hmm I don't see the mismatch. Take any example from the wicket ajax examples - all of them could be useful on stateless pages. In our case we need auto-complete fields and ajax validators in stateless forms, reloading some small part of a big portal page etc etc. -- Andrew Klochkov - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] stateless ajax behavior
do you have examples what kind of ajax request you make? Because i still think that partial page updates with ajax is just a complete mismatch with stateless pages. But i guess 2 things need to happen 1 YourAjaxBehavior.getStatelessHint(Component component) should return true 2 Somehow we must then create a hybrid url in RequestCycle.urlFor(final Component component, final IBehavior behaviour, final RequestListenerInterface listener) But as i said i don't see currently any pro's/examples for having that johan On 7/13/07, Andrew Klochkov [EMAIL PROTECTED] wrote: I wonder why there's no questions about stateless ajax here, so here's my one :-) Recently we've done some performance tests and obviously we have to make most of our pages stateless to support large number of active user sessions. That would not be a big problem if we didn't use a lot of ajax. So we created StatelessAjaxBehavior which can process ajax requests when using stateless pages, but the code is ugly: 1. First we look for the page instance in the session. If it's found - process ajax as usual. 2. Create page instance and render it using MockHttpServletResponse 3. The look for a component listener using AbstractRequestCycleProcessor.resolveListenerInterfaceTarget 4. Call the listener So could the support for stateless ajax be included in the wicket core? -- Andrew Klochkov - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] stateless wicket?
the number of pages an applicaiton has not not importand in 1.3 we only keep 1 page per pagemap in memory so just calculate the average page size and that will be your session usage. johan On 7/13/07, James Law [EMAIL PROTECTED] wrote: Thanks Eelco for the response! I appreciate the update. As I am trying to sell wicket for use on a lot of applications, I do see the knee-jerk you describe. I am not concerned about memory usage, but more about the ability to persist it (via session persistence) efficiently, because I work in health care, a lot of people here are all about 99..999 availability, and of course appserver clustering always comes up in this discussion. I am optimistic that having a reasonably sized page history, and using idetachable models should keep things to a reasonable size. Do you have any experience using session persistence with a medium size app (say 50-100 pages)? eg what session size can we expect? Thanks again James Eelco Hillenius wrote: On 7/12/07, Johan Compagner [EMAIL PROTECTED] wrote: the real client side wicket , so storing the data in the browser didn't make it and i don't think it will make it very soon because no current committer really sees the big benefit of this approach. Yep. We played with it a while ago and we have a fair idea how to do it but we felt it wasn't worth the energy to keep working on it. There are disadvantages to client side state saving: * First of all you'd lose the secure-by-default model you have with Wicket. For instance, imagine having a detail panel for a product. If you pass around objects (or ids) on the server side, there is no way a client could get access to the details he/ she is not supposed to see. When passing state via the client, you would always have to check the incoming state for misuse. This is actually a pretty strong feature Wicket has over most other frameworks. The other side of this is that if you want to have your whole app bookmarkable, you'll have to do some extra work :) * Secondly, synchronously serializing, encoding and sending the state to the client eats processor time and bandwith. The size of the serialized, encoded state will be larger than than on the server. Even if we do something really smart, chances are we're sending *at least* 20KB to the client on each request. Maybe even more. We think using RAM is way more favorible. * Last but not least, GETs have to be made POSTs or you'd have to run the risk that state doesn't fit a request. Of course, there are advantages to client state saving as well: * No worries about RAM, at least not because of Wicket[1]. * Pages are recoverable by default. Even when a session times out, you could let the client pick up where he/ she left. * No need for session affinity[2] Conclussion: we don't support client side state saving currently, and we don't feel it's a priority at this time. However, if someone does feel it is important, we'd be more than happy to look at patches. I think the easiest way to achieve this is to implement it as a IResponseFilter and a custom session store. Eelco [1] worrying about using RAM is the typical knee-jerk reaction of people. Before worrying, calculate how many concurrent sessions you'll have to support, and how much RAM you'd need for that. [2] this increases your options when it comes to the way you cluster, though not using session affinity can have disadvantages as well (for instance when using ORM caches). - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] stateless wicket?
the real client side wicket , so storing the data in the browser didn't make it and i don't think it will make it very soon because no current committer really sees the big benefit of this approach. johan On 7/11/07, James Law [EMAIL PROTECTED] wrote: Hi, On the features page of the wicket webpage, there is some indication that a stateless, client side wicket will appear at some point. i guess eliminating the session usage that typically occurs with wicket. Could someone elaborate on how this will be accoomplished, and if this is a 1.3 feature? Thanks James - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Using hot-reloading of classes with Spring (Was: Has something changed in markup inheritance?)
if the jetty classloader is able to load that class then you have a wrong configuration. Jetty shouldn't be able to load the classes at all, those classes shouldn't be in the webapp classpath johan On 7/12/07, Watter [EMAIL PROTECTED] wrote: Jean-Baptiste Quenot-3 wrote: * Watter: I created a small demo application that demonstrates the problem? Is there somewhere I can upload the zip file (it uses maven so it's only 7kb) with some instructions on the steps necessary to recreate the problem? I hate to open a bug in JIRA for this seeing as how it's most likely a misconfiguration error on my part and not really a bug in Wicket. Please file a JIRA issue, and I'll look into it. As I suggested in this thread, I think the problem is caused by the page being de-serialized from the file store. The issue has been created. https://issues.apache.org/jira/browse/WICKET-749 Matt -- View this message in context: http://www.nabble.com/Has-something-changed-in-markup-inheritance--tf3963374.html#a11559120 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] How can I prevent a WebPage from being serialized
thats currently not possible (or you must your another SessionStore completely) because we need to store the page somewhere and the pagemap will only hold one but if the object can't be serialized it also shouldn't go into the http session and that will be the case everytime or you must make the popup page completely stateless. So why isn't it serializeable? johan On 7/12/07, Stefan Lindner [EMAIL PROTECTED] wrote: How can I prevent a WebPage from being serialized to the FilePageStore? I have a page that ist to be displayed within a modal window. The page recieves an object as parameter but this object is not serializable. Can I tell wicket not to serialize this page? I have tried to set page.isVersioned() to false but this does not the trick. Stefan Lindner - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Intermittent serialization error
use the default serialization for now, if you know why it happens then please make a test case for this. On 7/12/07, Russell Morrisey [EMAIL PROTECTED] wrote: Hi, I'm using wicket 1.3.0 SNAPSHOT, and I'm encountering intermittent errors in console on my pages. I can't seem to determine a reproducible test case for this issue, so I'm not sure how to isolate the problem any further. Please let me know if you have any suggestions on what to look for. In the initial setup of my application, I'm setting Objects.setObjectStreamFactory(new org.apache.wicket.util.io.WicketObjectStreamFactory()); When I hit the page I'm working on to debug some AJAX behavior on the page, I sometimes get a serialization error in the log. It looks like it's trying to serialize the Hibernate session on the page. The session is on the page to enable extended Hibernate sessions. I tried switching to JDK-based serialization (per the suggestion in the exception message), and got a different error; I'll post that in a separate e-mail to cut down on the length. Here's the log of the error with wicket serialization: 11:23:58,209 ERROR Objects:1113 - Error serializing object class com.csc.aims.specchange.wicket.SpecChangePage [object=[Page class = com.csc.aims.specchange.wicket.SpecChangePage, id = 4, version = 0]] org.apache.wicket.util.io.WicketSerializeableException: Error writing fields for com.csc.aims.specchange.wicket.SpecChangePage NOTE: if you feel Wicket is at fault with this exception, please report to the mailing list. You can switch to JDK based serialization by calling: org.apache.wicket.util.lang.Objects.setObjectStreamFactory(new IObjectStreamFactory.DefaultObjectStreamFactory()) e.g. in the init method of your application at org.apache.wicket.util.io.WicketObjectOutputStream.writeObjectOverride(WicketObjectOutputStream.java:806) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:298) at org.apache.wicket.util.lang.Objects.objectToByteArray(Objects.java:1103) at org.apache.wicket.protocol.http.FilePageStore.serializePage(FilePageStore.java:741) at org.apache.wicket.protocol.http.FilePageStore.access$800(FilePageStore.java:58) at org.apache.wicket.protocol.http.FilePageStore$PageSerializingThread.run(FilePageStore.java:261) at java.lang.Thread.run(Thread.java:595) Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException at org.apache.wicket.util.io.ClassStreamHandler.invokeWriteMethod(ClassStreamHandler.java:471) at org.apache.wicket.util.io.WicketObjectOutputStream.writeObjectOverride(WicketObjectOutputStream.java:777) ... 6 more Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.wicket.util.io.ClassStreamHandler.invokeWriteMethod(ClassStreamHandler.java:459) ... 7 more Caused by: org.apache.wicket.util.io.WicketSerializeableException: Error writing fields for org.hibernate.impl.SessionImpl pageState-com.csc.aims.specchange.wicket.SpecChangePageState-conversationSession NOTE: if you feel Wicket is at fault with this exception, please report to the mailing list. You can switch to JDK based serialization by calling: org.apache.wicket.util.lang.Objects.setObjectStreamFactory(new IObjectStreamFactory.DefaultObjectStreamFactory()) e.g. in the init method of your application at org.apache.wicket.util.io.WicketObjectOutputStream.writeObjectOverride(WicketObjectOutputStream.java:806) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:298) at org.apache.wicket.util.io.ClassStreamHandler$ObjectFieldAndIndex.writeField(ClassStreamHandler.java:863) at org.apache.wicket.util.io.ClassStreamHandler.writeFields(ClassStreamHandler.java:388) at org.apache.wicket.util.io.WicketObjectOutputStream.writeObjectOverride(WicketObjectOutputStream.java:779) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:298) at org.apache.wicket.util.io.ClassStreamHandler$ObjectFieldAndIndex.writeField(ClassStreamHandler.java:863) at org.apache.wicket.util.io.ClassStreamHandler.writeFields(ClassStreamHandler.java:388) at org.apache.wicket.util.io.WicketObjectOutputStream.defaultWriteObject(WicketObjectOutputStream.java:465) at org.apache.wicket.protocol.http.FilePageStore$PageSerializer.serializePage(FilePageStore.java:870) at org.apache.wicket.Page.writeObject(Page.java:1293) ... 12 more Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException at
Re: [Wicket-user] StringResourceModel feature or bug??
add an issue to jira with a quickstart case On 7/11/07, Murat Yücel [EMAIL PROTECTED] wrote: Hi Johan It is the same key and it is being called with the same component instance everytime. There are no locale added to the key. /Murat 2007/7/10, Johan Compagner [EMAIL PROTECTED]: is the string key 3 time exactly the same? or is the locale added to it and then stripped down? On 7/9/07, Murat Yücel [EMAIL PROTECTED] wrote: Hi All, I have some problems when using StringResourceModel. It seems like it is calling the IStringResourceLoader 3 times. I am currently using wicket 1.3.0-incubator. Here is an example: CLASS: TestPage.java public class TestPage extends WebPage { public TestPage() { StringResourceModel model = new StringResourceModel(myresourcekey, this, null); add(new Label(label, model)); } } MARKUP:TestPage.html html head titleTest Page/title /head body h1This is a test page.../h1 span wicket:id=label/span /body /html PROPERTY FILE:TestPage.properties myresourcekey=label Add a breakpoint in the wicket class ComponentStringResourceLoader.public String loadStringResource(final Component component, final String key) Trigger the webpage and you will see it be triggered 3 times. /Murat - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] StringResourceModel feature or bug??
why is that triggering 3 times? what is the difference? the log statement? On 7/11/07, Murat Yücel [EMAIL PROTECTED] wrote: Hi Johan I have created a jira but i have closed it again. https://issues.apache.org/jira/browse/WICKET-742 The IStringResourceLoader was only called 3 times if debug was enabled. No problem when running in a deployment environment. This method was triggering the 3 calls LoadableDetachableModel.getObject() /** * @see org.apache.wicket.model.IModel#getObject() */ public Object getObject() { if (!attached) { attached = true; transientModelObject = load(); if (log.isDebugEnabled()) { log.debug(loaded transient object + transientModelObject + for + this + , requestCycle + RequestCycle.get()); } onAttach(); } return transientModelObject; } /Murat 2007/7/11, Johan Compagner [EMAIL PROTECTED]: add an issue to jira with a quickstart case On 7/11/07, Murat Yücel [EMAIL PROTECTED] wrote: Hi Johan It is the same key and it is being called with the same component instance everytime. There are no locale added to the key. /Murat 2007/7/10, Johan Compagner [EMAIL PROTECTED]: is the string key 3 time exactly the same? or is the locale added to it and then stripped down? On 7/9/07, Murat Yücel [EMAIL PROTECTED] wrote: Hi All, I have some problems when using StringResourceModel. It seems like it is calling the IStringResourceLoader 3 times. I am currently using wicket 1.3.0-incubator. Here is an example: CLASS: TestPage.java public class TestPage extends WebPage { public TestPage() { StringResourceModel model = new StringResourceModel(myresourcekey, this, null); add(new Label(label, model)); } } MARKUP:TestPage.html html head titleTest Page/title /head body h1This is a test page.../h1 span wicket:id=label/span /body /html PROPERTY FILE:TestPage.properties myresourcekey=label Add a breakpoint in the wicket class ComponentStringResourceLoader.public String loadStringResource(final Component component, final String key) Trigger the webpage and you will see it be triggered 3 times. /Murat - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Using a component more than once on a wicket page
i dont think you can, because we really depend on one to onw mapping currently, but i gues juergen knows more on that (for example markup index) On 7/11/07, Eelco Hillenius [EMAIL PROTECTED] wrote: Is there a way to turn off reporting of this as an error? Is it really an error to bind to a component more than once in a markup unit? Yes it is an error to bind a component *instance* more than once. Though you can turn that off (and is turned off in deployment mode): getDebugSettings().setComponentUseCheck(false) Eelco - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Wicket-user Digest, Vol 14, Issue 85
On 7/10/07, Chris Colman [EMAIL PROTECTED] wrote: Not with Wicket directly. You could take a look at the WIcket Velocity sub project (also found at Apache Wicket) where you have more flexibility regarding markup scripting. Martijn Would it be an easy enhancement to implement? - just an option to not raise an error if the Java component 'declares' a component that the markup doesn't use. I don't see how that would have any negative side effects - only a more flexible web framework, passing more responsibility to the markup side. getDebugSettings().setComponentUseCheck(false); this is enabled by default in development mode - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Autocomplete field sends me right to Expired error page (v.1.3 beta 1)
make a test case and attach that to a jira issue. johan On 7/10/07, Francisco Diaz Trepat - gmail [EMAIL PROTECTED] wrote: Hello, I am still having this problem and I don't know what could be. Can someone help? -- Forwarded message -- From: Francisco Diaz Trepat - gmail [EMAIL PROTECTED] Date: Jul 6, 2007 5:52 PM Subject: Autocomplete field sends me right to Expired error page (v.1.3beta 1) To: wicket-user@lists.sourceforge.net Hi guys, I have an Autocomplete field. As soon as I hit a key the following url gets loaded. http://localhost:8084/ArgoWeb2/?wicket:bookmarkablePage=%3Aorg.apache.wicket.markup.html.pages.PageExpiredErrorPage I copy the code from the example at: http://wicketstuff.org/wicket13/ajax/?wicket:bookmarkablePage=%3Aorg.apache.wicket.examples.ajax.builtin.AutoCompletePage Am I missing something? is this common? cheers, f(t) - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] access to private fields
Of course, if Java had compile-time MyClass#field syntax, then that could enforce the visibility and everyone would be happy. +1! - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] do not want to log ERROR when visiting a nonexistant page
as far as i know in deployment mode we are only throwing an InternalExceptionPage on that page we don't give the exception. johan On 7/10/07, Ingram Chen [EMAIL PROTECTED] wrote: This anonys me too. IMHO I think by default, it should log error in development mode, and keep silent in deployment mode. On 7/10/07, Eelco Hillenius [EMAIL PROTECTED] wrote: In my web app, when someone visits a page that doesn't exist (eg. by manually mucking with the url), they might end up at an error page with a stack trace, and also when that happens, wicket logs an ERROR like: ERROR [RequestCycle] - Unable to load class with name: com.foo.bar. I don't like that this is an ERROR, since our monitoring picks it up and will send spurious warning emails to our team. Is there a better way I can be dealing with this? In Wicket 1.3 you can provide a custom request cycle and override RequestCycle#logRuntimeException Eelco - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- Ingram Chen online share order: http://dinbendon.net blog: http://www.javaworld.com.tw/roller/page/ingramchen - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] StringResourceModel feature or bug??
is the string key 3 time exactly the same? or is the locale added to it and then stripped down? On 7/9/07, Murat Yücel [EMAIL PROTECTED] wrote: Hi All, I have some problems when using StringResourceModel. It seems like it is calling the IStringResourceLoader 3 times. I am currently using wicket 1.3.0-incubator. Here is an example: CLASS: TestPage.java public class TestPage extends WebPage { public TestPage() { StringResourceModel model = new StringResourceModel(myresourcekey, this, null); add(new Label(label, model)); } } MARKUP:TestPage.html html head titleTest Page/title /head body h1This is a test page.../h1 span wicket:id=label/span /body /html PROPERTY FILE:TestPage.properties myresourcekey=label Add a breakpoint in the wicket class ComponentStringResourceLoader.publicString loadStringResource(final Component component, final String key) Trigger the webpage and you will see it be triggered 3 times. /Murat - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Seam2 and Wicket
Using the designer the user could draw visually the flow between pages .. but this is what Seam do with page flow. This strikes me as doing something shiny just because you can, rather than because it would be useful. The reason you need this kind of stuff in Seam is presumably that you end up managing all the state yourself otherwise? I prefer to just write some trivial Java, thanks. +1 - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] access to private fields
i am als -1 on removing this. it won't help a bit also this feature is already in the PropertyResolver from november last year. So already 8 or 9 months in the code base. johan On 7/9/07, Matej Knopp [EMAIL PROTECTED] wrote: I'm a strong -1 on removing access to private fields. This wouldn't really change anything. When someone wants to access private fields, he/she will do that, with or without PropertyModel. -Matej On 7/8/07, Igor Vaynberg [EMAIL PROTECTED] wrote: On 7/7/07, Kent Tong [EMAIL PROTECTED] wrote: I've never said saving typing is always bad. As I said in another post, saving typing at the cost of static type checking sometimes is a justified tradeoff (eg, regex). Just that I've never seen that being done at the cost of exposing implementation details. see, this is where we disagree. i think putting public setters and getters for things that are really meant to be only private is exposing implementation details. if someone goes hunting for a private field - and they do have to go hunting for it unless it is code they wrote - that is by their choice. you havent leaked anything, they went looking and they can access it with or without property model. the securitymanager concern is valid, albeit having a functioning securitymanager is a rare occurence. i was going to suggest having an application setting to enable this feature in propertymodel, but now that i think about it it can break libraries that were written with this feature being enabled in mind. so i think it is best to simply leave it the way it is - always on. but, i think what we can do and what is simple and elegant is to restrict access to fields that are declared on the class being introspected - ignoring its superclass hierarchy. that way we limit the scope and still have it viable for usecases where it is really useful. -igor - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Seam2 and Wicket
pageflow? like defining the next page in xml file? and then instead of setResponsePage(new MyNextPage()); i get setResponsePage(mynextpageasastring) if you want something like that then you should really develop then on top if wicket yourself. because that won't make it into core. johan On 7/6/07, Paolo Di Tommaso [EMAIL PROTECTED] wrote: I think it depends how Seam will be really decoupled from JSF. I think it would be a nice option to Seam users to use Wicket as presentation layer instead of JSF, but if so the integration should be a Seam developers matter .. What would be nice to have in Wicket from an integration with Seam is the Pageflow mechanism. I think this is one the most interesting Seam feature that is missing in the Wicket framework. - Paolo On 7/6/07, Eelco Hillenius [EMAIL PROTECTED] wrote: I think the BPM feature would be a nice addition. I'm curious to learn what you would think that should look like. I've heard of a couple of projects that used/ integrated Wicket + jBPM (likely the default of SEAM) but everyone might have different ideas on it. How would you want to use such integration as an end-user? I checked out seam from cvs today and browsed through the code a bit (and also looked at JSR 299 for that matter). Gavin states that Seam is now ready to be used in other frameworks. Well... only if those other frameworks work with page flows, support EL, manage state independenly from objects, etc. Stuff Wicket doesn't need. But if that's all stripped, what's left? Really, it looks to me that Seam (and JSR-299) are completely bound to JSF, if not technically, than at least conceptually. I think it is better to just stay focussed on what Wicket is good at. We have excellent facilities for state management, model binding, etc, and adding a framework in between will only make Wicket more heavy weight. But please do speak up if you don't agree with what I think of Seam + Wicket, and give some concrete examples of how such integration would be an advantage. Eelco - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] 401 HTTP authentication?
you can use a Page that you also display and then in the configureResponse() you can set the right status like the AccessDeniedPage does: protected void configureResponse() { super.configureResponse(); getWebRequestCycle().getWebResponse().getHttpServletResponse().setStatus( HttpServletResponse.SC_FORBIDDEN); } or if you don't want a page but only set the status you can do: RequestCycle.get().setRequestTarget(new IRequestTarget() { respond() { getWebRequestCycle().getWebResponse().getHttpServletResponse().setStatus( HttpServletResponse.SC_FORBIDDEN); } }); On 7/4/07, Jesse Barnum [EMAIL PROTECTED] wrote: What is the right way to use basic HTTP authentication? I know how to read the headers to extract the username and password, but if they don't match, or if they're not supplied, what is the best way to send the 401 response to the user? It seems like the ISecuritySettings.setUnauthorizedComponentInstantiationListener() method assumes that you want to present an HTML login component to the user. --Jesse Barnum, President, 360Works http://www.360works.com (770) 234-9293 - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Copenhagen Wicket Users Group - interested?
yes everybody start calling our new phone buddy!! On 7/3/07, Martijn Dashorst [EMAIL PROTECTED] wrote: I wonder how much spam this will attract :) Martijn -- Wicket joins the Apache Software Foundation as Apache Wicket Apache Wicket 1.3.0-beta2 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta2/ - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] onSubmit() called twice
first AjaxFormValidationBehavior doesn't do client side (javascript) validation. it calls the server and does this by submitting the form. so if you change the field where you have this validation on. And then you directly click a submit button yes it will be done twice. first the fields onchange is triggered (or the button i dont know what the browser sees first) then the button click. so yes you get 2 form submits But i don't know where you add that form on and what onchange you trigger because this: add( new AjaxFormValidatingBehavior( this, onchange ) ); seems to me that you add this to a forms onchange? (because this needs to be a form) but i guess you mean textfield.add( new AjaxFormValidatingBehavior( this, onchange ) ); johan On 7/3/07, David Leangen [EMAIL PROTECTED] wrote: Hi, Eelco, I guess I found why this was happening, but somehow this doesn't seem right to me. I had been experimenting with adding this add( new AjaxFormValidatingBehavior( this, onchange ) ); to my RequiredTextField. It never did work for me, but I thought I'd get back to it later. [When I say it doesn't work, I mean that there is no Javascript validation (which IIUC is what's supposed to happen).] Anyway, when I add this behaviour, onSubmit() is getting called twice for some reason, which at least for me is definitely not the desired behaviour of my form. Is this the expected behaviour, or is something wrong? Cheers, Dave On Mon, 2007-07-02 at 21:51 -0700, Eelco Hillenius wrote: onSubmit(), and consequently the code I have in that overridden method, is being called twice. I'm wondering if it's my misunderstanding of how Wicket works, and this behaviour is intended, or if I somehow introduced a bug in my code. If this is caused by my error, does anybody have any hints as to where I can look to find the source of this method's being called twice? That should definitively not happen. Can you tell us again what Wicket version you are using, and can you set a break point in your onSubmit method and tell us the trace? Eelco - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] jWeekend London-based Wicket training course on July 14th/15th
hmm a weekend in london! /me checking flights :) On 7/3/07, Al Maw [EMAIL PROTECTED] wrote: Hi folks, This is a shameless plug. However, it's an on-topic shameless plug, so hopefully that's fine with everyone. ;-) jWeekend run weekend training courses for people who are too busy to do them during the week. I'm going to be helping run a course on Wicket on the weekend of July 14th/15th. The programme is looking really interesting and comprehensive, and this will be a fabulous opportunity to really get up to speed with the framework. Obviously, I'd love to see some of you there. For more details and booking information please see the web site, which lives here: http://www.jweekend.co.uk Best regards, Al -- Alastair Maw Wicket-biased blog at http://herebebeasties.com - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Use getConverterInput rather than updateModel in FormComponentPanel
by the way this is a bit more dangerous now: protected void convertInput() { setConvertedInput(dateField.getConvertedInput()); } this goes ok because we visit child post order. and because dateField is a child it works But getConvertedInput and convertInput() are called in different flows. johan On 7/2/07, ChuckDeal [EMAIL PROTECTED] wrote: Eelco Hillenius wrote: Good point. I didn't think about getConvertedInput being called multiple times. I'm working on a refactoring now. Removing final from getConvertedInput wasn't the smartest thing to do it turns out. I'm thinking about making that method final again, and instead removing final from convert (and rename that to convertInput) and add setConvertedInput. You can then override convertInput and call setConvertedInput with the new value, and be sure this method will only be called once. As it turns out, using getConvertedInput was the best for me either :). When I was writing a validator for my component, the input was null which caused it to throw an exception. Upon figuring out why it was throwing the ex, I realized that I really wanted my Custom component to defer to the underlying text box, so I made getInputAsArray return the underlying TextBox's getInputAsArray and then I overrode convertValue to do what getConvertedInput was doing before. And since I now have valid data from getInputAsArray, validators don't cause exceptions. Chuck -- View this message in context: http://www.nabble.com/Use-getConverterInput-rather-than-updateModel-in-FormComponentPanel-tf3873952.html#a11399774 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Use getConverterInput rather than updateModel in FormComponentPanel
protected Object convertInput() { return dateField.convertInput(); } but that will mean that it will call twice convert intput on the inner date field. johan On 7/3/07, Eelco Hillenius [EMAIL PROTECTED] wrote: by the way this is a bit more dangerous now: protected void convertInput() { setConvertedInput(dateField.getConvertedInput()); } this goes ok because we visit child post order. and because dateField is a child it works But getConvertedInput and convertInput() are called in different flows. Yeah, I noticed that. I couldn't really think of a better solution though. Either you tell users to override a method that can (will) be called multiple times - getConvertedInput - and there isn't even a guarantee when that is, or, like we do now, we tell users to override a method that will only be called once and at a clear point in the processing. WDYT Johan? Eelco - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] onSubmit() called twice
you can use onchange but then you don't have to have a submit button because after every change your form is submitted. On 7/3/07, Igor Vaynberg [EMAIL PROTECTED] wrote: On 7/3/07, Johan Compagner [EMAIL PROTECTED] wrote: first AjaxFormValidationBehavior doesn't do client side (javascript) validation. it calls the server and does this by submitting the form. so if you change the field where you have this validation on. And then you directly click a submit button yes it will be done twice. first the fields onchange is triggered (or the button i dont know what the browser sees first) then the button click. so yes you get 2 form submits But i don't know where you add that form on and what onchange you trigger because this: add( new AjaxFormValidatingBehavior( this, onchange ) ); seems to me that you add this to a forms onchange? (because this needs to be a form) but i guess you mean textfield.add ( new AjaxFormValidatingBehavior( this, onchange ) ); the problem here is that onchange is fired when the focus is lost from the field. so if you are on that field and you click the submit button this will result in two form-submittals that are very very close to each other. thus the double submit that you see. you should add validatingbehavior to onkeyup, and make sure to set a throttle so it doesnt flood your server. -igor johan On 7/3/07, David Leangen [EMAIL PROTECTED] wrote: Hi, Eelco, I guess I found why this was happening, but somehow this doesn't seem right to me. I had been experimenting with adding this add( new AjaxFormValidatingBehavior( this, onchange ) ); to my RequiredTextField. It never did work for me, but I thought I'd get back to it later. [When I say it doesn't work, I mean that there is no Javascript validation (which IIUC is what's supposed to happen).] Anyway, when I add this behaviour, onSubmit() is getting called twice for some reason, which at least for me is definitely not the desired behaviour of my form. Is this the expected behaviour, or is something wrong? Cheers, Dave On Mon, 2007-07-02 at 21:51 -0700, Eelco Hillenius wrote: onSubmit(), and consequently the code I have in that overridden method, is being called twice. I'm wondering if it's my misunderstanding of how Wicket works, and this behaviour is intended, or if I somehow introduced a bug in my code. If this is caused by my error, does anybody have any hints as to where I can look to find the source of this method's being called twice? That should definitively not happen. Can you tell us again what Wicket version you are using, and can you set a break point in your onSubmit method and tell us the trace? Eelco - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] DynamicWebResources, ResourceLinks, and URL Parameters
hmm i guess it would be easier if we just made this method protected i think: AbstractRequestTargetUrlCodingStrategy private void appendValue(AppendingStringBuffer url, String key, String value) and this one is already protected: protected ValueMap decodeParameters(String urlFragment, Map urlParameters) so then you can generate your own param string by extending SharedResourceRequestTargetUrlCodingStrategy and override those 2 methods. johan On 7/2/07, Karl M. Davis [EMAIL PROTECTED] wrote: Igor, I actually did figure out a way to get this working without having to do any (major) hacking. Pretty simple, too, once I figured it out. I just created a new IndexedParamResourceUrlCodingStrategy class (included below) and mounted that. For anyone else looking to do this, here is the relevant code: // Register the resource with the web application app.getSharedResources().add(resourceName, customResource); // Mount the resource ResourceReference ref = new ResourceReference(resourceName); app.mount(new IndexedParamResourceUrlCodingStrategy(mountUrl, ref.getSharedResourceKey())); That takes care of just about everything. However, right about that point, you'll likely run into the following bug: https://issues.apache.org/jira/browse/WICKET-631. I did have to hack around that a bit, unfortunately. In my DynamicWebResource class, I added a cachedParams ThreadLocal and cache the parameter ValueMap during setHeaders(WebResponse) in it, because the parameters get wiped out before getResourceState() is called. Here's the code for that in case anyone needs it: public class SomeResource extends DynamicWebResource { private static ThreadLocalValueMap cachedParams; ... /** * @see org.apache.wicket.markup.html.DynamicWebResource#setHeaders(org.apache.wicket.protocol.http.WebResponse) */ @Override protected void setHeaders(WebResponse response) { super.setHeaders(response); cachedParams.set(getParameters()); } ... /** * @see org.apache.wicket.markup.html.DynamicWebResource#getResourceState() */ @Override protected ResourceState getResourceState() { ValueMap params = cachedParams.get(); ... } } And voila! I now have mounted resources with pretty indexed parameters like the following: .../myresource/folderparam/folderparam/fileparam I'm not sure how to go about submitting patches, but the following class would probably help others looking to do the same out. I stole most of the code for it wholesale from IndexedParamUrlCodingStrategy, anyways. /** * This class is similar to [EMAIL PROTECTED] IndexedParamUrlCodingStrategy}, but for * [EMAIL PROTECTED] Resource}s, not bookmarkable pages. * * NOTE: The code for [EMAIL PROTECTED] #appendParameters(AppendingStringBuffer, Map)} and * [EMAIL PROTECTED] #decodeParameters(String, Map)} was copied verbatim from * [EMAIL PROTECTED] IndexedParamUrlCodingStrategy}. * * @author Karl M. Davis */ public class IndexedParamResourceUrlCodingStrategy extends SharedResourceRequestTargetUrlCodingStrategy { /** * Constructor. * * @param mountPath *the path to mount the [EMAIL PROTECTED] Resource} at * @param resourceKey *the key of the [EMAIL PROTECTED] Resource} (see *[EMAIL PROTECTED] ResourceReference#getSharedResourceKey()}) */ public IndexedParamResourceUrlCodingStrategy(String mountPath, String resourceKey) { super(mountPath, resourceKey); } /** * @see org.apache.wicket.request.target.coding.AbstractRequestTargetUrlCodingStrategy#appendParameters(org.apache.wicket.util.string.AppendingStringBuffer, * java.util.Map) */ protected void appendParameters(AppendingStringBuffer url, Map parameters) { int i = 0; while (parameters.containsKey(String.valueOf(i))) { String value = (String) parameters.get(String.valueOf(i)); url.append(/).append(urlEncode(value)); i++; } String pageMap = (String) parameters .get(WebRequestCodingStrategy.PAGEMAP); if (pageMap != null) { i++; url.append(/).append(WebRequestCodingStrategy.PAGEMAP) .append(/).append(urlEncode(pageMap)); } if (i != parameters.size()) { throw new WicketRuntimeException( Not all parameters were encoded. Make sure all parameter
Re: [Wicket-user] replaceWith() not working
it is not by accident an ajax request right? On 6/28/07, Evan Chooly [EMAIL PROTECTED] wrote: On 6/28/07, Eelco Hillenius [EMAIL PROTECTED] wrote: public void onClick() { DeleteLink.this.replaceWith(new ConfirmDeletePanel(DeleteLink.this.getId(), really delete?) { @Override protected void onCancel() { replaceWith(DeleteLink.this); } @Override protected void onConfirm() { Filter filter = (Filter)getParent().getParent().getModelObject(); service.delete(filter); replaceWith(DeleteLink.this); } }); } Code looks fine to me. And I'm using replaceWith quite a bit and it works fine. Can you try to set a break point in onClick, see if it arrives there and step into the replace code? The onClick() is definitely getting called (I set breakpoints this morning...) but the panel just isn't getting replaced. Now, is there any problem with replacing a link (in this case) with a panel? There's no impedence mismatch between the a and the span that would normally get used? - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] pagemap locking
Yeah i think that code i also did see, this should go into the next version yes. But i dont see how we can do that easy for java 4 johan On 6/28/07, Jonathan Locke [EMAIL PROTECTED] wrote: yeah, i just figured that out. i'll just patch our wicket for now. but we should add this for wicket 1.4 (in a nicer way than this (generic utility method), of course): final StringBuilder builder = new StringBuilder(); StackTraceElement[] elements = t.getStackTrace(); for (int i = 0; i elements.length; i++) { builder.append (elements[i]); } throw new WicketRuntimeException(After + timeout + the Pagemap + pageMapName + is still locked by: + t + , giving up trying to get the page for path: + path + \nStack Trace: + builder.toString()); Eelco Hillenius wrote: makes sense all right. is there any way we could print out a stack trace of the thread that's holding the monitor we're trying to grab? maybe via JMX? this would be extremely useful when this exception is thrown! We've had a thread about that, and the conclusion was that this is possible (I believe Johan built it) but only with Java 5. Eelco - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- View this message in context: http://www.nabble.com/pagemap-locking-tf3996742.html#a11351736 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Session.dirty()
i guess it could be public, it isnt public because most of the time you alter a variable inside session and then call dirty on the session itself But if you know your object is hold on to by the session and you are in that object itself, changing it then yes you also have to call dirty so i guess for this kind we just make it public. johan On 6/29/07, Maurice Marrink [EMAIL PROTECTED] wrote: Hi, I am in the process of making wasp and swarm play nicer within a clustered environment. Johan suggested calling dirty() whenever i make a change in the session (which is where i store everything indirectly). But because i have login method on my authorization strategy (which should call dirty after a login) and Session.dirty() is protected i can not call dirty unless i expose it in my WaspSession. Before i do that however i thought i check here if there was a special reason not to make dirty() public. I could not come up with one especially since bind is also public which kind of has the same (side)effect. So my question, what is the reason dirty() is not public and if there is no reason could you make it public. Thanks, Maurice - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] pagemap locking
its a native call that isn't there in java 4 private native static StackTraceElement[][] dumpThreads(Thread[] threads); johan On 6/29/07, Martijn Dashorst [EMAIL PROTECTED] wrote: We could try retrotranslator to see what kind of code is emitted? Martijn On 6/29/07, Johan Compagner [EMAIL PROTECTED] wrote: Yeah i think that code i also did see, this should go into the next version yes. But i dont see how we can do that easy for java 4 johan On 6/28/07, Jonathan Locke [EMAIL PROTECTED] wrote: yeah, i just figured that out. i'll just patch our wicket for now. but we should add this for wicket 1.4 (in a nicer way than this (generic utility method), of course): final StringBuilder builder = new StringBuilder(); StackTraceElement[] elements = t.getStackTrace(); for (int i = 0; i elements.length; i++) { builder.append(elements[i]); } throw new WicketRuntimeException(After + timeout + the Pagemap + pageMapName + is still locked by: + t + , giving up trying to get the page for path: + path + \nStack Trace: + builder.toString()); Eelco Hillenius wrote: makes sense all right. is there any way we could print out a stack trace of the thread that's holding the monitor we're trying to grab? maybe via JMX? this would be extremely useful when this exception is thrown! We've had a thread about that, and the conclusion was that this is possible (I believe Johan built it) but only with Java 5. Eelco - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- View this message in context: http://www.nabble.com/pagemap-locking-tf3996742.html#a11351736 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- Wicket joins the Apache Software Foundation as Apache Wicket Join the wicket community at irc.freenode.net: ##wicket Wicket 1.2.6 contains a very important fix. Download Wicket now! http://wicketframework.org - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] AjaxTabbedPanel and back button (Wicket 1.2.x)
i dont think this is really possible in 1.2. Because ajax and versioning is not really implemented in 1.3 we have IPageVersionManager.rollbackPage() where you can rollback a page version. But to support or catch the backbutton in the browser you need to write the javascript yourself that then calls a behavior on the page that roll backs 1 and then set that as the response page. johan On 6/28/07, Paolo Di Tommaso [EMAIL PROTECTED] wrote: Guys, I have a page with an AjaxTabbedPanel component. When the user change the tab selection and then click on the browser back button it come back to the previous page. I would like instead to come back to the previous selected tab (when has been changed obviously). This is the default behaviour with a TabbedPanel component. It is possible to have the same behaviour with the AjaxTabbedPanel component? Thank you, - Paolo - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Oracle Application Server 10g (10.1.2) and Wicket / ajax
it could be that we set the headers again after that in the chain.doFiltercall. On 6/28/07, Nino Saturnino Martinez Vazquez Wael [EMAIL PROTECTED] wrote: Hi Matej I've tried adding this: public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { if (servletRequest instanceof HttpServletRequest) { HttpServletRequest request = (HttpServletRequest) servletRequest; /* * First check if wicket ajax header are present, if true then add * missing parameter */ if (isHeaderPresent(request, Wicket_AJAX_HEADER)) { if (LOG.isDebugEnabled()) { LOG.debug(Got a wicket ajax header for domain: + request.getServerName()); } if (servletResponse instanceof HttpServletResponse) { if (LOG.isDebugEnabled()) { LOG.debug(Trying to add + CACHE_HEADER + , + CACHE_NO_STORE); } HttpServletResponse response = (HttpServletResponse) servletResponse; response.addHeader(CACHE_HEADER, CACHE_NO_STORE); if (LOG.isDebugEnabled()) { LOG.debug(Header added sucessfully, has these + CACHE_HEADER + 's:); Enumeration enum = request.getHeaders (CACHE_HEADER); while (enum.hasMoreElements()) { String header = (String) enum.nextElement(); LOG.debug(header); } } } } } filterChain.doFilter(servletRequest, servletResponse); } However it does not seem to add the header? Hoping you can tell what wrong? Log tells me that the filter does get activated and adds to header.. But on the web page firebug does not report that the header are there... regards Nino Matej Knopp wrote: I think we could make this by default in wicket. Until then, you can make a filter, that checks if the request contains wicket-ajax header, and when it does, add the cache-control no-store header. -Matej On 6/27/07, Nino Saturnino Martinez Vazquez Wael [EMAIL PROTECTED] wrote: Hi We are having some troubles using wicket and Oracle web server. It's some of our ajax calls that just hangs. By hanging I mean that if we click an ajax triggering control, if fires the event and just never gets a response. Debuggin a little deeper it seems that wicket does not even gets the request. We are suspecting that it has something todo with the oracle web cache. So the ajax call sends some attributs with it to avoid being cached, however it's missing the cache-control=no-store. We are not sure that this are causing our troubles. How can I make the ajax call include the attribute? Has anybody some ideas about this? I've tested the application on jetty, and here it works without any problems. any help highly appreciated. regards Nino - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list
Re: [Wicket-user] AjaxTabbedPanel and back button (Wicket 1.2.x)
not really, that part (the client part) is not really implemented yet. waiting for someone to do it :) johan On 6/28/07, Paolo Di Tommaso [EMAIL PROTECTED] wrote: Umh .. it is a pity .. Is there any example to start from ? Thanks a lot - Paolo On 6/28/07, Johan Compagner [EMAIL PROTECTED] wrote: i dont think this is really possible in 1.2. Because ajax and versioning is not really implemented in 1.3 we have IPageVersionManager.rollbackPage() where you can rollback a page version. But to support or catch the backbutton in the browser you need to write the javascript yourself that then calls a behavior on the page that roll backs 1 and then set that as the response page. johan On 6/28/07, Paolo Di Tommaso [EMAIL PROTECTED] wrote: Guys, I have a page with an AjaxTabbedPanel component. When the user change the tab selection and then click on the browser back button it come back to the previous page. I would like instead to come back to the previous selected tab (when has been changed obviously). This is the default behaviour with a TabbedPanel component. It is possible to have the same behaviour with the AjaxTabbedPanel component? Thank you, - Paolo - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] NPE in PropertyResolver
i think in the unit test the init method that is now introduced in the PropertyREsolver isn't called: private static Map getClassesToGetAndSetters() { return (Map)applicationToClassesToGetAndSetters.get(Application.get ()); } /** * Initialize cache for this app. * * @param application */ public static void init(Application application) { applicationToClassesToGetAndSetters.put(application, new ConcurrentHashMap(64)); } AlMaw?? johan On 6/25/07, Jonathan Locke [EMAIL PROTECTED] wrote: i'm getting this in a unit test and wondering if anyone knows why that might happen: Caused by: java.lang.NullPointerException at org.apache.wicket.util.lang.PropertyResolver.getGetAndSetter( PropertyResolver.java:274) at org.apache.wicket.util.lang.PropertyResolver.getObjectAndGetSetter( PropertyResolver.java:266) at org.apache.wicket.util.lang.PropertyResolver.getPropertyClass( PropertyResolver.java:144) at org.apache.wicket.model.AbstractPropertyModel.getObjectClass( AbstractPropertyModel.java:199) at org.apache.wicket.markup.html.form.AbstractTextComponent.getModelType( AbstractTextComponent.java:119) at org.apache.wicket.markup.html.form.AbstractTextComponent.onBeforeRender( AbstractTextComponent.java:107) at org.apache.wicket.Component.beforeRender(Component.java:846) at org.apache.wicket.MarkupContainer.onBeforeRenderChildren( MarkupContainer.java:1449) -- View this message in context: http://www.nabble.com/NPE-in-PropertyResolver-tf3974388.html#a11281637 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] NPE in PropertyResolver
maybe we shouldn't store the class itself at all: Map getAndSetters = (Map)classesToGetAndSetters.get(clz); if (getAndSetters == null) { getAndSetters = new ConcurrentHashMap(8); classesToGetAndSetters.put(clz, getAndSetters); } but do put(clz.getName(), getAndSetters) hmm, on second hand that wont help a bit, because we need to keep references to fields and methods anyway. johan On 6/25/07, Johan Compagner [EMAIL PROTECTED] wrote: i think in the unit test the init method that is now introduced in the PropertyREsolver isn't called: private static Map getClassesToGetAndSetters() { return (Map)applicationToClassesToGetAndSetters.get( Application.get()); } /** * Initialize cache for this app. * * @param application */ public static void init(Application application) { applicationToClassesToGetAndSetters.put (application, new ConcurrentHashMap(64)); } AlMaw?? johan On 6/25/07, Jonathan Locke [EMAIL PROTECTED] wrote: i'm getting this in a unit test and wondering if anyone knows why that might happen: Caused by: java.lang.NullPointerException at org.apache.wicket.util.lang.PropertyResolver.getGetAndSetter( PropertyResolver.java:274) at org.apache.wicket.util.lang.PropertyResolver.getObjectAndGetSetter ( PropertyResolver.java:266) at org.apache.wicket.util.lang.PropertyResolver.getPropertyClass( PropertyResolver.java:144) at org.apache.wicket.model.AbstractPropertyModel.getObjectClass( AbstractPropertyModel.java :199) at org.apache.wicket.markup.html.form.AbstractTextComponent.getModelType( AbstractTextComponent.java:119) at org.apache.wicket.markup.html.form.AbstractTextComponent.onBeforeRender( AbstractTextComponent.java :107) at org.apache.wicket.Component.beforeRender(Component.java:846) at org.apache.wicket.MarkupContainer.onBeforeRenderChildren( MarkupContainer.java:1449) -- View this message in context: http://www.nabble.com/NPE-in-PropertyResolver-tf3974388.html#a11281637 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Question on Serialization
with the current 1.3 if you hold page references in other pages the the main pag is not serialized as a whole. Every page reference we come across is saved by itself in its own file. So pages are not saved twice or multiply in more then one file. The only thing i dont know currenlty is if PageX is the request page, PageY the response with a reference to PageX then it is still possible then PageX is saved twice (one time as main page and one time as a sub one, but this will result in one file for pagex) On 6/23/07, Iman Rahmatizadeh [EMAIL PROTECTED] wrote: Does holding references to other Pages inside a Page make them be serialized twice ? Like : class MyPage extends Page { ListPage otherPages; } would it make any difference if it was inside another object, like : class MyPage extends Page { MyPageHolder pageHolder; // serializable } finally, where exactly is this logic hidden in wicket code, so I can give it a closer look ? Iman - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Question on Serialization
no, also normal serialization. 1 page instance (id/version) is never saved in more then 1 file johan On 6/23/07, Eelco Hillenius [EMAIL PROTECTED] wrote: with the current 1.3 if you hold page references in other pages the the main pag is not serialized as a whole. Every page reference we come across is saved by itself in its own file. So pages are not saved twice or multiply in more then one file. The only thing i dont know currenlty is if PageX is the request page, PageY the response with a reference to PageX then it is still possible then PageX is saved twice (one time as main page and one time as a sub one, but this will result in one file for pagex) You are talking about the optimizatinos in the custom serialization mechanism, right? Eelco - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Use of Session
you should really create your own session. Usage of the metadata things should really be avoided for that kind of data. I almost could say. don't use meta data at all, its a wicket internal thing to store quickly markers and stuff like that. johan On 6/22/07, Matthieu Casanova [EMAIL PROTECTED] wrote: Hi, I'm not familiar with wicket sessions. I understand that I can create my own session object that extends the WebSession, and that will have some fields containing my sessions datas. In that case I have to replace the ISessionFactory of my application. The other choice to store datas in the Session is to use the getMetaData and setMetaData methods of WebSession ? What is the best choice ? thanks Matthieu - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] PageMap.AccessStack gone in 1.3
yes then SLC isn't used, you use the same thing as you did with 1.2 session size is increased then because more page/pageversions are in memory. johan On 6/21/07, Ivo van Dongen [EMAIL PROTECTED] wrote: Hi, Thanks for the quick reply. That would mean that the second level cache isn't used any more right? Does this lead to a great increase in session size or are there other disadvantages? Regards, Ivo On 6/20/07, Eelco Hillenius [EMAIL PROTECTED] wrote: On 6/20/07, Igor Vaynberg [EMAIL PROTECTED] wrote: you either have to pass a reference, keep a reference to last page in session, or not use the second level page store. If you put: protected ISessionStore newSessionStore() { return new HttpSessionStore(this); } in your application object, Wicket will use that session store instead of the default. HttpSessionStore is the same store as was the default in 1.2. Eelco - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- Ivo van Dongen Func. Internet Integration W http://www.func.nl T +31 20 423 F +31 20 4223500 - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] PageMap.AccessStack gone in 1.3
If you store the id/version of a page when it is renderd in your session (in a list/stack object) then you are doing exactly the same as the AccessStackPageMap would do. You should only store the id/version not the page itself, because you don't have to hold on to a reference of it you can always restore any page of the current session. So pagex.onRender - store the id/version in your session: now has an entry of 1 pagey.onRender - add the id/version of this one now has an entry of 2 pagez.onRender - add the id/version of this one now has an entry of 3 then you want to go back and take the id/version of pagey and restore that page for rendering. if you then want to completely do the same thing remove the pagez entry so that you now have 2 entries again after pagey rendered for the second time johan On 6/21/07, Ivo van Dongen [EMAIL PROTECTED] wrote: Hi, Sorry, but I don't get exactly what to do here. As I understand it you're advising me to store a separate map of Pages in the Session and then lookup the previous Page there? Otherwise I wouldn't see how to implement the YourSession.get().getPage() method as I still can't get to the PageMap's size to use that to calculate the previous PageEntry's id. I'm probably totally missing something here :) Thanks, Ivo On 6/20/07, Johan Compagner [EMAIL PROTECTED] wrote: What i would do is a bit different. You want a stack of the last rendered pages? if you have a common BasePage then override: protected void onBeforeRender() in that method you take your session and add a object that stores the page id and the current version number entry. YourSession.get().addPageEntry(getPageMapName(), getNumericId(), getCurrentPageVersion()); then if you want go back: YourSession.get().getPage(-1) -1 (is the previous page) -2 skip 2 in that method you can get the page then: return PageMap.forName(pagemapname).get(pageid,versionid) johan On 6/20/07, Ivo van Dongen [EMAIL PROTECTED] wrote: Hi, We're in the middle of upgrading one of our apps from wicket 1.2.6 to 1.3 (finally :)). Sadly, we're running into a small problem which we don't know how to get around. In our 1.2.6 version we had an utility class to set up previous page links based on the PageMap. It went something like this: public static PreviousPageLink getInstance(String markupId) { PageMap pageMap = (PageMap) Session.get().getDefaultPageMap(); int size = pageMap.getAccessStack().size(); if(size 0) { PageMap.Access access = (PageMap.Access) pageMap.getAccessStack().get(size-1); Page previousPage = pageMap.getEntry(access.getId ()).getPage(); ... } But in 1.3 the AccessStack isn't available in PageMap, only in AccessStackPageMap. But the PageMap used in our application is the SecondLevelCachePageMap which doesn't have any means to access the list of PageMapEntries. Any ideas on how to work arround this? We've tried to use the numeric id from the page, but that seems to be zero every time. Thanks in advance, Ivo and Rommert -- Ivo van Dongen Func. Internet Integration W http://www.func.nl T +31 20 423 F +31 20 4223500 - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- Ivo van Dongen Func. Internet Integration W http://www.func.nl T +31 20 423 F +31 20 4223500 - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now
Re: [Wicket-user] handling expiring pages
we already have hybrid urls if you make a statelessform or link then that will generate hybrid urls (the did that from day 1 we have the stateless support i think) On 6/20/07, Eelco Hillenius [EMAIL PROTECTED] wrote: But even if I would accept the usability penalty of the expiring pages, I'm surrounded by usability experts who will never do that. Moreover a very long session timeout won't be accepted by others. But if you require your users to be logged in, what alternatives are left then? Even if you would use another framework, you would have to deal with session time-outs, right? I'm sure there are still possibilities to improve though. One of the things that we've been talking about is to have a more recoverable model. Like in, when a page for an internal page is not found, we would try to construct it's bookmarkable counterpart etc. I think we've discussing this as 'hybrib urls' and Matej has been doing some experimentation with this. We also just need a couple of really good ideas and use cases if we want to improve on this. Cheers, Eelco - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Newbie Question: you are about to be redirected to a connection that is not secure Warning
as far as i know wicket never redirected to ful urls (including protocol) always relative (context path included or not) so it seems to me that when we send a redirect url the container doesn't prepends it with http instead of https. johan On 6/20/07, Hiller, Steve [EMAIL PROTECTED] wrote: Hi All, I just created my first Wicket-based demo project -- I like the framework and have been demonstrating it to my colleagues. I have a web page that consists of a form and a panel. The form data is used by some backend process that returns a very long string. The string is formatted and then displayed in a MultiLineLabel held within the panel. The same web page is then displayed with the results. The web app is deployed to a WebSphere application server, and SSL is turned on. It seems like when the page is about to be displayed with results, the following message is displayed: You are about to be redirected to a connection that is not Secure. The information you are sending to the current site might be retransmitted to a nonsecure site. Do you wish to continue? I have all the HTML pages and backing java classes all in one directory so I'm not sure why having SSL turned on is causing this problem. Any suggestions would be appreciated. Thanks, Steve - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] PageMap.AccessStack gone in 1.3
if you could come up with a nice navigation component that does this behavior we could maybe add this into wicket extentions if more people would like to have such a thing johan On 6/21/07, Ivo van Dongen [EMAIL PROTECTED] wrote: Hi, Thanks again for the help. As soon as I hit the reply button it dawned on me, guess it's to early :) Ivo On 6/21/07, Johan Compagner [EMAIL PROTECTED] wrote: If you store the id/version of a page when it is renderd in your session (in a list/stack object) then you are doing exactly the same as the AccessStackPageMap would do. You should only store the id/version not the page itself, because you don't have to hold on to a reference of it you can always restore any page of the current session. So pagex.onRender - store the id/version in your session: now has an entry of 1 pagey.onRender - add the id/version of this one now has an entry of 2 pagez.onRender - add the id/version of this one now has an entry of 3 then you want to go back and take the id/version of pagey and restore that page for rendering. if you then want to completely do the same thing remove the pagez entry so that you now have 2 entries again after pagey rendered for the second time johan On 6/21/07, Ivo van Dongen [EMAIL PROTECTED] wrote: Hi, Sorry, but I don't get exactly what to do here. As I understand it you're advising me to store a separate map of Pages in the Session and then lookup the previous Page there? Otherwise I wouldn't see how to implement the YourSession.get().getPage() method as I still can't get to the PageMap's size to use that to calculate the previous PageEntry's id. I'm probably totally missing something here :) Thanks, Ivo On 6/20/07, Johan Compagner [EMAIL PROTECTED] wrote: What i would do is a bit different. You want a stack of the last rendered pages? if you have a common BasePage then override: protected void onBeforeRender() in that method you take your session and add a object that stores the page id and the current version number entry. YourSession.get().addPageEntry(getPageMapName(), getNumericId(), getCurrentPageVersion()); then if you want go back: YourSession.get().getPage(-1) -1 (is the previous page) -2 skip 2 in that method you can get the page then: return PageMap.forName(pagemapname).get(pageid,versionid) johan On 6/20/07, Ivo van Dongen [EMAIL PROTECTED] wrote: Hi, We're in the middle of upgrading one of our apps from wicket 1.2.6to 1.3 (finally :)). Sadly, we're running into a small problem which we don't know how to get around. In our 1.2.6 version we had an utility class to set up previous page links based on the PageMap. It went something like this: public static PreviousPageLink getInstance(String markupId) { PageMap pageMap = (PageMap) Session.get ().getDefaultPageMap(); int size = pageMap.getAccessStack().size(); if(size 0) { PageMap.Access access = (PageMap.Access) pageMap.getAccessStack().get(size-1); Page previousPage = pageMap.getEntry(access.getId ()).getPage(); ... } But in 1.3 the AccessStack isn't available in PageMap, only in AccessStackPageMap. But the PageMap used in our application is the SecondLevelCachePageMap which doesn't have any means to access the list of PageMapEntries. Any ideas on how to work arround this? We've tried to use the numeric id from the page, but that seems to be zero every time. Thanks in advance, Ivo and Rommert -- Ivo van Dongen Func. Internet Integration W http://www.func.nl T +31 20 423 F +31 20 4223500 - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- Ivo van Dongen Func. Internet Integration W http://www.func.nl T +31 20 423 F +31 20 4223500
Re: [Wicket-user] another missing stack trace
i dont think so because you do get Caused by? We don't print caused by, that is the thing we change about the input. what do you exactly see? so whats in that [...] space you have in the email? johan On 6/20/07, Jonathan Locke [EMAIL PROTECTED] wrote: could this be caused by this thread (which we never quite did finish)? http://www.nabble.com/abbreviated-stack-traces-tf3837742.html#a10899418 Jonathan Locke wrote: i just got another missing stack trace problem: [...] Caused by: java.lang.NullPointerException then no stack trace for the NPE. eelco earlier asserted that my logging config must be wrong while johan said we must have a problem. the only odd bit of configuration in our log4j file is this pattern: log4j.appender.Stdout.layout.conversionPattern=[%d{HH:mm:ss}] %-5p - %-26.26c{1} - %m\n could that be the problem somehow? cause if not, i think we have a pretty serious logging problem that needs some attention. -- View this message in context: http://www.nabble.com/another-missing-stack-trace-tf3953540.html#a11217625 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] PageMap.AccessStack gone in 1.3
What i would do is a bit different. You want a stack of the last rendered pages? if you have a common BasePage then override: protected void onBeforeRender() in that method you take your session and add a object that stores the page id and the current version number entry. YourSession.get().addPageEntry(getPageMapName(), getNumericId(), getCurrentPageVersion()); then if you want go back: YourSession.get().getPage(-1) -1 (is the previous page) -2 skip 2 in that method you can get the page then: return PageMap.forName(pagemapname).get(pageid,versionid) johan On 6/20/07, Ivo van Dongen [EMAIL PROTECTED] wrote: Hi, We're in the middle of upgrading one of our apps from wicket 1.2.6 to 1.3(finally :)). Sadly, we're running into a small problem which we don't know how to get around. In our 1.2.6 version we had an utility class to set up previous page links based on the PageMap. It went something like this: public static PreviousPageLink getInstance(String markupId) { PageMap pageMap = (PageMap) Session.get().getDefaultPageMap(); int size = pageMap.getAccessStack().size(); if(size 0) { PageMap.Access access = (PageMap.Access) pageMap.getAccessStack().get(size-1); Page previousPage = pageMap.getEntry(access.getId ()).getPage(); ... } But in 1.3 the AccessStack isn't available in PageMap, only in AccessStackPageMap. But the PageMap used in our application is the SecondLevelCachePageMap which doesn't have any means to access the list of PageMapEntries. Any ideas on how to work arround this? We've tried to use the numeric id from the page, but that seems to be zero every time. Thanks in advance, Ivo and Rommert -- Ivo van Dongen Func. Internet Integration W http://www.func.nl T +31 20 423 F +31 20 4223500 - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] infinite loop
can't you debug it and break on the exception NullPointer? But i agree somehow we should log this better. On 6/18/07, Jonathan Locke [EMAIL PROTECTED] wrote: aha. we might have two of these bugs, but i'm getting this trace now. does anyone have any idea what line of code it is that is failing to print the stack trace for this NPE into the log? it looks like an NPE is causing the processing step to restart over and over again. would be a good fix to wicket to have it print that stack trace and not just the exception message. [10:19:01] ERROR - RequestCycle? - java.lang.NullPointerException? [10:19:01] ERROR - RequestCycle? - java.lang.NullPointerException? [10:19:01] ERROR - RequestCycle? - java.lang.NullPointerException? [10:19:01] ERROR - RequestCycle? - java.lang.NullPointerException? [10:19:01] ERROR - RequestCycle? - java.lang.NullPointerException? [10:19:01] ERROR - RequestCycle? - java.lang.NullPointerException? [10:19:01] ERROR - RequestCycle? - java.lang.NullPointerException? [10:19:01] ERROR - RequestCycle? - java.lang.NullPointerException? [10:19:01] ERROR - RequestCycle? - java.lang.NullPointerException? [10:19:01] ERROR - RequestCycle? - java.lang.NullPointerException? [10:19:01] ERROR - RequestCycle? - java.lang.NullPointerException? [10:19:01] ERROR - RequestCycle? - java.lang.NullPointerException? [10:19:01] ERROR - RequestCycle? - java.lang.NullPointerException? [10:19:01] ERROR - [default] - Servlet.service() for servlet default threw exception java.lang.IllegalStateException?: Request processing executed 32767 steps, which means it is probably in an infinite loop. at org.apache.wicket.RequestCycle?.steps(RequestCycle?.java:1187) at org.apache.wicket.RequestCycle?.request(RequestCycle?.java:510) at org.apache.wicket.protocol.http.WicketFilter ?.doGet(WicketFilter?.java:251) at org.apache.wicket.protocol.http.WicketFilter ?.doFilter(WicketFilter?.java:125) at org.apache.catalina.core.ApplicationFilterChain ?.internalDoFilter(ApplicationFilterChain?.java:202) at org.apache.catalina.core.ApplicationFilterChain ?.doFilter(ApplicationFilterChain? Al Maw wrote: I've seen this happen if you run behind a mod_proxy and fail to set up the ProxyPassReverse setting properly. Make sure you have ProxyPassReverseCookiePath, too. See the wiki for details. Al Jonathan Locke wrote: anyone have any ideas on what might cause this? in particular can a user exception cause it or is it definitely a wicket bug? java.lang.IllegalStateException?: Request processing executed 32767 steps, which means it is probably in an infinite loop. at org.apache.wicket.RequestCycle?.steps(RequestCycle?.java:1187) at org.apache.wicket.RequestCycle?.request(RequestCycle?.java:510) at org.apache.wicket.protocol.http.WicketFilter ?.doGet(WicketFilter?.java:251) at org.apache.wicket.protocol.http.WicketFilter ?.doFilter(WicketFilter?.java:125) at org.apache.catalina.core.ApplicationFilterChain ?.internalDoFilter(ApplicationFilterChain?.java:202) at org.apache.catalina.core.ApplicationFilterChain ?.doFilter(ApplicationFilterChain?.java:173) at org.apache.catalina.core.StandardWrapperValve ?.invoke(StandardWrapperValve?.java:213) at org.apache.catalina.core.StandardContextValve ?.invoke(StandardContextValve?.java:178) at org.apache.catalina.core.StandardHostValve ?.invoke(StandardHostValve?.java:126) at org.apache.catalina.cluster.tcp.ReplicationValve ?.invoke(ReplicationValve?.java:346) at org.apache.catalina.valves.ErrorReportValve ?.invoke(ErrorReportValve?.java:105) at org.apache.catalina.core.StandardEngineValve ?.invoke(StandardEngineValve?.java:107) at org.apache.catalina.connector.CoyoteAdapter ?.service(CoyoteAdapter?.java:148) at org.apache.coyote.ajp.AjpAprProcessor ?.process(AjpAprProcessor?.java:425) at org.apache.coyote.ajp.AjpAprProtocol ?$AjpConnectionHandler?.process(AjpAprProtocol?.java:452) at org.apache.tomcat.util.net.AprEndpoint ?$Worker.run(AprEndpoint?.java:1285) at java.lang.Thread.run(Thread.java:619) - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- View this message in context: http://www.nabble.com/infinite-loop-tf3933416.html#a11167872 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___
Re: [Wicket-user] 1) PropertyResolver and Lists 2) Page expiration in 1.3
Yes you have :). private final static IGetAndSet getGetAndSetter(String exp, Class clz) has changed quite a lot. Do you have a unit test that fails now that shouldn't that i can add to the PropertyResolverTest ? No I don't. is this exception now thrown then: throw new WicketRuntimeException(The expression ' + exp + ' is neither an index nor is it a method for the list + clz); ?? - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] AjaxFormComponentUpdatingBehavior for DropDownChoice not working in IE
is maybe in IE the onChange method not called? Can you debug that what happens for example if you click somewhere in the browser so that the focus get lost from the dropdown? Where is the onChange code attached to?? Is it attached to the right tag? johan On 6/15/07, Javed [EMAIL PROTECTED] wrote: Your doubt is valid but dropdown is inside form. If this was the case then it wouldnt have worked in Firefox. Frank Bille wrote: Sounds weird. Could it be something with the dropdown isn't inside a form? Frank On 6/14/07, Javed [EMAIL PROTECTED] wrote: Thanks for Reply. Sorry, I didnt understand term Ajax debug What I did or rather saw is, In FireFox when I make selection in drop down the image changes. if I see the properties of this image then it shows correct name of that image. But in case of IE, I am not getting image name. I found one more thing, When I select any item from drop down in IE onUpdate method doesnt call. Javascript code written on onchange for both browser is same. Hope, this will help u to figure out the exact problem. Johan Compagner wrote: what do you see in the ajax debug when you get the results? are you really seeing a different url in the src? On 6/12/07, Javed [EMAIL PROTECTED] wrote: Follwing code snippet adds dropdown. private DropDownChoice getDropDown1(final Label image){ DropDownChoice dropDown1 = new DropDownChoice(selectUser,new PropertyModel(model,user1),Arrays.asList(options),choiceRenderer); favsDropDown.add(new AjaxFormComponentUpdatingBehavior(onchange){ /** * When Specified event took place this method gets called * @param target */ @Override protected void onUpdate(AjaxRequestTarget target) { String imageUrl = null; String user = model.getUser1(); // selected user object from drop down imageUrl = getImage(user); imageUrl = imageUrl == null? : imageUrl; model.setImageUrl(imageUrl); // sets new image model image.add(new AttributeModifier(src,new PropertyModel(model,imageUrl))); // sets image src target.addComponent(image); } }); return dropDown1; } When dropdown selection changes I need to modify image related to it. Frank Bille wrote: Hi I haven't got experience with that error. Can you please post the code that is not working? Frank On 6/11/07, Javed [EMAIL PROTECTED] wrote: I need to change image according the selection made in dropdown. It is working fine Firefox but not in IE I tried it with onchange and onclick. It worked in Firefox but some how it is not working IE. Is there anything I am missing? Is there any other approach to achieve the same functionality with Ajax effect? -- View this message in context: http://www.nabble.com/AjaxFormComponentUpdatingBehavior-for-DropDownChoice-not-working-in-IE-tf3901202.html#a11059387 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- View this message in context: http://www.nabble.com/AjaxFormComponentUpdatingBehavior-for-DropDownChoice-not-working-in-IE-tf3901202.html#a11075468 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email
Re: [Wicket-user] 1) PropertyResolver and Lists 2) Page expiration in 1.3
1) If the model is List, PropertySolver doesn't try to find fields. We are using vectors containing public fields. In 1.2.6 this was ok. i dont know if we really changed the property resolver behavior like tis for 1.3 Do you have a unit test that fails now that shouldn't that i can add to the PropertyResolverTest ? 2) Pressing any button or link causes page expiration. It seems that sessions are not stored anywhere. newSessionStore() of WebApplication is called every time session is needed. We tested this with very basic WebApplication and Page: WebApplication: - getResourceSettings().addResourceFolder(folder); was set WebPage: - contains one TextField, one AjaxButton and one ListView. Any ideas what to do? is the Session.bind() method called for a request? That either doesn't happen or you are constantly getting a new http session (you loose the cookie ?) johan - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] noob question about wicket
when you do this: CSSession session = (CSSession) getSession(); session.setUser(loggedInUser); then that method: CSSession.setUser(User) { this.user = user; dirty(); You have to do this here! } if you alter your session data you have to call dirty Then you session wil be stored. johan On 6/14/07, verbal evasion [EMAIL PROTECTED] wrote: yeah i got it to work. it wasnt the code, it was some maven weirdness that was going on. i have a few more questions. currently, when i login, my authentication mechanism tells me that i have successfully logged in, but it seems like the session information is not stored?? i have a print in my isVisible checks and it always says that the user variable is null. i may be returning the incorrect ResponsePage? // in constructor WebMarkupContainer loggedOut = new WebMarkupContainer(loggedOut) { public boolean isVisible() { boolean rv; rv = ((CSSession) getSession()).getUser() == null; System.out.println(loggedOut - isVisible? + rv); return rv; } }; ... WebMarkupContainer loggedIn = new WebMarkupContainer(loggedIn) { public boolean isVisible() { boolean rv; rv = ((CSSession) getSession()).getUser() != null; System.out.println(loggedIn - isVisible? + rv); return rv; } }; // In submit form public void onSubmit() { String userId = getUserId(); String password = getPassword(); User loggedInUser = null; try { loggedInUser = UserImpl.authenticate(userId, password); // Components can access the Session through getSession() CSSession session = (CSSession) getSession(); session.setUser(loggedInUser); System.out.println(Logged in as + userId); logger.debug(Logged in as + userId); //session.get().info(Logged in as + userId); //Index indexPage = new Index(userId, BasePage.this); //setResponsePage(indexPage); setResponsePage(new Index()); } catch (AuthenticationException ae) { String errMsg = getLocalizer().getString( login.errors.invalidCredentials , this); // Register this message with the form component. error(errMsg); } } when i keep logging in, it'll say the following: 20:06:14,806 INFO [STDOUT] loggedOut - isVisible? true 20:06:14,806 INFO [STDOUT] loggedIn - isVisible? false 20:06:14,810 INFO [STDOUT] loggedOut - isVisible? true 20:06:14,810 INFO [STDOUT] loggedOut - isVisible? true 20:06:14,811 INFO [STDOUT] loggedOut - isVisible? true 20:06:14,811 INFO [STDOUT] loggedIn - isVisible? false 20:06:14,813 INFO [STDOUT] loggedIn - isVisible? false 20:06:14,814 INFO [STDOUT] loggedOut - isVisible? true 20:06:14,814 INFO [STDOUT] loggedOut - isVisible? true 20:06:14,815 INFO [STDOUT] loggedOut - isVisible? true 20:06:14,815 INFO [STDOUT] loggedOut - isVisible? true 20:06:14,816 INFO [STDOUT] loggedIn - isVisible? false this is for *one* successful login attempt. why is the constructor run so many times? also, the output is wrong. what should i be returning as the setResponsePage from the onSubmit? thanks, verbal On 6/13/07, Igor Vaynberg [EMAIL PROTECTED] wrote: the form is added to loggedout container, also notice that the form tag is inside a div wicket:id=loggedout so it matches the java hierarchy. -igor On 6/13/07, verbal evasion [EMAIL PROTECTED] wrote: i tried implementing what you had put and i am stuck because loggedin and form are both in the highest scope of the websitem but in the java code, you have the form added to the loggedin WeMarkupContainer. that doesnt seem to fly with wicket unless i'm doing something wrong. i tried to take out the html for the login form, but that just doesnt make sense because there will be no corresponding html to describe what should be in the webcontainer. this is my code snippet. thanks in advance. /* * loggedOut - username and password */ WebMarkupContainer loggedOut = new WebMarkupContainer(loggedOut) { public boolean isVisible() { return ((CSSession) getSession()).getUser() == null; } }; TextField userIdField = new TextField(userId, new PropertyModel(this, userId)); PasswordTextField passField = new PasswordTextField(password, new PropertyModel(this, password)); Form form = new LoginForm(loginForm); add(loggedOut); loggedOut.add(form); form.add(userIdField); form.add(passField); /* * loggedIn - username
Re: [Wicket-user] nice url for DownloadLink
somehow there is also txt/strings written to the output, can you set a breakt point in the br.close() method and see what it wants to write? On 6/13/07, Jan Van Besien [EMAIL PROTECTED] wrote: Jean-Baptiste Quenot wrote: The concepts described in the static pages examples are the same in 1.2.6. You would just have to copy URIRequestTargetUrlCodingStrategy in your project, it is compatible with 1.2.6. Ok, that's what I did. In the WebPage class I have something like (StaticLink as in the example) StaticLink fileLink = new StaticLink(fileLink, new Model(reports/ + file.getAbsolutePath())); In the WebApplication class I do mount(/reports, new URIRequestTargetUrlCodingStrategy(/reports) { public IRequestTarget decode(RequestParameters requestParameters) { String path = getURI(requestParameters); FileResourceStream fileStream = new FileResourceStream(new File(path)); return new ResourceStreamRequestTarget(fileStream); } }); Note that I use a FileResourceStream because my files are not in the webapp. Now when I try to browse to a certain file, I get this in a JBoss server 08:09:44,384 ERROR [[rtApplication]] Servlet.service() for servlet rtApplication threw exception java.lang.IllegalStateException: getOutputStream() has already been called for this response at org.apache.catalina.connector.Response.getWriter(Response.java:596) at org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:186) at wicket.protocol.http.WebResponse.write(WebResponse.java:315) at wicket.protocol.http.BufferedWebResponse.close(BufferedWebResponse.java:75) at wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:229) at javax.servlet.http.HttpServlet.service(HttpServlet.java:697) at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112) at java.lang.Thread.run(Thread.java:595) Strange thing: if I replace the 'new File(path)' with 'new File(/tmp/test.txt)' it actually works (returning test.txt for every link ofcourse). Any ideas? thnx Jan - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Evaluating Wicket
where does you page markup come from? because if you also can generate that then you can dynamically generate the page markup an component structure. That is what we (servoy) do On 6/12/07, Patrick Angeles [EMAIL PROTECTED] wrote: We're up to the prototyping phase of a new JEE application. We are looking at EJB3 + some UI framework. There's actually two types of UI: a complex admin UI with around 100 concurrent users, and several public-facing, CMS-driven, branded web-sites with 1000s of concurrent users. Obviously, we'd prefer to use the same UI framework for both, but would need to take performance into account. I would love to use a component based framework for the admin UI. This leaves us with: JSF, Tapestry, Wicket, GWT... perhaps even SWT deployed via Java WebStart. The SWT solution is a bit risky, as we'd have to contend with corporate firewalls and basically come up with some HTTP tunneling solution (JAX-WS?). GWT is intriguing, but not an option for the CMS-driven front-end. Tapestry hasn't even entered into my mindshare, but I'm leery based on their track record of breaking backward-compatibility. This leaves us with Wicket and JSF. I've played with both technologies (v1.2.4 of Wicket), and JSF just scares me. I've used Facelets and Seam with JSF. We cannot take advantage of Seam because of the tiered architecture of our application (separate presentation and service clusters). So there's Wicket. Right now, I have the following reservations with Wicket: - Dates. When will 1.3 be released? How about 1.4? - Documentation. There's not one coherent document for 1.3... the Wiki is littered with bits of wisdom, but it's hard to tell what techniques work with or are obsoleted by version 1.3... - Books. When are the books coming out? - CMS... as I've said, the front-end is CMS driven, and because of load, I'd like to keep things stateless as much as possible (altho, all bets are off when the user logs in). I haven't yet found a good description of how 1.3 handles session state. I'd also like to know if I can mount bookmarkable pages dynamically... say if someone were to create and publish a new CMS page from the admin app. I like what I've seen of Wicket so far, and I would love to deploy the first enterprise-class application running Wicket, but I need some advice to get rid of the butterflies in my stomach. Regards, - P -- View this message in context: http://www.nabble.com/Evaluating-Wicket-tf3909204.html#a11084242 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] [Question] render(final MarkupStream markupStream)
isVisibleInHierarchy doesn't make to much sense because it has to be visible already because the parent is already rendering and passing its render to the childs. So the parent is already checked for visiblility. what you seem to have is more another bug that something is not created or tried to rendered that is already removed by another request On 6/13/07, Alex Objelean [EMAIL PROTECTED] wrote: I have a question about the render method. Why, before rendering, instead of checking isVisibleInHierarchy(), isVisible() is called? public final void render(final MarkupStream markupStream) { setMarkupStream(markupStream); setFlag(FLAG_IS_RENDERED_ONCE, true); // Determine if component is visible using it's authorization status // and the isVisible property. if (isRenderAllowed() isVisible()) //why not isVisibleInHierarchy() ?? { //etc... } //more code. } I am asking because I suspect a bug with the following StackTrace: Caused by: java.lang.NullPointerException at wicket.markup.html.list.ListView.renderItem(ListView.java:676) at wicket.markup.html.list.ListView.onRender(ListView.java:637) I happens when an AjaxTabbedPanel is updated via ajax. The tabbedPanel contains a holder Panel with a ListView child component. The visibility of the holder Panel is decided dynamicaly by overriding isVisible method. Maybe later I will try to isolate this situation and to make it more clear. Still, I would like to know if you've encountered something like this. Thank you! -- View this message in context: http://www.nabble.com/-Question--render%28final-MarkupStream-markupStream%29-tf3914413.html#a11098575 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] [Question] render(final MarkupStream markupStream)
we also have a. setting where we do output some markup with display:none when it is not visible, setOutputMarkupIdX() (i forgot the exact name) On 6/13/07, Alex Objelean [EMAIL PROTECTED] wrote: I found a workaround for this issue, so instead of overriding isVisible() of the bulkContainer WebMarkupContainer, I add an AttributeModifier which makes the container display:none.. private WebMarkupContainer getBulkContainer() { if (bulkContainer == null) { bulkContainer = new WebMarkupContainer(bulkContainer); bulkContainer.add(new SimpleAttributeModifier(class, invisible) { public boolean isEnabled() { return getMode().isEdit(); } }); //add to bulkContainer a form which contains a ListView. } return bulkContainer; } I do not like this solution, because anyone having firebug can hack the application + more markup than needed is generated... Johan Compagner wrote: isVisibleInHierarchy doesn't make to much sense because it has to be visible already because the parent is already rendering and passing its render to the childs. So the parent is already checked for visiblility. what you seem to have is more another bug that something is not created or tried to rendered that is already removed by another request On 6/13/07, Alex Objelean [EMAIL PROTECTED] wrote: I have a question about the render method. Why, before rendering, instead of checking isVisibleInHierarchy(), isVisible() is called? public final void render(final MarkupStream markupStream) { setMarkupStream(markupStream); setFlag(FLAG_IS_RENDERED_ONCE, true); // Determine if component is visible using it's authorization status // and the isVisible property. if (isRenderAllowed() isVisible()) //why not isVisibleInHierarchy() ?? { //etc... } //more code. } I am asking because I suspect a bug with the following StackTrace: Caused by: java.lang.NullPointerException at wicket.markup.html.list.ListView.renderItem(ListView.java:676) at wicket.markup.html.list.ListView.onRender(ListView.java:637) I happens when an AjaxTabbedPanel is updated via ajax. The tabbedPanel contains a holder Panel with a ListView child component. The visibility of the holder Panel is decided dynamicaly by overriding isVisible method. Maybe later I will try to isolate this situation and to make it more clear. Still, I would like to know if you've encountered something like this. Thank you! -- View this message in context: http://www.nabble.com/-Question--render%28final-MarkupStream-markupStream%29-tf3914413.html#a11098575 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- View this message in context: http://www.nabble.com/-Question--render%28final-MarkupStream-markupStream%29-tf3914413.html#a11099854 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] AjaxLink not updating Image
so the problem is that in the ajax request you still send the initial image? so it seems that set model on the nci has no effect at all? On 6/13/07, Jeremy Levy [EMAIL PROTECTED] wrote: I have an AjaxLink link that I am trying to use to update an image, in the onClick method I am replacing the Model of the image to the new path, however it's not working. I've tried it with Image and NonCachingImage, and also turned off Caching in FireFox. I'm not sure but the XML being sent doesn't look correct. I'm using 1.2.5. Here are the relevant code snipits: ... final NonCachingImage warningImage = new NonCachingImage(warningImage, new Model(images/alert_orange.png)); warningImage.setOutputMarkupId(true); add(warningImage); ... final AjaxLink link = new AjaxLink(theLink) { public void onClick(AjaxRequestTarget ajaxRequestTarget) { log.debug(Link Clicked...); warningImage.setModel(new Model(images/alert_green.png)); ajaxRequestTarget.addComponent(warningImage); } }; add(link); From the AJAX Console: INFO: INFO: Initiating Ajax GET request on /1/meetmoi?x=YuQ6ay6aKBGDiO5OfiMmT7sqTYDzw7kvj2TxXBaK1HxBbP9XAjorn1Zpm4EovOnWCZVHg*4WCL-uPukV*-Oz2CeAsvJdoPkhwicket:behaviorId=0random=0.337860019529019 INFO: Invoking pre-call handler(s)... INFO: Received ajax response (388 characters) INFO: ?xml version=1.0 encoding=UTF-8?ajax-responsecomponent id=notYetActive_repeatingAlerts_1_aAlert_warningImage ![CDATA[img id=notYetActive_repeatingAlerts_1_aAlert_warningImage src=/1/meetmoi/resources/com.mdate.web.panels.alerts.MobileNotValidatedAlert/images/alert_orange_en_US.png?wicket:antiCache=1181744625859 wicket:id=warningImage/]]/component/ajax-response INFO: Response parsed. Now invoking steps... INFO: Response processed successfully. INFO: Invoking post-call handler(s)... Thanks. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] FileUploadField in a ModalWindow
this will not work, you cant submit multipart with ajax as far as i know On 6/13/07, diego [EMAIL PROTECTED] wrote: I have a form inside a ModalWindow, it has a FileUploadField. When I submit the form I get the exception java.lang.IllegalStateException: ServletRequest does not contain multipart content It makes sense, because the request sent is not of the type multipart/... but instead application/x-www-form-urlencoded since it's an Ajax request. Is there any way to make this work? All my other forms appear in a ModalWindow, so it wouldn't be nice at all to have this one form on the opener page. I wouldn't mind if the form posted to a new instance of the page, I mean, not using an Ajax request for posting, which I guess it's done using a plain Button instead of an AjaxSubmitButton. When I tried that, I got a pop-up warning me I was going away from the ModalWindow (wich of course is precisely what I want to do, so I don't want to be warned) - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] AjaxFormComponentUpdatingBehavior for DropDownChoice not working in IE
what do you see in the ajax debug when you get the results? are you really seeing a different url in the src? On 6/12/07, Javed [EMAIL PROTECTED] wrote: Follwing code snippet adds dropdown. private DropDownChoice getDropDown1(final Label image){ DropDownChoice dropDown1 = new DropDownChoice(selectUser,new PropertyModel(model,user1),Arrays.asList(options),choiceRenderer); favsDropDown.add(new AjaxFormComponentUpdatingBehavior(onchange){ /** * When Specified event took place this method gets called * @param target */ @Override protected void onUpdate(AjaxRequestTarget target) { String imageUrl = null; String user = model.getUser1(); // selected user object from drop down imageUrl = getImage(user); imageUrl = imageUrl == null? : imageUrl; model.setImageUrl(imageUrl); // sets new image model image.add(new AttributeModifier(src,new PropertyModel(model,imageUrl))); // sets image src target.addComponent(image); } }); return dropDown1; } When dropdown selection changes I need to modify image related to it. Frank Bille wrote: Hi I haven't got experience with that error. Can you please post the code that is not working? Frank On 6/11/07, Javed [EMAIL PROTECTED] wrote: I need to change image according the selection made in dropdown. It is working fine Firefox but not in IE I tried it with onchange and onclick. It worked in Firefox but some how it is not working IE. Is there anything I am missing? Is there any other approach to achieve the same functionality with Ajax effect? -- View this message in context: http://www.nabble.com/AjaxFormComponentUpdatingBehavior-for-DropDownChoice-not-working-in-IE-tf3901202.html#a11059387 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- View this message in context: http://www.nabble.com/AjaxFormComponentUpdatingBehavior-for-DropDownChoice-not-working-in-IE-tf3901202.html#a11075468 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Form with ajaxsubmitbutton won't submit after error
Hi, it might be a book. which book? The one eelco and martijn are writing? Does he have that already?? johan - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Use case - dublin core METADATA generator
a form component already is able to store the value (as text) that a user entered without pushing it to the models (form.process not called) if you do a submit with a button that has default form processing on false then the data will be kept in the form components and when rendered again that data is used. johan On 6/7/07, Vít Rozkovec [EMAIL PROTECTED] wrote: Hallo, I have this problem and I need to get a bit of kick-start. See this page: http://www.webarchiv.cz/generator/dc.php (in Czech language, but I hope you get the picture) This is the generator which I need to replicate with all of its functionality in Wicket. So far I have managed to be able to add and remove fields for one group, I did this with panel. I created add and remove links which have as the response page the panel with a number of row (I am trying to get it functional just for a panel at first). Just a solution which came to my mind - should I create some wrapper class which contains all the elements settings and their values and pass it as an argument for page which generates the form and set this page as a response page for a add/remove link? Or is there some other, better way how can I manage to preserve already entered values when adding those fields at run-time? How can I access all the elements of the form after the submit, including those dynamically created ones? Give me please just some clue how to achieve this, I am a kind of newbie. Thanks alot. Regards Vitek - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] wicket did not make the grade.
Is there any friendlier poster here than Eelco? yes he is called igor johan - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] page map size
do you share something between those pages? On 6/8/07, Scott Swank [EMAIL PROTECTED] wrote: Martjin, We're using 1.2.6. Is the 2nd level cache available prior to 1.3? As for page complexity, we commonly have a reasonably robust repeater or list view on each page (though without too many rows) along with a form or two. I'm concerned about models because as I do work on a given page I see the older page maps change in size. I.e. I have p0=30K, p1=33K -- then I do something substantial on p2 and see the size of p0 p1 each increase by 11K. Thank you, Scott On 6/8/07, Martijn Dashorst [EMAIL PROTECTED] wrote: Depends on your page, number of components, deployment mode, wicket version, how you bind the models to your components. Do you use the second level cache for storing your pages for back button support? Martijn On 6/8/07, Scott Swank [EMAIL PROTECTED] wrote: Are these typical sizes for page maps? wicket:/app:p:null:267,668 bytes wicket:/app:p:null:155,861 bytes wicket:/app:p:null:052,817 bytes -- Scott Swank reformed mathematician - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- Join the wicket community at irc.freenode.net: ##wicket Wicket 1.2.6 contains a very important fix. Download Wicket now! http://wicketframework.org - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- Scott Swank reformed mathematician - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] page map size
no it is true for page versions there will be a Access object created for every page version that will be pushed on the access stack (in the pagemap) that access object has 2 variables: pageid and versionnumber that makes it unique and you are looking at the wrong thing that Settings.maxPageVersions doesn't do much its the: public LeastRecentlyAccessedEvictionStrategy(int maxVersions) (IPageMapEvictionStrategy) that one evicts such a access objects from the pagemap. and if it events an Access object with pageid 7 and version 2 it will delete that version from the changelist of the versionmanger for that page and if that is the last one the complete page is removed. If not then there is just one version less for that page. So no in wicket 1.2 we don't build up a page over and over again. There is really only 5 or 7 (i see 5 is now the default) page/pageversions alive at one time (5 access objects) the problem was if i remember correctly pure ajax pages. (and i don't see at the moment how that did go wrong in 1.2) johan On 6/8/07, Eelco Hillenius [EMAIL PROTECTED] wrote: I don't think that is true for page *versions*, which is also used when you use component replacement, ajax or not. A quick look reveals that Settings#maxPageVersions is still max int, and in 1.2, Page has protected IPageVersionManager newVersionManager() { final IPageSettings settings = getSession().getApplication().getPageSettings(); return new UndoPageVersionManager(this, settings.getMaxPageVersions()); } Then, UndoPageVersionManager has // If stack is overfull, remove oldest entry if (getVersions() maxVersions) { expireOldestVersion(); } in method endVersion. So unless I miss something in the larger picture, it looks to me that whenever you do component replacement on a page, it just keeps building up versions until max int is reached. And this is exactly what I've been objecting to in the past, and I still think max int is a crazy (dangerous) default. But please do enlighten me if I'm wrong. And maybe this time we can either clear this up or fix it for once and for all. Eelco On 6/8/07, Johan Compagner [EMAIL PROTECTED] wrote: that growing of a page constantly is only a problem when you use one page and through ajax request you constantly change that single page. if not then the page versions will be removed because there can only be 7 (pages + page versions) by default johan On 6/8/07, Eelco Hillenius [EMAIL PROTECTED] wrote: We're using 1.2.6. Is the 2nd level cache available prior to 1.3? It's only in 1.3 I'm afraid. As for page complexity, we commonly have a reasonably robust repeater or list view on each page (though without too many rows) along with a form or two. I'm concerned about models because as I do work on a given page I see the older page maps change in size. I.e. I have p0=30K, p1=33K -- then I do something substantial on p2 and see the size of p0 p1 each increase by 11K. One known issue with the old sessionstore is that deltas of a page are stored in the page itself. This will result in the page keep on growing. We've had lots of discussion about this, which resulted in the default session store implementation of 1.3 now storing the whole page for each version to second level cache (temp dir) instead. I'm not sure how to fix this for 1.2 tbh. To limit how far those versions can grow, you can set maxVersions in UndoPageVersionManager, which in 1.2 is a setting somewhere (sorry don't know from the top of my head). Eelco - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user
Re: [Wicket-user] page map size
that max page versions thing can be removed in the access stack it doesn't make any sense. because you don't control one page because setting that to 5 still means that there can be 5 pages with each 5 versions is a back button support of 25 what you want is control that last (25) value. So you want to control the max number of back buttons over all the pages, that is what the pagemap evict strategy does. johan On 6/9/07, Eelco Hillenius [EMAIL PROTECTED] wrote: Ok, I'll take a look at whether I can follow this this weekend. That must be the worst code ever though, if it's so unobvious. And why do we still have that maxPageVersions application parameter, and the maxversions member in the pageversion member? The whole way this works sounds like one big fat hack to me; it probably is to get around the initial limitations without breaking the API, is that correct? Eelco On 6/8/07, Johan Compagner [EMAIL PROTECTED] wrote: no it is true for page versions there will be a Access object created for every page version that will be pushed on the access stack (in the pagemap) that access object has 2 variables: pageid and versionnumber that makes it unique and you are looking at the wrong thing that Settings.maxPageVersionsdoesn't do much its the: public LeastRecentlyAccessedEvictionStrategy(int maxVersions) (IPageMapEvictionStrategy) that one evicts such a access objects from the pagemap. and if it events an Access object with pageid 7 and version 2 it will delete that version from the changelist of the versionmanger for that page and if that is the last one the complete page is removed. If not then there is just one version less for that page. So no in wicket 1.2 we don't build up a page over and over again. There is really only 5 or 7 (i see 5 is now the default) page/pageversions alive at one time (5 access objects) the problem was if i remember correctly pure ajax pages. (and i don't see at the moment how that did go wrong in 1.2) johan On 6/8/07, Eelco Hillenius [EMAIL PROTECTED] wrote: I don't think that is true for page *versions*, which is also used when you use component replacement, ajax or not. A quick look reveals that Settings#maxPageVersions is still max int, and in 1.2, Page has protected IPageVersionManager newVersionManager() { final IPageSettings settings = getSession().getApplication().getPageSettings(); return new UndoPageVersionManager(this, settings.getMaxPageVersions()); } Then, UndoPageVersionManager has // If stack is overfull, remove oldest entry if (getVersions() maxVersions) { expireOldestVersion(); } in method endVersion. So unless I miss something in the larger picture, it looks to me that whenever you do component replacement on a page, it just keeps building up versions until max int is reached. And this is exactly what I've been objecting to in the past, and I still think max int is a crazy (dangerous) default. But please do enlighten me if I'm wrong. And maybe this time we can either clear this up or fix it for once and for all. Eelco On 6/8/07, Johan Compagner [EMAIL PROTECTED] wrote: that growing of a page constantly is only a problem when you use one page and through ajax request you constantly change that single page. if not then the page versions will be removed because there can only be 7 (pages + page versions) by default johan On 6/8/07, Eelco Hillenius [EMAIL PROTECTED] wrote: We're using 1.2.6. Is the 2nd level cache available prior to 1.3? It's only in 1.3 I'm afraid. As for page complexity, we commonly have a reasonably robust repeater or list view on each page (though without too many rows) along with a form or two. I'm concerned about models because as I do work on a given page I see the older page maps change in size. I.e. I have p0=30K, p1=33K -- then I do something substantial on p2 and see the size of p0 p1 each increase by 11K. One known issue with the old sessionstore is that deltas of a page are stored in the page itself. This will result in the page keep on growing. We've had lots of discussion about this, which resulted in the default session store implementation of 1.3 now storing the whole page for each version to second level cache (temp dir) instead. I'm not sure how to fix this for 1.2 tbh. To limit how far those versions can grow, you can set maxVersions in UndoPageVersionManager, which in 1.2 is a setting somewhere (sorry don't know from the top of my head). Eelco - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version
Re: [Wicket-user] MarkupContainer.add() fails if log4j is enabled
Moreover, this is an inconsistent behavior. System should have the same behavior regardless whether log is enabled or not. thats true, i was just saying your isVisible() shouldn't absolutely depend on a parent page.. It could be used in none logging code also. The parent hierarchy doesn't have to be there in specific cases (that we tried to solve in the now dead branch 2.0) johan - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Wicket 1.2.6 Development mode serialization checks and remote EJB's
so the end result is that in production you have now a none serializeable object in the session? that is not really the right solution if you ask me. also going to wicket1.3 (with SecondLevelCache) is not an option then johan On 6/7/07, salmas [EMAIL PROTECTED] wrote: It's not a case of an unknown reference causing the not serializable exception. I know which object is not serializable and it is the concrete proxy object created by WebLogic for my remote EJB. I ended up checking if I was in development mode and then using a transient variable and then using a another variable which is not transient when the app is running in a production environment. I was hesitant to simply mark the EJB as transient in case it caused issues in the production environment. Thanks all for your replies, they helped confirm that there wasn't a workaround other than marking it transient. Regards Johan Compagner wrote: cant you make the non serializable object transient? and make sure that you can relookup the object when it is null? johan On 6/4/07, Saad, Salma [EMAIL PROTECTED] wrote: I have a wicket page (java class) which uses a service locater to execute messages on a remote EJB. Though there is no direct reference to the EJB from my wicket page there is a reference to the service locater which uses JNDI to get a reference to the remote EJB. I get the following error (FYI, This error does not happen in wicket 1.2 but happens in wicket 1.2.6). WicketMessage: Internal error cloning object. Make sure all dependent objects implement Serializable. Class: com.abc.wicket.LoginPage Root cause: java.io.NotSerializableException: com. abc.ejb. AFacadeBean. AFacadeBean_7gl30w_EOImpl The EJB implements javax.ejb.SessionBean which extends the serializable interface but the EJB proxy object returned by the WebLogic server does NOT implement serialzable. Below is the class hierarchy of the object located through JNDI. (I printed this using reflectiion) com. abc.ejb. AFacadeBean. AFacadeBean _7gl30w_HomeImpl -weblogic.ejb20.internal.StatelessEJBHome --weblogic.ejb20.internal.BaseEJBHome ---java.lang.Object So it seems that I cannot use EJB's in wicket pages, (I am doing this indirectly through service locaters to decouple the pages from the back end). Any advice about what to do in this situation would be appreciated. Currently I am running in deployment mode since this avoids the checking. I have given some thought to marking the EJB transient in my service locator but would like to hear any insights/design suggestions/advice -- CONFIDENTIAL: This e-mail, including its contents and attachments, if any, are confidential. It is neither an offer to buy or sell, nor a solicitation of an offer to buy or sell, any securities or any related financial instruments mentioned in it. If you are not the named recipient please notify the sender and immediately delete it. You may not disseminate, distribute, or forward this e-mail message or disclose its contents to anybody else. Unless otherwise indicated, copyright and any other intellectual property rights in its contents are the sole property of Mizuho Securities USA Inc. E-mail transmission cannot be guaranteed to be secure or error-free. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. Although we routinely screen for viruses, addressees should check this e-mail and any attachments for viruses. We make no representation or warranty as to the absence of viruses in this e-mail or any attachments. Please note that to ensure regulatory compliance and for the protection of our customers and business, we may monitor and read e-mails sent to and from our server(s). -- - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- View this message in context: http://www.nabble.com/Wicket-1.2.6-Development-mode-serialization-checks
Re: [Wicket-user] Wicket 1.2.6 Development mode serialization checks and remote EJB's
i did understand you, if you can't do anything to the object that is generated is fine by me. But i still say, don't have it as a serializeable field in your pages that you can handle. Just lookup the EJB when you need it and cache it in a transient variable johan On 6/7/07, salmas [EMAIL PROTECTED] wrote: Thanks so much Eelco! Your reply is exactly what i was looking for! We are using JDK 1.4 so I cannot use annotations but the other thing would work. Johan, I don't think you understand what the unserializable object is. My remote EJB is serializable by definition. However, the object I am having issues is an internally generated rmi stub created by WebLogic. This object was not created by me, I have no control over it and should not even be aware of what the exact implementation of this stub is since this is all handled behind the scenes by WebLogic is but it became an issue because in debug mode wicket tries to serialize it. Eelco Hillenius wrote: It's not a case of an unknown reference causing the not serializable exception. I know which object is not serializable and it is the concrete proxy object created by WebLogic for my remote EJB. I ended up checking if I was in development mode and then using a transient variable and then using a another variable which is not transient when the app is running in a production environment. I was hesitant to simply mark the EJB as transient in case it caused issues in the production environment. Thanks all for your replies, they helped confirm that there wasn't a workaround other than marking it transient. But there is. You can turn the check off, even for development mode. See IDebugSettings#setSerializeSessionAttributes[1] What you probably want in the end though, is a construct like @SpringBean or just look the bean up right at the moment you need it without holding the reference. Eelco [1] http://wicket.sourceforge.net/apidocs/wicket/settings/IDebugSettings.html - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- View this message in context: http://www.nabble.com/Wicket-1.2.6-Development-mode-serialization-checks-and-remote-EJB%27s-tf3866878.html#a11010152 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Want return key to click button in autocomplete behavior
cant you add a key listener to the textfield and if you see an enter you call button.onclick() your self? On 6/5/07, Jonathan Locke [EMAIL PROTECTED] wrote: I've got an autocomplete text field nested inside a larger form. When you click add next to the field, it adds what you've completed to a list that is submitted when the overall form is submitted. Would like to figure out how to make pressing the return key in the field (when there is no completion dropdown stuff going on) act like pushing the add button (which is an AjaxSubmitButton). Any ideas on how to approach this in general? -- View this message in context: http://www.nabble.com/Want-return-key-to-click-button-in-autocomplete-behavior-tf3874367.html#a10977981 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Use getConverterInput rather than updateModel in FormComponentPanel
Its a pitty that we cant do this in FormComponentPanel: /** * @see org.apache.wicket.markup.html.form.FormComponent#getConvertedInput() */ public abstract Object getConvertedInput(); then we force everybody to think about it.. But you can't do then super.getConvertedInput() :( (because the compiler thinks it is abstract which is not really the case..) updateModel is more for modifying again the convertedinput to the model. (like merging list) Do we have more components that we should check? Like MultiFileUploadField? johan On 6/5/07, Eelco Hillenius [EMAIL PROTECTED] wrote: Hi, When fixing issues 500[1] and 522[2] I found that the best way of fixing this is to override getConvertedInput (which was declared as final). For anyone using FormComponentPanel, please take note that if you want this component to work properly with validators and form validators you should override getConvertedInput rather then updateModel. Please see the implementations of DateField and DateTimeField and the updated JavaDoc of FormComponentPanel. Cheers, Eelco [1] http://issues.apache.org/jira/browse/WICKET-522 [2] http://issues.apache.org/jira/browse/WICKET-500 - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] wicket did not make the grade.
I am sad to announce that my company did not choose to use wicket after comparison with struts 2. :-( it are 2 different worlds.. can you give me an example then with a page with 2 listviews on it that are sortable for example on both struts and wicket ... (ofcourse if i sort one then the other must be stable) But what is then the difference in the number of things you have? in wicket you have just the java and the html what lines of what kind of code do you then not have with struts 2 (keeping the same behavior) One criticism that came out as we were looking at Wicket code was that there seems to be a need to write a lot of Java code in a ListView for such things as displaying a table. Although I did not see this issue as out-weighing all the benefits, many of my colleagues did. a lot of? a simple ListView you just have to implement one method: populateItem() How is that a lot? Is there any plan or push or hidden feature that allows for a bean to be directly mapped to a template without having to declare new Label(...) for each field in the ListView. I think this would be a great win for Wicket if adding those low-level components was only necessary when one wants to add special handling, formating, validation, etc. and where is then the binding specified? What kind of data should be displayed where? johan - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Page lifetime in wicket
With wicket 1.3 (and the SecondLevelCacheSessionStore thats default in 1.3) only one page is kept in (session)memory this is the active page that is just rendered. All other pages (for backbutton) are saved to the hd. So wicket controls the memory for you so you don't forget stuff (what i see a lot in model2 frameworks) models should be detachable so that you only have a small state (an id) so that you can rebuild the real object you where working on. this way the pages are pretty small. If you don't want to have a page at all in the session then you can use Stateless Pages (StatelessForms and links) but don't use this for the wrong reasons... johan On 6/5/07, Matthieu Casanova [EMAIL PROTECTED] wrote: Hi, I wonder what was the lifetime of the page and related objects in Wicket ? For example if I create a link in a web page, if I click on it, my java method is called. But how many time do I have to click on it ? Isn't it possible to have memory problems because of those objects (the models too I suppose) that remains in memory and that I do not control ? Matthieu - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Bug in 1.3? HeaderContributor.forCss(String)
But what about this my page is in a package org.wicket. in that page i have this: foo/bar.css where does that css resides then? in /context/org/wicket//foo/bar.css? or /context/foo/bar.css? I must admit that i don't know exactly how the src urls are interpreted at the moment (are the all context specific or page/html specific) becaues if they are page specific how can i then say that they must be context specific? normally i would do that with / (the root of the webapplication so context must be prepended). johan On 6/4/07, Jeremy Thomerson [EMAIL PROTECTED] wrote: It's what was done in 1.2.6, but no longer in 1.3. 1.3 converts it to a path relative to your context. Sorry, my last post was probably confusing. If I put /foo/bar.css - foo is NOT my context. My context for the app could be anything (but not foo). Foo would be the root folder off of my domain that I want the request to be sent for. ( i.e.. www.mydomain.com/app/SomeWicketPage includes the style sheet at www.mydomain.com/foo/bar.css). I do this and pair it with an Apache alias that directs /foo to that folder within my webapp so that Apache (not my servlet container) will serve static resources. As of 1.2.6, it works fine. As of 1.3, I can no longer do that without adding my domain name ( add(HeaderContributor.forCss( http://www.mydomain.com/resources/styles/global.css;)); ), which is NOT desirable - I should not have to add my domain name to be able to add the resource relative to my domain root. I opened JIRA https://issues.apache.org/jira/browse/WICKET-612 for this. I will attach a patch to it as soon as I can get my environment set up to work on Wicket. Jeremy Thomerson On 6/3/07, Eelco Hillenius [EMAIL PROTECTED] wrote: Sort of - but Wicket doesn't have to handle the prepending of it. If I use /foo/bar.css, Wicket should generate my link tag using exactly that string, without modifying it in any way. I actually think this is what we do now. Dunno, should look at it. However, I think it is a bad idea to hard-code your context patch in your applications. Eelco - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Wicket Acegi ?
i haven't looked much at the wicket security solution there are now i would say talk to the security master: Maurice :) johan On 6/1/07, Jan Kriesten [EMAIL PROTECTED] wrote: hi johan, hmm then i have to stopp working on it right now... because i am already passed the hour again good work! thanx for doing so! have you seen my example how to use acegi without using filters? best regards, --- jan. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Stable URLs (Was: Bookmarkable pages and transparent login)
nothing is wrong if you click on a wicket link (or submit a form) then we do a redirect to the page that is then rendered What is strange (if that happens at your place) is that if you click on a bookmarkable link then that link should stay there (until you press a none bookmarkable link or submit a form on that page) If you just click on a bookmarkable link and then the url does change in the browser then somewhere a setRedirect(true) is done. johan On 5/31/07, Thomas Singer [EMAIL PROTECTED] wrote: No one knows what's wrong? Tom Thomas Singer wrote: OK, I've tried to create an unversioned page to keep the URL stable using following page code: public class DownloadFile extends TemplatePage { // Constants == private static final String FILE_PARAMETER = file; // Static = public static BookmarkablePageLink createLinkToPage(String id, String file) { final BookmarkablePageLink pageLink = new BookmarkablePageLink(id, DownloadFile.class); pageLink.setParameter(FILE_PARAMETER, file); return pageLink; } // Setup == public DownloadFile(PageParameters parameters) { final String file = parameters.getString(FILE_PARAMETER); if (file == null) { throw new RestartResponseAtInterceptPageException( Download.class); } if (!getOurSession().isLicenseAgreed()) { addContent(createLicenseFragment(contentPanel, parameters)); throw new RestartResponseAtInterceptPageException(this); } addContent(createDownloadFragment(contentPanel, file)); } // Utils == private Fragment createDownloadFragment(String id, String file) { final Fragment fragment = new Fragment(id, downloadFragment); fragment.add(new Label(file, file)); return fragment; } private Fragment createLicenseFragment(String id, final PageParameters parameters) { final Fragment fragment = new Fragment(id, licenseFragment); fragment.add(new PageLink(accept, new IPageLink() { public Page getPage() { getOurSession().setLicenseAgreed(true); return new DownloadFile(parameters); } public Class getPageIdentity() { return DownloadFile.class; } })); return fragment; } public boolean isVersioned() { return false; } } Every page is mounted with QueryStringUrlCodingStrategy. On the Download page a link to this DownloadFile page is created using the above createLinkToPage() static method call which creates a link to http://localhost:8080/smartcvs/download-file.html?file=win32jre; Curiously, when I click on it, the browser displays http://localhost:8080/?wicket:interface=:2::; as URL. The accept-link occurs pointing to http://localhost:8080/?wicket:interface=:2:border:contentPanel:accept::ILinkListener . When I click it, the browser displays http://localhost:8080/?wicket:interface=:3::; as URL. Clicking the back-button shows the http://localhost:8080/?wicket:interface=:2::; page with the accept-link, no matter whether I try it with Opera or FireFox. Tom Eelco Hillenius wrote: Regarding the back-button: it would be the best if the intermediate license agreement page would not occur when pressing the back-button, but instead the previous page (if any). Is something like that possible? What you need to achieve is that the URL stays stable. One way to achieve this is to use panel replacement. E.g. when you click the download page, you replace the main panel on your page with a panel that displays the license agreement. If you turn off versioning for that page, the URL will stay stable and thus if you push the back button later, your browser will return to the first version of the page. I think this should work for most browsers (maybe only not with Opera). There are alternative ways to do this, including throwing RestartResponseExceptions, using custom page factories and custom url coding strategies. Or you can trick the browser using JavaScript, of which I don't know too many details. Eelco - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/
Re: [Wicket-user] [BUG]script tag evaluation in IE
But do we have components or behaviors that output this kind of ajax scripts that aren't working in IE7? So the question is who is generating that code/script? johan On 5/31/07, Alex Objelean [EMAIL PROTECTED] wrote: Not necessarily, only if you (core developers) consider that it worth the effort.. I just thought that this workaround could be useful for anyone who have struggled with the same problem... Alex Eelco Hillenius wrote: 2) Wrap the script into the tag, like this: script //your script /script Is this something Wicket can/ should do by default? Eelco - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- View this message in context: http://www.nabble.com/-BUG-%3Cscript%3E-tag-evaluation-in-IE-tf3839952.html#a10887903 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] How To Test with getApplication method
i think this was a problem in 1.2 we fixed this in 1.3 so that you can use your own application class, somebody please correct me if i am mistaken here So in 1.2 there isn't really a right way to reuse your webapplication object johan On 5/30/07, tma tma [EMAIL PROTECTED] wrote: Hi I am not native English speaker. sorry for poor English. I use wicket 1.2.6 . I have question to use WicketTester. i want to make Global object ,create instance in WebApplication Class and create method to access the instance. In WebPage class ,access the instance like this SingleClass class = ((FooApplication)getApplication()).getSingleClass(); 'FooApplication' extends WebApplication and 'SingleClass' is Global object's class. To test the above WebPage class, make the class 'FooApplicationTester' that extends WicketTester and Copy Paste the FooApplication's method . when run the test code, ClassCastException happens. I declared interface IFooApplication and implement at FooApplication and FooApplicationTester. I changed the WebPage class like this SingleClass class = ((IFooApplication)getApplication()).getSingleClass(); This way, I can run without exception. But I don't want to create interface. Is there other way to solve ? best regards - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Stable URLs (Was: Bookmarkable pages and transparent login)
that url that you get doesn't have anything to do with a page being versioned or not. that url you just get when you redirect to a page instance. if you want to keep that bookmarkable then use this constructor public RestartResponseAtInterceptPageException(final Class interceptPageClass) On 5/31/07, Thomas Singer [EMAIL PROTECTED] wrote: If you just click on a bookmarkable link and then the url does change in the browser then somewhere a setRedirect(true) is done. So the URL http://localhost:8080/?wicket:interface=:2::; comes from the throw new RestartResponseAtInterceptPageException(this)? At least the second time, when getOurSession().isLicenseAgreed() returns true and hence no redirect happens, the URL remains the same. Unfortunately, this does not allow me to eliminate the intermediate redirect to the license agreement from the back-button history, although isVersioned() returns false all the time. Tom Johan Compagner wrote: nothing is wrong if you click on a wicket link (or submit a form) then we do a redirect to the page that is then rendered What is strange (if that happens at your place) is that if you click on a bookmarkable link then that link should stay there (until you press a none bookmarkable link or submit a form on that page) If you just click on a bookmarkable link and then the url does change in the browser then somewhere a setRedirect(true) is done. johan - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] DateTimeField surviving Ajax updates
do you have a quickstart/example code for this ? johan On 5/30/07, Aaron Hiniker [EMAIL PROTECTED] wrote: I have a AjaxTabbedPanel that contains the Yahoo DateTimeField from extensions. The calendar works fine on a page refresh, but when clicking to other tabs with Ajax loading each tab, the DateTimeFields quit working. Has anyone else experienced this and found a workaround or fix? Thanks Aaron - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Wiki reference page on custom converter is outdated
We should really first divide wiki a bit i think 1.2 and 1.3 because converters are really changed now. johan On 5/30/07, Anto Paul [EMAIL PROTECTED] wrote: Hi all, The reference about using custom converter in apache wiki is outdated(http://cwiki.apache.org/confluence/display/WICKET/Using+custom+converters#Usingcustomconverters-Provideacustomconverterfactory). I could'nt find the method getConverterFactory() in Application class. Can somebody update the wiki with details for 1.2 series. Regards, Anto - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Wicket Acegi ?
Hey, one hour per day contributing to Open Source is already a lot! hmm then i have to stopp working on it right now... because i am already passed the hour again johan - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Map.Entry and serialization
ahh ok change this new ListView(list, new ArrayListMap.EntryIKey,Integer(map.entrySet())) { thats wrong you can't keep Map.Entry objects in a arraylist. why not keep the map yourself? new ListView(list, new Model(map) { johan On 5/30/07, Sven Schliesing [EMAIL PROTECTED] wrote: Changing the code to: new ListView(list, new ArrayListMap.EntryIKey, Integer(map.entrySet())) { public void populateItem(ListItem listItem) { Map.EntryIKey, Integer entry = (Map.EntryIKey, Integer) listItem.getModelObject(); ... } }; doesn't fix the problem. Furthermore http://java.sun.com/j2se/1.5.0/docs/api/java/util/Map.html says that Maps are not serializable. Now I'm confused. btw: I didn't make the variable final to use it in an inner class. It was just a leftover of cp. Sven - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] 1.2.x trunk stack overflow
that seems to be a problem yes what i did was change the Settigngs one: contextPath = ((WebRequest)RequestCycle.get().getRequest()).getHttpServletRequest().getContextPath(); so that i directly call the context path of the http servlet request. i think that should work fine, or does some have WebRequest.getContextPath() overwritten so that they supply there something else?? johan On 5/30/07, Ingram Chen [EMAIL PROTECTED] wrote: All, I build 1.2.x trunk today to try some fixed bugs (which found in 1.2.6) . After I deploy I got stack overflow: java.lang.StackOverflowError at java.lang.ThreadLocal.get(ThreadLocal.java:125) at wicket.RequestCycle.get(RequestCycle.java:211) at wicket.settings.Settings.getContextPath(Settings.java:451) at wicket.protocol.http.servlet.ServletWebRequest.getContextPath( ServletWebRequest.java :69) at wicket.settings.Settings.getContextPath(Settings.java:453) at wicket.protocol.http.servlet.ServletWebRequest.getContextPath( ServletWebRequest.java:69) at wicket.settings.Settings.getContextPath (Settings.java:453) I notice ServletWebRequest.getContextPath implmentaton changed: in 1.2.6: public String getContextPath() { return httpServletRequest.getContextPath(); } in 1.2.x trunk public String getContextPath() { String contextPath = Application.get ().getApplicationSettings().getContextPath(); return contextPath != null ? contextPath : httpServletRequest.getContextPath (); } so the problem is caused by additional Application.get().getApplicationSettings().getContextPath(); I know wicket has a bamboo to build trunk continuously, but I can't find it to check trunk's health. -- Ingram Chen ��便��啦: http://dinbendon.net blog: http://www.javaworld.com.tw/roller/page/ingramchen - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Map.Entry and serialization
Model model = new Model(map) { getObject() { return new List(map.entries()) } } ListView lv = new ListView(x,model); johan On 5/30/07, Sven Schliesing [EMAIL PROTECTED] wrote: I tried that already. But I ran into the following problem: Caused by: java.lang.ClassCastException: java.util.HashMap cannot be cast to java.util.List at org.apache.wicket.markup.html.list.ListView.getList( ListView.java:174) at org.apache.wicket.markup.html.list.ListView.getViewSize(ListView.java:227) at org.apache.wicket.markup.html.list.ListView.onBeforeRender(ListView.java :538) at org.apache.wicket.Component.beforeRender(Component.java:3037) at org.apache.wicket.MarkupContainer.onBeforeRenderChildren( MarkupContainer.java:1433) ... 28 more The method-body: public final List getList() { final List list = (List)getModelObject(); if (list == null) { return Collections.EMPTY_LIST; } return list; } So there is a need to use a List. I can't override getList() cause it's final. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Chicken-and-egg w/ Data Provider
this only works if you have a seperate method: private List getOrders() { if (orders == null) { orders = DAO.getOrders() } } iterator() { return getOrders().sublist(x,y).iterator() } size() { return getOrders().size(); } detach() { orders = null; } johan On 5/29/07, V. Jenks [EMAIL PROTECTED] wrote: I'm trying to use a provider class for a DataView so I can do paging/sorting, etc. It looks like this: public class OrderProvider implements IDataProvider { private transient ListOrder orders; public OrderProvider() { } public Iterator iterator(int first, int count) { this.orders = WicketHelper.ListOrdergetDetachedModelObject( OrderProxy.getAll(first, first + count)); return this.orders.iterator(); } public IModel model(Object model) { return WicketHelper.getDetachedModel(model); } public int size() { return this.orders.size(); } } I thought this would work but it looks like size() is called first, since I get a NPE: Caused by: java.lang.NullPointerException at com.myapp.provider.OrderProvider.size(OrderProvider.java:36) It works if size() makes a call to the database to get a count of records...but I'm trying to use a global field to prevent that data call. Any suggestions? -- View this message in context: http://www.nabble.com/Chicken-and-egg-w--Data-Provider-tf3834369.html#a10855464 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] 1.2.x trunk stack overflow
no i thnk AlMaw wants to take a look at it. johan On 5/30/07, Ingram Chen [EMAIL PROTECTED] wrote: In 1.2.x trunk, Settings still use old implemation: public String getContextPath() { // Set the default context path if the context path is not already // set (previous time or by the developer itself) // This all to do missing api in the servlet spec.. You can't get a // context path from the servlet context, which is just stupid. if (contextPath == null RequestCycle.get ().getRequest() instanceof WebRequest) { contextPath = ((WebRequest)RequestCycle.get().getRequest()).getContextPath(); } return contextPath; } http://svn.apache.org/repos/asf/incubator/wicket/branches/wicket-1.2.x/wicket/src/main/java/wicket/settings/Settings.java not yet commit ? On 5/30/07, Johan Compagner [EMAIL PROTECTED] wrote: that seems to be a problem yes what i did was change the Settigngs one: contextPath = ((WebRequest)RequestCycle.get().getRequest()).getHttpServletRequest().getContextPath(); so that i directly call the context path of the http servlet request. i think that should work fine, or does some have WebRequest.getContextPath() overwritten so that they supply there something else?? johan On 5/30/07, Ingram Chen [EMAIL PROTECTED] wrote: All, I build 1.2.x trunk today to try some fixed bugs (which found in 1.2.6) . After I deploy I got stack overflow: java.lang.StackOverflowError at java.lang.ThreadLocal.get(ThreadLocal.java:125) at wicket.RequestCycle.get(RequestCycle.java:211) at wicket.settings.Settings.getContextPath(Settings.java:451) at wicket.protocol.http.servlet.ServletWebRequest.getContextPath( ServletWebRequest.java :69) at wicket.settings.Settings.getContextPath(Settings.java:453) at wicket.protocol.http.servlet.ServletWebRequest.getContextPath( ServletWebRequest.java:69) at wicket.settings.Settings.getContextPath (Settings.java:453) I notice ServletWebRequest.getContextPath implmentaton changed: in 1.2.6: public String getContextPath() { return httpServletRequest.getContextPath(); } in 1.2.x trunk public String getContextPath() { String contextPath = Application.get ().getApplicationSettings().getContextPath(); return contextPath != null ? contextPath : httpServletRequest.getContextPath (); } so the problem is caused by additional Application.get().getApplicationSettings().getContextPath(); I know wicket has a bamboo to build trunk continuously, but I can't find it to check trunk's health. -- Ingram Chen ��便��啦: http://dinbendon.net blog: http://www.javaworld.com.tw/roller/page/ingramchen - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- Ingram Chen ��便��啦: http://dinbendon.net blog: http://www.javaworld.com.tw/roller/page/ingramchen - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Request attributes
So you only need it in the wicket code? then store it in your custom request cycle or request.getRequestParameters().getParamteters().put(xxx,yyy) johan On 5/28/07, Matthieu Casanova [EMAIL PROTECTED] wrote: Hi, no, I'm not integrating with another technology. My problem is that for each request, I get some informations from a server, and I need those informations in several components to build my page. Those informations cannot be stored in session because they change at every request, and it is possible to have several requests from the same user at the same time. Matthieu 2007/5/28, Eelco Hillenius [EMAIL PROTECTED]: What you do should work, or you could just get the request object from the Wicket request and cast it down to HttpServletRequest. Why do you need to set request attributes? Are you integrating with another technology, like JSPs? Eelco On 5/28/07, Matthieu Casanova [EMAIL PROTECTED] wrote: Hi, I need some request attributes in my page. Those attributes aren't for session but only for the current request. To do that I made my own WebRequest that extends ServletWebRequest and changed the protected WebRequest newWebRequest(HttpServletRequest servletRequest) of my application to use my request. But I'm not sure it is the good way to do that. Is there something better to have attributes with request scope in wicket ? thanks Matthieu - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Map.Entry and serialization
remove the final keyword of the entry variable. You shouldn't keep entry objects like that then it will become members and an Map.Entry isn't serializeable because the HashMap doesn't serialize those (they aren't meant to be) johan On 5/29/07, Sven Schliesing [EMAIL PROTECTED] wrote: Hi, I just ran into problems with a List view. The Model used for this is actually a Map so I put in a entrySet() from the map in the ListView: new ListView(list, new ArrayListMap.EntryIKey, Integer(map.entrySet())) { public void populateItem(final ListItem listItem) { final Map.EntryIKey, Integer entry = (Map.EntryIKey, Integer) listItem.getModelObject(); ... } }; Unfortunately I'm getting an error message that Map.Entry is not serializable. I'm sure this is a known problem with a known fix. Isn't it? Thanks in advance! Sven PS: I'm relatively new to Wicket. So feel free to kick me to a faq I missed that covers this issue. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Map.Entry and serialization
no Maps are serializable and yes your problem is the final keyword before that variable. because you make it final so that you can reuse that in an (anonymous) inner class and then that Entry is placed in the session because it becomes a member of that inner class just remove the final keyword (and fix the problem a bit different) and you will see that the serialization problem will be fixed johan On 5/29/07, Sven Schliesing [EMAIL PROTECTED] wrote: So the problem isn't the final keyword but the fact that Maps aren't serializable, right? Johan Compagner wrote: remove the final keyword of the entry variable. You shouldn't keep entry objects like that then it will become members and an Map.Entry isn't serializeable because the HashMap doesn't serialize those (they aren't meant to be) johan - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Quick double submit problem
if you want an event thats before onSubmit then in 1.3 you can use onAttach() (thats called when the page is first used, used is rendered or a listener called) but does the onClick of the radio group doesn't really submit right? it only redirect to your onSelectionChange method but the model values of all the other fields aren't updated johan On 5/29/07, kubino [EMAIL PROTECTED] wrote: Hi, I have serious trouble with quick double submit problem. First problem are the submit buttons , especially in combination with radiogroup - (componment hierarchy changed between rendering and form submission) - as I read somewhere, it is neccessary to disable the second click on client. I can do this in onSubmit method of the form by checking some hidden property, but what I can not handle in onSubmit() method is the radio buttons change clicks handled by onClick() - which doensnt generate onSubmit event. I tried to add my script to the onClick method, but it is always overriden by the wicket, becouse when onSelectionChanged method returns true . Can anyone help me how to solve this? Essentially I need to add my function calling before the the wicket getForm.click() calling, is this possible? Thanks for reply. Jakub -- View this message in context: http://www.nabble.com/Quick-double-submit-problem-tf3834058.html#a10854524 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Have to click 2 times to get my search results
Are you sure that you don't set another page to render in the ajax button submit code?? Because if you a pure ajax call and you don't set anohter response page then the url in your browser shouldn't change johan On 5/29/07, Francisco Diaz Trepat - gmail [EMAIL PROTECTED] wrote: Hi all, I have the following behavior: On one side of a Page I have a list of links (acting as a menu :P) that is created by building links by obtaining the page class NameOfThePage.class. That gives me the url: http://localhost:8084/WicketDemo?wicket:bookmarkablePage=:ch.logismata.wicket.pages.DossierSearch Then I click on my AJAX Submit button to get a search result, but instead of that, the page is refreshed, now with this url: http://localhost:8084/WicketDemo?wicket:interface=:8:1 : Then I click the AJAX SubmitButton and everything works fine. This happens most times, but I don't know how yet, sometimes it works on the first step. Best regards, f(t) - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] integrating wicket and cocoon
that will not work because the locale isn't get through the Session.getLocale() at that time. it is set in the session for the first time in 1.3 its in the constructor: protected Session(Application application, Request request) { this.locale = request.getLocale(); but i guess in 1.2 it was done outside the constructor Session session = newSession() session.setLocale(request.getLocale()) so the only thing to do here on the wicket side is override the request class itself from the WebApplication: protected WebRequest newWebRequest(final HttpServletRequest servletRequest) { return new ServletWebRequest(servletRequest); } and return one that doesn't call getLocale on the given request. But this doesn't change the thing that cocoon is really borked if you can't call getLocale... johan On 5/28/07, Martijn Dashorst [EMAIL PROTECTED] wrote: In the mean time, I think you could override getLocale in your custom session, at least that was possible. Martijn On 5/28/07, Erik van Oosten [EMAIL PROTECTED] wrote: Hi Luca, Wicket uses the locale for finding resources (including the templates). You could do without but I am afraid it goes too far to let Wicket do something about Cocoon's incomplete HttpServletRequest implementation. So these are the options I see: 1. Make Cocoon behave itself by submitting a patch that will implement HttpServletRequest#getLocale properly. 2. Wrap Cocoon's request with something of your own which returns a proper Locale. Since I do not know Cocoon, I can not help you with finding out you how to do this. Regards, Erik. Luca Marrocco wrote: the first two line is quite interesting: java.lang.UnsupportedOperationException at org.apache.cocoon.servletservice.util.BlockCallHttpServletRequest.getLocale (BlockCallHttpServletRequest.java:160) at wicket.protocol.http.servlet.ServletWebRequest.getLocale( ServletWebRequest.java:91) my question in wicket side of problem is. It is necessary getLocale? Can i inibite this call in wicket configuration? Luca -- Erik van Oosten http://2007.rubyenrails.nl/ http://day-to-day-stuff.blogspot.com/ -- View this message in context: http://www.nabble.com/integrating-wicket-and-cocoon-tf3824772.html#a10834370 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- Join the wicket community at irc.freenode.net: ##wicket Wicket 1.2.6 contains a very important fix. Download Wicket now! http://wicketframework.org - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Problem with jsessionid in mounted Resources
what you could do is just stripoff (regexp replace) the jsession id of the url you can only do this is you don't acess the session in your resource and i guess you don't do that because you only need the url to stream the resource right? johan On 5/25/07, Rüdiger Schulz [EMAIL PROTECTED] wrote: Hello all, I have (or had) a problem with mounted Resources and an iserted jsessionid. My goal is, as discussed here before: http://www.nabble.com/Bookmarkable-images-tf3706668.html#a10383150, to have dynamic image URLs with just slashes and no question-mark-separated querystring, like this: /images/thumbnail/20.png What I did was in short this: Subclassed WebResource like this: public IResourceStream getResourceStream() { String path = RequestCycle.get ().getRequest().getRequestParameters().getPath(); // ... parse path, return ResourceStream // path should be images/thumbnail/20.png } In my Application.init(): getSharedResources().add(imageDataResource, new ImageDataResource()); mountSharedResource(ImageDataResource.MOUNT_PATH, new ResourceReference(imageDataResource).getSharedResourceKey()); Then a custom WebComponent, where I have an AttributeModifier for the src attribute, where I compile the src like this: ResourceReference resRef = new ResourceReference(imageDataResource); String src = urlFor(resRef); src += thumbnail/20.png; // this is dynamic in the application This all works almost perfect. It stops working when someone has disabled cookies, and jsessionid is added to all URLs. Then they look a little strange like this: /images;jsessionid=1ar97uck8ovr5/thumbnail/20.png because urlFor(resRef) returns /images;jsessionid=1ar97uck8ovr5 With such a URL, the command getRequestParameters().getPath() returns simply images, and all additional path info is lost. Now, my first take at a solution would be to take the jsessionid into consideration when building my URLs, so that they look like this: /images/thumbnail/20.png;jsessionid=1ar97uck8ovr5 But maybe this is just a workaround for something I did wrong at another place? -- greetings from Berlin, Rüdiger Schulz www.2rue.de - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Creating link with a label
public abstract class LabelLink extends Link { private IModel labelModel; public LabelLink(String id, IModel linkModel, IModel labelModel) { super(id, linkModel); this.labelModel = labelModel; } protected void onComponentTagBody(MarkupStream markupStream, ComponentTag openTag) { replaceComponentTagBody(markupStream, openTag, labelModel.getObject().toString()); } } maybe we should add this to our classes (core or extentions) so that we don't get this same question over and over again.. johan - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] FileUploadField clear after failed validation. Still a bug?
make a jira issue for this (if not already there) on the apache side (wicket sourceforge bug list got a bit lost) And attach a patch then we will apply that asap. johan On 5/24/07, manuel barzi [EMAIL PROTECTED] wrote: Nothing to say about this, right? the bug still there :( On 5/23/07, manuel barzi [EMAIL PROTECTED] wrote: Dear Sirs, I am registering exactly the bug registered here: http://www.nabble.com/--wicket-Bugs-1484321---FileUploadField-clear-after-failed-validation-tf1581602.html#a4292585 Is this problem persisting yet? We need to solve it asap! Thanks ;) - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user