Re: Back button problem
So you see the initial state instead of the latest ajax state? This is a browser problem, i believe ms is fixing that for ie in number 8. You can go around it by letting the backbutton always go to the server, look at configureResponse/setheaders of webpage an add nostore On 3/27/08, bhitai [EMAIL PROTECTED] wrote: Hi Igor thanks for the prompt reply..I'm trying to figure out how exactly to do that. This is because I have the following situation and I don't know where to apply the url coding strategy: 1. there are two pages, one is a menu and one detail page 2. menu page displays objects in a hierarchy - to drill down a category into sub-category and so on, when you click on it. 3. the application class loads the page MenuPage as the home page. 4. the home page displays items of the top level, adding AjaxBehavior on each item so when it is clicked, a drill-down operation is called on the corresponding menu item on the server. 5. the drill down operation basically loads the children of that item, recreates the menu panel on the page and adds that to the AjaxRequestTarget. 6. so now we have a brand new page content, which might have links to the DetailPage, which is a new page and will be reloaded. if the user now clicks on that link, he will be taken to the new page, and there begins the back button issue. When the user comes back he sees the contents as they appeared in step #4, that is the top level menu. Once you click on an a menu item just to test, that's where it blows up and gives the exception. Now I'm having trouble figuring out which page should be applied the coding strategy to. I am loading page A and page B both using setResponsePage(MenuPage.class) and setResponsePage(new DetailPage(id)). How do I introduce urls here, can you pls help a little bit? thanks jeff -- View this message in context: http://www.nabble.com/Back-button-problem-tp16313414p16319071.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: LoadableDetachableModel and ListView - changes in the list items is lost when saving
Yes I did, and the changed values are still being rest back to the original ones. Nick Heudecker wrote: Did you call setReuseItems(true) on your ListView? On Wed, Mar 26, 2008 at 9:12 AM, lizz [EMAIL PROTECTED] wrote: I have a page that contains a compound property model that refers to a loadableDetachable model. The domain object in the loadable detachable model contains a collection of Person Objects (Person contains a first name and a last name and an age). I want to display the persons in a ListView and I want to be able to change the first name, last name or age and save the new value. I therefore use three text fields for each list item. The problem is that when I press the save button the changed values has been reset back to the original value. Why is the detachable model being detached and reloaded before I save the list? -- View this message in context: http://www.nabble.com/LoadableDetachableModel-and-ListView---changes-in-the-list-items-is-lost-when-saving-tp16301505p16301505.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Nick Heudecker Professional Wicket Training Consulting http://www.systemmobile.com Eventful - Intelligent Event Management http://www.eventfulhq.com -- View this message in context: http://www.nabble.com/LoadableDetachableModel-and-ListView---changes-in-the-list-items-is-lost-when-saving-tp16301505p16323310.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Place HTML files inside one 'html' folder relative to java file
Hello, I have been looking at messages, examples and wiki, but I couldn't make this to work... I have one file: home.java, and around 26 language dependant html files (home.html, home_es.html, home_ja.html...). What I want to do is create a folder called 'html' and put the html files there. For example: Application/Registration/Register.java Application/Registration/html/Register.html Application/Registration/html/Register_es.html ... I tried this solution: http://cwiki.apache.org/confluence/display/WICKET/Control+where+HTML+files+are+loaded+from And added /html as resourceFinder, but still is not working. Any ideas? Thank you so much for your time and help, Oskar -- View this message in context: http://www.nabble.com/Place-HTML-files-inside-one-%27html%27-folder-relative-to-java-file-tp16323316p16323316.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Place HTML files inside one 'html' folder relative to java file
you need to implement your own IResourceStreamLocator and register it in resource settings -igor On Thu, Mar 27, 2008 at 12:37 AM, Toscano [EMAIL PROTECTED] wrote: Hello, I have been looking at messages, examples and wiki, but I couldn't make this to work... I have one file: home.java, and around 26 language dependant html files (home.html, home_es.html, home_ja.html...). What I want to do is create a folder called 'html' and put the html files there. For example: Application/Registration/Register.java Application/Registration/html/Register.html Application/Registration/html/Register_es.html ... I tried this solution: http://cwiki.apache.org/confluence/display/WICKET/Control+where+HTML+files+are+loaded+from And added /html as resourceFinder, but still is not working. Any ideas? Thank you so much for your time and help, Oskar -- View this message in context: http://www.nabble.com/Place-HTML-files-inside-one-%27html%27-folder-relative-to-java-file-tp16323316p16323316.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Page templates per virtual host
James Carman wrote: On Wed, Mar 26, 2008 at 3:36 PM, Nino Saturnino Martinez Vazquez Wael [EMAIL PROTECTED] wrote: If he meant that the cms should be available via multiple vhosts(apache2), but share the same application base then what? Lets say: mycompA.com -- myapplication on tomcat server via apache2 mycompB.com -- myapplication on tomcat server via apache2 using a vhost config some what like this: VirtualHost *:* ServerName mycompA.com ServerAlias mycompB.com ProxyPass / http://tomcatlocation/context/ ProxyPassReverse / http://tomcatlocation/context/ ProxyPassReverseCookiePath /context / Proxy * Order deny,allow Allow from all /Proxy /VirtualHost The only problem with that is that you have to set up your proxy Connector in Tomcat's server.xml with a hard-coded server name: Connector port=8081 ... proxyName=www.mycompany.com proxyPort=80/ So, if you want to proxy to multiple hosts, you have to have multiple connectors. Yuck! Im already doing this, but I do not have to setup connectors in tomcat, it's a apache2 based configuration only. However im not sure if wicket can pickup the different hosts.. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -Wicket for love Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Copenhagen Meetup
Yup. Jayway will be happy to sponsor/provide snacks and shelter for the meetup:) Flemming Boller wrote: Hi About the copenhagen meetup, should we arrange something around the 25 - 28 march? At my workplace we are having a wicket course with one of the developers. Perhabs we can persuade him to participate? Nino, will you offer for the meeting ? /Flemming -- -Wicket for love Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
using PropertyModel in abstract class
Hi! When I use PropertyModel like this: public abstract class Parent extends WebPage { private int field; public Parent() { Form form = new Form(form); add(form); form.add(new TextField(field, new PropertyModel(this, field))); } public int getField() { return field;} public void setField(int field) { this.field = field; }; [some other stuff...] } public class Child extends Parent { [some other stuff...] } I've got error: org.apache.wicket.WicketRuntimeException: No get method defined for class: class com.domain.Child expression: filed at org.apache.wicket.util.lang.PropertyResolver.getGetAndSetter(PropertyResolver.java:433) at org.apache.wicket.util.lang.PropertyResolver.getObjectAndGetSetter(PropertyResolver.java:275) at org.apache.wicket.util.lang.PropertyResolver.getValue(PropertyResolver.java:84) at org.apache.wicket.model.AbstractPropertyModel.getObject(AbstractPropertyModel.java:113) at org.apache.wicket.Component.getModelObject(Component.java:1551) at org.apache.wicket.Component.getModelObjectAsString(Component.java:1573) at org.apache.wicket.markup.html.form.FormComponent.getModelValue(FormComponent.java:1267) at org.apache.wicket.markup.html.form.FormComponent.getValue(FormComponent.java:780) at org.apache.wicket.markup.html.form.TextField.onComponentTag(TextField.java:100) Is is a bug? I use wicket 1.3.2 Thanks for help, Artur -- View this message in context: http://www.nabble.com/using-PropertyModel-in-abstract-class-tp16323331p16323331.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: New wicketstuff progress bar component / project
ATM the server seems to be down, so that might cause your problem. otherwise make sure you included the following repository in your pom. repository idwicket-snaps/id urlhttp://wicketstuff.org/maven/repository/url snapshots enabledtrue/enabled /snapshots releases enabledtrue/enabled /releases /repository Maurice On Thu, Mar 27, 2008 at 4:47 AM, luciolrv [EMAIL PROTECTED] wrote: I downloaded svn from the link below, but running maven2 on any of the 3 project gives the error: Missing com.resoap.wicket:wicket-progressbar:jar:0.1-SNAPSHOT Is this a repository problem? Lucio Rodriguez Christopher Hlubek wrote: I always wondered why there was no progress bar component for wicket. The UploadProgressBar is cool but only for file uploads and not designed for background tasks or long taking actions. So some time ago I wrote a progress bar component to have an easy to use a component for progress display of some task with AJAX updates. I recently published this as the wicketstuff-progressbar project. Just see the wiki (http://wicketstuff.org/confluence/display/STUFFWIKI/wicketstuff-progressbar) for a short description and the examples module for some example code. Since this is still work in progress I appreciate your comments or contribution! Thanks, Christopher Hlubek - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/New-wicketstuff-progress-bar-component---project-tp15392340p16321414.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: using PropertyModel in abstract class
org.apache.wicket.WicketRuntimeException: No get method defined for class: class com.domain.Child expression: filed looks like you mispelled the property name in the propertymodel constructor? Gerolf
Re: Setting text content of component
you can also roll your own TextLink very easily: class textlink extends link { public textlink(id, model) { super(id, model); } protected void onComponentTagBody(...) { replaceComponentTagBody(..., getModelObjectAsString()); } } this way you don't need a label inside the link. Gerolf On Wed, Mar 26, 2008 at 4:01 PM, Jörn Zaefferer [EMAIL PROTECTED] wrote: I keep stumbling about components where I'm (afaik) forced to add child components just to set their text content. Common examples are ListView items and Links. I'd like to set the text content of a li or a element without adding another child component (to give it a wicket:id and add a Label). Any solution to that? Jörn - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: using PropertyModel in abstract class
Sorry, it was my bug.. PropertyModel works great! :) Artur -- View this message in context: http://www.nabble.com/using-PropertyModel-in-abstract-class-tp16323331p16323342.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
CheckGroup in a DataView with another CheckGroup
Hi all, I want to use a CheckGroup (allowgroup) with a DataView, and there is another CheckGroup (othergroup) in the inside of the DataView. I can get the allowgroup's value, but I can't get the othergroup's value. submitformForm allowgroupCheckGroup allowselectorCheckGroupSelector sortuidLabel sortroleLabel commentsDataView allowcheckCheck uidLabel roleLabel othergroupCheckGroup otheraddCheck otherdeleteCheck otherqueryCheck othereditCheck otherselectorCheckGroupSelector navigator I use a HashMap to be a Model Like this. CheckGroup allowgroup = new CheckGroup(allowgroup, new Model((Serializable) othermap.keySet())); submitform.add(allowgroup); CheckGroup othergroup = new CheckGroup(othergroup, new ArrayList()); arg0.add(othergroup); http://www.nabble.com/file/p16323358/checkbox_with_dataview.jpg Wicket1.2.6 Thanks for help!! -- View this message in context: http://www.nabble.com/CheckGroup-in-a-DataView-with-another-CheckGroup-tp16323358p16323358.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: create email with wicket/javamail
I found the method Component.render(MarkupStream markupStream). I am thinking about to create this page and then render it, save the stream, and set it as email body... Or is there a more elegant and better wicket-way to achieve this? greeklinux wrote: Hello, I would like to create an email body with wicket and send it with javamail. I read that it is possible to create a page and get it from a buffer. I do not want to use other template languages like velocity. I think wicket schould be enough. I read about StringRequestTarget and the RequestCycle.setRequestTarget but I do not know how to use them. I new to wicket. If someone can give me a hint it would be great. -- View this message in context: http://www.nabble.com/create-email-with-wicket-javamail-tp16289600p16323360.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Copenhagen Meetup
Only problem is, that there are no days left. Since I cant today or tommorow:/ This really sucks! So I propose that we plan a WUG within the next two weeks instead? regards Nino Nino Saturnino Martinez Vazquez Wael wrote: Yup. Jayway will be happy to sponsor/provide snacks and shelter for the meetup:) Flemming Boller wrote: Hi About the copenhagen meetup, should we arrange something around the 25 - 28 march? At my workplace we are having a wicket course with one of the developers. Perhabs we can persuade him to participate? Nino, will you offer for the meeting ? /Flemming -- -Wicket for love Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: New wicketstuff progress bar component / project
Complementing Maurice on this: it's also described on the wiki on the developer page http://wicketstuff.org/confluence/display/STUFFWIKI/ , although the server seems to be down currently.. Maurice Marrink wrote: ATM the server seems to be down, so that might cause your problem. otherwise make sure you included the following repository in your pom. repository idwicket-snaps/id urlhttp://wicketstuff.org/maven/repository/url snapshots enabledtrue/enabled /snapshots releases enabledtrue/enabled /releases /repository Maurice On Thu, Mar 27, 2008 at 4:47 AM, luciolrv [EMAIL PROTECTED] wrote: I downloaded svn from the link below, but running maven2 on any of the 3 project gives the error: Missing com.resoap.wicket:wicket-progressbar:jar:0.1-SNAPSHOT Is this a repository problem? Lucio Rodriguez Christopher Hlubek wrote: I always wondered why there was no progress bar component for wicket. The UploadProgressBar is cool but only for file uploads and not designed for background tasks or long taking actions. So some time ago I wrote a progress bar component to have an easy to use a component for progress display of some task with AJAX updates. I recently published this as the wicketstuff-progressbar project. Just see the wiki (http://wicketstuff.org/confluence/display/STUFFWIKI/wicketstuff-progressbar) for a short description and the examples module for some example code. Since this is still work in progress I appreciate your comments or contribution! Thanks, Christopher Hlubek - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/New-wicketstuff-progress-bar-component---project-tp15392340p16321414.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -Wicket for love Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with DatePicker
Thank you !! It was that. I had not joda-time :) igor.vaynberg wrote: do you have joda jars which wicket-datetime depends on??? -igor On Wed, Mar 26, 2008 at 8:25 AM, Fabien D. [EMAIL PROTECTED] wrote: I've just migrated to wicket 1.3.2 and added the good librairies. And I have exactly the same error! That means I've done a mistake in my code? Thank you for your help :) Gerolf Seitz wrote: this is fixed in 1.3.2 Gerolf On Wed, Mar 26, 2008 at 11:42 AM, Fabien D. [EMAIL PROTECTED] wrote: Hi, I try to use a DatePicker like this : TextField date_version = new TextField(date_version, model_date_version, Date.class); date_version.setRequired(true); date_version.add(new DatePicker()); this.form_ajoutinfgeneral.add(date_version); I have import : import org.apache.wicket.extensions.yui.calendar.DatePicker; I'm using these librairies : wicket-datetime-1.3.1.jar and wicket-extensions-1.3.1.jar When I try to display my page, I have a problem, which is reported in my log file : java.lang.NoClassDefFoundError at org.apache.wicket.extensions.yui.calendar.DatePicker.class$( DatePicker.java:86) at org.apache.wicket.extensions.yui.calendar.DatePicker.getDatePattern( DatePicker.java:438) at org.apache.wicket.extensions.yui.calendar.DatePicker.checkComponentProvidesDateFormat (DatePicker.java:296) at org.apache.wicket.extensions.yui.calendar.DatePicker.bind(DatePicker.java :129) at org.apache.wicket.Component.add(Component.java:922) at com.mycompany.projet.PanelAjInfGeneral.initPage(Unknown Source) . I don't understand what is my mistake. Thank you in advance for your help. -- View this message in context: http://www.nabble.com/Problem-with-DatePicker-tp16299775p16299775.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Problem-with-DatePicker-tp16299775p16302996.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Problem-with-DatePicker-tp16299775p16323375.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Customising DateTimeField
On Wed, 26 Mar 2008, Charlie Dobbie wrote: I'm guessing at this point that I should just copy the DateTimeField component entirely and modify to fit! :-) Yes, Wicket does not entirely solve the issue of GUI component reuse, though helps a lot in it. I have also sometimes found that the most complex ready-made components serve better as examples than generic solutions; sometimes trying to make the same component usable in cases that differ by too much would make it too complex. Best wishes, Timo -- Timo Rantalaiho Reaktor Innovations OyURL: http://www.ri.fi/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: clustering failover error
Hi, Assuming you use CGLib: CGLib classes could cause this problem, it makes sense since: - It does not occur in a single jvm, the enhanced classes are available there. - It does occur when read from a different jvm *or* restarted jvm: The enhanced classes are no longer available there. According to the CGLib site there is a way around this. See http://cglib.sourceforge.net/howto.html CGLIB and JAVA Serialization JAVA objects can be serialized to binary streams, it is used to implement RMI too. Serialization needs to load class before to deserialize object data. It is possible there is no generated class on client or server for unmarshaled object, but serialization lets to replace objects in stream (writeReplace/readResolve contract). To add writeReplace method to proxy class declare this method in interface with exact signature specified by JAVA serialization. Implement writeReplace in interceptor. Proxy object can be replaced by handle, object stream invokes readResolve before to deserialize hanle. Generate or find proxy class in readResolve method before to deserialize hanle and return proxy instance. The description is a bit cryptic though But my understanding is that when you implement the writeReplace and readResolve methods in your enhanced class it should work. Hopes this helps. Lars On Wed, Mar 26, 2008 at 5:36 PM, Scott Swank [EMAIL PROTECTED] wrote: That did not take care of our problem. We are examining our session to see whether it mistakenly contains some sort of cglib proxy -- our typesafe model, or maybe something from Hibernate. Thank you again for the help. Scott On Tue, Mar 25, 2008 at 9:55 AM, Scott Swank [EMAIL PROTECTED] wrote: Thank you. We'll give that a try and let you know the results. On Mon, Mar 24, 2008 at 11:43 PM, Igor Vaynberg [EMAIL PROTECTED] wrote: see WICKET-1445. upgrade wicket to trunk and try again. -igor On Mon, Mar 24, 2008 at 3:15 PM, Scott Swank [EMAIL PROTECTED] wrote: We are trying to get clustering working with Wicket 1.3.2 (on JBoss 4.3.0) and we get the following exception when one node fails over to another node. Has anyone seen anything like this before? Any suggestions/guesses? Thank you, Scott 15:02:17,320 ERROR [RequestCycle] Could not deserialize object using `org.apache .wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory` object factory java.lang.RuntimeException: Could not deserialize object using `org.apache.wicke t.util.io.IObjectStreamFactory$DefaultObjectStreamFactory` object factory at org.apache.wicket.util.lang.Objects.byteArrayToObject( Objects.java:40 6) at org.apache.wicket.protocol.http.pagestore.AbstractPageStore.deseriali zePage(AbstractPageStore.java:228) at org.apache.wicket.protocol.http.pagestore.DiskPageStore.getPage(DiskP ageStore.java:706) at org.apache.wicket.protocol.http.pagestore.DiskPageStore.convertToPage (DiskPageStore.java:1218) at org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLe velCachePageMap.getLastPage(SecondLevelCacheSessionStore.java :228) at org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLe velCachePageMap.get(SecondLevelCacheSessionStore.java:296) at org.apache.wicket.Session.getPage(Session.java:751) at org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRender edPage(AbstractRequestCycleProcessor.java:448) at org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebR equestCycleProcessor.java:139) at org.apache.wicket.RequestCycle.step(RequestCycle.java :1224) at org.apache.wicket.RequestCycle.steps(RequestCycle.java :1330) at org.apache.wicket.RequestCycle.request( RequestCycle.java:493) at org.apache.wicket.protocol.http.WicketFilter.doGet( WicketFilter.java: 358) at org.apache.wicket.protocol.http.WicketServlet.doGet( WicketServlet.jav a:124) at javax.servlet.http.HttpServlet.service(HttpServlet.java :690) at javax.servlet.http.HttpServlet.service(HttpServlet.java :803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:206) at com.vegas.ui.filter.CustomerFacingClientContextFilter.doFilter(Custom erFacingClientContextFilter.java:42) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
RE: DataView size() iterator() call order issue
That makes perfect sense in the scenario where rows are deleted, but it doesn't make sense when all that is being done is clicking the next button for a PagingNavigator. Why would do we need two calls to the size method in that scenario? -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 26, 2008 3:27 PM To: users@wicket.apache.org Subject: Re: DataView size() iterator() call order issue On Wed, Mar 26, 2008 at 11:37 AM, Hoover, William [EMAIL PROTECTED] wrote: 2) Although AbstractPageableView does ensure the cached item count is used before calling the data provider size() in getRowCount(), the cached item count is cleared in onBeforeRender() before the call is made to getViewOffset() - getCurrentPage() - getPageCount() - getRowCount() when getting the item models in getItemModels(); This causes an unnecessary duplicate call to the data providers size() method when paginating. it is not unnecessary suppose you have a dataview with overridden isvisible() { return getitemcount()0; } inside this dataview you have a delete link suppose dataview loads and has 1 item. user clicks delete wicket checks the link is indeed visible - which results it the size() call which in turn caches the result onclick() handler is invoked row is removed onbeforerender is called dataview is rendered in this case dataview is rendered because getitemcount() has been cached before onclick() has been executed, so the cached count is 1 when in reality there are now 0 items. that is why onbeforerender() clears the cache, and why sometimes you will get two size() calls. -igor - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: DataView size() iterator() call order issue
How can the offset in the AbstractPageableView - getViewOffset() be accessed in a IDataProvider? Does the proposed solution make sense? -Original Message- From: Hoover, William [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 26, 2008 2:39 PM To: users@wicket.apache.org Subject: RE: DataView size() iterator() call order issue If we are caching the data as well as the size then we get that from the cache. The call that gets data/size can check the cache. If it is not cached then make the query call to get it. public final int size() { if (getItemCountCache() 0 || getDataCache() == null) { search(getOffsetCache(), getItemsPerPageCache()); // query size/data and set the cache } return getItemCountCache(); } // change: public final IteratorMODEL iterator(final int first, final int count) { to: public final IteratorMODEL iterator() { if (getItemCountCache() 0 || getDataCache() == null) { search(getOffsetCache(), getItemsPerPageCache()); // query size/data and set the cache } return getDataCache(); } If someone is concerned with retrieving the size before making the expensive call to get the data they can make two separate calls, one to query/set the size cache, and another to query/set the data cache (if the size is 0). Personally, I would prefer to let that be determined by the business tier via a BPM system. There are 2 outstanding issues: 1) There should be a means to access the offset cache, items per page cache, and a data cache. All of which can get cleared when the fix for issue 2 is resolved ;o) 2) Although AbstractPageableView does ensure the cached item count is used before calling the data provider size() in getRowCount(), the cached item count is cleared in onBeforeRender() before the call is made to getViewOffset() - getCurrentPage() - getPageCount() - getRowCount() when getting the item models in getItemModels(); This causes an unnecessary duplicate call to the data providers size() method when paginating. -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 26, 2008 1:32 PM To: users@wicket.apache.org Subject: Re: DataView size() iterator() call order issue we are getting off track though. suppose class result { int size; iterator data } and idataprovider { result getdata(int first, int count); } how do we handle usecases where we just need the size and dont know first/count yet? -igor On Wed, Mar 26, 2008 at 7:19 AM, Hoover, William [EMAIL PROTECTED] wrote: see below... -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Monday, March 24, 2008 5:13 PM To: users@wicket.apache.org Subject: Re: DataView size() iterator() call order issue how are we going to cover these usecases: * pagination toolbar needs to call dataprovier.size() to figure out how many total records there are. at this point the toolbar doesnt know what window of data to retrieve, it just wants to know the size. [Will]: Currently, the size() method is called twice when paginating using PagingNavigator (not to mention the call for isvisible you describe below). This causes issues with duplicate query calls if the count is queried in the size() method. Could there be transient properties in the data provider that cache the count/list of items that would be cleared when rendered? If that were the case there could be an abstract method defined in the data provider interface to query/set the results. * often users do: new dataview() { isvisible() { return dataprovider.size()0; } once again, datawindow size is not known. [Will]: This would be accommodated by the above solution. -igor On Mon, Mar 24, 2008 at 6:52 AM, Hoover, William [EMAIL PROTECTED] wrote: We are using a modified version of the Generic DAO for Hibernate (http://www.hibernate.org/328.html) where we make reuse of common DAO methods such as keyword searches that retrieve corresponding entities as well a total size (both use the same search criteria when determining results so it makes sense to combine the operations). As you stated, we are making two calls the database, but only one call to the DAO (although, as stated in previous responses there are alternative ways to perform one query to achieve this). Our business tier handles the transactions for us (not our DAOs ;o) using an event model (similar to typical BPM systems). Broadcast agents are used to notify our business listeners which in turn process our DAO calls. This gives us an the flexibility to have independent transactions for different business rule operations and makes the most out of code reuse. Avoiding the heavier call makes perfect sense, but couldn't this responsibility be passed to the data provider
Re: Back button problem
Hi Igore I have some code to share now. This is what I did: in the constructor for the Application, I mount pages with hybridUrlCoding strategy as suggested by you. mount(new HybridUrlCodingStrategy(home, MenuPage.class)); mount(new HybridUrlCodingStrategy(product, ProductDetailPage.class)); Now I can see different versions of pages being created unlike before.. However, the Ajax links I'm adding at various places are still showing the old format.. On my menu page (that gets updated through AJAX) over and over, I create menu items like this : public class MenuFragment extends Fragment { Listable item ; public MenuFragment(String id, final Listable item, final MenuPage page) { super(id, fragment); this.item = item; setOutputMarkupId(true); add(new Label(name, item.getName())); add(new ExternalImage(img, item)); add(new AjaxEventBehavior(onclick) { @Override protected void onEvent(AjaxRequestTarget target) { page.reload(item, target); } }); } } Is this the right approach? Or should I use some AjaxFallbackLink type of object instead of adding a clikable behavior to a div? My Listable interface basically has the primary key of the category, and Class name of the objects to be loaded (this is what what I do in page.reload) for that category. -- View this message in context: http://www.nabble.com/Back-button-problem-tp16313414p16324501.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DataView size() iterator() call order issue
and how do we know the difference? You as a developer know it, we dont know it as a framework, just cache it in your dataprovider or wrap in in a caching data provider. Why is that so difficult johan On Thu, Mar 27, 2008 at 12:39 PM, Hoover, William [EMAIL PROTECTED] wrote: That makes perfect sense in the scenario where rows are deleted, but it doesn't make sense when all that is being done is clicking the next button for a PagingNavigator. Why would do we need two calls to the size method in that scenario? -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 26, 2008 3:27 PM To: users@wicket.apache.org Subject: Re: DataView size() iterator() call order issue On Wed, Mar 26, 2008 at 11:37 AM, Hoover, William [EMAIL PROTECTED] wrote: 2) Although AbstractPageableView does ensure the cached item count is used before calling the data provider size() in getRowCount(), the cached item count is cleared in onBeforeRender() before the call is made to getViewOffset() - getCurrentPage() - getPageCount() - getRowCount() when getting the item models in getItemModels(); This causes an unnecessary duplicate call to the data providers size() method when paginating. it is not unnecessary suppose you have a dataview with overridden isvisible() { return getitemcount()0; } inside this dataview you have a delete link suppose dataview loads and has 1 item. user clicks delete wicket checks the link is indeed visible - which results it the size() call which in turn caches the result onclick() handler is invoked row is removed onbeforerender is called dataview is rendered in this case dataview is rendered because getitemcount() has been cached before onclick() has been executed, so the cached count is 1 when in reality there are now 0 items. that is why onbeforerender() clears the cache, and why sometimes you will get two size() calls. -igor - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: DataView size() iterator() call order issue
The difference is that in the deletion scenario the state of the data has changed. In the pagination scenario the state of the data has not changed. Why is that so difficult to differentiate? -Original Message- From: Johan Compagner [mailto:[EMAIL PROTECTED] Sent: Thursday, March 27, 2008 7:49 AM To: users@wicket.apache.org Subject: Re: DataView size() iterator() call order issue and how do we know the difference? You as a developer know it, we dont know it as a framework, just cache it in your dataprovider or wrap in in a caching data provider. Why is that so difficult johan On Thu, Mar 27, 2008 at 12:39 PM, Hoover, William [EMAIL PROTECTED] wrote: That makes perfect sense in the scenario where rows are deleted, but it doesn't make sense when all that is being done is clicking the next button for a PagingNavigator. Why would do we need two calls to the size method in that scenario? -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 26, 2008 3:27 PM To: users@wicket.apache.org Subject: Re: DataView size() iterator() call order issue On Wed, Mar 26, 2008 at 11:37 AM, Hoover, William [EMAIL PROTECTED] wrote: 2) Although AbstractPageableView does ensure the cached item count is used before calling the data provider size() in getRowCount(), the cached item count is cleared in onBeforeRender() before the call is made to getViewOffset() - getCurrentPage() - getPageCount() - getRowCount() when getting the item models in getItemModels(); This causes an unnecessary duplicate call to the data providers size() method when paginating. it is not unnecessary suppose you have a dataview with overridden isvisible() { return getitemcount()0; } inside this dataview you have a delete link suppose dataview loads and has 1 item. user clicks delete wicket checks the link is indeed visible - which results it the size() call which in turn caches the result onclick() handler is invoked row is removed onbeforerender is called dataview is rendered in this case dataview is rendered because getitemcount() has been cached before onclick() has been executed, so the cached count is 1 when in reality there are now 0 items. that is why onbeforerender() clears the cache, and why sometimes you will get two size() calls. -igor - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: DataView size() iterator() call order issue
Also, you mention that all that is needed is to cache it (I assume you are referring to the actual data) in the data provider. How can that be done when the size is being called when there is no way to get the current offset that is needed to get the data in the first place? -Original Message- From: Hoover, William [mailto:[EMAIL PROTECTED] Sent: Thursday, March 27, 2008 7:55 AM To: users@wicket.apache.org Subject: RE: DataView size() iterator() call order issue The difference is that in the deletion scenario the state of the data has changed. In the pagination scenario the state of the data has not changed. Why is that so difficult to differentiate? -Original Message- From: Johan Compagner [mailto:[EMAIL PROTECTED] Sent: Thursday, March 27, 2008 7:49 AM To: users@wicket.apache.org Subject: Re: DataView size() iterator() call order issue and how do we know the difference? You as a developer know it, we dont know it as a framework, just cache it in your dataprovider or wrap in in a caching data provider. Why is that so difficult johan On Thu, Mar 27, 2008 at 12:39 PM, Hoover, William [EMAIL PROTECTED] wrote: That makes perfect sense in the scenario where rows are deleted, but it doesn't make sense when all that is being done is clicking the next button for a PagingNavigator. Why would do we need two calls to the size method in that scenario? -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 26, 2008 3:27 PM To: users@wicket.apache.org Subject: Re: DataView size() iterator() call order issue On Wed, Mar 26, 2008 at 11:37 AM, Hoover, William [EMAIL PROTECTED] wrote: 2) Although AbstractPageableView does ensure the cached item count is used before calling the data provider size() in getRowCount(), the cached item count is cleared in onBeforeRender() before the call is made to getViewOffset() - getCurrentPage() - getPageCount() - getRowCount() when getting the item models in getItemModels(); This causes an unnecessary duplicate call to the data providers size() method when paginating. it is not unnecessary suppose you have a dataview with overridden isvisible() { return getitemcount()0; } inside this dataview you have a delete link suppose dataview loads and has 1 item. user clicks delete wicket checks the link is indeed visible - which results it the size() call which in turn caches the result onclick() handler is invoked row is removed onbeforerender is called dataview is rendered in this case dataview is rendered because getitemcount() has been cached before onclick() has been executed, so the cached count is 1 when in reality there are now 0 items. that is why onbeforerender() clears the cache, and why sometimes you will get two size() calls. -igor - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DataView size() iterator() call order issue
no cache the size. We first have to have the size to be able to give you the offset and count params. And depending of the type of data or the database you use you could also already query the data (in the size() call) But i know that is not always the best thing to do. But do you want an extra 2 params also in the size() call? What would be the offset and what would be the max length? The problem is that both of those depends on the size call. So the offset is calculated with the size param as is the count.. So if we try to guess those 2 params for the size() call then those 2 params dont have to be the same for the iterator call... johan On Thu, Mar 27, 2008 at 1:01 PM, Hoover, William [EMAIL PROTECTED] wrote: Also, you mention that all that is needed is to cache it (I assume you are referring to the actual data) in the data provider. How can that be done when the size is being called when there is no way to get the current offset that is needed to get the data in the first place? -Original Message- From: Hoover, William [mailto:[EMAIL PROTECTED] Sent: Thursday, March 27, 2008 7:55 AM To: users@wicket.apache.org Subject: RE: DataView size() iterator() call order issue The difference is that in the deletion scenario the state of the data has changed. In the pagination scenario the state of the data has not changed. Why is that so difficult to differentiate? -Original Message- From: Johan Compagner [mailto:[EMAIL PROTECTED] Sent: Thursday, March 27, 2008 7:49 AM To: users@wicket.apache.org Subject: Re: DataView size() iterator() call order issue and how do we know the difference? You as a developer know it, we dont know it as a framework, just cache it in your dataprovider or wrap in in a caching data provider. Why is that so difficult johan On Thu, Mar 27, 2008 at 12:39 PM, Hoover, William [EMAIL PROTECTED] wrote: That makes perfect sense in the scenario where rows are deleted, but it doesn't make sense when all that is being done is clicking the next button for a PagingNavigator. Why would do we need two calls to the size method in that scenario? -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 26, 2008 3:27 PM To: users@wicket.apache.org Subject: Re: DataView size() iterator() call order issue On Wed, Mar 26, 2008 at 11:37 AM, Hoover, William [EMAIL PROTECTED] wrote: 2) Although AbstractPageableView does ensure the cached item count is used before calling the data provider size() in getRowCount(), the cached item count is cleared in onBeforeRender() before the call is made to getViewOffset() - getCurrentPage() - getPageCount() - getRowCount() when getting the item models in getItemModels(); This causes an unnecessary duplicate call to the data providers size() method when paginating. it is not unnecessary suppose you have a dataview with overridden isvisible() { return getitemcount()0; } inside this dataview you have a delete link suppose dataview loads and has 1 item. user clicks delete wicket checks the link is indeed visible - which results it the size() call which in turn caches the result onclick() handler is invoked row is removed onbeforerender is called dataview is rendered in this case dataview is rendered because getitemcount() has been cached before onclick() has been executed, so the cached count is 1 when in reality there are now 0 items. that is why onbeforerender() clears the cache, and why sometimes you will get two size() calls. -igor - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Page templates per virtual host
On Thu, Mar 27, 2008 at 3:49 AM, Nino Saturnino Martinez Vazquez Wael [EMAIL PROTECTED] wrote: The only problem with that is that you have to set up your proxy Connector in Tomcat's server.xml with a hard-coded server name: Connector port=8081 ... proxyName=www.mycompany.com proxyPort=80/ So, if you want to proxy to multiple hosts, you have to have multiple connectors. Yuck! Im already doing this, but I do not have to setup connectors in tomcat, it's a apache2 based configuration only. However im not sure if wicket can pickup the different hosts.. If you've got it working somehow, please share! :) Here's how I had to set up my system to get the proxy names working correctly: Apache Configuration: VirtualHost *:80 ServerName domain1.com ProxyPass /website http://localhost:8081/site1 ProxyPassReverse /website http://localhost:8081/site1 /VirtualHost VirtualHost *:80 ServerName domain2.com ProxyPass /website http://localhost:9081/site2 ProxyPassReverse /website http://localhost:9081/site2 /VirtualHost Tomcat Configuration: Connector port=8081 proxyName=domain1.com proxyPort=80/ Connector port=9081 proxyName=domain2.com proxyPort=80/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: create email with wicket/javamail
I would maybe take a look at WicketTester. It does what you're looking for (renders to a String) I believe. On Thu, Mar 27, 2008 at 4:43 AM, greeklinux [EMAIL PROTECTED] wrote: I found the method Component.render(MarkupStream markupStream). I am thinking about to create this page and then render it, save the stream, and set it as email body... Or is there a more elegant and better wicket-way to achieve this? greeklinux wrote: Hello, I would like to create an email body with wicket and send it with javamail. I read that it is possible to create a page and get it from a buffer. I do not want to use other template languages like velocity. I think wicket schould be enough. I read about StringRequestTarget and the RequestCycle.setRequestTarget but I do not know how to use them. I new to wicket. If someone can give me a hint it would be great. -- View this message in context: http://www.nabble.com/create-email-with-wicket-javamail-tp16289600p16323360.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: New wicketstuff progress bar component / project
Server should be back up as of +-12:00. Maurice On Thu, Mar 27, 2008 at 10:00 AM, Nino Saturnino Martinez Vazquez Wael [EMAIL PROTECTED] wrote: Complementing Maurice on this: it's also described on the wiki on the developer page http://wicketstuff.org/confluence/display/STUFFWIKI/ , although the server seems to be down currently.. Maurice Marrink wrote: ATM the server seems to be down, so that might cause your problem. otherwise make sure you included the following repository in your pom. repository idwicket-snaps/id urlhttp://wicketstuff.org/maven/repository/url snapshots enabledtrue/enabled /snapshots releases enabledtrue/enabled /releases /repository Maurice On Thu, Mar 27, 2008 at 4:47 AM, luciolrv [EMAIL PROTECTED] wrote: I downloaded svn from the link below, but running maven2 on any of the 3 project gives the error: Missing com.resoap.wicket:wicket-progressbar:jar:0.1-SNAPSHOT Is this a repository problem? Lucio Rodriguez Christopher Hlubek wrote: I always wondered why there was no progress bar component for wicket. The UploadProgressBar is cool but only for file uploads and not designed for background tasks or long taking actions. So some time ago I wrote a progress bar component to have an easy to use a component for progress display of some task with AJAX updates. I recently published this as the wicketstuff-progressbar project. Just see the wiki (http://wicketstuff.org/confluence/display/STUFFWIKI/wicketstuff-progressbar) for a short description and the examples module for some example code. Since this is still work in progress I appreciate your comments or contribution! Thanks, Christopher Hlubek - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/New-wicketstuff-progress-bar-component---project-tp15392340p16321414.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -Wicket for love Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Page templates per virtual host
On Thu, Mar 27, 2008 at 8:49 AM, Nino Saturnino Martinez Vazquez Wael [EMAIL PROTECTED] wrote: I'll send my config once I get near my server later today:) It is actually working without the connector setup in tomcat. And I think you can even get it to work with connection pooling using the new proxy mod. Please do! I really hated having to add that other connector. I thought it was quite hacky. Thanks! p.s. I am keeping this discussion in the open since it could be of some use to others. Sorry to hijack someone else's thread for my own, but the subject is somewhat related. :) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: DataView size() iterator() call order issue
Okay, two issues... (1) combined call for size/data (2) multiple calls to size() when paginating I will avoid confusion by addressing only the multiple calls to size() for now. If only the size was to be cached, as you suggested, how would the data provider know when to clear it? The data provider is statefull and maintains the size across requests and there is no onBeforeRender in a data provider like there is in AbstractPageableView. So, the size will never be cleared when paginating from one page to the next. Even if we were able to cache the size we would be maintaining the same data in two different locations- in the AbstractPageableView - cachedItemCount and in the data provider. -Original Message- From: Johan Compagner [mailto:[EMAIL PROTECTED] Sent: Thursday, March 27, 2008 8:12 AM To: users@wicket.apache.org Subject: Re: DataView size() iterator() call order issue no cache the size. We first have to have the size to be able to give you the offset and count params. And depending of the type of data or the database you use you could also already query the data (in the size() call) But i know that is not always the best thing to do. But do you want an extra 2 params also in the size() call? What would be the offset and what would be the max length? The problem is that both of those depends on the size call. So the offset is calculated with the size param as is the count.. So if we try to guess those 2 params for the size() call then those 2 params dont have to be the same for the iterator call... johan On Thu, Mar 27, 2008 at 1:01 PM, Hoover, William [EMAIL PROTECTED] wrote: Also, you mention that all that is needed is to cache it (I assume you are referring to the actual data) in the data provider. How can that be done when the size is being called when there is no way to get the current offset that is needed to get the data in the first place? -Original Message- From: Hoover, William [mailto:[EMAIL PROTECTED] Sent: Thursday, March 27, 2008 7:55 AM To: users@wicket.apache.org Subject: RE: DataView size() iterator() call order issue The difference is that in the deletion scenario the state of the data has changed. In the pagination scenario the state of the data has not changed. Why is that so difficult to differentiate? -Original Message- From: Johan Compagner [mailto:[EMAIL PROTECTED] Sent: Thursday, March 27, 2008 7:49 AM To: users@wicket.apache.org Subject: Re: DataView size() iterator() call order issue and how do we know the difference? You as a developer know it, we dont know it as a framework, just cache it in your dataprovider or wrap in in a caching data provider. Why is that so difficult johan On Thu, Mar 27, 2008 at 12:39 PM, Hoover, William [EMAIL PROTECTED] wrote: That makes perfect sense in the scenario where rows are deleted, but it doesn't make sense when all that is being done is clicking the next button for a PagingNavigator. Why would do we need two calls to the size method in that scenario? -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 26, 2008 3:27 PM To: users@wicket.apache.org Subject: Re: DataView size() iterator() call order issue On Wed, Mar 26, 2008 at 11:37 AM, Hoover, William [EMAIL PROTECTED] wrote: 2) Although AbstractPageableView does ensure the cached item count is used before calling the data provider size() in getRowCount(), the cached item count is cleared in onBeforeRender() before the call is made to getViewOffset() - getCurrentPage() - getPageCount() - getRowCount() when getting the item models in getItemModels(); This causes an unnecessary duplicate call to the data providers size() method when paginating. it is not unnecessary suppose you have a dataview with overridden isvisible() { return getitemcount()0; } inside this dataview you have a delete link suppose dataview loads and has 1 item. user clicks delete wicket checks the link is indeed visible - which results it the size() call which in turn caches the result onclick() handler is invoked row is removed onbeforerender is called dataview is rendered in this case dataview is rendered because getitemcount() has been cached before onclick() has been executed, so the cached count is 1 when in reality there are now 0 items. that is why onbeforerender() clears the cache, and why sometimes you will get two size() calls. -igor - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For
Re: clustering failover error
Hi, I did some more research (since I am intrigued by the subject) with the following results: - If you have enhanced cglib classes in your session and they are serialized and later deserialized by a different jvm (for instance after restart) you'll get a ClassNotFoundException. Since it can't find the enhanced class. - Like the explanation on the cglib site you'll need to override the writeReplace method in the object containing the cglib enhanced classes to replace them with non enhanced counterparts. Here is testcode to proof it: == Dummy Session object containing the cglib enhanced class == public class Session implements Serializable { private static final long serialVersionUID = 7348708008236878630L; private TestObject testObject; public void setTestObject(TestObject testObject) { this.testObject = testObject; } } == TestObject that will be enhanced by cglib == public class TestObject implements Serializable { private static final long serialVersionUID = -5780038574171745351L; private String text = hallo; public String getText() { return text; } } == The serializer == import java.io.File; import java.io.FileOutputStream; import java.io.ObjectOutputStream; import net.sf.cglib.proxy.Enhancer; import net.sf.cglib.proxy.MethodInterceptor; public class Serializer { static final File TEST_FILE = new File(/tmp/Session.obj); public static void main(String[] args) throws Exception { Enhancer enhancer = new Enhancer(); enhancer.setSuperclass(TestObject.class); enhancer.setCallbackType(MethodInterceptor.class); Object object = enhancer.createClass().newInstance(); TestObject testObject = TestObject.class.cast(object); System.out.println(Text: + testObject.getText()); if(TEST_FILE.exists()) { System.out.println(Deleting existing file); TEST_FILE.delete(); } Session session = new Session(); session.setTestObject(testObject); FileOutputStream fileOutputStream = new FileOutputStream(TEST_FILE); ObjectOutputStream outputStream = new ObjectOutputStream(fileOutputStream); outputStream.writeObject(session); outputStream.close(); if(TEST_FILE.exists()) { System.out.println(File created!); } else { System.out.println(File NOT created!); } } } == The deserializer == public class DeSerializer { public static void main(String[] args) throws Exception { if(!Serializer.TEST_FILE.exists()) { System.out.println(Test file does not exist.); return; } FileInputStream fileInputStream = new FileInputStream( Serializer.TEST_FILE); ObjectInputStream inputStream = new ObjectInputStream(fileInputStream); Object object = inputStream.readObject(); System.out.println(Object: + object.getClass() + read from disk); } } If you'll first run the Serializer and then the DeSerializer you'll see the ClassNotFoundException with a mesage something like: TestObject$$EnhancerByCGLIB$$ If you add the following method in the Session: private Object writeReplace() throws ObjectStreamException { System.out.println(in write replace); this.testObject = new TestObject(); return this; } And run it again it will work smoothly. The object returned by writeReplace will actually be stored in the stream. This does not exactly solve your problem I guess (no StreamCorruptedException here...), but it does mean you can't have cglib enhanced classes in your session. Or was this already a known issues? Lars On Thu, Mar 27, 2008 at 12:19 PM, lars vonk [EMAIL PROTECTED] wrote: Hi, Assuming you use CGLib: CGLib classes could cause this problem, it makes sense since: - It does not occur in a single jvm, the enhanced classes are available there. - It does occur when read from a different jvm *or* restarted jvm: The enhanced classes are no longer available there. According to the CGLib site there is a way around this. See http://cglib.sourceforge.net/howto.html CGLIB and JAVA Serialization JAVA objects can be serialized to binary streams, it is used to implement RMI too. Serialization needs to load class before to deserialize object data. It is possible there is no generated class on client or server for unmarshaled object, but serialization lets to replace objects in stream (writeReplace/readResolve contract). To add writeReplace method to proxy class declare this method in interface with exact signature specified by JAVA serialization. Implement writeReplace in interceptor.
Re: DataView size() iterator() call order issue
no you as a developer KNOW that it can cache it Cache it if you can dont if you cant On Thu, Mar 27, 2008 at 2:28 PM, Hoover, William [EMAIL PROTECTED] wrote: Okay, two issues... (1) combined call for size/data (2) multiple calls to size() when paginating I will avoid confusion by addressing only the multiple calls to size() for now. If only the size was to be cached, as you suggested, how would the data provider know when to clear it? The data provider is statefull and maintains the size across requests and there is no onBeforeRender in a data provider like there is in AbstractPageableView. So, the size will never be cleared when paginating from one page to the next. Even if we were able to cache the size we would be maintaining the same data in two different locations- in the AbstractPageableView - cachedItemCount and in the data provider. -Original Message- From: Johan Compagner [mailto:[EMAIL PROTECTED] Sent: Thursday, March 27, 2008 8:12 AM To: users@wicket.apache.org Subject: Re: DataView size() iterator() call order issue no cache the size. We first have to have the size to be able to give you the offset and count params. And depending of the type of data or the database you use you could also already query the data (in the size() call) But i know that is not always the best thing to do. But do you want an extra 2 params also in the size() call? What would be the offset and what would be the max length? The problem is that both of those depends on the size call. So the offset is calculated with the size param as is the count.. So if we try to guess those 2 params for the size() call then those 2 params dont have to be the same for the iterator call... johan On Thu, Mar 27, 2008 at 1:01 PM, Hoover, William [EMAIL PROTECTED] wrote: Also, you mention that all that is needed is to cache it (I assume you are referring to the actual data) in the data provider. How can that be done when the size is being called when there is no way to get the current offset that is needed to get the data in the first place? -Original Message- From: Hoover, William [mailto:[EMAIL PROTECTED] Sent: Thursday, March 27, 2008 7:55 AM To: users@wicket.apache.org Subject: RE: DataView size() iterator() call order issue The difference is that in the deletion scenario the state of the data has changed. In the pagination scenario the state of the data has not changed. Why is that so difficult to differentiate? -Original Message- From: Johan Compagner [mailto:[EMAIL PROTECTED] Sent: Thursday, March 27, 2008 7:49 AM To: users@wicket.apache.org Subject: Re: DataView size() iterator() call order issue and how do we know the difference? You as a developer know it, we dont know it as a framework, just cache it in your dataprovider or wrap in in a caching data provider. Why is that so difficult johan On Thu, Mar 27, 2008 at 12:39 PM, Hoover, William [EMAIL PROTECTED] wrote: That makes perfect sense in the scenario where rows are deleted, but it doesn't make sense when all that is being done is clicking the next button for a PagingNavigator. Why would do we need two calls to the size method in that scenario? -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 26, 2008 3:27 PM To: users@wicket.apache.org Subject: Re: DataView size() iterator() call order issue On Wed, Mar 26, 2008 at 11:37 AM, Hoover, William [EMAIL PROTECTED] wrote: 2) Although AbstractPageableView does ensure the cached item count is used before calling the data provider size() in getRowCount(), the cached item count is cleared in onBeforeRender() before the call is made to getViewOffset() - getCurrentPage() - getPageCount() - getRowCount() when getting the item models in getItemModels(); This causes an unnecessary duplicate call to the data providers size() method when paginating. it is not unnecessary suppose you have a dataview with overridden isvisible() { return getitemcount()0; } inside this dataview you have a delete link suppose dataview loads and has 1 item. user clicks delete wicket checks the link is indeed visible - which results it the size() call which in turn caches the result onclick() handler is invoked row is removed onbeforerender is called dataview is rendered in this case dataview is rendered because getitemcount() has been cached before onclick() has been executed, so the cached count is 1 when in reality there are now 0 items. that is why onbeforerender() clears the cache, and why sometimes you will get two size() calls. -igor - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Page templates per virtual host
Okay here follows my config, I've configured multiple domains: Forexample you can see at some point I append something like /zeuz to the context, thats because in my filtermapping I've specfied that wicket should only bind to /zeuz also if you have images served by tomcat you need to forward that too. This is running on ubuntu server gutsy gibbon btw.. Please ask if there are questions NameVirtualHost * VirtualHost *:* ServerName domain.dk ServerAlias www.domain.dk ServerAlias www.domain.ath.cx ServerAlias domain.ath.cx ServerAdmin [EMAIL PROTECTED] DocumentRoot /var/www/SimpleFront LogLevel warn CustomLog /var/log/apache2/simplefronaccess.log combined /VirtualHost VirtualHost *:* ServerName beta.domain.dk ServerAlias *.beta.domain.dk ServerAlias *.beta.domain.cx ServerAlias beta.domain.ath.cx ServerAdmin [EMAIL PROTECTED] ProxyPass /images http://10.0.0.2:8180/context/images ProxyPass / http://10.0.0.2:8180/context/zeuz/ ProxyPassReverse / http://10.0.0.2:8180/context/zeuz/ ProxyPassReverseCookiePath /context / Proxy * Order deny,allow Allow from all /Proxy
Re: Page templates per virtual host
argh it got truncated... heres one that looks prettier: http://papernapkin.org/pastebin/view/213/ -regards Nino - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Page expiration error while using popup
Hi everyone,
RE: DataView size() iterator() call order issue
Can you post code for an example data provider that would KNOW how to cache the size? -Original Message- From: Johan Compagner [mailto:[EMAIL PROTECTED] Sent: Thursday, March 27, 2008 10:47 AM To: users@wicket.apache.org Subject: Re: DataView size() iterator() call order issue no you as a developer KNOW that it can cache it Cache it if you can dont if you cant On Thu, Mar 27, 2008 at 2:28 PM, Hoover, William [EMAIL PROTECTED] wrote: Okay, two issues... (1) combined call for size/data (2) multiple calls to size() when paginating I will avoid confusion by addressing only the multiple calls to size() for now. If only the size was to be cached, as you suggested, how would the data provider know when to clear it? The data provider is statefull and maintains the size across requests and there is no onBeforeRender in a data provider like there is in AbstractPageableView. So, the size will never be cleared when paginating from one page to the next. Even if we were able to cache the size we would be maintaining the same data in two different locations- in the AbstractPageableView - cachedItemCount and in the data provider. -Original Message- From: Johan Compagner [mailto:[EMAIL PROTECTED] Sent: Thursday, March 27, 2008 8:12 AM To: users@wicket.apache.org Subject: Re: DataView size() iterator() call order issue no cache the size. We first have to have the size to be able to give you the offset and count params. And depending of the type of data or the database you use you could also already query the data (in the size() call) But i know that is not always the best thing to do. But do you want an extra 2 params also in the size() call? What would be the offset and what would be the max length? The problem is that both of those depends on the size call. So the offset is calculated with the size param as is the count.. So if we try to guess those 2 params for the size() call then those 2 params dont have to be the same for the iterator call... johan On Thu, Mar 27, 2008 at 1:01 PM, Hoover, William [EMAIL PROTECTED] wrote: Also, you mention that all that is needed is to cache it (I assume you are referring to the actual data) in the data provider. How can that be done when the size is being called when there is no way to get the current offset that is needed to get the data in the first place? -Original Message- From: Hoover, William [mailto:[EMAIL PROTECTED] Sent: Thursday, March 27, 2008 7:55 AM To: users@wicket.apache.org Subject: RE: DataView size() iterator() call order issue The difference is that in the deletion scenario the state of the data has changed. In the pagination scenario the state of the data has not changed. Why is that so difficult to differentiate? -Original Message- From: Johan Compagner [mailto:[EMAIL PROTECTED] Sent: Thursday, March 27, 2008 7:49 AM To: users@wicket.apache.org Subject: Re: DataView size() iterator() call order issue and how do we know the difference? You as a developer know it, we dont know it as a framework, just cache it in your dataprovider or wrap in in a caching data provider. Why is that so difficult johan On Thu, Mar 27, 2008 at 12:39 PM, Hoover, William [EMAIL PROTECTED] wrote: That makes perfect sense in the scenario where rows are deleted, but it doesn't make sense when all that is being done is clicking the next button for a PagingNavigator. Why would do we need two calls to the size method in that scenario? -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 26, 2008 3:27 PM To: users@wicket.apache.org Subject: Re: DataView size() iterator() call order issue On Wed, Mar 26, 2008 at 11:37 AM, Hoover, William [EMAIL PROTECTED] wrote: 2) Although AbstractPageableView does ensure the cached item count is used before calling the data provider size() in getRowCount(), the cached item count is cleared in onBeforeRender() before the call is made to getViewOffset() - getCurrentPage() - getPageCount() - getRowCount() when getting the item models in getItemModels(); This causes an unnecessary duplicate call to the data providers size() method when paginating. it is not unnecessary suppose you have a dataview with overridden isvisible() { return getitemcount()0; } inside this dataview you have a delete link suppose dataview loads and has 1 item. user clicks delete wicket checks the link is indeed visible - which results it the size() call which in turn caches the result onclick() handler is invoked row is removed onbeforerender is called dataview is rendered in this case dataview is rendered because getitemcount() has been cached before onclick() has been executed, so the cached count is 1 when in reality there are now 0 items. that is why
Add different component for treenode
Hi, with newNodeComponent in the BaseTree class i can specify a different component for my treenode, but this is the same for all node. Is it possible setting different treenode component for added a different type of node in my tree? something like this: protected Component newNodeComponent(String id, IModel model) { if( node type a) return new component_a(id, model, tree); else if return new component_b(id, model, tree); else return new component_c(id, model, tree); } is it possible? thk
Re: CheckGroup in a DataView with another CheckGroup
we have just released 1.2.7 which is the last 1.2.x release we will make. there is a patch on how to make this work in jira assigned to 1.3, you can take that and roll your own checkgroup/check variants. -igor On Thu, Mar 27, 2008 at 1:41 AM, Dreamltf [EMAIL PROTECTED] wrote: Hi all, I want to use a CheckGroup (allowgroup) with a DataView, and there is another CheckGroup (othergroup) in the inside of the DataView. I can get the allowgroup's value, but I can't get the othergroup's value. submitformForm allowgroupCheckGroup allowselectorCheckGroupSelector sortuidLabel sortroleLabel commentsDataView allowcheckCheck uidLabel roleLabel othergroupCheckGroup otheraddCheck otherdeleteCheck otherqueryCheck othereditCheck otherselectorCheckGroupSelector navigator I use a HashMap to be a Model Like this. CheckGroup allowgroup = new CheckGroup(allowgroup, new Model((Serializable) othermap.keySet())); submitform.add(allowgroup); CheckGroup othergroup = new CheckGroup(othergroup, new ArrayList()); arg0.add(othergroup); http://www.nabble.com/file/p16323358/checkbox_with_dataview.jpg Wicket1.2.6 Thanks for help!! -- View this message in context: http://www.nabble.com/CheckGroup-in-a-DataView-with-another-CheckGroup-tp16323358p16323358.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with DatePicker
you couldve just used maven and saved us all some time... -igor On Thu, Mar 27, 2008 at 2:04 AM, Fabien D. [EMAIL PROTECTED] wrote: Thank you !! It was that. I had not joda-time :) igor.vaynberg wrote: do you have joda jars which wicket-datetime depends on??? -igor On Wed, Mar 26, 2008 at 8:25 AM, Fabien D. [EMAIL PROTECTED] wrote: I've just migrated to wicket 1.3.2 and added the good librairies. And I have exactly the same error! That means I've done a mistake in my code? Thank you for your help :) Gerolf Seitz wrote: this is fixed in 1.3.2 Gerolf On Wed, Mar 26, 2008 at 11:42 AM, Fabien D. [EMAIL PROTECTED] wrote: Hi, I try to use a DatePicker like this : TextField date_version = new TextField(date_version, model_date_version, Date.class); date_version.setRequired(true); date_version.add(new DatePicker()); this.form_ajoutinfgeneral.add(date_version); I have import : import org.apache.wicket.extensions.yui.calendar.DatePicker; I'm using these librairies : wicket-datetime-1.3.1.jar and wicket-extensions-1.3.1.jar When I try to display my page, I have a problem, which is reported in my log file : java.lang.NoClassDefFoundError at org.apache.wicket.extensions.yui.calendar.DatePicker.class$( DatePicker.java:86) at org.apache.wicket.extensions.yui.calendar.DatePicker.getDatePattern( DatePicker.java:438) at org.apache.wicket.extensions.yui.calendar.DatePicker.checkComponentProvidesDateFormat (DatePicker.java:296) at org.apache.wicket.extensions.yui.calendar.DatePicker.bind(DatePicker.java :129) at org.apache.wicket.Component.add(Component.java:922) at com.mycompany.projet.PanelAjInfGeneral.initPage(Unknown Source) . I don't understand what is my mistake. Thank you in advance for your help. -- View this message in context: http://www.nabble.com/Problem-with-DatePicker-tp16299775p16299775.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Problem-with-DatePicker-tp16299775p16302996.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Problem-with-DatePicker-tp16299775p16323375.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: DataView size() iterator() call order issue
I'm only interested in caching it for the current request so there isn't multiple calls to size within the same request. The same way AbstractPageableView is caching it and clearing it in onBeforeRender. The only problem is that: 1) I do not have access to the cached size stored in AbstractPageableView - cachedItemCount from within the data provider 2) The cached size in AbstractPageableView - cachedItemCount is cleared in onBeforeRender() before the call is made to getViewOffset() - getCurrentPage() - getPageCount() - getRowCount() when getting the item models in getItemModels(); This causes a second call to the data providers size() method when paginating. In other words, the AbstractPageableView - cachedItemCount is not working properly when a link for the PagingNavigator is clicked- causing 2 calls to the size() method within the same request (w/o deletions ;o). -Original Message- From: Johan Compagner [mailto:[EMAIL PROTECTED] Sent: Thursday, March 27, 2008 11:36 AM To: users@wicket.apache.org Subject: Re: DataView size() iterator() call order issue If you are iterating over a list that can be changed by all kinds of different users Then you cant really cache it If you are iterating over a list that is pretty stable for the current users or the user itself only alters that list (insert/delete) Then you can cache it easily Just call detach (that clears the size cache) when you have an action that deletes or inserts a new items so that you know the size is changed. johan On Thu, Mar 27, 2008 at 4:04 PM, Hoover, William [EMAIL PROTECTED] wrote: Can you post code for an example data provider that would KNOW how to cache the size? -Original Message- From: Johan Compagner [mailto:[EMAIL PROTECTED] Sent: Thursday, March 27, 2008 10:47 AM To: users@wicket.apache.org Subject: Re: DataView size() iterator() call order issue no you as a developer KNOW that it can cache it Cache it if you can dont if you cant On Thu, Mar 27, 2008 at 2:28 PM, Hoover, William [EMAIL PROTECTED] wrote: Okay, two issues... (1) combined call for size/data (2) multiple calls to size() when paginating I will avoid confusion by addressing only the multiple calls to size() for now. If only the size was to be cached, as you suggested, how would the data provider know when to clear it? The data provider is statefull and maintains the size across requests and there is no onBeforeRender in a data provider like there is in AbstractPageableView. So, the size will never be cleared when paginating from one page to the next. Even if we were able to cache the size we would be maintaining the same data in two different locations- in the AbstractPageableView - cachedItemCount and in the data provider. -Original Message- From: Johan Compagner [mailto:[EMAIL PROTECTED] Sent: Thursday, March 27, 2008 8:12 AM To: users@wicket.apache.org Subject: Re: DataView size() iterator() call order issue no cache the size. We first have to have the size to be able to give you the offset and count params. And depending of the type of data or the database you use you could also already query the data (in the size() call) But i know that is not always the best thing to do. But do you want an extra 2 params also in the size() call? What would be the offset and what would be the max length? The problem is that both of those depends on the size call. So the offset is calculated with the size param as is the count.. So if we try to guess those 2 params for the size() call then those 2 params dont have to be the same for the iterator call... johan On Thu, Mar 27, 2008 at 1:01 PM, Hoover, William [EMAIL PROTECTED] wrote: Also, you mention that all that is needed is to cache it (I assume you are referring to the actual data) in the data provider. How can that be done when the size is being called when there is no way to get the current offset that is needed to get the data in the first place? -Original Message- From: Hoover, William [mailto:[EMAIL PROTECTED] Sent: Thursday, March 27, 2008 7:55 AM To: users@wicket.apache.org Subject: RE: DataView size() iterator() call order issue The difference is that in the deletion scenario the state of the data has changed. In the pagination scenario the state of the data has not changed. Why is that so difficult to differentiate? -Original Message- From: Johan Compagner [mailto:[EMAIL PROTECTED] Sent: Thursday, March 27, 2008 7:49 AM To: users@wicket.apache.org Subject: Re: DataView size() iterator() call order issue and how do we know the difference? You as a developer know it, we dont know it as a framework, just cache it in your dataprovider or wrap in in a caching data provider. Why is that so difficult johan On Thu, Mar 27, 2008 at 12:39 PM, Hoover,
Re: Customising DateTimeField
that is why we try to layer functionality in class hierarchy via abstract classes, so you can find a good point to rewrite something high level for your particular usecase. -igor On Thu, Mar 27, 2008 at 2:06 AM, Timo Rantalaiho [EMAIL PROTECTED] wrote: On Wed, 26 Mar 2008, Charlie Dobbie wrote: I'm guessing at this point that I should just copy the DateTimeField component entirely and modify to fit! :-) Yes, Wicket does not entirely solve the issue of GUI component reuse, though helps a lot in it. I have also sometimes found that the most complex ready-made components serve better as examples than generic solutions; sometimes trying to make the same component usable in cases that differ by too much would make it too complex. Best wishes, Timo -- Timo Rantalaiho Reaktor Innovations OyURL: http://www.ri.fi/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Back button problem
my suggestion is to make it work without ajax first, that way you know everything is correctly setup. then add ajax into the mix. -igor On Thu, Mar 27, 2008 at 4:46 AM, bhitai [EMAIL PROTECTED] wrote: Hi Igore I have some code to share now. This is what I did: in the constructor for the Application, I mount pages with hybridUrlCoding strategy as suggested by you. mount(new HybridUrlCodingStrategy(home, MenuPage.class)); mount(new HybridUrlCodingStrategy(product, ProductDetailPage.class)); Now I can see different versions of pages being created unlike before.. However, the Ajax links I'm adding at various places are still showing the old format.. On my menu page (that gets updated through AJAX) over and over, I create menu items like this : public class MenuFragment extends Fragment { Listable item ; public MenuFragment(String id, final Listable item, final MenuPage page) { super(id, fragment); this.item = item; setOutputMarkupId(true); add(new Label(name, item.getName())); add(new ExternalImage(img, item)); add(new AjaxEventBehavior(onclick) { @Override protected void onEvent(AjaxRequestTarget target) { page.reload(item, target); } }); } } Is this the right approach? Or should I use some AjaxFallbackLink type of object instead of adding a clikable behavior to a div? My Listable interface basically has the primary key of the category, and Class name of the objects to be loaded (this is what what I do in page.reload) for that category. -- View this message in context: http://www.nabble.com/Back-button-problem-tp16313414p16324501.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ListView not updating when changed
i suppose you can try issuing a window.opener.wicket.ajax.get request to trigger an ajax request, but i am not sure how and if xmlhttprequest works across windows... -igor On Thu, Mar 27, 2008 at 7:56 AM, taygolf [EMAIL PROTECTED] wrote: I would have thought there was another way to do this. I can not refresh the whole page because I have other textfields and I will lose the data entered in them on a page refresh. I just want to refresh the markupcontainer that the ListView is in. I guess I need to look into change my popup class from a popup page to a div. Are there any other suggestions? Thanks T igor.vaynberg wrote: since its in a different page there isnt much you can do except something like outputting head script window.opener.refresh(); window.close(); /script /head after the form has been submitted -igor On Wed, Mar 26, 2008 at 6:39 PM, taygolf [EMAIL PROTECTED] wrote: The popup is a different page. Just a simple page with 2 textfields and a few check boxes and a submit button and I submit it via a regular post right now but I can change that to ajax if that is what I need to do. igor.vaynberg wrote: your popup is a different page or a div inside the current page? do you submit the form in it via ajax or a regular post? -igor On Wed, Mar 26, 2008 at 3:00 PM, taygolf [EMAIL PROTECTED] wrote: THanks for explaining it to me igor. I have been doing some searching about my other problem. Again my new problem is that I really do not want this listview to refresh on a timer. Here is the process of my app. The user can click on a link that says add member. that link inturn creates a popup page that has a form and some textfields. When the form is submitted I update the Session List to add that member and the popup is closed. Then when the timer tells the listview to refresh it gets the new informationfrom the session list the user just entered and updates the listview. Instead of having the listview refresh on a timer I would like for it to refresh when the popup window form is submited. How would I go about doing this? I have done some looking and I think maybe instead of using a listview I should be using a refreshingview. I made this change but it still does not solve my problem. Can I refresh the markup container from the popup? if so how? I was thinking maybe a AjaxSubmit button on the popup page but I am not sure. Anyway a little help with this would be awesome Thanks T igor.vaynberg wrote: On Wed, Mar 26, 2008 at 6:57 AM, taygolf [EMAIL PROTECTED] wrote: that worked prefect Thanks for the help. I decided to go with the Model example. I do have a few more questions though. First why cant I use a PropertyModel instead of a AbstractReadOnlyModel. I tried to do this: New Label(kmname, new PropertyModel(kmd, name); because you are still caching the instance of kmd in the model by passing it directly, instead new PropertyModel(item.getModel(), name); that way the models are chained properly -igor but that did not work. I am guessing that getObject has to be called or the ListView will not get updated but that is just my guess. Also right now I am using AjaxSelfUpdatingTimerBehavior(Duration.seconds(5)) to get the ListView to updated but I would like to do this from my popup instead. So there is a link that will create a popup and that popup adds info to the session variable that the ListView uses. When the submit button is clicked on that popup I would like to refresh the ListView instead of waiting for the 5 seconds to go by. I have done some looking and I think I need to us an AjaxFullBackLink but I wnated to go ahead and ask to make sure I was looking in the right direction Thanks T Thomas Maeder wrote: If memory serves, the ListView will not repopulate already existing items. I see two options: 1) setReuseItems(false) 2) instead of creating the label with a fixed String (I assume that kmd.getName() returns a String) pass an IModel to the label like so: New Label(kmname, new AbstractReadOnlyModel() { public Object getObject() { KeyMemberData kmd =
Re: Add different component for treenode
i dont see why not. model.getobject() will get you the treenode, which you can cast down to your impl which will have a type property -igor On Thu, Mar 27, 2008 at 8:24 AM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, with newNodeComponent in the BaseTree class i can specify a different component for my treenode, but this is the same for all node. Is it possible setting different treenode component for added a different type of node in my tree? something like this: protected Component newNodeComponent(String id, IModel model) { if( node type a) return new component_a(id, model, tree); else if return new component_b(id, model, tree); else return new component_c(id, model, tree); } is it possible? thk - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DataView size() iterator() call order issue
public class MySizeCachingDataProvider implements IDataProvider { private Integer size = null; private ListFoo resultset = null; public int getSize() { if(size == null ) { performExpensiveQuery(); } return size; } public Iterator iterator() { if(resultset == null ) { performExpensiveQuery(); } return resultset; } private void performExpensiveQuery() { size = count(); resultset = query(); } } On 3/27/08, Hoover, William [EMAIL PROTECTED] wrote: I'm only interested in caching it for the current request so there isn't multiple calls to size within the same request. The same way AbstractPageableView is caching it and clearing it in onBeforeRender. The only problem is that: 1) I do not have access to the cached size stored in AbstractPageableView - cachedItemCount from within the data provider 2) The cached size in AbstractPageableView - cachedItemCount is cleared in onBeforeRender() before the call is made to getViewOffset() - getCurrentPage() - getPageCount() - getRowCount() when getting the item models in getItemModels(); This causes a second call to the data providers size() method when paginating. In other words, the AbstractPageableView - cachedItemCount is not working properly when a link for the PagingNavigator is clicked- causing 2 calls to the size() method within the same request (w/o deletions ;o). -Original Message- From: Johan Compagner [mailto:[EMAIL PROTECTED] Sent: Thursday, March 27, 2008 11:36 AM To: users@wicket.apache.org Subject: Re: DataView size() iterator() call order issue If you are iterating over a list that can be changed by all kinds of different users Then you cant really cache it If you are iterating over a list that is pretty stable for the current users or the user itself only alters that list (insert/delete) Then you can cache it easily Just call detach (that clears the size cache) when you have an action that deletes or inserts a new items so that you know the size is changed. johan On Thu, Mar 27, 2008 at 4:04 PM, Hoover, William [EMAIL PROTECTED] wrote: Can you post code for an example data provider that would KNOW how to cache the size? -Original Message- From: Johan Compagner [mailto:[EMAIL PROTECTED] Sent: Thursday, March 27, 2008 10:47 AM To: users@wicket.apache.org Subject: Re: DataView size() iterator() call order issue no you as a developer KNOW that it can cache it Cache it if you can dont if you cant On Thu, Mar 27, 2008 at 2:28 PM, Hoover, William [EMAIL PROTECTED] wrote: Okay, two issues... (1) combined call for size/data (2) multiple calls to size() when paginating I will avoid confusion by addressing only the multiple calls to size() for now. If only the size was to be cached, as you suggested, how would the data provider know when to clear it? The data provider is statefull and maintains the size across requests and there is no onBeforeRender in a data provider like there is in AbstractPageableView. So, the size will never be cleared when paginating from one page to the next. Even if we were able to cache the size we would be maintaining the same data in two different locations- in the AbstractPageableView - cachedItemCount and in the data provider. -Original Message- From: Johan Compagner [mailto:[EMAIL PROTECTED] Sent: Thursday, March 27, 2008 8:12 AM To: users@wicket.apache.org Subject: Re: DataView size() iterator() call order issue no cache the size. We first have to have the size to be able to give you the offset and count params. And depending of the type of data or the database you use you could also already query the data (in the size() call) But i know that is not always the best thing to do. But do you want an extra 2 params also in the size() call? What would be the offset and what would be the max length? The problem is that both of those depends on the size call. So the offset is calculated with the size param as is the count.. So if we try to guess those 2 params for the size() call then those 2 params dont have to be the same for the iterator call... johan On Thu, Mar 27, 2008 at 1:01 PM, Hoover, William [EMAIL PROTECTED] wrote: Also, you mention that all that is needed is to cache it (I assume you are referring to the actual data) in the data provider. How can that be done when the size is being called when there is no way to get the current offset that is needed to get the data in the first place? -Original Message- From: Hoover, William [mailto:[EMAIL PROTECTED] Sent: Thursday, March 27, 2008 7:55 AM To:
Re: DataView size() iterator() call order issue
forgot: public class MYSizeCachingDataProvider ... { public void detach() { size = null; resultset = null; } } On 3/27/08, Martijn Dashorst [EMAIL PROTECTED] wrote: public class MySizeCachingDataProvider implements IDataProvider { private Integer size = null; private ListFoo resultset = null; public int getSize() { if(size == null ) { performExpensiveQuery(); } return size; } public Iterator iterator() { if(resultset == null ) { performExpensiveQuery(); } return resultset; } private void performExpensiveQuery() { size = count(); resultset = query(); } } On 3/27/08, Hoover, William [EMAIL PROTECTED] wrote: I'm only interested in caching it for the current request so there isn't multiple calls to size within the same request. The same way AbstractPageableView is caching it and clearing it in onBeforeRender. The only problem is that: 1) I do not have access to the cached size stored in AbstractPageableView - cachedItemCount from within the data provider 2) The cached size in AbstractPageableView - cachedItemCount is cleared in onBeforeRender() before the call is made to getViewOffset() - getCurrentPage() - getPageCount() - getRowCount() when getting the item models in getItemModels(); This causes a second call to the data providers size() method when paginating. In other words, the AbstractPageableView - cachedItemCount is not working properly when a link for the PagingNavigator is clicked- causing 2 calls to the size() method within the same request (w/o deletions ;o). -Original Message- From: Johan Compagner [mailto:[EMAIL PROTECTED] Sent: Thursday, March 27, 2008 11:36 AM To: users@wicket.apache.org Subject: Re: DataView size() iterator() call order issue If you are iterating over a list that can be changed by all kinds of different users Then you cant really cache it If you are iterating over a list that is pretty stable for the current users or the user itself only alters that list (insert/delete) Then you can cache it easily Just call detach (that clears the size cache) when you have an action that deletes or inserts a new items so that you know the size is changed. johan On Thu, Mar 27, 2008 at 4:04 PM, Hoover, William [EMAIL PROTECTED] wrote: Can you post code for an example data provider that would KNOW how to cache the size? -Original Message- From: Johan Compagner [mailto:[EMAIL PROTECTED] Sent: Thursday, March 27, 2008 10:47 AM To: users@wicket.apache.org Subject: Re: DataView size() iterator() call order issue no you as a developer KNOW that it can cache it Cache it if you can dont if you cant On Thu, Mar 27, 2008 at 2:28 PM, Hoover, William [EMAIL PROTECTED] wrote: Okay, two issues... (1) combined call for size/data (2) multiple calls to size() when paginating I will avoid confusion by addressing only the multiple calls to size() for now. If only the size was to be cached, as you suggested, how would the data provider know when to clear it? The data provider is statefull and maintains the size across requests and there is no onBeforeRender in a data provider like there is in AbstractPageableView. So, the size will never be cleared when paginating from one page to the next. Even if we were able to cache the size we would be maintaining the same data in two different locations- in the AbstractPageableView - cachedItemCount and in the data provider. -Original Message- From: Johan Compagner [mailto:[EMAIL PROTECTED] Sent: Thursday, March 27, 2008 8:12 AM To: users@wicket.apache.org Subject: Re: DataView size() iterator() call order issue no cache the size. We first have to have the size to be able to give you the offset and count params. And depending of the type of data or the database you use you could also already query the data (in the size() call) But i know that is not always the best thing to do. But do you want an extra 2 params also in the size() call? What would be the offset and what would be the max length? The problem is that both of those depends on the size call. So the offset is calculated with the size param as is the count.. So if we try to guess those 2 params for the size() call then those 2 params dont have to be the same for the iterator call... johan On Thu, Mar 27, 2008 at 1:01 PM, Hoover, William [EMAIL PROTECTED] wrote: Also, you mention that all that is needed
Re: Setting text content of component
On Wed, 26 Mar 2008, Maurice Marrink wrote: In wicket you have to assign a Label to an Item or a Link. The corresponding markup would then be something like: li wicket:id=itemspan wicket:id=label/span/li However it is possible to remove the span for the label from the final markup send to the browser by using label.setRenderBodyOnly(true); Another functionally equivalent alternative is li wicket:id=item wicket:container wicket:id=label/wicket:container /li Best wishes, Timo -- Timo Rantalaiho Reaktor Innovations OyURL: http://www.ri.fi/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Deploying quickstart application in Jboss
what happens if you use Examples? i dont know jboss that well, but under the hood it is tomcat so it should wrk fine On Wed, Mar 26, 2008 at 11:15 PM, surya009 [EMAIL PROTECTED] wrote: Yes all I did was took the quickstart sample application and added jboss-web.xml as shown below jboss-web context-root//context-root /jboss-web Did I miss anythingw here, I tried added classloader config below to jboss-web.xml but even then I got the same exception. jboss-web class-loading java2ClassLoadingCompliance=false loader-repository wicket.quickstart:loader=wicket-quickstart.war loader-repository-configjava2ParentDelegation=false/loader-repository-config /loader-repository /class-loading context-root//context-root /jboss-web Johan Compagner wrote: are you sure you deployed your webapp ok? ClassNotFound does tell a lot On Wed, Mar 26, 2008 at 6:54 PM, surya009 [EMAIL PROTECTED] wrote: Hello All, I am evaluating wicket for the first time and trying to deploy the quickstart application from jboss but no luck so far, I get following exceptions. Looks like the jboss class loader is having problem loading wicket classes. wicket.WicketRuntimeException: Unable to create application of class wicket.quickstart.QuickStartApplication at wicket.protocol.http.ContextParamWebApplicationFactory.createApplication( ContextParamWebApplicationFactory.ja va:68) at wicket.protocol.http.WicketServlet.init(WicketServlet.java :275) at javax.servlet.GenericServlet.init(GenericServlet.java:211) at org.apache.catalina.core.StandardWrapper.loadServlet( StandardWrapper.java :1105) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932) at org.apache.catalina.core.StandardContext.loadOnStartup( StandardContext.java:3917) at org.apache.catalina.core.StandardContext.start(StandardContext.java :4201) at org.apache.catalina.core.ContainerBase.addChildInternal( ContainerBase.java :759) . at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run( AbstractDeploymentScanner.java:225) Caused by: java.lang.ClassNotFoundException: wicket.quickstart.QuickStartApplication at org.apache.catalina.loader.WebappClassLoader.loadClass( WebappClassLoader.java:1352) at org.apache.catalina.loader.WebappClassLoader.loadClass( WebappClassLoader.java:1198) Thanks, Suresh -- View this message in context: http://www.nabble.com/Deploying-quickstart-application-in-Jboss-tp16309156p16309156.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Deploying-quickstart-application-in-Jboss-tp16309156p16317650.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Navigaion Menu
Hi all, Does anybody know any good JavaScript navigation menu that works fine with Wicket? Out Graphics Designer is trying to create a menu for me and has problem finding a good one. Thanks, Zhubin Zhubin Salehi Senior Software Engineer Route1, Inc. Phone: (416) 848-8391 Ext. 2262 * Fax: (416) 848-8394 mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] * blocked::http://www.route1.com/ www.route1.com This electronic mail transmission contains information from Route1, Inc that is for the sole use of the intended recipient and may contain confidential, privileged or proprietary information. If you are not the intended recipient, please be aware that any disclosure, copying, distribution or use of this message, its contents, or any attachment is prohibited. Any wrongful interception of this message is punishable as a federal crime. If you have received this message in error, please return a copy to the sender by electronic mail indicating the error. Then, please destroy the original message and any copies from your computer. Thank you. smime.p7s Description: S/MIME cryptographic signature
Re: clustering failover error
Thank you Lars, unfortunately we still haven't found any actual cglib proxies in our session. So it goes. - Scott On Thu, Mar 27, 2008 at 7:41 AM, lars vonk [EMAIL PROTECTED] wrote: Hi, I did some more research (since I am intrigued by the subject) with the following results: - If you have enhanced cglib classes in your session and they are serialized and later deserialized by a different jvm (for instance after restart) you'll get a ClassNotFoundException. Since it can't find the enhanced class. - Like the explanation on the cglib site you'll need to override the writeReplace method in the object containing the cglib enhanced classes to replace them with non enhanced counterparts. Here is testcode to proof it: == Dummy Session object containing the cglib enhanced class == public class Session implements Serializable { private static final long serialVersionUID = 7348708008236878630L; private TestObject testObject; public void setTestObject(TestObject testObject) { this.testObject = testObject; } } == TestObject that will be enhanced by cglib == public class TestObject implements Serializable { private static final long serialVersionUID = -5780038574171745351L; private String text = hallo; public String getText() { return text; } } == The serializer == import java.io.File; import java.io.FileOutputStream; import java.io.ObjectOutputStream; import net.sf.cglib.proxy.Enhancer; import net.sf.cglib.proxy.MethodInterceptor; public class Serializer { static final File TEST_FILE = new File(/tmp/Session.obj); public static void main(String[] args) throws Exception { Enhancer enhancer = new Enhancer(); enhancer.setSuperclass(TestObject.class); enhancer.setCallbackType(MethodInterceptor.class); Object object = enhancer.createClass().newInstance(); TestObject testObject = TestObject.class.cast(object); System.out.println(Text: + testObject.getText()); if(TEST_FILE.exists()) { System.out.println(Deleting existing file); TEST_FILE.delete(); } Session session = new Session(); session.setTestObject(testObject); FileOutputStream fileOutputStream = new FileOutputStream(TEST_FILE); ObjectOutputStream outputStream = new ObjectOutputStream(fileOutputStream); outputStream.writeObject(session); outputStream.close(); if(TEST_FILE.exists()) { System.out.println(File created!); } else { System.out.println(File NOT created!); } } } == The deserializer == public class DeSerializer { public static void main(String[] args) throws Exception { if(!Serializer.TEST_FILE.exists()) { System.out.println(Test file does not exist.); return; } FileInputStream fileInputStream = new FileInputStream( Serializer.TEST_FILE); ObjectInputStream inputStream = new ObjectInputStream(fileInputStream); Object object = inputStream.readObject(); System.out.println(Object: + object.getClass() + read from disk); } } If you'll first run the Serializer and then the DeSerializer you'll see the ClassNotFoundException with a mesage something like: TestObject$$EnhancerByCGLIB$$ If you add the following method in the Session: private Object writeReplace() throws ObjectStreamException { System.out.println(in write replace); this.testObject = new TestObject(); return this; } And run it again it will work smoothly. The object returned by writeReplace will actually be stored in the stream. This does not exactly solve your problem I guess (no StreamCorruptedException here...), but it does mean you can't have cglib enhanced classes in your session. Or was this already a known issues? Lars On Thu, Mar 27, 2008 at 12:19 PM, lars vonk [EMAIL PROTECTED] wrote: Hi, Assuming you use CGLib: CGLib classes could cause this problem, it makes sense since: - It does not occur in a single jvm, the enhanced classes are available there. - It does occur when read from a different jvm *or* restarted jvm: The enhanced classes are no longer available there. According to the CGLib site there is a way around this. See http://cglib.sourceforge.net/howto.html CGLIB and JAVA Serialization JAVA objects can be serialized to binary streams, it is used to implement RMI too. Serialization needs to load class before to
Re: clustering failover error
We just discovered that if we use SecondLevelCacheSessionStore the problem goes away. From there we determined that the setting Application.get().getPageSettings().setAutomaticMultiWindowSupport(false); is the lynch pin. We still don't know why this resolves the problem. - Scott On Tue, Mar 25, 2008 at 9:55 AM, Scott Swank [EMAIL PROTECTED] wrote: Thank you. We'll give that a try and let you know the results. On Mon, Mar 24, 2008 at 11:43 PM, Igor Vaynberg [EMAIL PROTECTED] wrote: see WICKET-1445. upgrade wicket to trunk and try again. -igor On Mon, Mar 24, 2008 at 3:15 PM, Scott Swank [EMAIL PROTECTED] wrote: We are trying to get clustering working with Wicket 1.3.2 (on JBoss 4.3.0) and we get the following exception when one node fails over to another node. Has anyone seen anything like this before? Any suggestions/guesses? Thank you, Scott 15:02:17,320 ERROR [RequestCycle] Could not deserialize object using `org.apache .wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory` object factory java.lang.RuntimeException: Could not deserialize object using `org.apache.wicke t.util.io.IObjectStreamFactory$DefaultObjectStreamFactory` object factory at org.apache.wicket.util.lang.Objects.byteArrayToObject(Objects.java:40 6) at org.apache.wicket.protocol.http.pagestore.AbstractPageStore.deseriali zePage(AbstractPageStore.java:228) at org.apache.wicket.protocol.http.pagestore.DiskPageStore.getPage(DiskP ageStore.java:706) at org.apache.wicket.protocol.http.pagestore.DiskPageStore.convertToPage (DiskPageStore.java:1218) at org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLe velCachePageMap.getLastPage(SecondLevelCacheSessionStore.java:228) at org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLe velCachePageMap.get(SecondLevelCacheSessionStore.java:296) at org.apache.wicket.Session.getPage(Session.java:751) at org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRender edPage(AbstractRequestCycleProcessor.java:448) at org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebR equestCycleProcessor.java:139) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1224) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1330) at org.apache.wicket.RequestCycle.request(RequestCycle.java:493) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java: 358) at org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.jav a:124) at javax.servlet.http.HttpServlet.service(HttpServlet.java:690) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:206) at com.vegas.ui.filter.CustomerFacingClientContextFilter.doFilter(Custom erFacingClientContextFilter.java:42) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:206) at com.vegas.ui.filter.HibernateFilter.doFilter(HibernateFilter.java:37) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:206) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFi lter.java:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV alve.java:230) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV alve.java:175) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Securit yAssociationValve.java:179) at org.jboss.web.tomcat.service.session.ClusteredSessionValve.invoke(Clu steredSessionValve.java:87) at org.jboss.web.tomcat.service.session.JvmRouteValve.invoke(JvmRouteVal ve.java:84) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv e.java:84) at
TextField returning a null
I've just realised that the database is getting filled with columns of empty strings which then don't cause the 'not null' test to trip. The culprit is the TextField returning an empty string rather than a null. I can see there are some special considerations for returning a null and I want to understand how they will effect me. However, I've tried TexField.setConvertEmptyInputStringToNull( true ) with no effect and using new TextField( id ) { public boolean isInputNullable() { regturn true; } }; also with no effect. I'm assuming I'm not the first person to see this effect and I guess it's lack of understanding rather than some implicit behaviour but I can't find anything guiding on the subject. In this case, the string has no special formatting, it just needs to be stored verbatim in the database but the application logic in the backend uses an empty string in a different way than a null string and, yes, maybe the database should also have a column check but it doesn't at present. Any pointers?
Sometimes get Session expired when submitting forms with IE
Hi, I've been experiencing issues when submitting forms using IE. I'm using Wicket with Jetty under Windows. Sometimes, when submitting a form the user sees a session expired page and loses his data. When testing this I set the session-timeout to 60 minutes and the problem appeared well before that (unfortunately I found no sure way to reproduce this, apparently it is due to imperfections in our corporate network) In the logs, There is the following trace : 2008-03-26 17:07:11.163::WARN: /myapp/ wicket.WicketRuntimeException: Redirect failed at wicket.protocol.http.WebResponse.redirect(WebResponse.java:209) at wicket.protocol.http.BufferedWebResponse.close(BufferedWebResponse.java:68) at wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:229) at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:367) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139) at org.mortbay.jetty.Server.handle(Server.java:285) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:502) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:821) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:513) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:208) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:378) at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:226) at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442) Caused by: org.mortbay.jetty.EofException at org.mortbay.jetty.HttpGenerator.flush(HttpGenerator.java:767) at org.mortbay.jetty.HttpGenerator.complete(HttpGenerator.java:655) at org.mortbay.jetty.HttpConnection.completeResponse(HttpConnection.java:592) at org.mortbay.jetty.Response.complete(Response.java:1074) at org.mortbay.jetty.Response.sendRedirect(Response.java:398) at wicket.protocol.http.WebResponse.redirect(WebResponse.java:203) ... 19 more Caused by: java.net.SocketException: Connection reset by peer: socket write error at java.net.SocketOutputStream.socketWrite0(Native Method) at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92) at java.net.SocketOutputStream.write(SocketOutputStream.java:136) at org.mortbay.io.ByteArrayBuffer.writeTo(ByteArrayBuffer.java:158) at org.mortbay.io.bio.StreamEndPoint.flush(StreamEndPoint.java:114) at org.mortbay.jetty.HttpGenerator.flush(HttpGenerator.java:695) ... 24 more My guess is that the BufferedWebResponse does too much in the close() method, and thus escapes the exception handling code normally done in Resource.respond(). Any hints on how I can avoid or fix this ? Thanks. -- View this message in context: http://www.nabble.com/Sometimes-get-%22Session-expired%22-when-submitting-forms-with-IE-tp16329201p16329201.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Sometimes get Session expired when submitting forms with IE
Caused by: org.mortbay.jetty.EofException that usually happens when someone presses the stop button in the browser/network connection fails before the request is finished... -igor On Thu, Mar 27, 2008 at 10:32 AM, vico [EMAIL PROTECTED] wrote: Hi, I've been experiencing issues when submitting forms using IE. I'm using Wicket with Jetty under Windows. Sometimes, when submitting a form the user sees a session expired page and loses his data. When testing this I set the session-timeout to 60 minutes and the problem appeared well before that (unfortunately I found no sure way to reproduce this, apparently it is due to imperfections in our corporate network) In the logs, There is the following trace : 2008-03-26 17:07:11.163::WARN: /myapp/ wicket.WicketRuntimeException: Redirect failed at wicket.protocol.http.WebResponse.redirect(WebResponse.java:209) at wicket.protocol.http.BufferedWebResponse.close(BufferedWebResponse.java:68) at wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:229) at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:367) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139) at org.mortbay.jetty.Server.handle(Server.java:285) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:502) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:821) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:513) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:208) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:378) at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:226) at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442) Caused by: org.mortbay.jetty.EofException at org.mortbay.jetty.HttpGenerator.flush(HttpGenerator.java:767) at org.mortbay.jetty.HttpGenerator.complete(HttpGenerator.java:655) at org.mortbay.jetty.HttpConnection.completeResponse(HttpConnection.java:592) at org.mortbay.jetty.Response.complete(Response.java:1074) at org.mortbay.jetty.Response.sendRedirect(Response.java:398) at wicket.protocol.http.WebResponse.redirect(WebResponse.java:203) ... 19 more Caused by: java.net.SocketException: Connection reset by peer: socket write error at java.net.SocketOutputStream.socketWrite0(Native Method) at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92) at java.net.SocketOutputStream.write(SocketOutputStream.java:136) at org.mortbay.io.ByteArrayBuffer.writeTo(ByteArrayBuffer.java:158) at org.mortbay.io.bio.StreamEndPoint.flush(StreamEndPoint.java:114) at org.mortbay.jetty.HttpGenerator.flush(HttpGenerator.java:695) ... 24 more My guess is that the BufferedWebResponse does too much in the close() method, and thus escapes the exception handling code normally done in Resource.respond(). Any hints on how I can avoid or fix this ? Thanks. -- View this message in context: http://www.nabble.com/Sometimes-get-%22Session-expired%22-when-submitting-forms-with-IE-tp16329201p16329201.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
warning: [deprecation] AuthenticatedWebSession(AuthenticatedWebApplication,Request)
Hi, I'm using Wicket 1.3.2, had a piece of code that read like this: public MySession(final AuthenticatedWebApplication application, final Request request) { super(application, request); } and was getting the following warning: warning: [deprecation] AuthenticatedWebSession(org.apache.wicket.authentication.AuthenticatedWebApplication,org.apache.wicket.Request) in org.apache.wicket.authentication.AuthenticatedWebSession has been deprecated so I tried to use the form of the constructor that takes only one argument - Request, like so: public ElectronicaSession(final AuthenticatedWebApplication application, final Request request) { super(request); } and now I get: org.apache.wicket.WicketRuntimeException: Unable to instantiate web session class my.package.MySession org.apache.wicket.authentication.AuthenticatedWebApplication.newSession(AuthenticatedWebApplication.java:120) org.apache.wicket.Session.findOrCreate(Session.java:228) org.apache.wicket.Session.findOrCreate(Session.java:211) org.apache.wicket.Session.get(Session.java:250) org.apache.wicket.Application$1.onInstantiation(Application.java:276) org.apache.wicket.Application.notifyComponentInstantiationListeners(Application.java:974) org.apache.wicket.Component.init(Component.java:866) org.apache.wicket.MarkupContainer.init(MarkupContainer.java:105) org.apache.wicket.Page.init(Page.java:236) org.apache.wicket.markup.html.WebPage.init(WebPage.java:184) org.apache.wicket.markup.html.pages.ExceptionErrorPage.init(ExceptionErrorPage.java:55) org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:163) org.apache.wicket.RequestCycle.step(RequestCycle.java:1280) org.apache.wicket.RequestCycle.steps(RequestCycle.java:1330) org.apache.wicket.RequestCycle.request(RequestCycle.java:493) org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:358) org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:194) How do I avoid both the warning and the error? Best regards, Johnny -- View this message in context: http://www.nabble.com/warning%3A--deprecation--AuthenticatedWebSession%28AuthenticatedWebApplication%2CRequest%29-tp16329498p16329498.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Adding new Link() to an img tag = weird default behavior
Hello, Yesterday I tried adding a new Link() to an img tag. I noticed that when you hover over the image the cursor doesn't change and the status bar doesn't say anything. I bet 9 times out of 10 you wouldn't want this behavior. I already fixed the cursor problem with CSS, how do I make the status bar display the right thing on hover? BTW, should I file this under a request for improvement? Thanks, Dan
Re: Adding new Link() to an img tag = weird default behavior
that's because Link only adds the onclick event handler for non anchor tags and browser only do the cursor and status bar thing for anchor tags by default. you already fixed the cursor issue and you can write text to the status bar via window.status = foo, although this doesn't work in IE7 and only somehow in opera and konqueror. i suggest you wrap the image with an anchor tag and attach the Link component to that. Gerolf On Thu, Mar 27, 2008 at 7:15 PM, Dan Kaplan [EMAIL PROTECTED] wrote: Hello, Yesterday I tried adding a new Link() to an img tag. I noticed that when you hover over the image the cursor doesn't change and the status bar doesn't say anything. I bet 9 times out of 10 you wouldn't want this behavior. I already fixed the cursor problem with CSS, how do I make the status bar display the right thing on hover? BTW, should I file this under a request for improvement? Thanks, Dan
RE: Adding new Link() to an img tag = weird default behavior
Ah, ok, thanks for that explanation. BTW, only recently have I started seriously using wicket (as in, every day for 4+ hours). Something that comes up time and time again is the need for a LinkLabelPanel. I find it very time consuming to add() to this in the code: a wicket:id=linkspan wicket:id=labellabel/span/a If I submitted a patch for a LinkLabelPanel would you guys consider checking it into core? Here's how I foresee the constructor: new LinkLabelPanel(String id, IModel hrefModel, IModel textModel); And then the html would just look like this: a wicket:id=linkLabelPanelThis will be replaced/a -Original Message- From: Gerolf Seitz [mailto:[EMAIL PROTECTED] Sent: Thursday, March 27, 2008 11:32 AM To: users@wicket.apache.org Subject: Re: Adding new Link() to an img tag = weird default behavior that's because Link only adds the onclick event handler for non anchor tags and browser only do the cursor and status bar thing for anchor tags by default. you already fixed the cursor issue and you can write text to the status bar via window.status = foo, although this doesn't work in IE7 and only somehow in opera and konqueror. i suggest you wrap the image with an anchor tag and attach the Link component to that. Gerolf On Thu, Mar 27, 2008 at 7:15 PM, Dan Kaplan [EMAIL PROTECTED] wrote: Hello, Yesterday I tried adding a new Link() to an img tag. I noticed that when you hover over the image the cursor doesn't change and the status bar doesn't say anything. I bet 9 times out of 10 you wouldn't want this behavior. I already fixed the cursor problem with CSS, how do I make the status bar display the right thing on hover? BTW, should I file this under a request for improvement? Thanks, Dan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: clustering failover error
what else did you use if you didnt use SLCS? Because if you use the HttpSessionStore then we dont do anything with serialization.. Thats all tomcat or app container itself johan On Thu, Mar 27, 2008 at 6:01 PM, Scott Swank [EMAIL PROTECTED] wrote: We just discovered that if we use SecondLevelCacheSessionStore the problem goes away. From there we determined that the setting Application.get().getPageSettings().setAutomaticMultiWindowSupport(false); is the lynch pin. We still don't know why this resolves the problem. - Scott On Tue, Mar 25, 2008 at 9:55 AM, Scott Swank [EMAIL PROTECTED] wrote: Thank you. We'll give that a try and let you know the results. On Mon, Mar 24, 2008 at 11:43 PM, Igor Vaynberg [EMAIL PROTECTED] wrote: see WICKET-1445. upgrade wicket to trunk and try again. -igor On Mon, Mar 24, 2008 at 3:15 PM, Scott Swank [EMAIL PROTECTED] wrote: We are trying to get clustering working with Wicket 1.3.2 (on JBoss 4.3.0) and we get the following exception when one node fails over to another node. Has anyone seen anything like this before? Any suggestions/guesses? Thank you, Scott 15:02:17,320 ERROR [RequestCycle] Could not deserialize object using `org.apache .wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory` object factory java.lang.RuntimeException: Could not deserialize object using `org.apache.wicke t.util.io.IObjectStreamFactory$DefaultObjectStreamFactory` object factory at org.apache.wicket.util.lang.Objects.byteArrayToObject( Objects.java:40 6) at org.apache.wicket.protocol.http.pagestore.AbstractPageStore.deseriali zePage(AbstractPageStore.java:228) at org.apache.wicket.protocol.http.pagestore.DiskPageStore.getPage(DiskP ageStore.java:706) at org.apache.wicket.protocol.http.pagestore.DiskPageStore.convertToPage (DiskPageStore.java:1218) at org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLe velCachePageMap.getLastPage(SecondLevelCacheSessionStore.java :228) at org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLe velCachePageMap.get(SecondLevelCacheSessionStore.java:296) at org.apache.wicket.Session.getPage(Session.java:751) at org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRender edPage(AbstractRequestCycleProcessor.java:448) at org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebR equestCycleProcessor.java:139) at org.apache.wicket.RequestCycle.step(RequestCycle.java :1224) at org.apache.wicket.RequestCycle.steps(RequestCycle.java :1330) at org.apache.wicket.RequestCycle.request( RequestCycle.java:493) at org.apache.wicket.protocol.http.WicketFilter.doGet( WicketFilter.java: 358) at org.apache.wicket.protocol.http.WicketServlet.doGet( WicketServlet.jav a:124) at javax.servlet.http.HttpServlet.service(HttpServlet.java :690) at javax.servlet.http.HttpServlet.service(HttpServlet.java :803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:206) at com.vegas.ui.filter.CustomerFacingClientContextFilter.doFilter(Custom erFacingClientContextFilter.java:42) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:206) at com.vegas.ui.filter.HibernateFilter.doFilter( HibernateFilter.java:37) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:206) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter (ReplyHeaderFi lter.java:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke (StandardWrapperV alve.java:230) at org.apache.catalina.core.StandardContextValve.invoke (StandardContextV alve.java:175) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Securit yAssociationValve.java:179) at
Re: ListView not updating when changed
Can I change my popup window from a standard popup window to a modal window. would that allow me to do what I am wanting to do. All I want to do is have a main page. on that main page click a link. the link will bring up a popup or a modal window, or a hidden div or what ever that will allow me to enter information into a form. when the submit button is clicked the popup will disappear and the information entered will be displayed on the main page in a table form. After I get that working I want to create a link that will allow me to edit that information and I also want a button to delete that information. I have all of this working with the way I am doing it currently but I do not like the timer because it will refresh the parent page while i have the popup window up. Thanks T igor.vaynberg wrote: i suppose you can try issuing a window.opener.wicket.ajax.get request to trigger an ajax request, but i am not sure how and if xmlhttprequest works across windows... -igor On Thu, Mar 27, 2008 at 7:56 AM, taygolf [EMAIL PROTECTED] wrote: I would have thought there was another way to do this. I can not refresh the whole page because I have other textfields and I will lose the data entered in them on a page refresh. I just want to refresh the markupcontainer that the ListView is in. I guess I need to look into change my popup class from a popup page to a div. Are there any other suggestions? Thanks T igor.vaynberg wrote: since its in a different page there isnt much you can do except something like outputting head script window.opener.refresh(); window.close(); /script /head after the form has been submitted -igor On Wed, Mar 26, 2008 at 6:39 PM, taygolf [EMAIL PROTECTED] wrote: The popup is a different page. Just a simple page with 2 textfields and a few check boxes and a submit button and I submit it via a regular post right now but I can change that to ajax if that is what I need to do. igor.vaynberg wrote: your popup is a different page or a div inside the current page? do you submit the form in it via ajax or a regular post? -igor On Wed, Mar 26, 2008 at 3:00 PM, taygolf [EMAIL PROTECTED] wrote: THanks for explaining it to me igor. I have been doing some searching about my other problem. Again my new problem is that I really do not want this listview to refresh on a timer. Here is the process of my app. The user can click on a link that says add member. that link inturn creates a popup page that has a form and some textfields. When the form is submitted I update the Session List to add that member and the popup is closed. Then when the timer tells the listview to refresh it gets the new informationfrom the session list the user just entered and updates the listview. Instead of having the listview refresh on a timer I would like for it to refresh when the popup window form is submited. How would I go about doing this? I have done some looking and I think maybe instead of using a listview I should be using a refreshingview. I made this change but it still does not solve my problem. Can I refresh the markup container from the popup? if so how? I was thinking maybe a AjaxSubmit button on the popup page but I am not sure. Anyway a little help with this would be awesome Thanks T igor.vaynberg wrote: On Wed, Mar 26, 2008 at 6:57 AM, taygolf [EMAIL PROTECTED] wrote: that worked prefect Thanks for the help. I decided to go with the Model example. I do have a few more questions though. First why cant I use a PropertyModel instead of a AbstractReadOnlyModel. I tried to do this: New Label(kmname, new PropertyModel(kmd, name); because you are still caching the instance of kmd in the model by passing it directly, instead new PropertyModel(item.getModel(), name); that way the models are chained properly -igor but that did not work. I am guessing that getObject has to be called or the ListView will not get updated but that is just my guess. Also right now I am using AjaxSelfUpdatingTimerBehavior(Duration.seconds(5)) to get the ListView to updated but I would like to do this from my popup instead. So there is a link that will create a popup and that popup adds info to the session variable that the ListView uses. When the submit button is clicked on that popup I would like to refresh the ListView
Re: ListView not updating when changed
yes, that way in modal window's close callback you have access to the ajax request target -igor On Thu, Mar 27, 2008 at 1:39 PM, taygolf [EMAIL PROTECTED] wrote: Can I change my popup window from a standard popup window to a modal window. would that allow me to do what I am wanting to do. All I want to do is have a main page. on that main page click a link. the link will bring up a popup or a modal window, or a hidden div or what ever that will allow me to enter information into a form. when the submit button is clicked the popup will disappear and the information entered will be displayed on the main page in a table form. After I get that working I want to create a link that will allow me to edit that information and I also want a button to delete that information. I have all of this working with the way I am doing it currently but I do not like the timer because it will refresh the parent page while i have the popup window up. Thanks T igor.vaynberg wrote: i suppose you can try issuing a window.opener.wicket.ajax.get request to trigger an ajax request, but i am not sure how and if xmlhttprequest works across windows... -igor On Thu, Mar 27, 2008 at 7:56 AM, taygolf [EMAIL PROTECTED] wrote: I would have thought there was another way to do this. I can not refresh the whole page because I have other textfields and I will lose the data entered in them on a page refresh. I just want to refresh the markupcontainer that the ListView is in. I guess I need to look into change my popup class from a popup page to a div. Are there any other suggestions? Thanks T igor.vaynberg wrote: since its in a different page there isnt much you can do except something like outputting head script window.opener.refresh(); window.close(); /script /head after the form has been submitted -igor On Wed, Mar 26, 2008 at 6:39 PM, taygolf [EMAIL PROTECTED] wrote: The popup is a different page. Just a simple page with 2 textfields and a few check boxes and a submit button and I submit it via a regular post right now but I can change that to ajax if that is what I need to do. igor.vaynberg wrote: your popup is a different page or a div inside the current page? do you submit the form in it via ajax or a regular post? -igor On Wed, Mar 26, 2008 at 3:00 PM, taygolf [EMAIL PROTECTED] wrote: THanks for explaining it to me igor. I have been doing some searching about my other problem. Again my new problem is that I really do not want this listview to refresh on a timer. Here is the process of my app. The user can click on a link that says add member. that link inturn creates a popup page that has a form and some textfields. When the form is submitted I update the Session List to add that member and the popup is closed. Then when the timer tells the listview to refresh it gets the new informationfrom the session list the user just entered and updates the listview. Instead of having the listview refresh on a timer I would like for it to refresh when the popup window form is submited. How would I go about doing this? I have done some looking and I think maybe instead of using a listview I should be using a refreshingview. I made this change but it still does not solve my problem. Can I refresh the markup container from the popup? if so how? I was thinking maybe a AjaxSubmit button on the popup page but I am not sure. Anyway a little help with this would be awesome Thanks T igor.vaynberg wrote: On Wed, Mar 26, 2008 at 6:57 AM, taygolf [EMAIL PROTECTED] wrote: that worked prefect Thanks for the help. I decided to go with the Model example. I do have a few more questions though. First why cant I use a PropertyModel instead of a AbstractReadOnlyModel. I tried to do this: New Label(kmname, new PropertyModel(kmd, name); because you are still caching the instance of kmd in the model by passing it directly, instead new PropertyModel(item.getModel(), name); that way the models are chained properly -igor but that did not work. I am guessing that getObject has to be called
Re: Copenhagen Meetup
Im sad to say this, but I cant change the plans now, it's just to close to schedule:/ So see you next time Matej:) And for the others, I do feel that we should hold a wug within the next 14. days or so... Nino Saturnino Martinez Vazquez Wael wrote: I am interested but I cant, I got the wonderfull choir of picking up my daughter from daycare. Since my wife has an appointment. But since it would be great to meet I believe we could shuffle this around, so Im up for it:) We could even have mini WUG if we wanted to.. What do the others say? Matej Knopp wrote: Well, since I'm leaving the day after tomorrow, we could could maybe have a beer tomorrow somewhere if any of the Copenhagen Wicket users are interested. Flemming? Frank? -Matej On Thu, Mar 27, 2008 at 9:58 AM, Nino Saturnino Martinez Vazquez Wael [EMAIL PROTECTED] wrote: Only problem is, that there are no days left. Since I cant today or tommorow:/ This really sucks! So I propose that we plan a WUG within the next two weeks instead? regards Nino Nino Saturnino Martinez Vazquez Wael wrote: Yup. Jayway will be happy to sponsor/provide snacks and shelter for the meetup:) Flemming Boller wrote: Hi About the copenhagen meetup, should we arrange something around the 25 - 28 march? At my workplace we are having a wicket course with one of the developers. Perhabs we can persuade him to participate? Nino, will you offer for the meeting ? /Flemming -- -Wicket for love Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -Wicket for love Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Sort/Rank List Component Suggestion
Hi, I'm wondering if there's a Wicket component that allows items in a single list to be re-ordered. The extensions Palette component has what I'm looking for as part of it. The selected list allows you to order the items, but I don't want the available list and have to move items from it to selected to reorder. Does anyone know of such a component? Thanks in advance, Shelli - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Adding JS onclick behavior to button?
I guess I could just do something like this: button.add(new AttributeModifier(onClick, return jsMethod();)); but I remember there's a standard way of doing that... Michael
how to resolve jsessionid for the first time in the url
Hi, when i go to my homepage for the first time, after clearing caching in the browser, clicking on the login form I see http://localhost:8080/;jsessionid=905AA4A0D7E4441514ED2588160A04E5?wicket:interface=:0:loginform::IFormSubmitListener:: After the first time and go back to home page again it is resolved to http://localhost:8080/home?wicket:interface=:1:loginform::IFormSubmitListener:: so how to avoid the jessionid in the url for the first time Penn -- View this message in context: http://www.nabble.com/how-to-resolve-jsessionid-for-the-first-time-in-the-url-tp16340508p16340508.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Adding JS onclick behavior to button?
OR, even simpler via a wicket:message: button wicket:id=fooButton wicket:message=onclick:fooMethod What I don't like about this is that the JS call would actually wind up in my properties file. -Original Message- From: Michael Mehrle [mailto:[EMAIL PROTECTED] Sent: Thursday, March 27, 2008 3:29 PM To: users@wicket.apache.org Subject: Adding JS onclick behavior to button? I guess I could just do something like this: button.add(new AttributeModifier(onClick, return jsMethod();)); but I remember there's a standard way of doing that... Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to resolve jsessionid for the first time in the url
That's a feature of the application server you're using. It has to put that on there initially because it doesn't know if the browser supports cookies or not. When a subsequent request comes in with the jsessionid cookie, it no longer needs to append it to the URLs. Check the docs for HttpServletResponse.encodeURL(): http://java.sun.com/javaee/5/docs/api/javax/servlet/http/HttpServletResponse.html#encodeURL(java.lang.String) On Thu, Mar 27, 2008 at 7:05 PM, Penn [EMAIL PROTECTED] wrote: Hi, when i go to my homepage for the first time, after clearing caching in the browser, clicking on the login form I see http://localhost:8080/;jsessionid=905AA4A0D7E4441514ED2588160A04E5?wicket:interface=:0:loginform::IFormSubmitListener:: After the first time and go back to home page again it is resolved to http://localhost:8080/home?wicket:interface=:1:loginform::IFormSubmitListener:: so how to avoid the jessionid in the url for the first time Penn -- View this message in context: http://www.nabble.com/how-to-resolve-jsessionid-for-the-first-time-in-the-url-tp16340508p16340508.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to resolve jsessionid for the first time in the url
On Thu, 2008-03-27 at 16:05 -0700, Penn wrote: Hi, when i go to my homepage for the first time, after clearing caching in the browser, clicking on the login form I see http://localhost:8080/;jsessionid=905AA4A0D7E4441514ED2588160A04E5?wicket:interface=:0:loginform::IFormSubmitListener:: After the first time and go back to home page again it is resolved to http://localhost:8080/home?wicket:interface=:1:loginform::IFormSubmitListener:: so how to avoid the jessionid in the url for the first time James was too fast, but... Until the cookie is set it has to put it on the URL... (From what I've observed from tomcat.. ) On the other hand I think other app containers do a redirect to test this and so it's a bit more transparent.) ymmv so deploy under another app container (jetty for example) ./C - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Adding JS onclick behavior to button?
override oncomponenttag and do it there -igor On Thu, Mar 27, 2008 at 4:10 PM, Michael Mehrle [EMAIL PROTECTED] wrote: OR, even simpler via a wicket:message: button wicket:id=fooButton wicket:message=onclick:fooMethod What I don't like about this is that the JS call would actually wind up in my properties file. -Original Message- From: Michael Mehrle [mailto:[EMAIL PROTECTED] Sent: Thursday, March 27, 2008 3:29 PM To: users@wicket.apache.org Subject: Adding JS onclick behavior to button? I guess I could just do something like this: button.add(new AttributeModifier(onClick, return jsMethod();)); but I remember there's a standard way of doing that... Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Any example of how to use PageableListView and PagingNavigation, PagingNavigator?
I need to display a list of numbers of 1,2,3,4 ... to n, 'n' being some big number. I want to display the number 20 number per page and have some navigation bar to page through the numbers.
Re: clustering failover error
So that at least eliminates the possibility that cglib is somehow involved. On Thu, Mar 27, 2008 at 5:33 PM, Scott Swank [EMAIL PROTECTED] wrote: Here's a simple example that reproduces the problem on fail-over, also for 1.2. All we really need is to have something in the session and we get the error. On Thu, Mar 27, 2008 at 12:18 PM, Johan Compagner [EMAIL PROTECTED] wrote: what else did you use if you didnt use SLCS? Because if you use the HttpSessionStore then we dont do anything with serialization.. Thats all tomcat or app container itself johan On Thu, Mar 27, 2008 at 6:01 PM, Scott Swank [EMAIL PROTECTED] wrote: We just discovered that if we use SecondLevelCacheSessionStore the problem goes away. From there we determined that the setting Application.get().getPageSettings().setAutomaticMultiWindowSupport(false); is the lynch pin. We still don't know why this resolves the problem. - Scott On Tue, Mar 25, 2008 at 9:55 AM, Scott Swank [EMAIL PROTECTED] wrote: Thank you. We'll give that a try and let you know the results. On Mon, Mar 24, 2008 at 11:43 PM, Igor Vaynberg [EMAIL PROTECTED] wrote: see WICKET-1445. upgrade wicket to trunk and try again. -igor On Mon, Mar 24, 2008 at 3:15 PM, Scott Swank [EMAIL PROTECTED] wrote: We are trying to get clustering working with Wicket 1.3.2 (on JBoss 4.3.0) and we get the following exception when one node fails over to another node. Has anyone seen anything like this before? Any suggestions/guesses? Thank you, Scott 15:02:17,320 ERROR [RequestCycle] Could not deserialize object using `org.apache .wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory` object factory java.lang.RuntimeException: Could not deserialize object using `org.apache.wicke t.util.io.IObjectStreamFactory$DefaultObjectStreamFactory` object factory at org.apache.wicket.util.lang.Objects.byteArrayToObject( Objects.java:40 6) at org.apache.wicket.protocol.http.pagestore.AbstractPageStore.deseriali zePage(AbstractPageStore.java:228) at org.apache.wicket.protocol.http.pagestore.DiskPageStore.getPage(DiskP ageStore.java:706) at org.apache.wicket.protocol.http.pagestore.DiskPageStore.convertToPage (DiskPageStore.java:1218) at org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLe velCachePageMap.getLastPage(SecondLevelCacheSessionStore.java :228) at org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLe velCachePageMap.get(SecondLevelCacheSessionStore.java:296) at org.apache.wicket.Session.getPage(Session.java:751) at org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRender edPage(AbstractRequestCycleProcessor.java:448) at org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebR equestCycleProcessor.java:139) at org.apache.wicket.RequestCycle.step(RequestCycle.java :1224) at org.apache.wicket.RequestCycle.steps(RequestCycle.java :1330) at org.apache.wicket.RequestCycle.request( RequestCycle.java:493) at org.apache.wicket.protocol.http.WicketFilter.doGet( WicketFilter.java: 358) at org.apache.wicket.protocol.http.WicketServlet.doGet( WicketServlet.jav a:124) at javax.servlet.http.HttpServlet.service(HttpServlet.java :690) at javax.servlet.http.HttpServlet.service(HttpServlet.java :803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:206) at com.vegas.ui.filter.CustomerFacingClientContextFilter.doFilter(Custom erFacingClientContextFilter.java:42) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:206) at com.vegas.ui.filter.HibernateFilter.doFilter( HibernateFilter.java:37) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:235)
Clearing Form inputs
Hello, My Problem is very simple but it gives me headache. I use form.clearInput(); inside the IndicatingAjaxButton onSubmit but it did not clears the inputs from the textfields.Any idea how to do this?im using wicket 1.3.1. Thanks a lot. Cheers -- View this message in context: http://www.nabble.com/Clearing-Form-inputs-tp16343705p16343705.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: clustering failover error
Glad it works for you. Tried what you said below, but doesn't solve my problem. http://www.nabble.com/Finding-the-cause-of-an-Exception-td16088387.html#a16112402 On Thu, 2008-03-27 at 10:01 -0700, Scott Swank wrote: We just discovered that if we use SecondLevelCacheSessionStore the problem goes away. From there we determined that the setting Application.get().getPageSettings().setAutomaticMultiWindowSupport(false); is the lynch pin. We still don't know why this resolves the problem. - Scott On Tue, Mar 25, 2008 at 9:55 AM, Scott Swank [EMAIL PROTECTED] wrote: Thank you. We'll give that a try and let you know the results. On Mon, Mar 24, 2008 at 11:43 PM, Igor Vaynberg [EMAIL PROTECTED] wrote: see WICKET-1445. upgrade wicket to trunk and try again. -igor On Mon, Mar 24, 2008 at 3:15 PM, Scott Swank [EMAIL PROTECTED] wrote: We are trying to get clustering working with Wicket 1.3.2 (on JBoss 4.3.0) and we get the following exception when one node fails over to another node. Has anyone seen anything like this before? Any suggestions/guesses? Thank you, Scott 15:02:17,320 ERROR [RequestCycle] Could not deserialize object using `org.apache .wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory` object factory java.lang.RuntimeException: Could not deserialize object using `org.apache.wicke t.util.io.IObjectStreamFactory$DefaultObjectStreamFactory` object factory at org.apache.wicket.util.lang.Objects.byteArrayToObject(Objects.java:40 6) at org.apache.wicket.protocol.http.pagestore.AbstractPageStore.deseriali zePage(AbstractPageStore.java:228) at org.apache.wicket.protocol.http.pagestore.DiskPageStore.getPage(DiskP ageStore.java:706) at org.apache.wicket.protocol.http.pagestore.DiskPageStore.convertToPage (DiskPageStore.java:1218) at org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLe velCachePageMap.getLastPage(SecondLevelCacheSessionStore.java:228) at org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLe velCachePageMap.get(SecondLevelCacheSessionStore.java:296) at org.apache.wicket.Session.getPage(Session.java:751) at org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRender edPage(AbstractRequestCycleProcessor.java:448) at org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebR equestCycleProcessor.java:139) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1224) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1330) at org.apache.wicket.RequestCycle.request(RequestCycle.java:493) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java: 358) at org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.jav a:124) at javax.servlet.http.HttpServlet.service(HttpServlet.java:690) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:206) at com.vegas.ui.filter.CustomerFacingClientContextFilter.doFilter(Custom erFacingClientContextFilter.java:42) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:206) at com.vegas.ui.filter.HibernateFilter.doFilter(HibernateFilter.java:37) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:206) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFi lter.java:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV alve.java:230) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV alve.java:175) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Securit yAssociationValve.java:179) at
Re: clustering failover error
My e-mail with attached an attached test case jar didn't go through. With the following simple application page we get the exception on failover. WicketTestApplication.java --- package com.vegas.wicket_test; import org.apache.wicket.protocol.http.HttpSessionStore; import org.apache.wicket.protocol.http.WebApplication; import org.apache.wicket.session.ISessionStore; public class WicketTestApplication extends WebApplication { public WicketTestApplication() { super(); } @Override public Class getHomePage() { return TestPage.class; } @Override protected ISessionStore newSessionStore() { return new HttpSessionStore(this); } @Override protected void init() { super.init(); } } TestPage.java --- package com.vegas.wicket_test; import org.apache.wicket.markup.html.WebPage; import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.markup.html.link.Link; import org.apache.wicket.model.PropertyModel; public class TestPage extends WebPage { private static final long serialVersionUID = 1L; private String stuff = ; public TestPage() { System.err.println(HERE); add(new Link(testLink) { private static final long serialVersionUID = 1L; @Override public void onClick() { stuff = saved stuff; } }); add(new Label(stuffTxt, new PropertyModel(this, stuff))); } public String getStuff() { return stuff; } } TestPage.html --- html body div wicket:id=stuffTxt/div a href=# wicket:id=testLinkClick this/a /body /html On Thu, Mar 27, 2008 at 6:10 PM, David Leangen [EMAIL PROTECTED] wrote: Glad it works for you. Tried what you said below, but doesn't solve my problem. http://www.nabble.com/Finding-the-cause-of-an-Exception-td16088387.html#a16112402 On Thu, 2008-03-27 at 10:01 -0700, Scott Swank wrote: We just discovered that if we use SecondLevelCacheSessionStore the problem goes away. From there we determined that the setting Application.get().getPageSettings().setAutomaticMultiWindowSupport(false); is the lynch pin. We still don't know why this resolves the problem. - Scott On Tue, Mar 25, 2008 at 9:55 AM, Scott Swank [EMAIL PROTECTED] wrote: Thank you. We'll give that a try and let you know the results. On Mon, Mar 24, 2008 at 11:43 PM, Igor Vaynberg [EMAIL PROTECTED] wrote: see WICKET-1445. upgrade wicket to trunk and try again. -igor On Mon, Mar 24, 2008 at 3:15 PM, Scott Swank [EMAIL PROTECTED] wrote: We are trying to get clustering working with Wicket 1.3.2 (on JBoss 4.3.0) and we get the following exception when one node fails over to another node. Has anyone seen anything like this before? Any suggestions/guesses? Thank you, Scott 15:02:17,320 ERROR [RequestCycle] Could not deserialize object using `org.apache .wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory` object factory java.lang.RuntimeException: Could not deserialize object using `org.apache.wicke t.util.io.IObjectStreamFactory$DefaultObjectStreamFactory` object factory at org.apache.wicket.util.lang.Objects.byteArrayToObject(Objects.java:40 6) at org.apache.wicket.protocol.http.pagestore.AbstractPageStore.deseriali zePage(AbstractPageStore.java:228) at org.apache.wicket.protocol.http.pagestore.DiskPageStore.getPage(DiskP ageStore.java:706) at org.apache.wicket.protocol.http.pagestore.DiskPageStore.convertToPage (DiskPageStore.java:1218) at org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLe velCachePageMap.getLastPage(SecondLevelCacheSessionStore.java:228) at org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLe velCachePageMap.get(SecondLevelCacheSessionStore.java:296) at org.apache.wicket.Session.getPage(Session.java:751) at org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRender edPage(AbstractRequestCycleProcessor.java:448) at org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebR equestCycleProcessor.java:139) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1224) at
Re: Place HTML files inside one 'html' folder relative to java file
Hi Igor, Thank you for your answer although I'm afraid I have no idea on how to do it... so I will just leave as it is. I thought that it was easier! Thanks, Oskar igor.vaynberg wrote: you need to implement your own IResourceStreamLocator and register it in resource settings -igor On Thu, Mar 27, 2008 at 12:37 AM, Toscano [EMAIL PROTECTED] wrote: Hello, I have been looking at messages, examples and wiki, but I couldn't make this to work... I have one file: home.java, and around 26 language dependant html files (home.html, home_es.html, home_ja.html...). What I want to do is create a folder called 'html' and put the html files there. For example: Application/Registration/Register.java Application/Registration/html/Register.html Application/Registration/html/Register_es.html ... I tried this solution: http://cwiki.apache.org/confluence/display/WICKET/Control+where+HTML+files+are+loaded+from And added /html as resourceFinder, but still is not working. Any ideas? Thank you so much for your time and help, Oskar -- View this message in context: http://www.nabble.com/Place-HTML-files-inside-one-%27html%27-folder-relative-to-java-file-tp16323316p16323316.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Place-HTML-files-inside-one-%27html%27-folder-relative-to-java-file-tp16323316p16343707.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Place HTML files inside one 'html' folder relative to java file
you know, i've kindof wanted this feature for quite a while. does anyone else out there care? we could maybe add it to the wish list. i don't think it would add anything to the API. the default markup location mechanism would just search a subfolder named after the markup type. might be nice to do the same thing with properties so we could put all those Application_xx.properties files in a folder. jon Toscano wrote: Hello, I have been looking at messages, examples and wiki, but I couldn't make this to work... I have one file: home.java, and around 26 language dependant html files (home.html, home_es.html, home_ja.html...). What I want to do is create a folder called 'html' and put the html files there. For example: Application/Registration/Register.java Application/Registration/html/Register.html Application/Registration/html/Register_es.html ... I tried this solution: http://cwiki.apache.org/confluence/display/WICKET/Control+where+HTML+files+are+loaded+from And added /html as resourceFinder, but still is not working. Any ideas? Thank you so much for your time and help, Oskar -- View this message in context: http://www.nabble.com/Place-HTML-files-inside-one-%27html%27-folder-relative-to-java-file-tp16323316p16344153.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Clearing Form inputs
you have to clear the model also -igor On Thu, Mar 27, 2008 at 6:06 PM, freak182 [EMAIL PROTECTED] wrote: Hello, My Problem is very simple but it gives me headache. I use form.clearInput(); inside the IndicatingAjaxButton onSubmit but it did not clears the inputs from the textfields.Any idea how to do this?im using wicket 1.3.1. Thanks a lot. Cheers -- View this message in context: http://www.nabble.com/Clearing-Form-inputs-tp16343705p16343705.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Place HTML files inside one 'html' folder relative to java file
On Thu, Mar 27, 2008 at 6:16 PM, Toscano [EMAIL PROTECTED] wrote: Hi Igor, Thank you for your answer although I'm afraid I have no idea on how to do it... so I will just leave as it is. I thought that it was easier! how much easier can it be? you implement a simple interface and register it with resource settings... -igor Thanks, Oskar igor.vaynberg wrote: you need to implement your own IResourceStreamLocator and register it in resource settings -igor On Thu, Mar 27, 2008 at 12:37 AM, Toscano [EMAIL PROTECTED] wrote: Hello, I have been looking at messages, examples and wiki, but I couldn't make this to work... I have one file: home.java, and around 26 language dependant html files (home.html, home_es.html, home_ja.html...). What I want to do is create a folder called 'html' and put the html files there. For example: Application/Registration/Register.java Application/Registration/html/Register.html Application/Registration/html/Register_es.html ... I tried this solution: http://cwiki.apache.org/confluence/display/WICKET/Control+where+HTML+files+are+loaded+from And added /html as resourceFinder, but still is not working. Any ideas? Thank you so much for your time and help, Oskar -- View this message in context: http://www.nabble.com/Place-HTML-files-inside-one-%27html%27-folder-relative-to-java-file-tp16323316p16323316.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Place-HTML-files-inside-one-%27html%27-folder-relative-to-java-file-tp16323316p16343707.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Place HTML files inside one 'html' folder relative to java file
why would it change the api? write the iresourcestreamlocator and add it to our compound one... -igor On Thu, Mar 27, 2008 at 6:45 PM, Jonathan Locke [EMAIL PROTECTED] wrote: you know, i've kindof wanted this feature for quite a while. does anyone else out there care? we could maybe add it to the wish list. i don't think it would add anything to the API. the default markup location mechanism would just search a subfolder named after the markup type. might be nice to do the same thing with properties so we could put all those Application_xx.properties files in a folder. jon Toscano wrote: Hello, I have been looking at messages, examples and wiki, but I couldn't make this to work... I have one file: home.java, and around 26 language dependant html files (home.html, home_es.html, home_ja.html...). What I want to do is create a folder called 'html' and put the html files there. For example: Application/Registration/Register.java Application/Registration/html/Register.html Application/Registration/html/Register_es.html ... I tried this solution: http://cwiki.apache.org/confluence/display/WICKET/Control+where+HTML+files+are+loaded+from And added /html as resourceFinder, but still is not working. Any ideas? Thank you so much for your time and help, Oskar -- View this message in context: http://www.nabble.com/Place-HTML-files-inside-one-%27html%27-folder-relative-to-java-file-tp16323316p16344153.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Place HTML files inside one 'html' folder relative to java file
of course. i'm just saying this could be in core rather than having end-users implement it. it seems like a very reasonable pattern to add in wicket 1.5. igor.vaynberg wrote: why would it change the api? write the iresourcestreamlocator and add it to our compound one... -igor On Thu, Mar 27, 2008 at 6:45 PM, Jonathan Locke [EMAIL PROTECTED] wrote: you know, i've kindof wanted this feature for quite a while. does anyone else out there care? we could maybe add it to the wish list. i don't think it would add anything to the API. the default markup location mechanism would just search a subfolder named after the markup type. might be nice to do the same thing with properties so we could put all those Application_xx.properties files in a folder. jon Toscano wrote: Hello, I have been looking at messages, examples and wiki, but I couldn't make this to work... I have one file: home.java, and around 26 language dependant html files (home.html, home_es.html, home_ja.html...). What I want to do is create a folder called 'html' and put the html files there. For example: Application/Registration/Register.java Application/Registration/html/Register.html Application/Registration/html/Register_es.html ... I tried this solution: http://cwiki.apache.org/confluence/display/WICKET/Control+where+HTML+files+are+loaded+from And added /html as resourceFinder, but still is not working. Any ideas? Thank you so much for your time and help, Oskar -- View this message in context: http://www.nabble.com/Place-HTML-files-inside-one-%27html%27-folder-relative-to-java-file-tp16323316p16344153.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Place-HTML-files-inside-one-%27html%27-folder-relative-to-java-file-tp16323316p16345103.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to resolve jsessionid for the first time in the url
thanks James, what i am trying to do is, first time i go to home page it is fine, I have a login form. If I enter a correct username/password i login, that's fine. If user just clicks submit button on the login form without any data, it remains on the same page. that is fine but the url i get it is http://localhost:8080/;jsessionid=905AA4A0D7E4441514ED2588160A04E5?wicket:interface=:0:loginform::IFormSubmitListener:: this messes up the other content on the page. i tried something like this getResponse().encodeURL(((WebRequest)RequestCycle.get().getRequest()).getHttpServletRequest().getRequestURI()); it did't work. I am using tomcat 6, wicket 3.1. is there a anyother way in wicket to do this. this problem only in firefox not in safari. jwcarman wrote: That's a feature of the application server you're using. It has to put that on there initially because it doesn't know if the browser supports cookies or not. When a subsequent request comes in with the jsessionid cookie, it no longer needs to append it to the URLs. Check the docs for HttpServletResponse.encodeURL(): http://java.sun.com/javaee/5/docs/api/javax/servlet/http/HttpServletResponse.html#encodeURL(java.lang.String) On Thu, Mar 27, 2008 at 7:05 PM, Penn [EMAIL PROTECTED] wrote: Hi, when i go to my homepage for the first time, after clearing caching in the browser, clicking on the login form I see http://localhost:8080/;jsessionid=905AA4A0D7E4441514ED2588160A04E5?wicket:interface=:0:loginform::IFormSubmitListener:: After the first time and go back to home page again it is resolved to http://localhost:8080/home?wicket:interface=:1:loginform::IFormSubmitListener:: so how to avoid the jessionid in the url for the first time Penn -- View this message in context: http://www.nabble.com/how-to-resolve-jsessionid-for-the-first-time-in-the-url-tp16340508p16340508.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/how-to-resolve-jsessionid-for-the-first-time-in-the-url-tp16340508p16345239.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: bypass required field during form processing
You could use onchange events to attach ajax behavior that changes the required fields? ** Martin 2008/3/28, freak182 [EMAIL PROTECTED]: Hello, I have a problem about bypassing some textfields during form process.I know how bypass form processing through adding a method to button.setDefaultFormProcessing(false);. Now my problem is to bypass only 1 or 3 requiredtextfields during form processing because what im concerned is only the value of radiogroup attach to the form...e.g.. i have to REMOVE only the radio button which is selected in the form, thats means no more inputs needed.Of course, when i have to add items in listview i should validate if there is value in textfield which required...Thanks a lot..Cheers. -- View this message in context: http://www.nabble.com/bypass-required-field-during-form-processing-tp16345749p16345749.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: bypass required field during form processing
Ofcourse this does not work if javascript is disabled. I wonder if it is possible to switch the required fields in a validator (one which can be configured to run before the required checks). ** Martin 2008/3/28, Martin Makundi [EMAIL PROTECTED]: You could use onchange events to attach ajax behavior that changes the required fields? ** Martin 2008/3/28, freak182 [EMAIL PROTECTED]: Hello, I have a problem about bypassing some textfields during form process.I know how bypass form processing through adding a method to button.setDefaultFormProcessing(false);. Now my problem is to bypass only 1 or 3 requiredtextfields during form processing because what im concerned is only the value of radiogroup attach to the form...e.g.. i have to REMOVE only the radio button which is selected in the form, thats means no more inputs needed.Of course, when i have to add items in listview i should validate if there is value in textfield which required...Thanks a lot..Cheers. -- View this message in context: http://www.nabble.com/bypass-required-field-during-form-processing-tp16345749p16345749.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: bypass required field during form processing
Nice idea, but i dont know how to implement it. Validator or Behavior? any codes..thanks a lot..cheers Martin Makundi wrote: Ofcourse this does not work if javascript is disabled. I wonder if it is possible to switch the required fields in a validator (one which can be configured to run before the required checks). ** Martin 2008/3/28, Martin Makundi [EMAIL PROTECTED]: You could use onchange events to attach ajax behavior that changes the required fields? ** Martin 2008/3/28, freak182 [EMAIL PROTECTED]: Hello, I have a problem about bypassing some textfields during form process.I know how bypass form processing through adding a method to button.setDefaultFormProcessing(false);. Now my problem is to bypass only 1 or 3 requiredtextfields during form processing because what im concerned is only the value of radiogroup attach to the form...e.g.. i have to REMOVE only the radio button which is selected in the form, thats means no more inputs needed.Of course, when i have to add items in listview i should validate if there is value in textfield which required...Thanks a lot..Cheers. -- View this message in context: http://www.nabble.com/bypass-required-field-during-form-processing-tp16345749p16345749.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/bypass-required-field-during-form-processing-tp16345749p16346215.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: bypass required field during form processing
add(new RadioGroup(...) { protected wantOnSelectionChangedNotifications() { return true; }} will make it invoke RadioGroup.onSelectionChanged anytime a selection changes -igor On Thu, Mar 27, 2008 at 10:48 PM, freak182 [EMAIL PROTECTED] wrote: Nice idea, but i dont know how to implement it. Validator or Behavior? any codes..thanks a lot..cheers Martin Makundi wrote: Ofcourse this does not work if javascript is disabled. I wonder if it is possible to switch the required fields in a validator (one which can be configured to run before the required checks). ** Martin 2008/3/28, Martin Makundi [EMAIL PROTECTED]: You could use onchange events to attach ajax behavior that changes the required fields? ** Martin 2008/3/28, freak182 [EMAIL PROTECTED]: Hello, I have a problem about bypassing some textfields during form process.I know how bypass form processing through adding a method to button.setDefaultFormProcessing(false);. Now my problem is to bypass only 1 or 3 requiredtextfields during form processing because what im concerned is only the value of radiogroup attach to the form...e.g.. i have to REMOVE only the radio button which is selected in the form, thats means no more inputs needed.Of course, when i have to add items in listview i should validate if there is value in textfield which required...Thanks a lot..Cheers. -- View this message in context: http://www.nabble.com/bypass-required-field-during-form-processing-tp16345749p16345749.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/bypass-required-field-during-form-processing-tp16345749p16346215.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]