Re: Handling Ajax session expired
Hi! What is the best way to change the PageExpiredErrorPage or InternalErrorPage depending on a silo? Application.getApplicationSettings() is shared among all silos. ** Martin 2009/12/28 Igor Vaynberg igor.vaynb...@gmail.com: use a cookie. every time a user enters a silo set it in a silo cookie. when the session expires, the cookie will still be there. -igor On Mon, Dec 28, 2009 at 5:04 AM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: 2009/12/28 Ernesto Reinaldo Barreiro reier...@gmail.com: but I'm no core developer... So, why not wait to see what do they comment on this issue? Maybe they just want us to weather this out on ourselves ... ;) ** Martin On Mon, Dec 28, 2009 at 1:44 PM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: How would you formulate such RFE? Wicket needs an autonomus but parametrizable global behavior, that is transparent to all url encoding schemes, that can be used to identify users's silo in the application. When session is invalidated or other errors occur, each silo can have its own errorpage/homepage which is automatically rendered by the behavior. Is this descriptive enough? Maybe some junit wickettester test cases? - test 1: User has begun using Silo1Homepage.class when session is invalidated. User is redirected back to Silo1Homepage. - test 2: User has begun using Silo2Homepage.class when session is invalidated. User is redirected back to Silo2Homepage. - similar for error pages, and after error page - silo-home-page - etc. ** Martin 2009/12/28 Ernesto Reinaldo Barreiro reier...@gmail.com: Create a RFE? Maybe on 1.5 it is already possible? Ernesto On Mon, Dec 28, 2009 at 1:16 PM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: It should be automatic and global, like a url encoding scheme, and it should come with an interpreter that will process the homepage/errorpage when necessary. ** Martin 2009/12/28 Ernesto Reinaldo Barreiro reier...@gmail.com: But where could we bind the silo information into urls globally? Mounting pages? Or better having some kind of configuration class that you use to mount the pages and do the ugly URL plumbing on that method? Best, Ernesto - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Handling Ajax session expired
Ah.. probably RequestCycle.onRuntimeException is the key. ** Martin 2010/1/24 Martin Makundi martin.maku...@koodaripalvelut.com: Hi! What is the best way to change the PageExpiredErrorPage or InternalErrorPage depending on a silo? Application.getApplicationSettings() is shared among all silos. ** Martin 2009/12/28 Igor Vaynberg igor.vaynb...@gmail.com: use a cookie. every time a user enters a silo set it in a silo cookie. when the session expires, the cookie will still be there. -igor On Mon, Dec 28, 2009 at 5:04 AM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: 2009/12/28 Ernesto Reinaldo Barreiro reier...@gmail.com: but I'm no core developer... So, why not wait to see what do they comment on this issue? Maybe they just want us to weather this out on ourselves ... ;) ** Martin On Mon, Dec 28, 2009 at 1:44 PM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: How would you formulate such RFE? Wicket needs an autonomus but parametrizable global behavior, that is transparent to all url encoding schemes, that can be used to identify users's silo in the application. When session is invalidated or other errors occur, each silo can have its own errorpage/homepage which is automatically rendered by the behavior. Is this descriptive enough? Maybe some junit wickettester test cases? - test 1: User has begun using Silo1Homepage.class when session is invalidated. User is redirected back to Silo1Homepage. - test 2: User has begun using Silo2Homepage.class when session is invalidated. User is redirected back to Silo2Homepage. - similar for error pages, and after error page - silo-home-page - etc. ** Martin 2009/12/28 Ernesto Reinaldo Barreiro reier...@gmail.com: Create a RFE? Maybe on 1.5 it is already possible? Ernesto On Mon, Dec 28, 2009 at 1:16 PM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: It should be automatic and global, like a url encoding scheme, and it should come with an interpreter that will process the homepage/errorpage when necessary. ** Martin 2009/12/28 Ernesto Reinaldo Barreiro reier...@gmail.com: But where could we bind the silo information into urls globally? Mounting pages? Or better having some kind of configuration class that you use to mount the pages and do the ugly URL plumbing on that method? Best, Ernesto - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Resource JS
I recently configured apache to gzip my js files instead of going through tomcat. Can this be done for the js files that are loaded as resources? D/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: dynamically adding components to a ListView
Hi, you'll have to tell the request target which components to redraw: Put your list inside a markupcontainer and use addComponent(). Sven zdmytriv wrote: Could anyone tell me why it doesn't work? Thanks InteractivePanelPage.html table tr td # Add Panel /td /tr tr wicket:id=interactiveListView td /td /tr /table InteractivePanelPage.java // ... imports public class InteractivePanelPage extends WebPage { public LinkedListInteractivePanel interactivePanels = new LinkedListInteractivePanel(); private ListViewInteractivePanel interactiveList; public InteractivePanelPage() { add(new AjaxLinkString(addPanelLink) { private static final long serialVersionUID = 1L; @Override public void onClick(AjaxRequestTarget target) { try { System.out.println(link clicked); InteractivePanel newInteractivePanel = new InteractivePanel( interactiveItemPanel); newInteractivePanel.setOutputMarkupId(true); interactiveList.getModelObject().add(newInteractivePanel); } catch (Exception e) { e.printStackTrace(); } } }); interactivePanels.add(new InteractivePanel(interactiveItemPanel)); interactiveList = new ListViewInteractivePanel(interactiveListView, new PropertyModelListInteractivePanel(this, interactivePanels)) { private static final long serialVersionUID = 1L; @Override protected void populateItem(ListItemInteractivePanel item) { item.add(item.getModelObject()); } }; interactiveList.setOutputMarkupId(true); add(interactiveList); } public ListInteractivePanel getInteractivePanels() { return interactivePanels; } } InteractivePanel.html html xmlns:wicket wicket:panel input type=button value=BLAAA wicket:id=simpleButton/ /wicket:panel /html InteractivePanel.java // ... imports public class InteractivePanel extends Panel { private static final long serialVersionUID = 1L; public InteractivePanel(String id) { super(id); add(new Button(simpleButton)); } } zkn wrote: On 22.01.2010, at 03:18, vasil.pup...@gmail.com wrote: http://old.nabble.com/dynamically-adding-components-to-a-ListView-td26626657.html In this post you said You found it. Could you please post how did you do it? Zinovii in addPanel() replaced panels.add(panel); with panels.getModelObject().add(panel); On 04.12.2009, at 00:17, zkn wrote: found it. On 03.12.2009, at 16:19, zkn wrote: Hi, I'm trying to dynamically add components to an existing ListView but I can't figure out how to do that. Here is my case: MyPanelContainer class with markup wicket:panel wicket:container wicket:id=panels wicket:container wicket:id=panel / /wicket:container # add panel /wicket:panel and here is how I create the container in the constructor of my page .. MyPanelContainer container = new MyPanelContainer(panels_list_1); ListMyPanel panels = new ArrayListMyPanel(); for (int j = 0; j 5; j++) { MyPanel panel = new MyPanel(panel); . panels.add(panel); . container.add(new ListViewMyPanel(panels, panels) { protected void populateItem(ListItemMyPanel item) { item.add( item.getModelObject()); } }); add(Container); .. This works fine and I can see all MyPanel inside the container. Now I'm trying to add another MyPanel inside the container on user click. Here is the constructor of MyPanelContainer public MyPanelContainer(String id) { super(id); add(new Link(addPanel) { @Override public void onClick() { addPanel(); } }); . .. public void addPanel() { ListView MyPanel panels = (ListView MyPanel ) get(panels); MyPanel panel = new MyPanel(panel); ... panels.add(panel); } Basically addPanel() does the same thing as in page constructor to add panels to the list but nothing shows up. Thanks in advance for your help Ozkan - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Resource JS
On Sun, 2010-01-24 at 03:19 -0800, Douglas Ferguson wrote: I recently configured apache to gzip my js files instead of going through tomcat. Can this be done for the js files that are loaded as resources? see Application.get().getResourceSettings().getJavascriptCompressor() if this returns null then any JavascriptPackageResource will be not compressed D/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Message Bundles - 1.3.2
Another related question... I'm adding a ResourceModel to an AjaxLabelLink, and in the call to the AjaxLabelLink's constructor, passing in: new ResourceModel(myResourceKey) does not work...I need to use wrapOnAssignment: new ResourceModel(myResourceKey).wrapOnAssignment(this) Is this the correct approach, or should I be doing it differently? I looked briefly at the source code, and am wondering...why not just have a ResourceModel constructor that takes a component as a parameter instead of always using a wrapper approach? Something to do with serialization? Thanks, Keith -- View this message in context: http://old.nabble.com/Message-Bundles---1.3.2-tp16212900p27297793.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: how to set default options in object palette
Make sure your model reflects the selected state. Palette will pick that up automatically On Sat, Jan 23, 2010 at 12:50 PM, victorTrapiello vic...@trapiello.net wrote: I use the palette component, to assigne option to a User. but I don't find a functionnality, how to set already selected option ?. Exemple : a user selected option, I store it into a database: In the future, the user want to update his option, at the moment he doesn't see his previous selected option. Do you have a solution.¿?, doe sir make sense¿? cheers!! quote author=MartinM Well.. you can override newChoicesComponent ** Martin 2009/4/28 新希望软件 -- 俞宏伟 nhsoft@gmail.com: yes, i can setMarkupId for Palette. but now i want to filter for palette's choicesComponent. there is no public getChoicesComponent() method for choicesComponent. 2009/4/28 Martin Makundi martin.maku...@koodaripalvelut.com Why cannot get markupid? You can determine it yourself (setMarkupId) You could also update via ajax using a textfield which sends the filtered text to server and server updates the select via ajax... I wonder if someone has made a select in which the filter is visually built into the select component? ** Martin 2009/4/28 新希望软件 -- 俞宏伟 nhsoft@gmail.com: I want to add a filter for palette choice list, because choice list have a very large HTML SELECT list. I found that there is a select filter implement( http://www.barelyfitz.com/projects/filterlist/index.php/1), but i can not get select component markupid, so filter can not init. -- H. L. Mencken http://www.brainyquote.com/quotes/authors/h/h_l_mencken.html - It is even harder for the average ape to believe that he has descended from man. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://old.nabble.com/how-to-add-filter-for-Palette-choice-tp23269578p27288282.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: urlFor() outside wicket session
Thanks Igor That's just what I'll do. 2010/1/22 Igor Vaynberg igor.vaynb...@gmail.com mount the page so the url is well known, then you do not need wicket to construct it for you. -igor On Fri, Jan 22, 2010 at 1:29 PM, Help System i...@squir.es wrote: Hi, I have a quartz job that sends emails containing links to pages rendered by Wicket. All these links have parameters. Is there a way of doing the equivalent of RequestCycle.get().urlFor(pageclass, parameters) from a quartz job? At the moment it's hardcoded to generate the url but if the Wicket application configuration changes, the quartz job is something else to remember to modify. Thanks, Tim - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Getting value from TextField ?
Greetings , I have placed a TextField and a Link(Html submit button) in my page.I want to get the value of the TextField when the button is pressed(onClick()). But in the following code, I dont get the value the user typed in. What I am doing wrong? My HTML is: div class=comment Search Nihonbare: input wicket:id=txtSearchQuery type=text name=search class=search / input wicket:id=searchButton type=submit value=Search class=submit / /div Java Code: final TextField queryText=new TextField(txtSearchQuery,new ModelString()); add(queryText); add(new Link(advancedSearchPage) { @Override public void onClick() { setResponsePage(new SearchResultsPage()); } }); add(new Link(searchButton) { @Override public void onClick() { System.out.println(QUERY Text: + queryText.getModel().getObject()); } }); - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Getting value from TextField ?
Are you using a form? On Sun, Jan 24, 2010 at 9:07 PM, Ashika Umanga Umagiliya auma...@biggjapan.com wrote: Greetings , I have placed a TextField and a Link(Html submit button) in my page.I want to get the value of the TextField when the button is pressed(onClick()). But in the following code, I dont get the value the user typed in. What I am doing wrong? My HTML is: div class=comment Search Nihonbare: input wicket:id=txtSearchQuery type=text name=search class=search / input wicket:id=searchButton type=submit value=Search class=submit / /div Java Code: final TextField queryText=new TextField(txtSearchQuery,new ModelString()); add(queryText); add(new Link(advancedSearchPage) { @Override public void onClick() { setResponsePage(new SearchResultsPage()); } }); add(new Link(searchButton) { @Override public void onClick() { System.out.println(QUERY Text: + queryText.getModel().getObject()); } }); - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Getting value from TextField ?
Oops, No..I am not using a Form! James Carman wrote: Are you using a form? On Sun, Jan 24, 2010 at 9:07 PM, Ashika Umanga Umagiliya auma...@biggjapan.com wrote: Greetings , I have placed a TextField and a Link(Html submit button) in my page.I want to get the value of the TextField when the button is pressed(onClick()). But in the following code, I dont get the value the user typed in. What I am doing wrong? My HTML is: div class=comment Search Nihonbare: input wicket:id=txtSearchQuery type=text name=search class=search / input wicket:id=searchButton type=submit value=Search class=submit / /div Java Code: final TextField queryText=new TextField(txtSearchQuery,new ModelString()); add(queryText); add(new Link(advancedSearchPage) { @Override public void onClick() { setResponsePage(new SearchResultsPage()); } }); add(new Link(searchButton) { @Override public void onClick() { System.out.println(QUERY Text: + queryText.getModel().getObject()); } }); - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: functional testing
For functional testing, I'd suggest Selenium. For unit testing of Wicket pages, I'd suggest Wicket Page Test (http://wicketpagetest.sourceforge.net). - -- Kent Tong Better way to unit test Wicket pages (http://wicketpagetest.sourceforge.net) Books on CXF, Axis2, Wicket, JSF (http://http://agileskills2.org) -- View this message in context: http://old.nabble.com/functional-testing-tp27278781p27301553.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Releasing wicket library
In the course of developing my first wicket web application, I've wound up with quite a few reusable wicket components, validators, and other utilities. I think things like a LinkPanel, EmailLink, etc etc should be available, after all wicket is all about reusability. I'm packaging and releasing them on sourceforge. If anyone's interested, check it out. Most of the stuff is stable and works, but it's not carefully tested or ready for release, but I went ahead and put it on sourceforge so anyone interested can use it or help out. This is the first upload, I'm currently adding comments and cleaning some stuff up. svn co https://swicket.svn.sourceforge.net/svnroot/swicket swicket It depends on jclib, universal java toolkit (very very useful). jclib in turn depends on common-collections15, commons-lang and a couple others. Personally I don't know how anybody lives without these libraries. svn co https://jclib.svn.sourceforge.net/svnroot/jclib jclib - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Resource JS
Hmm... Actually, I'm wanting to gzip them are they gziped? Another thought was to do something like this: Alias /resources/com.package/ /user/local/tomcat5.5/webapps/resources/path/to/package So that apache can serve up the static content.. D/ On Jan 24, 2010, at 9:18 AM, Martin Grigorov wrote: On Sun, 2010-01-24 at 03:19 -0800, Douglas Ferguson wrote: I recently configured apache to gzip my js files instead of going through tomcat. Can this be done for the js files that are loaded as resources? see Application.get().getResourceSettings().getJavascriptCompressor() if this returns null then any JavascriptPackageResource will be not compressed D/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
AjaxSelfUpdatingTimerBehavior and session timeout
I thought it would be fun to add a 'time to session expiration' display to my pages. So I attempted this using the AjaxSelfUpdatingTimerBehavior. I just took the Clock example and hacked it as follows hsession = request.getHttpServletRequest().getSession(); lastAccessTime = hsession.getLastAccessedTime(); thisTime = *new* java.util.Date().getTime(); elapsedTime = thisTime - lastAccessTime; The problem is that elapsedTime is always the duration specified when I create the clock instance. So, my question is, if I have a page that uses AjaxSelfUpdatingTimerBehavior and the user is displaying that page then his session will never expire? Or am I missing something?
Re: AjaxSelfUpdatingTimerBehavior and session timeout
your behavior is always touching the session, so it will never timeout. using this behavior is actually a solution to preventing the session from ever timing out :) -igor On Sun, Jan 24, 2010 at 9:10 PM, Chuck Brinkman chasb1...@gmail.com wrote: I thought it would be fun to add a 'time to session expiration' display to my pages. So I attempted this using the AjaxSelfUpdatingTimerBehavior. I just took the Clock example and hacked it as follows hsession = request.getHttpServletRequest().getSession(); lastAccessTime = hsession.getLastAccessedTime(); thisTime = *new* java.util.Date().getTime(); elapsedTime = thisTime - lastAccessTime; The problem is that elapsedTime is always the duration specified when I create the clock instance. So, my question is, if I have a page that uses AjaxSelfUpdatingTimerBehavior and the user is displaying that page then his session will never expire? Or am I missing something? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket bench in eclipse
We are not using the Wicket bench editor, just the plain built-in html editor in eclipse. For a while we tried an html editor from Aptana (no association with Wicket), but it did to much to the over-all eclipse environment. By entering your wicket context I guess you are supposed to get style sheets resolved in the Wicket bench editor, if you enter it in the head section of the html page. Since we are keeping our wicket pages in a jar file (different project) and not in the web module, I haven't gotten that to work. //Swanthe On 2010-01-21 22:32, Lionel Port wrote: Thats exactly what I want it for. Some reason it doesn't detect wicket pages. I tried setting the wicket context in the project properties but it doesn't change and if I force opening the html page with wicket bench it throws an initialisation error. At least if you saying it works for you I know it should work and I should keep trying. BTW. What are you meant to get your wicket context set to in the project properties, is it /src/main/resources. On Fri, Jan 22, 2010 at 12:25 AM, Swanthe Lindgren swanthe.lindg...@megasol.se wrote: We are using Galileo and m2eclipse (Maven) with Wicket bench, no problem, but we are only using wicket bench when creating new pages and panels as a lazy way to get both the java and html file. //Swanthe On 2010-01-21 04:48, Lionel Port wrote: Hi Guys, Not strictly a wicket question, I know. Does anyone have wicket bench working in Galileo or recent version of eclipse or know of a good plugin I should be using?. My project has a maven structure, not sure if thats why it doesn't work. regards, Lionel - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org