Apache Wicket 1.5.2 is released
This is the second maintenance release of the Wicket 1.5.x series. Thisrelease brings over 25 bug fixes and 5 improvements. Subversion taghttp://svn.apache.org/repos/asf/wicket/releases/wicket-1.5.2 Changeloghttps://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12310561version=12318078 To use in Maven:dependency groupIdorg.apache.wicket/groupId artifactIdwicket-core/artifactId version1.5.2/version/dependency Download the full distributionhttp://www.apache.org/dyn/closer.cgi/wicket/1.5.2 (including source) The Wicket Team - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: inmethod grid - Is is possible to have column with AJAX link to perform some action?
Hi, You can create a column that renders a Panel and this panel can contain anything you need. On Mon, Oct 24, 2011 at 6:03 AM, Chris Colman chr...@stepaheadsoftware.com wrote: Is it possible in inmethod grid to create a column where each row contains a link (nice to have an icon even instead of text) that a user can click on to initiate an AJAX event such as opening a modal dialog? If so is there a dedicated column property class for this already or do we need to create a custom one? Chris -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: inmethod grid - Is is possible to have column with AJAX link to perform some action?
Ah, I was thinking too hard about it again. Once again the Wicket solution is so simple I looked right past it :) -Original Message- From: Martin Grigorov [mailto:mgrigo...@apache.org] Sent: Monday, 24 October 2011 6:28 PM To: users@wicket.apache.org Subject: Re: inmethod grid - Is is possible to have column with AJAX link to perform some action? Hi, You can create a column that renders a Panel and this panel can contain anything you need. On Mon, Oct 24, 2011 at 6:03 AM, Chris Colman chr...@stepaheadsoftware.com wrote: Is it possible in inmethod grid to create a column where each row contains a link (nice to have an icon even instead of text) that a user can click on to initiate an AJAX event such as opening a modal dialog? If so is there a dedicated column property class for this already or do we need to create a custom one? Chris -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: PageMap locking...
Once the user has clicked a link to another page (Or switched a tab if it is a tabed page), is there a way to terminate the request to prevent a load on the server for a page that will not be displayed? Normally: no, because these are separate requests. The first request will cancel only when it tries to write to the (now closed, unless keepalive is used) stream to the browser. In a tabed page, is there a way to go to another tab without waiting for the first tab to rendered? (As the tab link is waiting to the page map to be relased...) You can alleviate the problem by delegating the long rendering operation to the AjaxLazyLoadPanel mechanism. Then the page itself is rendered quickly but with an indicator for the Ajax-loaded real panel rendering. - Tor Iver - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wrong path for resources on redirected login page
Hi, On Sun, Oct 23, 2011 at 11:10 PM, bjolletz daniel.akerl...@pagero.com wrote: Hi. I didn't get things to work with 1.5.2, seems to be the same behavior there. I've done some additional research and debugging... As far as I understand, my problem boils down to this: * Wicket creates a redirect from my StartPage (mounted as App/StartPage) to my LoginPage (mounted as LoginPage). * In the end of this redirect, wicket calls the sendRedirect(String location) method of the Response class of my web container, which in my case is org.apache.catalina.connector.Response (JBoss/Tomcat). As the location parameter, wicket sends LoginPage. This looks wrong. It should be ../LoginPage instead. But I'm not sure that Wicket creates this redirect location. From the description in your first mail I think the web container (Tomcat) should care about the redirect. I.e. hitting an Url that requires authentication Tomcat will not deliver it to WicketFilter at all but will do the redirect to the 'form-login-page'. I'm not sure how exactly the web container does this though... If it is redirect 302 then all should be fine, but if it is RequestDispatcher.forward() then Wicket will be confused indeed. See https://issues.apache.org/jira/browse/WICKET-4138 * Looking into the source code of org.apache.catalina.connector.Response, I can see that Tomcat treats this as a relative URL. Since the last URL visited was App/StartPage, tomcat renders the redirect URL to be App/LoginPage. * My browser receives the redirect and asks for the page App/LoginPage. Although this URL is wrong, wicket somehow seems to work out that LoginPage is the page to access, but no resources are loaded bacause of wrong URLs. I've tried mounting my LoginPage like: mountPage(/LoginPage, LoginPage.class); But that attempt was futile, since it seems like wicket strips the / in the beginning of a mount URL. The question now is whether this is a wicket or a tomcat issue (or both, or none :) ). As far as I can see, if wicket called the org.apache.catalina.connector.Response with sendRedirect(/LoginPage), things would work out. But there may well be many things I dont understand here... Bottom line... * Is my scenario meant to work? * Are my conclusions correct? * If so, should I create a JIRA case on this issue? Thanks for reading and your time! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wrong-path-for-resources-on-redirected-login-page-tp3920038p3931337.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wrong path for resources on redirected login page
I also thought that Tomcat should take care of the redirect configured in web.xml by itself, but that does not seem to be the case. To me it seems like Tomcat does create its own redirect response, but that Tomcat still calls its filter chain, which will invoke my WicketFilter which leads to wicket also constructing a redirect, which I would guess takes precedence over the one created by Tomcat. Using the debug tool in Google Chrome and FireBug in Firefox, I can affirm that the redirect really is a 302 redirect. Martin Grigorov-4 wrote: This looks wrong. It should be ../LoginPage instead. But I'm not sure that Wicket creates this redirect location. From the description in your first mail I think the web container (Tomcat) should care about the redirect. I.e. hitting an Url that requires authentication Tomcat will not deliver it to WicketFilter at all but will do the redirect to the 'form-login-page'. I'm not sure how exactly the web container does this though... If it is redirect 302 then all should be fine, but if it is RequestDispatcher.forward() then Wicket will be confused indeed. See https://issues.apache.org/jira/browse/WICKET-4138 -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wrong-path-for-resources-on-redirected-login-page-tp3920038p3932467.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
1.5.2: WebPageRenderer - The Buffered response should be handled by BufferedResponseRequestHandler
Hi I've just upgraded to 1.5.2 and I'm now seeing a WARN that didn't occur with 1.5.1: WebPageRenderer - The Buffered response should be handled by BufferedResponseRequestHandler I'm seeing it on every page load...? We're using a Wizard, if that makes a difference... Thanks Matt smime.p7s Description: S/MIME Cryptographic Signature
Re: 1.5.2: WebPageRenderer - The Buffered response should be handled by BufferedResponseRequestHandler
https://issues.apache.org/jira/browse/WICKET-4163 On Mon, Oct 24, 2011 at 10:46 AM, Matthias Keller matthias.kel...@ergon.ch wrote: Hi I've just upgraded to 1.5.2 and I'm now seeing a WARN that didn't occur with 1.5.1: WebPageRenderer - The Buffered response should be handled by BufferedResponseRequestHandler I'm seeing it on every page load...? We're using a Wizard, if that makes a difference... Thanks Matt -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: PageMap locking...
Actually using lazy panel makes the problem worse, now the user can click on the tabs, but they will not work as they wait to the lazy panel to complete... We need to allow to move to another tab, without waiting for the first tab to be rendered. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/PageMap-locking-tp3930623p3932536.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: 1.5.2: WebPageRenderer - The Buffered response should be handled by BufferedResponseRequestHandler
Hi Martin Thanks for the quick reply. Is there a drawback with just ignoring the WARN message for now compared to your workaround? Thanks Matt On 2011-10-24 10:58, Martin Grigorov wrote: https://issues.apache.org/jira/browse/WICKET-4163 On Mon, Oct 24, 2011 at 10:46 AM, Matthias Keller matthias.kel...@ergon.ch wrote: Hi I've just upgraded to 1.5.2 and I'm now seeing a WARN that didn't occur with 1.5.1: WebPageRenderer - The Buffered response should be handled by BufferedResponseRequestHandler I'm seeing it on every page load...? We're using a Wizard, if that makes a difference... Thanks Matt smime.p7s Description: S/MIME Cryptographic Signature
Re: 1.5.2: WebPageRenderer - The Buffered response should be handled by BufferedResponseRequestHandler
On Mon, Oct 24, 2011 at 11:23 AM, Matthias Keller matthias.kel...@ergon.ch wrote: Hi Martin Thanks for the quick reply. Is there a drawback with just ignoring the WARN message for now compared to your workaround? The only drawback I see is negligible waste of CPU time. Thanks Matt On 2011-10-24 10:58, Martin Grigorov wrote: https://issues.apache.org/jira/browse/WICKET-4163 On Mon, Oct 24, 2011 at 10:46 AM, Matthias Keller matthias.kel...@ergon.ch wrote: Hi I've just upgraded to 1.5.2 and I'm now seeing a WARN that didn't occur with 1.5.1: WebPageRenderer - The Buffered response should be handled by BufferedResponseRequestHandler I'm seeing it on every page load...? We're using a Wizard, if that makes a difference... Thanks Matt -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wrong path for resources on redirected login page
I just realized something that should maybe have been obvious to me at once... I'm not at home and able to test this atm, but I'm quite sure that my WicketFilter is positioned before my security-constraint in my web.xml. I didn't think security-constraint was treated as a filter, so I didn't think the placement of that section mattered. But if the order matters, I guess that would explain why WicketFilter is invoked even when I expected Tomcat to make a redirect. If this is the cause of my problem I feel stupid... :) However, the same web.xml did work in wicket 1.4.18, probably due to lucky circumstances... -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wrong-path-for-resources-on-redirected-login-page-tp3920038p3932608.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: PageMap locking...
If you are using wicket 1.4, you should be able to delegate your long running request to work with a different pageMap. On Mon, Oct 24, 2011 at 6:16 AM, YaronHolland [via Apache Wicket] ml-node+s1842946n3932536...@n4.nabble.com wrote: Actually using lazy panel makes the problem worse, now the user can click on the tabs, but they will not work as they wait to the lazy panel to complete... We need to allow to move to another tab, without waiting for the first tab to be rendered. -- If you reply to this email, your message will be added to the discussion below: http://apache-wicket.1842946.n4.nabble.com/PageMap-locking-tp3930623p3932536.html To unsubscribe from Apache Wicket, click herehttp://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=1842946code=amNnYXJjaWFtQGdtYWlsLmNvbXwxODQyOTQ2fDEyNTYxMzc3ODY=. -- JC -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/PageMap-locking-tp3930623p3932867.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
DataView or GridView with two columns by item
Hi, I'm trying to make a table with two columns by item. I mean, my item have to generate two columns. The first have attributes of the object, the second have another attribute with details. I can't do this. I made tests with DataView and GridView. I don't know what is the best component. Could you give me an idea of how to do something like this? Thanks in advance. Tito
Re: PageMap locking...
How can i delegate to another PageMap when i need it on a panel in a tabed page? The PageMap is declared in the page, how can i use a diffrent PageMap for a tab in the page? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/PageMap-locking-tp3930623p3932904.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Wicket and ExtJS
So I am on the verge of giving up on integrating Wicket and ExtJS and going with some other webapp framework. I thought Wicket and ExtJS would be the perfect companions because Wicket is basically a hierarchy of components and so is ExtJS. If I could extend wicket components to write out the required javascript instead of their HTML (or even in addition to), it would be a perfect fit. My developers wouldn't need to be expert javascript developers as long as enough of us were to maintain the components. The developer could simply snap in an extended component in Wicket, and like magic, a beautiful full-featured UI widget appears in their browser. The problems I am having are probably mostly from my Wicket inexperience. I just cannot figure out how to make components that do what I want. I try using header contributors to write out the javascript, but many wicket values (like the links generated by the link components) don't seem available in the page. I envisioned being able to override a method in an extended component to write out what I wanted to write like myComponent.writeMe() to write out what I wanted to write out. But that seems like it's not how Wicket works. I am presently overriding onBeforeRender at the page level, iterating through child components looking for an interface I hung on my extended components, and calling methods to get javascript contributions from them, and then adding a header contributor to the page. But this feels like I am ESCAPING the tool, not using it. And the strict Wicket component to markup structure is frustrating because ExtJS 4 builds components solely through javascript. It feels like Wicket is fighting me every step of the way, and that screams to me that I am misusing the tool. Has anyone done something like this in Wicket? Can anyone provide some guidance? Am I approaching the problem from the wrong perspective? Brian Mulholland - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Dynamic BorderBehavior and AjaxFormSubmitBehavior
Hello, Is it possible to use BorderBehavior and AjaxFormSubmitBehavior together on the same TextField? BorderBehavior in our case is dynamic: with the aid of isEnabled. But it seems, that border is not updating be AJAX: only by refresh of the page. Is it correct behavior? Thanks, Ilia
Re: Wicket and ExtJS
Brian, Why don´t you look at how things have been implemented for other libraries (e.g. jquery UI). Can you give a concrete example of component you want to integrate that is giving you problems? And the strict Wicket component to markup structure is frustrating because ExtJS 4 builds components solely through javascript. It feels like Wicket is fighting me every step of the way, and that screams to me that I am misusing the tool. So do many jQuery based components and they can still be integrated with wicket. Regards, Ernesto - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Wicket 1.5.2 HttpSessionDataStore cannot store pages with default store settings
Hi all, Just noticed that when using HttpSessionDataStore pages are not saved. This happens when Wicket-PageSavingThread (org.apache.wicket.pageStore.AsynchronousDataStore) tries to store entry's data to the dataStore. In this case store happens to be HttpSessionDataStore. When trying to get pageTable at org.apache.wicket.pageStore.memory.HttpSessionDataStore:138 Session.exists() returns always false. It seems that code in HttpSessionDataStore expects the call for storing the page coming from user's thread that has correct threadLocal? The error that is printed to the log goes something like: ERROR - HttpSessionDataStore - Cannot store the data for page with id '0' in session with id '1x6veaq6f0b23trchiio53f3g' Store is created pretty much the way it is described in HttpSessionDataStore's javadocs: setPageManagerProvider(new DefaultPageManagerProvider(this) { @Override protected IDataStore newDataStore() { return new HttpSessionDataStore(new DefaultPageManagerContext(), new PageNumberEvictionStrategy(12)); } }); Problem goes away by setting to synchronous action by: getStoreSettings().setAsynchronous(false); Now the question is this the correct way to avoid this problem? Or should asynchronous saving work also with HttpSessionDataStore? So is this a bug and should I open jira issue and provide quickstart demonstrating the problem? Regards, Mikko Pukki
Re: Wicket 1.5.2 HttpSessionDataStore cannot store pages with default store settings
Hi, On Mon, Oct 24, 2011 at 3:16 PM, Mikko Pukki mikko.pu...@syncrontech.com wrote: Hi all, Just noticed that when using HttpSessionDataStore pages are not saved. This happens when Wicket-PageSavingThread (org.apache.wicket.pageStore.AsynchronousDataStore) tries to store entry's data to the dataStore. In this case store happens to be HttpSessionDataStore. When trying to get pageTable at org.apache.wicket.pageStore.memory.HttpSessionDataStore:138 Session.exists() returns always false. It seems that code in HttpSessionDataStore expects the call for storing the page coming from user's thread that has correct threadLocal? The error that is printed to the log goes something like: ERROR - HttpSessionDataStore - Cannot store the data for page with id '0' in session with id '1x6veaq6f0b23trchiio53f3g' Store is created pretty much the way it is described in HttpSessionDataStore's javadocs: setPageManagerProvider(new DefaultPageManagerProvider(this) { @Override protected IDataStore newDataStore() { return new HttpSessionDataStore(new DefaultPageManagerContext(), new PageNumberEvictionStrategy(12)); } }); Problem goes away by setting to synchronous action by: getStoreSettings().setAsynchronous(false); Now the question is this the correct way to avoid this problem? Or should asynchronous saving work also with HttpSessionDataStore? So is this a bug and should I open jira issue and provide quickstart demonstrating the problem? The problem is clear. Indeed HttpSessionDataStore is not intended to be used asynchronously. The AsynchronousDataStore is used to detach the http worker thread from the actual write of the page's bytes in slower data stores like DiskDataStore. Anyway, please create a ticket. No errors should happen by just changing the settings. Regards, Mikko Pukki -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
non caching dynamic links
Hi! What is the best way to add non caching sugar onto all non-bookmarkable and/or ajax links of a wicket 1.4.x application with standard out-of-the-box url encoding schemes? We are facing some problems with using http caching headers, some browsers completely stop working properly. ** Martin - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket and ExtJS
First, thanks for the prompt response. Okay, so I am struggling with writing a menu component. I saw the Suckerfish menu example and tried to adapt that towards my needs. I want my fellow developers to be able to write something like: MyMenu topMenu = new MyMenu(topMenu); MyMenu subMenu1 = new SubMenu(subMenu1, Here is a submenu); MyMenu subMenu2 = new SubMenu2(subMenu2, Here is another submenu); subMenu1.addMenuItem(new BookmarkableLink(LINK_ID, SomePage.class), Some Page); subMenu2.addMenuItem(new BookmarkableLink(LINK_ID, SomeOtherPage.class), Some Other Page); submenu1.addMenuItem(new MyMenuSeparator()); subMenu1.addMenuItem(new Link(LINK_ID) { public void onClick() { //do something } }, An action); subMenu1.addMenuItem(new MyClientSideAction(Do Local Work, some javascript code or the name of a client side function to invoke or something)); subMenu2.addMenuItem(new Link(LINK_ID) { public void onClick() { //do something else } }, Another action); subMenu2.addMenuItem(new MyClientSideAction(Other Local Work, some javascript code or the name of a client side function to invoke or something)); Which would then generate Ext code. Either as one large block using the Ext JSON config objects (if you've ever seen Ext code you know what I mean), or generating a series of smaller scriptlets each generating the indiidual item needed and adding by name to the component that is it's parent. The former might look like this (m just typing this now so forgive any typoes). Ext.onReady(function() { //some code to make parent components not shown until we get to it's items array which might look like: items: [{ xtype: 'menu', items: [{ xtype: 'menu', text: 'Here is a submenu', items: [{ xtype: 'menuitem', text: 'Some Page', handler: { //some magic code that somehow gets the wicket link to forward to Some Page } }, { xtype: 'separator' }, { xtype: 'menuitem', text: 'An Action', handler: { //some magic code that somehow invokes the onClick method on the server in the right link } }, { xtype: 'menuitem', text: 'Do Local Work', handler: { //the code or function provided } }] //end first submenu's items }, { xtype: 'menu', text: 'Here is another submenu', items: [{ xtype: 'menuitem', text: 'Some Other Page', handler: { //some magic code that somehow gets the wicket link to forward to Some Other Page } }, { xtype: 'menuitem', text: 'Another Action', handler: { //some magic code that somehow invokes the onClick method on the server in the right link } }, { xtype: 'menuitem', text: 'Other Local Work', handler: { //the code or function provided } }] //end secondsubmenu's items }] //end topMenu's items }] //end the parent object (whatever that is) items }); the second proposal might have independent script tags at each wicket:id tag, replacing the element with a script tag that gets the parent (as detected by the parent hierarchy in wicket) and adds the component to it's parent. Because Ext stores each function and executes it in order, it should have the same effect as above, but allow the component to be more independent. It only needs to detect it's parent. I like this style better, but I have less idea how to implement it through wicket. How can I override what wicket writes for it's body? So I would end up with many small block like the following throughout my rendered markup. SCRIPT Ext.onReady(function(){ var parent = Ext.getCmp(myParent); parent.add(Ext.create(whatever we are creating, { //the config parms }); }); /SCRIPT Since I don't know how to do that, I have been writing towards the first example. the result of my stumblings is a set of components that all implement an interface that asks for the snippet of the first example that represents their contribution, and then adds it as a header contribution to the page. Links are resolved by css styling the markup wicket generates as display:none, and then using javascript to pick up the link and text of the menu item to add after render. But this solution feels 'hacky' and inelegant. It feels like I am sneaking around the framework, not USING the framework. As to jQuery. I know zilch about jQuery. Because I also am just learning wicket, I am leery of getting 'sucked into the rabbit hole' on reading and learning how another library was implemented and then finding out that it doesn't apply. But if you think it applies, I can give it a shot. Is there a particular implementation that you think is good to review? Again, thanks for responding quickly, Ernesto. It's appreciated. Brian Mulholland On Mon, Oct 24, 2011 at 9:04 AM, Ernesto Reinaldo Barreiro reier...@gmail.com wrote: Brian, Why don´t you look at how things have been
reverse engineering a wicket application
Hi , I found an 'abandoned' wicket project that I want to use, but I don't know how to determine what urls are valid to access it from my jetty instance. I built it with no errors, and I can start the jetty server, but I don't know what url to use to access it. For example, I assume it would be of the form http://localhost:8080/something. I don't know how to determine what the value 'something' might be. Is there a configuration file or entry that I can look at to figure out what to enter for a url? Regards, Ron -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/reverse-engineering-a-wicket-application-tp3933538p3933538.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: reverse engineering a wicket application
Check the webApplication file you should be able to find the mounted pages there --Original Message-- From: roncking To: users@wicket.apache.org ReplyTo: users@wicket.apache.org Subject: reverse engineering a wicket application Sent: Oct 24, 2011 9:32 AM Hi , I found an 'abandoned' wicket project that I want to use, but I don't know how to determine what urls are valid to access it from my jetty instance. I built it with no errors, and I can start the jetty server, but I don't know what url to use to access it. For example, I assume it would be of the form http://localhost:8080/something. I don't know how to determine what the value 'something' might be. Is there a configuration file or entry that I can look at to figure out what to enter for a url? Regards, Ron -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/reverse-engineering-a-wicket-application-tp3933538p3933538.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: reverse engineering a wicket application
Also try the home page : http://localhost:8080 From there hopefully you'll have links to the other pages. On Mon, Oct 24, 2011 at 5:38 PM, anant.a...@gmail.com wrote: Check the webApplication file you should be able to find the mounted pages there --Original Message-- From: roncking To: users@wicket.apache.org ReplyTo: users@wicket.apache.org Subject: reverse engineering a wicket application Sent: Oct 24, 2011 9:32 AM Hi , I found an 'abandoned' wicket project that I want to use, but I don't know how to determine what urls are valid to access it from my jetty instance. I built it with no errors, and I can start the jetty server, but I don't know what url to use to access it. For example, I assume it would be of the form http://localhost:8080/something. I don't know how to determine what the value 'something' might be. Is there a configuration file or entry that I can look at to figure out what to enter for a url? Regards, Ron -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/reverse-engineering-a-wicket-application-tp3933538p3933538.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: PageMap locking...
you shouldnt have requests that take a long time to process. there are lots of problems with this like users starving your threadpool, etc. instead you should load the data in another thread and either use a push notification or let the client poll to find out if the data is available. unfortunately the ajaxlazyloadpanel is not implemented correctly, it doesnt poll but simply request and wait for the data with ajax. a better implementation might look like this and might better work for what you need: class BetterLazyLoadPanel extends Panel { public BetterLazyLoadPanel() { add(new WebMarkupContainer(content)); -- placeholder until the right component is added add(new AjaxSelfUpdatingTimerBehavior(Duration.seconds(2)) { onTimer(target) { Component replacement=getLazyLoadedComponent(content); if (replacement!=null) { replace(replacement); stop(); target.add(BetterLazyLoadPanel.this); } } }); } protected abstract getLazyLoadedComponent(String id); } now in getLazyLoadedComponent() you can return null until your data has finished loading in another thread, and when its done return the component you wish to represent it with. hope this helps. -igor On Sun, Oct 23, 2011 at 9:06 AM, YaronHolland gel...@yahoo.com wrote: We have some pages that might take a long time to load, depanding on data. Once the user has clicked a link to another page (Or switched a tab if it is a tabed page), is there a way to terminate the request to prevent a load on the server for a page that will not be displayed? In a tabed page, is there a way to go to another tab without waiting for the first tab to rendered? (As the tab link is waiting to the page map to be relased...) -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/PageMap-locking-tp3930623p3930623.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: DataView or GridView with two columns by item
dataview/listview/datatable should all work just fine, post your code. -igor On Mon, Oct 24, 2011 at 5:06 AM, Tito njyt...@gmail.com wrote: Hi, I'm trying to make a table with two columns by item. I mean, my item have to generate two columns. The first have attributes of the object, the second have another attribute with details. I can't do this. I made tests with DataView and GridView. I don't know what is the best component. Could you give me an idea of how to do something like this? Thanks in advance. Tito - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: reverse engineering a wicket application
Check WebApplication also for method getHomePage() or getSignInPageClass () to identify home and signin pages. Check the webApplication file you should be able to find the mounted pages there --Original Message-- From: roncking To: users@wicket.apache.org ReplyTo: users@wicket.apache.org Subject: reverse engineering a wicket application Sent: Oct 24, 2011 9:32 AM Hi , I found an 'abandoned' wicket project that I want to use, but I don't know how to determine what urls are valid to access it from my jetty instance. I built it with no errors, and I can start the jetty server, but I don't know what url to use to access it. For example, I assume it would be of the form http://localhost:8080/something. I don't know how to determine what the value 'something' might be. Is there a configuration file or entry that I can look at to figure out what to enter for a url? Regards, Ron -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/reverse-engineering-a-wicket-application-tp3933538p3933538.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Dynamic BorderBehavior and AjaxFormSubmitBehavior
the behavior needs to be refactored to take advantage of IAjaxRegionMarkupIdProvider so it can work properly with ajax repaints, perhaps you can create a patch and attach it to a jira ticket. -igor On Mon, Oct 24, 2011 at 5:59 AM, Илья Нарыжный phan...@ydn.ru wrote: Hello, Is it possible to use BorderBehavior and AjaxFormSubmitBehavior together on the same TextField? BorderBehavior in our case is dynamic: with the aid of isEnabled. But it seems, that border is not updating be AJAX: only by refresh of the page. Is it correct behavior? Thanks, Ilia - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: Wicket 1.5.2 HttpSessionDataStore cannot store pages with default store settings
Hi, Created a ticket: https://issues.apache.org/jira/browse/WICKET-4165 It is now marked as major because I forgot to change priority to minor. Not at all a showstopper by any means. Regards, Mikko Pukki -Original Message- From: Martin Grigorov [mailto:mgrigo...@apache.org] Sent: 24. lokakuuta 2011 16:25 To: users@wicket.apache.org Subject: Re: Wicket 1.5.2 HttpSessionDataStore cannot store pages with default store settings Hi, On Mon, Oct 24, 2011 at 3:16 PM, Mikko Pukki mikko.pu...@syncrontech.com wrote: Hi all, Just noticed that when using HttpSessionDataStore pages are not saved. This happens when Wicket-PageSavingThread (org.apache.wicket.pageStore.AsynchronousDataStore) tries to store entry's data to the dataStore. In this case store happens to be HttpSessionDataStore. When trying to get pageTable at org.apache.wicket.pageStore.memory.HttpSessionDataStore:138 Session.exists() returns always false. It seems that code in HttpSessionDataStore expects the call for storing the page coming from user's thread that has correct threadLocal? The error that is printed to the log goes something like: ERROR - HttpSessionDataStore - Cannot store the data for page with id '0' in session with id '1x6veaq6f0b23trchiio53f3g' Store is created pretty much the way it is described in HttpSessionDataStore's javadocs: setPageManagerProvider(new DefaultPageManagerProvider(this) { @Override protected IDataStore newDataStore() { return new HttpSessionDataStore(new DefaultPageManagerContext(), new PageNumberEvictionStrategy(12)); } }); Problem goes away by setting to synchronous action by: getStoreSettings().setAsynchronous(false); Now the question is this the correct way to avoid this problem? Or should asynchronous saving work also with HttpSessionDataStore? So is this a bug and should I open jira issue and provide quickstart demonstrating the problem? The problem is clear. Indeed HttpSessionDataStore is not intended to be used asynchronously. The AsynchronousDataStore is used to detach the http worker thread from the actual write of the page's bytes in slower data stores like DiskDataStore. Anyway, please create a ticket. No errors should happen by just changing the settings. Regards, Mikko Pukki -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: DataView or GridView with two columns by item
Hi Igor this is what i'm doing: .java public DedicationsReportPanel(String id, IModelUsers user, final IModelDate dayOfReport) { super(id); add(new DataViewDedication(dedications, new DedicationDataProvider(dedicationService, user.getObject().getUserName())) { @Override protected void populateItem(ItemDedication item) { DateFormat formatter = new SimpleDateFormat(hh:mm); final Dedication dedication = item.getModelObject(); item.add(new Label(timeFrom, formatter.format(dedication.getTimeFrom(; item.add(new Label(timeTo, formatter.format(dedication.getTimeTo(; item.add(new Label(hours, dedication.getHours().toString())); item.add(new Label(task, dedication.getTask().getName())); item.add(new Label(accounts, getAccounts(dedication))); item.add(new TextAreaString(serviceStatus, new PropertyModelString(item.getModel(), serviceStatus))); } @Override protected ItemDedication newItem(String id, int index, IModelDedication model) { OddEvenItemDedication item = new OddEvenItemDedication(id, index, model); return item; } }); } .html html xmlns:wicket=http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd head/head body wicket:panel table cellspacing=0 class=listado tr thFecha/th thHoras/th thTarea/th thServicios/th thAcciones/th /tr div wicket:id=dedications tr tdspan wicket:id=hours[horas]/span/td tdspan wicket:id=timeFrom[hora desde]/span]/td tdspan wicket:id=timeTo[hora hasta]/span]/td tdspan wicket:id=task[tarea]/span/td tdspan wicket:id=accounts[cuentas]/span/td /tr tr td colspan=5 input wicket:id=serviceStatus / /td /tr /div /table /wicket:panel /body /html I'm using a div to group two columns. The problem is that this not a valid html, and I can't get Odd, Even class in rows. I think it is because div is repeated instead of tr. What i'm expecting in the final html is something like this: table cellspacing=0 class=listado tr thFecha/th thHoras/th thTarea/th thServicios/th thAcciones/th /tr tr class=Even tdspanhours 1/span/td tdspantime from 1/span]/td tdspantime to 1/span]/td tdspantask 1/span/td tdspanaccounts 1/span/td /tr tr class=Even td colspan=5 input wicket:id=serviceStatus / /td /tr tr class=Odd tdspanhours 2/span/td tdspantime from 2/span]/td tdspantime to 2/span]/td tdspantask 2/span/td tdspanaccounts 2/span/td /tr tr class=Odd td colspan=5 input wicket:id=serviceStatus / /td /tr /table Thanks! 2011/10/24 Igor Vaynberg igor.vaynb...@gmail.com dataview/listview/datatable should all work just fine, post your code. -igor On Mon, Oct 24, 2011 at 5:06 AM, Tito njyt...@gmail.com wrote: Hi, I'm trying to make a table with two columns by item. I mean, my item have to generate two columns. The first have attributes of the object, the second have another attribute with details. I can't do this. I made tests with DataView and GridView. I don't know what is the best component. Could you give me an idea of how to do something like this? Thanks in advance. Tito - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket 1.5.2 HttpSessionDataStore cannot store pages with default store settings
On Mon, Oct 24, 2011 at 6:08 PM, Mikko Pukki mikko.pu...@syncrontech.com wrote: Hi, Created a ticket: https://issues.apache.org/jira/browse/WICKET-4165 It is now marked as major because I forgot to change priority to minor. Not at all a showstopper by any means. Thanks! I made it minor. Regards, Mikko Pukki -Original Message- From: Martin Grigorov [mailto:mgrigo...@apache.org] Sent: 24. lokakuuta 2011 16:25 To: users@wicket.apache.org Subject: Re: Wicket 1.5.2 HttpSessionDataStore cannot store pages with default store settings Hi, On Mon, Oct 24, 2011 at 3:16 PM, Mikko Pukki mikko.pu...@syncrontech.com wrote: Hi all, Just noticed that when using HttpSessionDataStore pages are not saved. This happens when Wicket-PageSavingThread (org.apache.wicket.pageStore.AsynchronousDataStore) tries to store entry's data to the dataStore. In this case store happens to be HttpSessionDataStore. When trying to get pageTable at org.apache.wicket.pageStore.memory.HttpSessionDataStore:138 Session.exists() returns always false. It seems that code in HttpSessionDataStore expects the call for storing the page coming from user's thread that has correct threadLocal? The error that is printed to the log goes something like: ERROR - HttpSessionDataStore - Cannot store the data for page with id '0' in session with id '1x6veaq6f0b23trchiio53f3g' Store is created pretty much the way it is described in HttpSessionDataStore's javadocs: setPageManagerProvider(new DefaultPageManagerProvider(this) { @Override protected IDataStore newDataStore() { return new HttpSessionDataStore(new DefaultPageManagerContext(), new PageNumberEvictionStrategy(12)); } }); Problem goes away by setting to synchronous action by: getStoreSettings().setAsynchronous(false); Now the question is this the correct way to avoid this problem? Or should asynchronous saving work also with HttpSessionDataStore? So is this a bug and should I open jira issue and provide quickstart demonstrating the problem? The problem is clear. Indeed HttpSessionDataStore is not intended to be used asynchronously. The AsynchronousDataStore is used to detach the http worker thread from the actual write of the page's bytes in slower data stores like DiskDataStore. Anyway, please create a ticket. No errors should happen by just changing the settings. Regards, Mikko Pukki -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: DataView or GridView with two columns by item
ahhh. so you want two *rows* not two *columns* per item, attach the repeater to a wicket:container tag like so: wicket:container wicket:id=repeater trtd.../tr trtd/tr /wicket:container you will have to rig up odd/even yourself -igor On Mon, Oct 24, 2011 at 9:10 AM, Tito njyt...@gmail.com wrote: Hi Igor this is what i'm doing: .java public DedicationsReportPanel(String id, IModelUsers user, final IModelDate dayOfReport) { super(id); add(new DataViewDedication(dedications, new DedicationDataProvider(dedicationService, user.getObject().getUserName())) { @Override protected void populateItem(ItemDedication item) { DateFormat formatter = new SimpleDateFormat(hh:mm); final Dedication dedication = item.getModelObject(); item.add(new Label(timeFrom, formatter.format(dedication.getTimeFrom(; item.add(new Label(timeTo, formatter.format(dedication.getTimeTo(; item.add(new Label(hours, dedication.getHours().toString())); item.add(new Label(task, dedication.getTask().getName())); item.add(new Label(accounts, getAccounts(dedication))); item.add(new TextAreaString(serviceStatus, new PropertyModelString(item.getModel(), serviceStatus))); } @Override protected ItemDedication newItem(String id, int index, IModelDedication model) { OddEvenItemDedication item = new OddEvenItemDedication(id, index, model); return item; } }); } .html html xmlns:wicket=http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd head/head body wicket:panel table cellspacing=0 class=listado tr thFecha/th thHoras/th thTarea/th thServicios/th thAcciones/th /tr div wicket:id=dedications tr tdspan wicket:id=hours[horas]/span/td tdspan wicket:id=timeFrom[hora desde]/span]/td tdspan wicket:id=timeTo[hora hasta]/span]/td tdspan wicket:id=task[tarea]/span/td tdspan wicket:id=accounts[cuentas]/span/td /tr tr td colspan=5 input wicket:id=serviceStatus / /td /tr /div /table /wicket:panel /body /html I'm using a div to group two columns. The problem is that this not a valid html, and I can't get Odd, Even class in rows. I think it is because div is repeated instead of tr. What i'm expecting in the final html is something like this: table cellspacing=0 class=listado tr thFecha/th thHoras/th thTarea/th thServicios/th thAcciones/th /tr tr class=Even tdspanhours 1/span/td tdspantime from 1/span]/td tdspantime to 1/span]/td tdspantask 1/span/td tdspanaccounts 1/span/td /tr tr class=Even td colspan=5 input wicket:id=serviceStatus / /td /tr tr class=Odd tdspanhours 2/span/td tdspantime from 2/span]/td tdspantime to 2/span]/td tdspantask 2/span/td tdspanaccounts 2/span/td /tr tr class=Odd td colspan=5 input wicket:id=serviceStatus / /td /tr /table Thanks! 2011/10/24 Igor Vaynberg igor.vaynb...@gmail.com dataview/listview/datatable should all work just fine, post your code. -igor On Mon, Oct 24, 2011 at 5:06 AM, Tito njyt...@gmail.com wrote: Hi, I'm trying to make a table with two columns by item. I mean, my item have to generate two columns. The first have attributes of the object, the second have another attribute with details. I can't do this. I made tests with DataView and GridView. I don't know what is the best component. Could you give me an idea of how to do something like this? Thanks in advance. Tito - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: DataView or GridView with two columns by item
I'm sorry, you are right! I said columns but I meant Rows! What is the java component for wicket container? How do you suggest to add Odd, Even classes? Thank you! 2011/10/24 Igor Vaynberg igor.vaynb...@gmail.com ahhh. so you want two *rows* not two *columns* per item, attach the repeater to a wicket:container tag like so: wicket:container wicket:id=repeater trtd.../tr trtd/tr /wicket:container you will have to rig up odd/even yourself -igor On Mon, Oct 24, 2011 at 9:10 AM, Tito njyt...@gmail.com wrote: Hi Igor this is what i'm doing: .java public DedicationsReportPanel(String id, IModelUsers user, final IModelDate dayOfReport) { super(id); add(new DataViewDedication(dedications, new DedicationDataProvider(dedicationService, user.getObject().getUserName())) { @Override protected void populateItem(ItemDedication item) { DateFormat formatter = new SimpleDateFormat(hh:mm); final Dedication dedication = item.getModelObject(); item.add(new Label(timeFrom, formatter.format(dedication.getTimeFrom(; item.add(new Label(timeTo, formatter.format(dedication.getTimeTo(; item.add(new Label(hours, dedication.getHours().toString())); item.add(new Label(task, dedication.getTask().getName())); item.add(new Label(accounts, getAccounts(dedication))); item.add(new TextAreaString(serviceStatus, new PropertyModelString(item.getModel(), serviceStatus))); } @Override protected ItemDedication newItem(String id, int index, IModelDedication model) { OddEvenItemDedication item = new OddEvenItemDedication(id, index, model); return item; } }); } .html html xmlns:wicket= http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd head/head body wicket:panel table cellspacing=0 class=listado tr thFecha/th thHoras/th thTarea/th thServicios/th thAcciones/th /tr div wicket:id=dedications tr tdspan wicket:id=hours[horas]/span/td tdspan wicket:id=timeFrom[hora desde]/span]/td tdspan wicket:id=timeTo[hora hasta]/span]/td tdspan wicket:id=task[tarea]/span/td tdspan wicket:id=accounts[cuentas]/span/td /tr tr td colspan=5 input wicket:id=serviceStatus / /td /tr /div /table /wicket:panel /body /html I'm using a div to group two columns. The problem is that this not a valid html, and I can't get Odd, Even class in rows. I think it is because div is repeated instead of tr. What i'm expecting in the final html is something like this: table cellspacing=0 class=listado tr thFecha/th thHoras/th thTarea/th thServicios/th thAcciones/th /tr tr class=Even tdspanhours 1/span/td tdspantime from 1/span]/td tdspantime to 1/span]/td tdspantask 1/span/td tdspanaccounts 1/span/td /tr tr class=Even td colspan=5 input wicket:id=serviceStatus / /td /tr tr class=Odd tdspanhours 2/span/td tdspantime from 2/span]/td tdspantime to 2/span]/td tdspantask 2/span/td tdspanaccounts 2/span/td /tr tr class=Odd td colspan=5 input wicket:id=serviceStatus / /td /tr /table Thanks! 2011/10/24 Igor Vaynberg igor.vaynb...@gmail.com dataview/listview/datatable should all work just fine, post your code. -igor On Mon, Oct 24, 2011 at 5:06 AM, Tito njyt...@gmail.com wrote: Hi, I'm trying to make a table with two columns by item. I mean, my item have to generate two columns. The first have attributes of the object, the second have another attribute with details. I can't do this. I made tests with DataView and GridView. I don't know what is the best component. Could you give me an idea of how to do something like this? Thanks in advance. Tito - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: DataView or GridView with two columns by item
On Mon, Oct 24, 2011 at 9:31 AM, Tito njyt...@gmail.com wrote: I'm sorry, you are right! I said columns but I meant Rows! What is the java component for wicket container? no need for a java component, wicket:container is an auto tag like wicket:message How do you suggest to add Odd, Even classes? you can make trs webmarkupcontainers that add the correct class -igor Thank you! 2011/10/24 Igor Vaynberg igor.vaynb...@gmail.com ahhh. so you want two *rows* not two *columns* per item, attach the repeater to a wicket:container tag like so: wicket:container wicket:id=repeater trtd.../tr trtd/tr /wicket:container you will have to rig up odd/even yourself -igor On Mon, Oct 24, 2011 at 9:10 AM, Tito njyt...@gmail.com wrote: Hi Igor this is what i'm doing: .java public DedicationsReportPanel(String id, IModelUsers user, final IModelDate dayOfReport) { super(id); add(new DataViewDedication(dedications, new DedicationDataProvider(dedicationService, user.getObject().getUserName())) { @Override protected void populateItem(ItemDedication item) { DateFormat formatter = new SimpleDateFormat(hh:mm); final Dedication dedication = item.getModelObject(); item.add(new Label(timeFrom, formatter.format(dedication.getTimeFrom(; item.add(new Label(timeTo, formatter.format(dedication.getTimeTo(; item.add(new Label(hours, dedication.getHours().toString())); item.add(new Label(task, dedication.getTask().getName())); item.add(new Label(accounts, getAccounts(dedication))); item.add(new TextAreaString(serviceStatus, new PropertyModelString(item.getModel(), serviceStatus))); } @Override protected ItemDedication newItem(String id, int index, IModelDedication model) { OddEvenItemDedication item = new OddEvenItemDedication(id, index, model); return item; } }); } .html html xmlns:wicket= http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd head/head body wicket:panel table cellspacing=0 class=listado tr thFecha/th thHoras/th thTarea/th thServicios/th thAcciones/th /tr div wicket:id=dedications tr tdspan wicket:id=hours[horas]/span/td tdspan wicket:id=timeFrom[hora desde]/span]/td tdspan wicket:id=timeTo[hora hasta]/span]/td tdspan wicket:id=task[tarea]/span/td tdspan wicket:id=accounts[cuentas]/span/td /tr tr td colspan=5 input wicket:id=serviceStatus / /td /tr /div /table /wicket:panel /body /html I'm using a div to group two columns. The problem is that this not a valid html, and I can't get Odd, Even class in rows. I think it is because div is repeated instead of tr. What i'm expecting in the final html is something like this: table cellspacing=0 class=listado tr thFecha/th thHoras/th thTarea/th thServicios/th thAcciones/th /tr tr class=Even tdspanhours 1/span/td tdspantime from 1/span]/td tdspantime to 1/span]/td tdspantask 1/span/td tdspanaccounts 1/span/td /tr tr class=Even td colspan=5 input wicket:id=serviceStatus / /td /tr tr class=Odd tdspanhours 2/span/td tdspantime from 2/span]/td tdspantime to 2/span]/td tdspantask 2/span/td tdspanaccounts 2/span/td /tr tr class=Odd td colspan=5 input wicket:id=serviceStatus / /td /tr /table Thanks! 2011/10/24 Igor Vaynberg igor.vaynb...@gmail.com dataview/listview/datatable should all work just fine, post your code. -igor On Mon, Oct 24, 2011 at 5:06 AM, Tito njyt...@gmail.com wrote: Hi, I'm trying to make a table with two columns by item. I mean, my item have to generate two columns. The first have attributes of the object, the second have another attribute with details. I can't do this. I made tests with DataView and GridView. I don't know what is the best component. Could you give me an idea of how to do something like this? Thanks in advance. Tito - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket and ExtJS
I would make class MyMenu as a Behavior or possibly a Label and class SubMenu as a POJO (don't make it extend Component). Everything doesn't have to be a subclass of component, right? You need to code MyMenu in such way that it generates javascript from POJOs. That way your developers don't need to add unnecessary elements to markup. MyMenu would be suitable as a behavior because it's just javascript and doesn't need html elements. You would simply add the behavior to the page. It could be a Label as well. I'm not sure which approach has more benefits. For the URLs that wicket must generate for you, see RequestCycle.urlFor() methods. For example, there's the urlFor(Class, PageParameters) method that creates a link to a page. To invoke some method on some component you would use urlFor(component, ILinkListener.INTERFACE) and the component must implement the ILinkListener interface. - Original Message - From: Brian Mulholland Sent: 10/24/11 05:41 PM To: users@wicket.apache.org Subject: Re: Wicket and ExtJS First, thanks for the prompt response. Okay, so I am struggling with writing a menu component. I saw the Suckerfish menu example and tried to adapt that towards my needs. I want my fellow developers to be able to write something like: MyMenu topMenu = new MyMenu(topMenu); MyMenu subMenu1 = new SubMenu(subMenu1, Here is a submenu); MyMenu subMenu2 = new SubMenu2(subMenu2, Here is another submenu); subMenu1.addMenuItem(new BookmarkableLink(LINK_ID, SomePage.class), Some Page); subMenu2.addMenuItem(new BookmarkableLink(LINK_ID, SomeOtherPage.class), Some Other Page); submenu1.addMenuItem(new MyMenuSeparator()); subMenu1.addMenuItem(new Link(LINK_ID) { public void onClick() { //do something } }, An action); subMenu1.addMenuItem(new MyClientSideAction(Do Local Work, some javascript code or the name of a client side function to invoke or something)); subMenu2.addMenuItem(new Link(LINK_ID) { public void onClick() { //do something else } }, Another action); sub Menu2.addMenuItem(new MyClientSideAction(Other Local Work, some javascript code or the name of a client side function to invoke or something)); Which would then generate Ext code. Either as one large block using the Ext JSON config objects (if you've ever seen Ext code you know what I mean), or generating a series of smaller scriptlets each generating the indiidual item needed and adding by name to the component that is it's parent. The former might look like this (m just typing this now so forgive any typoes). Ext.onReady(function() { //some code to make parent components not shown until we get to it's items array which might look like: items: [{ xtype: 'menu', items: [{ xtype: 'menu', text: 'Here is a submenu', items: [{ xtype: 'menuitem', text: 'Some Page', handler: { //some magic code that somehow gets the wicket link to forward to Some Page } }, { xtype: 'separator' }, { xtype: 'menuitem', text: 'An Action', handler: { //some magic code that somehow invokes the onC lick method on the server in the right link } }, { xtype: 'menuitem', text: 'Do Local Work', handler: { //the code or function provided } }] //end first submenu's items }, { xtype: 'menu', text: 'Here is another submenu', items: [{ xtype: 'menuitem', text: 'Some Other Page', handler: { //some magic code that somehow gets the wicket link to forward to Some Other Page } }, { xtype: 'menuitem', text: 'Another Action', handler: { //some magic code that somehow invokes the onClick method on the server in the right link } }, { xtype: 'menuitem', text: 'Other Local Work', handler: { //the code or function provided } }] //end secondsubmenu's items }] //end topMenu's items }] //end the parent object (whatever that is) items }); the second proposal might have independent script tags at each wicket:id tag, replacing the element with a script tag that gets the parent (as detected by the parent hierarchy in wicket) and adds the component to it's parent. Because Ext stores each function a nd executes it in order, it should have the same effect as above, but allow the component to be more independent. It only needs to detect it's parent. I like this style better, but I have less idea how to implement it through wicket. How can I override what wicket writes for it's body? So I would end up with many small block like the following throughout my rendered markup. SCRIPT Ext.onReady(function(){ var parent = Ext.getCmp(myParent); parent.add(Ext.create(whatever we are creating, { //the config parms }); }); /SCRIPT Since I don't know how to do that, I have been writing towards the first example. the result of my stumblings is a set of components that all implement an interface that asks for the snippet of the first example that represents their contribution, and then adds it as a header contribution to the page. Links are resolved by css styling the markup wicket generates as display:none, and then using javascript to pick up the link
Re: wicket + jasper reports
Got it - found another hint about DownloadLink that led me to this solution: @Override public void onSubmit() { ReportResource resource = new PdfReportResource(getReportName(), getParamsModel()); getRequestCycle().scheduleRequestHandlerAfterCurrent( new ResourceRequestHandler(resource, null)); } So simple, but it took some digging to find so hope this helps someone else. -- Jim. On Fri, Oct 21, 2011 at 2:44 PM, Jim Pinkham pinkh...@gmail.com wrote: OK, I've almost got it - thanks for the example. It comes down to either using a ResourceLinkVoid which serves up the pdf with no complaints, but despite being attached to a submit button, the form doesn't seem to have been submitted; the parameters don't reflect any user input or, I can solve that if I use a Button instead, and copy this code from ResourceLink.onResourceRequested into the Button's onSubmit()... Attributes a = new Attributes(RequestCycle.get().getRequest(), RequestCycle.get() .getResponse(), null); resource.respond(a); But if I do that, it works but then I get Header was already written to response! as mentioned earlier. I also tried making my own MyResourceLink (I would rather have extended ResourceLink but I had to go all the way back to Link because ResourceLink's onResourceRequested is final) and I put a call to ParamsForm.this.process(this); then super.onResourceRequested(), and that stopped the error but still didn't submit the form. Has anyone found a way to get the best of both? I found SubmitLink, but I guess I need some way to 'mix that in', or decorate the ResourceLink with a submit first... not sure how to do that.. (ResourceLink already implements IFormSubmittingComponent, but I guess that's not enough) (I tried calling inputField.getConvertedInput() like I might do from a validator but that just returns null, which is what leads me to believe the form hasn't been submitted) Thanks, -- Jim. On Wed, Oct 19, 2011 at 11:55 PM, Martin Grigorov mgrigo...@apache.orgwrote: On Wed, Oct 19, 2011 at 11:46 PM, Paul Szulc paul.sz...@gmail.com wrote: Ok, below the code I use to create a link that allows to download pdf file created by jasper on runtime. Hope it helps. Do not hesitate to ask questions. public class PdfGenerateLink extends ResourceLinkVoid { public PdfGenerateLink(final String id, final IModelBid model, final PdfBuilderFromBidCreator creator) { super(id, new WebResource() { @Override public IResourceStream getResourceStream() { IResourceStream resourceStream = new AbstractResourceStreamWriter() { public void write(OutputStream output) { try { generate(output, model.getObject()); } catch (Exception e) { throw new RuntimeException(e); } } private void generate(OutputStream output, Bid bid) throws Exception { PdfOfertaDocumentBuilder pdf = creator.create(bid); Oferta ?! This sounds like Bulgarians are involved here :-) InputStream generate = pdf.generate(); byte[] buffer = new byte[1024]; while (generate.read(buffer) != -1) { output.write(buffer); } generate.close(); } public String getContentType() { return application/pdf; } }; return resourceStream; } @Override protected void setHeaders(WebResponse response) { super.setHeaders(response); response.setCharacterEncoding(UFT-8); response.setHeader(Expires, 0); response.setHeader(Cache-Control, no-cache); response.setHeader(Cache-Control, must-revalidate, post-check=0, pre-check=0); response.setHeader(Pragma, public); response.setAttachmentHeader(model.getObject().getPublicTask().getName().replace( , _) + .pdf); } }); add(createImage(icon, pdficon16.png)); } } On Tue, Oct 18, 2011 at 8:43 PM, Jim Pinkham pinkh...@gmail.com wrote: Paul, I am doing something very similar - I'd be interested to know more about how you got this working - here is what I've got that works for now, but I'm not real happy with it: In my report forms, I have buttons like this: (details about params omitted - nothing fancy there) add(new MyReportResourceButton(pdf, new ReportResource(MyReport, new PdfResourceHandler()), paramsModel)); add(new
Re: Wicket and ExtJS
there have been plenty of discussions on wicket and extjs http://markmail.org/search/wicket+extjs my two cents is that this kind of integration is not a good idea. wicket is about manipulating existing markup in an object oriented way, while extjs is about generating the markup from code. there is a pretty big impedance mismatch between the two frameworks. further, the kind of logic that you would put into a link's onclick or a form's onsubmit is usually better written in javascript when using extjs. extjs is about creating fat clients that only use the server for data. wicket, on the other hand, is about creating thin clients where server also deals with the ui, not just data. so, here you have another impedance mismatch. imho you are better off using extjs with something like resteasy. -igor On Mon, Oct 24, 2011 at 5:54 AM, Brian Mulholland blmulholl...@gmail.com wrote: So I am on the verge of giving up on integrating Wicket and ExtJS and going with some other webapp framework. I thought Wicket and ExtJS would be the perfect companions because Wicket is basically a hierarchy of components and so is ExtJS. If I could extend wicket components to write out the required javascript instead of their HTML (or even in addition to), it would be a perfect fit. My developers wouldn't need to be expert javascript developers as long as enough of us were to maintain the components. The developer could simply snap in an extended component in Wicket, and like magic, a beautiful full-featured UI widget appears in their browser. The problems I am having are probably mostly from my Wicket inexperience. I just cannot figure out how to make components that do what I want. I try using header contributors to write out the javascript, but many wicket values (like the links generated by the link components) don't seem available in the page. I envisioned being able to override a method in an extended component to write out what I wanted to write like myComponent.writeMe() to write out what I wanted to write out. But that seems like it's not how Wicket works. I am presently overriding onBeforeRender at the page level, iterating through child components looking for an interface I hung on my extended components, and calling methods to get javascript contributions from them, and then adding a header contributor to the page. But this feels like I am ESCAPING the tool, not using it. And the strict Wicket component to markup structure is frustrating because ExtJS 4 builds components solely through javascript. It feels like Wicket is fighting me every step of the way, and that screams to me that I am misusing the tool. Has anyone done something like this in Wicket? Can anyone provide some guidance? Am I approaching the problem from the wrong perspective? Brian Mulholland - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: reverse engineering a wicket application
Get your IDE and open up the hierarchy for WebPage. From there you can see all pages in your application. Martijn On Mon, Oct 24, 2011 at 5:32 PM, roncking ronck...@gmail.com wrote: Hi , I found an 'abandoned' wicket project that I want to use, but I don't know how to determine what urls are valid to access it from my jetty instance. I built it with no errors, and I can start the jetty server, but I don't know what url to use to access it. For example, I assume it would be of the form http://localhost:8080/something. I don't know how to determine what the value 'something' might be. Is there a configuration file or entry that I can look at to figure out what to enter for a url? Regards, Ron -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/reverse-engineering-a-wicket-application-tp3933538p3933538.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Become a Wicket expert, learn from the best: http://wicketinaction.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Problem with ajax base url
I'm currently using wicket 1.5.1, testing with Firefox (latest). When wicket receives an ajax GET request it seems to store the query parameters of the last such request, and append them to the base url upon page reload. I'm sure this behavior serves a very valid purpose, but I'm wrapping a javascript-based component with a server side wicket component, and the result is messing me up. To be specific, I have a javascript select-like component which stores its current selection choice in a value field, and I'm adding javascript via the renderHead() method of the wicket wrapper to return that value via wicket ajax get. I'm also sending whether this is an initial contact or a subsequent selection. The render head method looks like... @Override public void renderHead (IHeaderResponse response) { response.renderJavaScript(var + getWatchFunctionName() + = function(){dijit.byId(' + select.getMarkupId() + ').watch('value', function(name, oldValue, newValue){ + valueChangedBehavior.getCallbackScript(false) + })};dojo.addOnLoad(function() { + valueChangedBehavior.getCallbackScript(true) + });dojo.addOnLoad( + getWatchFunctionName() + );, DojoSelect.class.getName() + .watch. + select.getMarkupId()); } As you can see it's a dojo select component, and I'm using dojo's watch() function to call back to a behavior on the wicket wrapper... private class SelectValueChangedBehavior extends AbstractDefaultAjaxBehavior { private CharSequence getCallbackScript (boolean initial) { return generateCallbackScript(wicketAjaxGet(' + getCallbackUrl(initial) + '); } private CharSequence getCallbackUrl (boolean initial) { return super.getCallbackUrl() + + select.getMarkupId() + .value='+ dijit.byId(' + select.getMarkupId() + ').value + ' + select.getMarkupId() + .initial= + initial; } @Override protected synchronized void respond (AjaxRequestTarget target) { boolean initial = Boolean.parseBoolean(RequestCycle.get().getRequest().getQueryParameters( ).getParameterValue(select.getMarkupId() + .initial).toString()); setValue(RequestCycle.get().getRequest().getQueryParameters().getParamet erValue(select.getMarkupId() + .value).toString(), initial); if (!initial) { for (DojoAjaxUpdatingBehavior dojoAjaxUpdatingBehavior : select.getBehaviors(DojoAjaxUpdatingBehavior.class)) { if (isNoOpEvent(dojoAjaxUpdatingBehavior.getEvent())) { dojoAjaxUpdatingBehavior.onUpdate(target); } } } } } All of which works just fine, and I'm happy with it. However, if the select was the last ajax callback fired, and the page is reloaded, then wicket adds select.2.value=MY_SELECTION_CHOICEselect.2.initial=false, or something similar, to the page url, and that then ends up in every subsequent ajax request, which messes the works up terribly. I've tried different methods of telling wicket not to add the last request parameters to no avail. The page should not be reloaded, but if it is, it's broken, and that bothers me. This behavior seems to be involved with RequestCycle.get().getUrlRenderer().getBaseUrl(), and the code in the default behavior... Url baseUrl = RequestCycle.get().getUrlRenderer().getBaseUrl(); CharSequence ajaxBaseUrl = Strings.escapeMarkup(baseUrl.toString()); response.renderJavaScript(Wicket.Ajax.baseUrl=\ + ajaxBaseUrl + \;, wicket-ajax-base-url); I think it runs deeper than that however, because setting the base url with... RequestCycle.get().getUrlRenderer().setBaseUrl(URL.pase()); ...in onBeforeRender() or onAfterRender() hasn't stopped it. Maybe I have the set in the wrong place? In any case, if anyone knows... 1) Why wicket caches the query parameters and adds them to the base url? 2) How to stop wicket from doing? ...then I'd appreciate it. Thanks in advance for any help, David
Using DropDownChoice to select chexboxes
Hi guys, I have a problem, which i couldnt solve for a while. I have a DropDownChoice control that contains a list of states(for example open and error). final SetDataReleaseProduction sel = new HashSetDataReleaseProduction(); private String selectedStatus = ; final DropDownChoice comboChoice = new DropDownChoice(comboChoice, new PropertyModelString(this, selected), new Model( getChoices(stringOpen, stringError)), new DropDownChoiceRenderer()); comboChoice.add(new AjaxFormComponentUpdatingBehavior(onchange) { @Override protected void onUpdate(AjaxRequestTarget target) { selectedStatus = selected.getValue(); setResponsePage(getPage()); } }); I am using a AjaxFallbackDefaultDataTable to represent the data on the screen. Each row contains a CheckBoxColumn which is set whenever a chosen condition from the drop-down menu has been fulfilled (state is chosen). CheckBoxColumnDataReleaseProduction ckBox = new CheckBoxColumnDataReleaseProduction( Model.of()) { @Override protected IModelBoolean newCheckBoxModel( final IModelDataReleaseProduction rowModel) { return new AbstractCheckBoxModel() { @Override public void unselect() { sel.remove(rowModel.getObject()); } @Override public void select() { sel.add(rowModel.getObject()); } @Override public boolean isSelected() { final DataReleaseProduction d = rowModel.getObject(); final String stati = d.getState().name(); boolean isEquals = stati.equals(selectedStatus); return isEquals; } @Override public void detach() { rowModel.detach(); } }; } }; The setting of the checkBox is done via the onchange event, which is searching for the fulfillment condition in my own created object DataReleaseProduction. So far i got the onchange event correct working. The problem i still have is that whenever i try to send the selected row for further processing (by using OnSubmit), the sel-HashSet has the size of 0. From my point of view, by choosing a state from the drop down menu, the selected rows arent stored into the HashSet. Whenever i choose rows manually the selected rows are stored into the set. Do you have by any chance idea what i am doing wrong and how can i improve my source code. Thanks Hristina -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Using-DropDownChoice-to-select-chexboxes-tp3934901p3934901.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
How to update a Component from Javascript
This should be easy, but I'm striking out... I want to use a new Javascript feature (EventSourcehttp://dev.w3.org/html5/eventsource/, part of HTML5 WebSockets) to push notifications from the server to the browser. Getting the basic mechanism to work was easy. What I can't figure out how to do is once I get the notification on the client, how to tell Wicket to update the relevant components via Ajax. In other words, the equivalent of AjaxRequestTarget.addComponent(Component) in Javascript. This is how far I got, which didn't work. I was trying to use wicketAjaxGet: Script at the top of my page: var wary = new Array(); var source = new EventSource(events); source.onmessage = function(event) { for (var i = 0, item; item = wary[i]; i++) { wicketAjaxGet('+item+', function(){}.bind(this),function(){}.bind(this)); } }; Method in my Component subclass: public void renderHead(IHeaderResponse response) { String js = wary.push(' + b.getCallbackUrl() + '); response.renderOnLoadJavascript(js); } Any help is appreciated. Julian
Re: Enhancements from Logica Feedback
On Mon, Oct 24, 2011 at 8:26 PM, Chris Colman chr...@stepaheadsoftware.comwrote: ** ** ** Hi Peter, ** ** I was wondering if you had a chance to go through the estimates. The hybrid option (3) comes in at around 4.4 days and gives Logica a system that will allow them to demonstrate uploading of payroll files and progress through the workflow using the existing functionality while providing no risk because we aren’t adding any extra functionality or model changes – purely reskinning and mocking up other features. This option’s effort actually comes in slightly less than option 1 – adding changes to the existing mock up because simulating many of the feedback features in a mock up is not trivial and many of them are already present in the current prototype. ** ** Given the 4.4 days effort on the hybrid option I could complete this by Saturday our time, Friday their time (by working standard days or quicker if I put in some 14 hour days – but probably not necessary) which would allow them to get acquainted with it for their demo on 2/11. In fact, given that the changes in the hybrid are purely mock up (except for the addition of NI number – which is a trivial addition of an extra field) there are no reasons why they couldn’t start preparing for their demo earlier as only the look and feel will be changing as the hybrid option avoids ‘blow out’ risk by avoiding any underlying model changes. ** ** Yours sincerely, ** ** **Chris Colman** Pagebloom Team Leader, Step Ahead Software pagebloom - your business your website growing together ** ** **Sydney**: (+61 2) 9656 1278 Canberra: (+61 2) 6100 2120 Email: chr...@stepahead.com.au //chr...@stepahead.com.au Website: http://www.pagebloom.com http://develop.stepaheadsoftware.com ** ** Chris, Did you send this to the wrong email address or did I miss something? -- Jeremy Thomerson http://wickettraining.com *Need a CMS for Wicket? Use Brix! http://brixcms.org*
RE: Enhancements from Logica Feedback
Chris, Did you send this to the wrong email address or did I miss something? Whoops! Please disregard this email - went to the wrong email address. -- Jeremy Thomerson http://wickettraining.com *Need a CMS for Wicket? Use Brix! http://brixcms.org* - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Problem with ajax base url
Hi Try with 1.5.2. This is fixed with https://issues.apache.org/jira/browse/WICKET-4109 On Tue, Oct 25, 2011 at 12:09 AM, David Berkman david.berk...@glu.com wrote: I'm currently using wicket 1.5.1, testing with Firefox (latest). When wicket receives an ajax GET request it seems to store the query parameters of the last such request, and append them to the base url upon page reload. I'm sure this behavior serves a very valid purpose, but I'm wrapping a javascript-based component with a server side wicket component, and the result is messing me up. To be specific, I have a javascript select-like component which stores its current selection choice in a value field, and I'm adding javascript via the renderHead() method of the wicket wrapper to return that value via wicket ajax get. I'm also sending whether this is an initial contact or a subsequent selection. The render head method looks like... @Override public void renderHead (IHeaderResponse response) { response.renderJavaScript(var + getWatchFunctionName() + = function(){dijit.byId(' + select.getMarkupId() + ').watch('value', function(name, oldValue, newValue){ + valueChangedBehavior.getCallbackScript(false) + })};dojo.addOnLoad(function() { + valueChangedBehavior.getCallbackScript(true) + });dojo.addOnLoad( + getWatchFunctionName() + );, DojoSelect.class.getName() + .watch. + select.getMarkupId()); } As you can see it's a dojo select component, and I'm using dojo's watch() function to call back to a behavior on the wicket wrapper... private class SelectValueChangedBehavior extends AbstractDefaultAjaxBehavior { private CharSequence getCallbackScript (boolean initial) { return generateCallbackScript(wicketAjaxGet(' + getCallbackUrl(initial) + '); } private CharSequence getCallbackUrl (boolean initial) { return super.getCallbackUrl() + + select.getMarkupId() + .value='+ dijit.byId(' + select.getMarkupId() + ').value + ' + select.getMarkupId() + .initial= + initial; } @Override protected synchronized void respond (AjaxRequestTarget target) { boolean initial = Boolean.parseBoolean(RequestCycle.get().getRequest().getQueryParameters( ).getParameterValue(select.getMarkupId() + .initial).toString()); setValue(RequestCycle.get().getRequest().getQueryParameters().getParamet erValue(select.getMarkupId() + .value).toString(), initial); if (!initial) { for (DojoAjaxUpdatingBehavior dojoAjaxUpdatingBehavior : select.getBehaviors(DojoAjaxUpdatingBehavior.class)) { if (isNoOpEvent(dojoAjaxUpdatingBehavior.getEvent())) { dojoAjaxUpdatingBehavior.onUpdate(target); } } } } } All of which works just fine, and I'm happy with it. However, if the select was the last ajax callback fired, and the page is reloaded, then wicket adds select.2.value=MY_SELECTION_CHOICEselect.2.initial=false, or something similar, to the page url, and that then ends up in every subsequent ajax request, which messes the works up terribly. I've tried different methods of telling wicket not to add the last request parameters to no avail. The page should not be reloaded, but if it is, it's broken, and that bothers me. This behavior seems to be involved with RequestCycle.get().getUrlRenderer().getBaseUrl(), and the code in the default behavior... Url baseUrl = RequestCycle.get().getUrlRenderer().getBaseUrl(); CharSequence ajaxBaseUrl = Strings.escapeMarkup(baseUrl.toString()); response.renderJavaScript(Wicket.Ajax.baseUrl=\ + ajaxBaseUrl + \;, wicket-ajax-base-url); I think it runs deeper than that however, because setting the base url with... RequestCycle.get().getUrlRenderer().setBaseUrl(URL.pase()); ...in onBeforeRender() or onAfterRender() hasn't stopped it. Maybe I have the set in the wrong place? In any case, if anyone knows... 1) Why wicket caches the query parameters and adds them to the base url? 2) How to stop wicket from doing? ...then I'd appreciate it. Thanks in advance for any help, David -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Enclosures and transparent WebContainer
Similiar to this post (http://apache-wicket.1842946.n4.nabble.com/Enclosure-changes-in-1-5-tp3822819p3822819.html) I've got the same error message using the enclosure-tag and a transparent WebContainer. I’ve just converted some working 1.4.18 code to 1.5.2 and got the same error: org.apache.wicket.WicketRuntimeException: Could not find child with id: paymentOptionsPanel in the wicket:enclosure at org.apache.wicket.markup.html.internal.Enclosure.checkChildComponent(Enclosure.java:232) at org.apache.wicket.markup.html.internal.Enclosure.getChildComponent(Enclosure.java:211) at org.apache.wicket.markup.html.internal.Enclosure.onInitialize(Enclosure.java:127) at org.apache.wicket.Component.fireInitialize(Component.java:919) Markup: table wicket:id=table_wrapper tbody wicket:enclosure child=column:info tr td wicket:id=column div [Info] /div /td /tr /wicket:enclosure tr td div wicket:id=list[Item List]/div /td /tr /tbody /table Java Code: final TransparentMarkupContainer table_wrapper = new TransparentMarkupContainer(table_wrapper); // additional stuff goes here add(table_wrapper); final WebMarkupContainer column = new WebMarkupContainer(column); // addition stuff goes here add(column); column.add( new Label( info, getInfoModel() ) { private static final long serialVersionUID = 1L; @Override public boolean isVisible() { // some logic return getInfoModel()!=null !Strings.isEmpty( getInfoModel().getObject() ); } }); add( new Label( list, new ModelString(Test Items) ) ); The code worked fine on 1.4 (with a WebMarkupContainer and isTransparent()-method retuning true) which makes me wonder if this is a bug. If I would change the component hierarchy without using a transparent WebContainer this would work as expected. Any ideas? Thanks in advance for any help, Dirk -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Enclosures-and-transparent-WebContainer-tp3935753p3935753.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org