Re: Mount a page class more than once.
Hi, It won't work as you did it. Wicket's IRequestMapper uses #getCompatibilityScore() to decide which mapper to use to handle a request. If the scores for several mappers are the same then the order of their definition is used. Since test3 is added last it has the highest priority. Later when Wicket needs to create a Url to a page (class) the mapper with the highest priority will be used. A simple workaround for you is to define 3 additional pages which just extend MyPageClass. They will have only the same constructors as MyPageClass, nothing more. Even the markup will be inherited. This way you can use different page types for the different urls. You can use #mountPage(/test1.html, MyPageClass1.class) instead of ICompoundRequestMapper mapper = getRootRequestMapperAsCompound(); mapper.add(new MountedMapper(/test1.html, MyPageClass1.class)); It is the same. On Fri, May 31, 2013 at 12:40 AM, josho josh.oliv...@hotmail.com wrote: Hello all, I have been using Wicket for about 1 year now for our company website. It has been working great. Recently we have decided to make the switch from Wicket 1.4.22 to 6.8.0. After moving all the code to the new library we are still having 1 problem. I am mounting several html pages against the same class (they all require some login/cart information to be generated by wicket, but have different content) like so: ICompoundRequestMapper mapper = getRootRequestMapperAsCompound(); mapper.add(new MountedMapper(/test1.html, MyPageClass.class)); mapper.add(new MountedMapper(/test2.html, MyPageClass.class)); mapper.add(new MountedMapper(/test3.html, MyPageClass.class)); When I attempt to access /test1.html or /test2.html in my browser, the server sends a 302 Redirect to /test3.html (the last page mounted). All my other classes with unique names are accessible (all extend this class as well). I have extended the ResourceStreamLocator class, and am filtering on URL, however the locator never recieves the first request. Previously we worked around this issue by not allowing MyPageClass.class to have cached markup. However that solution is no longer working. I have made several searches on Google and nabble for a solution, but no one seems to be in the same boat as me. Any help is appreciated. -Josh -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Mount-a-page-class-more-than-once-tp4659173.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: Mount a page class more than once.
On Fri, May 31, 2013 at 9:37 AM, Martin Grigorov mgrigo...@apache.org wrote: #mountPage(/test1.html, MyPageClass1.class) Moreover, it's usually a good idea to have different classes so you can build your link to these pages easily. -- Guillaume - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
New Open Source application using Wicket : artifact-listener.org
Hi, We wanted to present you our first Open Source application powered by Wicket. We use Wicket since 1.3 but it's the first application we can release as an Open Source project. It's a Maven Central notification service built on Wicket 6.8.0. Reason why we thought it might be interesting to post this on the list: - it's in Wicket and Open Source: https://github.com/openwide-java/artifact-listener/ and it might contain a few good ideas (at least, we hope so) - it can be handy to keep track of Wicket releases: https://www.artifact-listener.org/ Contributions/ideas/questions welcome. It's a very simple service we plan to maintain for a long time as we use it to keep track of all the Java components we use in our core framework. We have a lot of additional features in mind so stay tuned. Happy wicketing! -- Guillaume - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket free guide updated!
Hi Andrea, great job. Thank you very much! - -- Regards, Hans http://cantaa.de -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-free-guide-updated-tp4659158p4659179.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: Browser Back Button Question
Hi, dhongyt wrote I'm wondering if its because of hibernate? Its trying to get the query of the page to display but the query has been closed? You have serialized an object which contains properties proxied by Hibernate. On deserializing, the proxy tries to resolve with the now closed embedded Hibernate Session. - -- Regards, Hans http://cantaa.de -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Browser-Back-Button-Question-tp4658397p4659180.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 6 ListItem add CSS
Hey I'm trying to add a css class to a tr field inside a ListView. Here is the code add(new ListViewFinanceAccount(financeAccounts, new FinanceAccountListModelWithSum()) { @Override protected void populateItem(ListItemFinanceAccount itemOuter) { FinanceAccount fa = itemOuter.getModelObject(); itemOuter.add(new Label(accountNumber, fa.getAccountNumber())); itemOuter.add(new Label(accountName, fa.getName())); switch (fa.getFinanceAccountType()) { case PROFIT: case EXPENSE: case ASSET: case LIABILITY: { itemOuter.add(new Label(sum, fa.getSum())); break; } case HEADLINE: { itemOuter.add(new AttributeAppender(class,test)); itemOuter.add(new Label(sum, )); break; } case SUMFROM: { //TODO calculate sum itemOuter.add(new Label(sum, )); break; } } } }); And the markup table class=table table-condensed tr th wicket:message key=account.number/wicket:message /th th wicket:message key=account.name/wicket:message /th th wicket:message key=account.sum/wicket:message /th /tr span wicket:id=financeAccounts tr td span wicket:id=accountNumber/span /td td span wicket:id=accountName/span /td td span wicket:id=sum/span /td /tr /span /table All that happens is that it creates a lot of span surrounding the tr elements. Is it not possible to add a class directly to the tr element? Med venlig hilsen / Best regards Tommy Sadiq Hinrichsen
Re: Wicket 6 ListItem add CSS
Put the wicket id on the tr tag: tr wicket:id=financeAccounts td span wicket:id=accountNumber/span /td td span wicket:id=accountName/span /td td span wicket:id=sum/span /td /tr Sven On 05/31/2013 12:09 PM, Tommy Sadiq Hinrichsen wrote: Hey I'm trying to add a css class to a tr field inside a ListView. Here is the code add(new ListViewFinanceAccount(financeAccounts, new FinanceAccountListModelWithSum()) { @Override protected void populateItem(ListItemFinanceAccount itemOuter) { FinanceAccount fa = itemOuter.getModelObject(); itemOuter.add(new Label(accountNumber, fa.getAccountNumber())); itemOuter.add(new Label(accountName, fa.getName())); switch (fa.getFinanceAccountType()) { case PROFIT: case EXPENSE: case ASSET: case LIABILITY: { itemOuter.add(new Label(sum, fa.getSum())); break; } case HEADLINE: { itemOuter.add(new AttributeAppender(class,test)); itemOuter.add(new Label(sum, )); break; } case SUMFROM: { //TODO calculate sum itemOuter.add(new Label(sum, )); break; } } } }); And the markup table class=table table-condensed tr th wicket:message key=account.number/wicket:message /th th wicket:message key=account.name/wicket:message /th th wicket:message key=account.sum/wicket:message /th /tr span wicket:id=financeAccounts tr td span wicket:id=accountNumber/span /td td span wicket:id=accountName/span /td td span wicket:id=sum/span /td /tr /span /table All that happens is that it creates a lot of span surrounding the tr elements. Is it not possible to add a class directly to the tr element? Med venlig hilsen / Best regards Tommy Sadiq Hinrichsen - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Page expired and concurrent links
Hello *, I have a DataTable with a column of clickable checkboxes. Each time the user clicks a checkbox the server does some stuff on the database. If the user clicks another checkbox before the server finished processing the previous, he receives a Page Expired error. The behaviour is understandable, since the user obviously clicked a checkbox that was on a page that was being recreated, however I don't know how to avoid or workaround the problem. Any suggestions? Thanks in advance Lucio. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Page expired and concurrent links
In data Friday 31 May 2013 17:34:31, Lucio Crusca ha scritto: Hello *, I have a DataTable with a column of clickable checkboxes. Each time the user clicks a checkbox the server does some stuff on the database. If the user clicks another checkbox before the server finished processing the previous, he receives a Page Expired error. The behaviour is understandable, since the user obviously clicked a checkbox that was on a page that was being recreated, however I don't know how to avoid or workaround the problem. I've partially solved the problem: it was being caused by an anonymous inner class in the page (CheckboxClickManager) that wasn't serializable. However making it serializable led to a different problem: now the user does not receive errors anymore, but the page he finally receives sometimes takes into account only a subset of the clicks. In other words, say the users clicks rows 1,2,3,4,5,6,7, then he waits for the server to finish processing all the clicks, and finally he receives a page where only rows 1 to 5 are checked (for example, maybe it's 1 to 3 or something). However I suspect this new problem is caused by hibernate not being able to lock database pages within 1 minute, though I'm not sure. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: New Open Source application using Wicket : artifact-listener.org
Nice service. Sounds like a good idea! Martijn On Fri, May 31, 2013 at 10:13 AM, Guillaume Smet guillaume.s...@gmail.com wrote: Hi, We wanted to present you our first Open Source application powered by Wicket. We use Wicket since 1.3 but it's the first application we can release as an Open Source project. It's a Maven Central notification service built on Wicket 6.8.0. Reason why we thought it might be interesting to post this on the list: - it's in Wicket and Open Source: https://github.com/openwide-java/artifact-listener/ and it might contain a few good ideas (at least, we hope so) - it can be handy to keep track of Wicket releases: https://www.artifact-listener.org/ Contributions/ideas/questions welcome. It's a very simple service we plan to maintain for a long time as we use it to keep track of all the Java components we use in our core framework. We have a lot of additional features in mind so stay tuned. Happy wicketing! -- Guillaume - 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
Re: Mount a page class more than once.
Martin- Thanks for your help. I had a look at #getCompatabilityScore and #checkPageClass on IRequestMapper. I extended the MountedMapper class, and added some debug messages to help me follow what was going on. After a while I experimented with the class and came up with the following solution: It's a clunky solution but it gets the job done for me. I'll be able to put together something better when I have some more time. Also the reason I'm calling Mapper#add instead of #mountPage is that I am storing the MountedMapper instance for use at a later time. Thanks again. -Josh -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Mount-a-page-class-more-than-once-tp4659173p4659191.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 I get the internal html content of a dynamically updated div tag using Apache Wicket
Hi, In my html file I have a div tag like this, div wicket:id=editorAreaType Here/div I am using a JavaScript library called bootstrap-wysiwyg to make this div tag a text are which we can type rich text. When the person types text, div tag's html content updates to represent the text content in html. I want to retrieve it in to the Java code of the html file in wicket. I tried to do it by creating reference variable to div tag like following, WebMarkupContainer editorArea=new WebMarkupContainer(editorArea); String text=editorArea.getMarkup().toString(true) But this don't give me the updated HTML content. I give only the initial html content. what is the problem here? Thanks! -- Regards Andun S.L. Gunawardana Undergraduate Department of Computer Science And Engineering University of Moratuwa Sri Lanka Blog - http://www.insightforfuture.blogspot.com/ LinkedIn - http://www.linkedin.com/pub/andun-s-l-gunawardana/34/646/703 Twitter -http://twitter.com/AndunSLG - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org