Re: URL Help
try getRequestCycle().getRequest().getURL() Regards Dipu On Tue, Jan 6, 2009 at 7:41 AM, Nilesh More nm...@cybage.com wrote: Hi Friends, I want to check the content of the url in my java code. How can I do it? Thanks in advance Nilesh N. More Legal Disclaimer: This electronic message and all contents contain information from Cybage Software Private Limited which may be privileged, confidential, or otherwise protected from disclosure. The information is intended to be for the addressee(s) only. If you are not an addressee, any disclosure, copy, distribution, or use of the contents of this message is strictly prohibited. If you have received this electronic message in error please notify the sender by reply e-mail to and destroy the original message and all copies. Cybage has taken every reasonable precaution to minimize the risk of malicious content in the mail, but is not liable for any damage you may sustain as a result of any malicious content in this e-mail. You should carry out your own malicious content checks before opening the e-mail or attachment. www.cybage.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: RestartResponseAtInterceptPageException and the query string
Thanks a lot. I will take a look. It seems like for some reason when hitting the intercept page it creates a new sessiontherefore I cannot use the session to store things to achieve the required communication between the calls. Basically I do want to use RestartResponseAtInterceptPageException. because of its return functionality So it seems I am kind of stuck...not here, not there...but thanks for clearing it to me on my possibilities. On Tue, Jan 6, 2009 at 6:29 AM, David Leangen wic...@leangen.net wrote: Since nobody has replied yet... You can do this with RestartResponseException but not RestartResponseAtInterceptPageException. The difference between the two is that the former will simply break the current path and restart somewhere else, I guess kinda like a goto statement. In the latter case, you break to somewhere to do some temporary processing, and return to the point you left off when that temporary processing is done, maybe like a subroutine. This is ideal, for example, for the login scenario. RestartResponseAtInterceptPageException was not designed to accept parameters, so you just can't do it that way. (As to why it was designed that way, you'll have to ask the people who designed it.) What you can do is set a meta key. So long as you remain within the same session, you can temporary store data to the session. It may not be exactly what you want (parameters), but it will allow you to accomplish the same thing. I.e. in org.apache.wicket.Session: public final java.io.Serializable getMetaData(MetaDataKey key) public final void setMetaData(MetaDataKey key, Serializable object) Good luck! =dml On Wed, 2008-12-31 at 18:58 +0200, Arie Fishler wrote: Hi All, First...Happy new year to everybody! I apologize for raising this question again as I did it in the past in some other form but actually this was not really resolved for me. I am using RestartResponseAtInterceptPageException to redirect to some sign-in page or similar. I think it was Martijn that mentioned that the default for the redirect is that the QUERY STRING of the original message is passed to the sign-in page. StillI do not see this happening. I want to get the original query string or at least be able to provide some parameters to that sign in page. How do I achieve this? To make the issue clear I have this sequence. http://domain.com/wicket/pageX?a=1b=2 This does some logic and then throws RestartResponseAtInterceptPageException which redirects to http://domain.com/wicket/signIn but what I wanted to get is http://domain.com/wicket/signIn*?a=1b=2 http://domain.com/wicket/signIn?a=1b=2 * or even add some of my own parameters http://domain.com/wicket/signIn* ?a=1b=2c=3 http://domain.com/wicket/signIn?a=1b=2c=3* ** Can anyone help? Thanks!! - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
HOW TO REDIRECT
Hi everybody I have a problem in redirecting to a class(webpage) My Scenario is A login page when user is clicks the login button it will go to authentication page form there (automatically)if he is a valid user he must be directed to success page or to a failure page. How to do this I used setResponsepage(somepage) Thanks in advance Karthic -- View this message in context: http://www.nabble.com/HOW-TO-REDIRECT-tp21307007p21307007.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 REDIRECT
Hi, try using redirectToInterceptPage and continueToOriginalDestination instead ( http://wicket.apache.org/docs/wicket-1.3.2/wicket/apidocs/org/apache/wicket/IPageMap.html ) PSkarthic a écrit : Hi everybody I have a problem in redirecting to a class(webpage) My Scenario is A login page when user is clicks the login button it will go to authentication page form there (automatically)if he is a valid user he must be directed to success page or to a failure page. How to do this I used setResponsepage(somepage) Thanks in advance Karthic - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: HOW TO REDIRECT
Thanks for your reply redirectToInterceptPage is not working After login button is clicked the control is passed to verify page in that i have code like this if(user.equals(admin) || user.equals(karthic)){ //setRedirect(true); //setResponsePage(new Test()); //onsuccessful login redirectToInterceptPage(new SuccessPage()); } in that success page i include only a label(for testing purpose). How to solve it Thanks Karthic -- View this message in context: http://www.nabble.com/HOW-TO-REDIRECT-tp21307007p21307286.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 REDIRECT
throw new RestartResponseException(new SuccessPage()); Cheers Dipu On Tue, Jan 6, 2009 at 9:37 AM, PSkarthic kart...@touchpointindia.com wrote: Thanks for your reply redirectToInterceptPage is not working After login button is clicked the control is passed to verify page in that i have code like this if(user.equals(admin) || user.equals(karthic)){ //setRedirect(true); //setResponsePage(new Test()); //onsuccessful login redirectToInterceptPage(new SuccessPage()); } in that success page i include only a label(for testing purpose). How to solve it Thanks Karthic -- View this message in context: http://www.nabble.com/HOW-TO-REDIRECT-tp21307007p21307286.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: HOW TO REDIRECT
Thanks very much for ur help, its working, but is that a properway to divert to success or failure page depending on conditions or is there any thing like sendRedirect... Thanks karthic -- View this message in context: http://www.nabble.com/HOW-TO-REDIRECT-tp21307007p21307624.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
Help,DownloadLink, when file is not existed, not error message
Dear all, I am doing downloadLink , when the file is existed, it is ok to download it, but when the file is not existed, no any error message No file exist! to popup! According to debug, i can see it already go to the line: target.appendJavascript(alert('No file exist!')); the codes is below, any suggest? thanks you for help. File file = new File(C:/Documents and Settings/cw/Desktop/Advertiser_csv/AdSmart/2008/B-ONE FLORIST (SHAW TOWER)_m_2008_12.csv); form.add( new CustomDownloadLink(donld, file)); public class CustomDownloadLink extends DownloadLink { private static final long serialVersionUID = 1L; private File file; @Override public void onClick() { if (file.exists()) { super.onClick(); } } public CustomDownloadLink(String id, File file) { super(id, file); this.file = file; add(new AjaxEventBehavior(onclick) { private static final long serialVersionUID = 1L; @Override protected void onEvent(AjaxRequestTarget target) { if (!CustomDownloadLink.this.file.exists()) { target.appendJavascript(alert('No file exist!')); } } }); } } -- View this message in context: http://www.nabble.com/Help%2CDownloadLink%2C-when-file-is-not-existed%2C-not-error-message-tp21307695p21307695.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 REDIRECT
The doubt raised because of the word exception in that command. Once again Thank you very much for your support. Karthic. -- View this message in context: http://www.nabble.com/HOW-TO-REDIRECT-tp21307007p21307822.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 REDIRECT
it depends on your usecase, if you want to redirect conditionally that's the way to do it ( as far as i know ) dipu On Tue, Jan 6, 2009 at 9:58 AM, PSkarthic kart...@touchpointindia.com wrote: Thanks very much for ur help, its working, but is that a properway to divert to success or failure page depending on conditions or is there any thing like sendRedirect... Thanks karthic -- View this message in context: http://www.nabble.com/HOW-TO-REDIRECT-tp21307007p21307624.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: URL Help
Hi I used the method but it's giving the url of the component that I am clicking. Actually I wanted to get the content of the main page url Is there any different solution? Nilesh -Original Message- From: Dipu [mailto:dipu@googlemail.com] Sent: Tuesday, January 06, 2009 2:36 PM To: users@wicket.apache.org Subject: Re: URL Help try getRequestCycle().getRequest().getURL() Regards Dipu On Tue, Jan 6, 2009 at 7:41 AM, Nilesh More nm...@cybage.com wrote: Hi Friends, I want to check the content of the url in my java code. How can I do it? Thanks in advance Nilesh N. More Legal Disclaimer: This electronic message and all contents contain information from Cybage Software Private Limited which may be privileged, confidential, or otherwise protected from disclosure. The information is intended to be for the addressee(s) only. If you are not an addressee, any disclosure, copy, distribution, or use of the contents of this message is strictly prohibited. If you have received this electronic message in error please notify the sender by reply e-mail to and destroy the original message and all copies. Cybage has taken every reasonable precaution to minimize the risk of malicious content in the mail, but is not liable for any damage you may sustain as a result of any malicious content in this e-mail. You should carry out your own malicious content checks before opening the e-mail or attachment. www.cybage.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: URL Help
from java doc java.lang.CharSequence urlFor(java.lang.Class pageClass, PageParameters parameters) Returns a bookmarkable URL that references a given page class using a given set of page parameters. java.lang.CharSequence urlFor(IBehavior behaviour, RequestListenerInterface listener) Gets a URL for the listener interface on a behavior (e.g. java.lang.CharSequence urlFor(IPageMap pageMap, java.lang.Class pageClass, PageParameters parameters) Returns a bookmarkable URL that references a given page class using a given set of page parameters. java.lang.CharSequence urlFor(IRequestTarget requestTarget) Returns a URL that references the given request target. java.lang.CharSequence urlFor(RequestListenerInterface listener) Gets a URL for the listener interface (e.g. java.lang.CharSequence urlFor(ResourceReference resourceReference) Returns a URL that references a shared resource through the provided resource reference. Cheers Dipu On Tue, Jan 6, 2009 at 11:33 AM, Nilesh More nm...@cybage.com wrote: Hi I used the method but it's giving the url of the component that I am clicking. Actually I wanted to get the content of the main page url Is there any different solution? Nilesh -Original Message- From: Dipu [mailto:dipu@googlemail.com] Sent: Tuesday, January 06, 2009 2:36 PM To: users@wicket.apache.org Subject: Re: URL Help try getRequestCycle().getRequest().getURL() Regards Dipu On Tue, Jan 6, 2009 at 7:41 AM, Nilesh More nm...@cybage.com wrote: Hi Friends, I want to check the content of the url in my java code. How can I do it? Thanks in advance Nilesh N. More Legal Disclaimer: This electronic message and all contents contain information from Cybage Software Private Limited which may be privileged, confidential, or otherwise protected from disclosure. The information is intended to be for the addressee(s) only. If you are not an addressee, any disclosure, copy, distribution, or use of the contents of this message is strictly prohibited. If you have received this electronic message in error please notify the sender by reply e-mail to and destroy the original message and all copies. Cybage has taken every reasonable precaution to minimize the risk of malicious content in the mail, but is not liable for any damage you may sustain as a result of any malicious content in this e-mail. You should carry out your own malicious content checks before opening the e-mail or attachment. www.cybage.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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: FormComponent cookie persistent issue
Hi Murat, It seems to work both ways in my setup. I'm using Firefox 3.0. It successfully saves the username and password when I check the remember me checkbox, and clears them when I uncheck it. Did you check the host, path and the values of the cookies in your browser? Murat Yücel wrote: Hi again Did anyone had the time to look at the attached project? Are you guys seeing the same behaviour? /Murat 2008/12/31 Murat Yücel kodeperke...@gmail.com Hi Cemal Thanks for the response. I have attached the project. If you uncomment this line: mountBookmarkablePage(homepage, HomePage.class); in WicketApplication.java, then you can see the difference in the behaviour. /Murat 2008/12/31 jWeekend jweekend_for...@cabouge.com Murat, It is OK, just delete the target folder and zip it up before sending your quickstart project to this list. Regards - Cemal http://www.jWeekend.co.uk jWeekend Murat Yücel-2 wrote: By the way i am using wicket 1.3.5. I dont know if you need other information? I can send the quickstart project if anyone is interested. I dont know if it is okey to attach it to the mailing list. /Murat 2008/12/29 Murat Yücel kodeperke...@gmail.com Hi All I have a strange problem with persisting form component values. In my project i have a SignInPanel. The SignInPanel has a rememberMe checkbox. If the checkbox is checked then the values will get persisted in a cookie. This part is working very well if the user doesnt login from a mounted bookmarkable page. If the user login from a mounted bookmarkable page, then i can see that the value is saved by calling the CookieValuePersister, but on load the values are gone again. I have made a simple quickstart project and i am seing the same behaviour here. Am I missing something? Why doesnt cookie persist work for a mounted bookmarkable page? Hope that you can help. Kind regards /Murat -- View this message in context: http://www.nabble.com/FormComponent-cookie-persistent-issue-tp21197389p21230575.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: Moments of awesome.
think a big part of making it so good was the dutch cultural willingness (even eagerness) to puzzle over things until they make sense (discussion they call it). :)
Re: Bug? The page set by setReponsePage does not process its own response.
Well, page id per pagemap used to be the only option in first 1.3 releases. I don't think we need it now, you can make page id unique per session default. -Matej On Tue, Jan 6, 2009 at 3:32 PM, Johan Compagner jcompag...@gmail.com wrote: This is because of your: getSession().replaceSession(); call You can change that in 2 ways change the place where you call that so not at the beginning of the onsubmit but completely at the end: // Return onto the same page but disable inputField setResponsePage(new HomePage(false, ++submitCount)); getSession().replaceSession(); then it works fine The other is setting this setting: protected void init() { super.init(); getSessionSettings().setPageIdUniquePerSession(true); } I still dont know why that is not default to true I think we should just drop the complete pagemap page id. and always just use the session to create the next page id that is unique across all sessions Why do we have that setting? Matej was there really a thing that we still need the page pagemap id? johan On Tue, Jan 6, 2009 at 13:58, Martin Makundi martin.maku...@koodaripalvelut.com wrote: Hi! I have found out that the page set by setReponsePage does not process its own response and created a jira issue: https://issues.apache.org/jira/browse/WICKET-2006 I also attached a wicket quickstart for easily repeating the problem: Press the form submit button once, and you will get a form with the input field disabled. You would assume pressing the button again, the page instance set in the setResponsePage method would process the form but NO, it is the original (first) page will process the form.. not knowing you have edisabled the field and any other problems that might result .. Is this a bug or a feature? ** Martin - 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: Bug? The page set by setReponsePage does not process its own response.
Tnx guys..! 2009/1/6 Matej Knopp matej.kn...@gmail.com: Well, page id per pagemap used to be the only option in first 1.3 releases. I don't think we need it now, you can make page id unique per session default. -Matej On Tue, Jan 6, 2009 at 3:32 PM, Johan Compagner jcompag...@gmail.com wrote: This is because of your: getSession().replaceSession(); call You can change that in 2 ways change the place where you call that so not at the beginning of the onsubmit but completely at the end: // Return onto the same page but disable inputField setResponsePage(new HomePage(false, ++submitCount)); getSession().replaceSession(); then it works fine The other is setting this setting: protected void init() { super.init(); getSessionSettings().setPageIdUniquePerSession(true); } I still dont know why that is not default to true I think we should just drop the complete pagemap page id. and always just use the session to create the next page id that is unique across all sessions Why do we have that setting? Matej was there really a thing that we still need the page pagemap id? johan On Tue, Jan 6, 2009 at 13:58, Martin Makundi martin.maku...@koodaripalvelut.com wrote: Hi! I have found out that the page set by setReponsePage does not process its own response and created a jira issue: https://issues.apache.org/jira/browse/WICKET-2006 I also attached a wicket quickstart for easily repeating the problem: Press the form submit button once, and you will get a form with the input field disabled. You would assume pressing the button again, the page instance set in the setResponsePage method would process the form but NO, it is the original (first) page will process the form.. not knowing you have edisabled the field and any other problems that might result .. Is this a bug or a feature? ** Martin - 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: Bug? The page set by setReponsePage does not process its own response.
This is because of your: getSession().replaceSession(); call You can change that in 2 ways change the place where you call that so not at the beginning of the onsubmit but completely at the end: // Return onto the same page but disable inputField setResponsePage(new HomePage(false, ++submitCount)); getSession().replaceSession(); then it works fine The other is setting this setting: protected void init() { super.init(); getSessionSettings().setPageIdUniquePerSession(true); } I still dont know why that is not default to true I think we should just drop the complete pagemap page id. and always just use the session to create the next page id that is unique across all sessions Why do we have that setting? Matej was there really a thing that we still need the page pagemap id? johan On Tue, Jan 6, 2009 at 13:58, Martin Makundi martin.maku...@koodaripalvelut.com wrote: Hi! I have found out that the page set by setReponsePage does not process its own response and created a jira issue: https://issues.apache.org/jira/browse/WICKET-2006 I also attached a wicket quickstart for easily repeating the problem: Press the form submit button once, and you will get a form with the input field disabled. You would assume pressing the button again, the page instance set in the setResponsePage method would process the form but NO, it is the original (first) page will process the form.. not knowing you have edisabled the field and any other problems that might result .. Is this a bug or a feature? ** Martin - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Modal window - chagne width and height
there is no special code just on ajaxrequesttarget call method appendJavascript() and use the code below. Window will get resized and centered. I have also noticed that If I set width and height to empty strings, window will resize to it's needs :-) V. 2009/1/6 Martin Makundi martin.maku...@koodaripalvelut.com Hi, would you be kind to post also the server-side java code here? Otherwise, I have to go guessing ... ** Martin 2009/1/6 Vitek Tajzich v.tajz...@gmail.com: Hi, I've found a solution to this problem. It is straight forward but I did one mistake in my javascript. Thanks god for firebug ;-) So, If you want to resize ModalWindow by ajax call lets append these 3 lines in your target.appendJavascript... Code: Wicket.Window.get().window.style.width=800px;\n Wicket.Window.get().content.style.height=600px;\n Wicket.Window.get().center();\n Notice that properties and units should be get from modal's java object properties... Last line will center your modal Windows after resizing. BR, V. -Original Message- From: Martin Makundi [mailto:martin.maku...@koodaripalvelut.com] Sent: Monday, January 05, 2009 10:53 AM To: users@wicket.apache.org Subject: Re: Modal window - chagne width and height Why don't you just set the modal window div css properties with javascript? http://developer.apple.com/internet/webcontent/styles.html 2009/1/5 Vitek Tajzich v.tajz...@gmail.com: Yes, that right but these properties are read only at construction time so I'm not able to change size of already shown window by ajax If you have a solution I will be happy :-) V. 2009/1/5 Piller Sébastien pi...@hmcrecord.ch Hum yes sorry, I didn't get that you were in a modal window So there is some method setInitialWidth/setInitialHeight in ModalWindow that should work :) Vitek Tajzich a écrit : As far as I know that is not a window but only div actually, so I can't user resizeTo, can I? 2009/1/5 Piller Sébastien pi...@hmcrecord.ch Even here? http://www.javascripter.net/faq/resizing.htm Vitek Tajzich a écrit : Hi, actually there is now JS function resizeTo :-( V. 2009/1/4 Sébastien Piller pi...@hmcrecord.ch Hi, I doubt such a feature is implemented in the wicket code most likely, you will need to call the javascript function window.resizeTo yourself, with an AjaxBehavior (ie AjaxAbstractDefaultBehavior#respond and AjaxRequestTarget#appendJavascript) Vitek Tajzich wrote: Hi, Is it possible to resize Modal Window by ajax? I need for some reason to resize currently opened window. I've been looking on google and mailing list and I didn't found anything usable. I also looked into javascript for modal window and I think It should be possible.. Thanks.. V. - 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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to avoid blank node labels in TreeTable?
Did you ever find a solution to this problem? I'm having the same issue, and I was thinking about rewriting TreeTable (which I would really like to avoid if possible). Hannes-15 wrote: Hi all, if text is too long to fit into column width of PropertyTreeColumn, then it gets blanked. This results in empty node labels in tree, what is a problem, the more levels the tree has. So I would prefer clipping instead blanks... Any hints for a highly enthusiastic wicket rookie? Best regards Hannes - 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://www.nabble.com/How-to-avoid-blank-node-labels-in-TreeTable--tp20105360p21312982.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
Redirect to modal window?
Hi all, I have a modal window which collects user input and then calls an external servlet with that data. The servlet then feeds back the response (varying mime types). My issue is that I want the response from the servlet to appear in its own window. Currently it is replacing the content of the user input modal window. What would be the best way to redirect the response stream to a separate window? Thanks, -Dennis -- View this message in context: http://www.nabble.com/Redirect-to-modal-window--tp21313016p21313016.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: Wicket: Testing Request URLs
When you say do any work myself, do you mean to the WicketTester class? I simply want to specify a URL and then use wicket to render the proper page, it's a trivial test of something basic... but I was wondering if there was a way to do it in the mock servlet. Thanks again! igor.vaynberg wrote: without doing any work yourself the closest you can come is wickettester#startpage(class, pageparameters) -igor On Thu, Dec 18, 2008 at 8:09 AM, walnutmon justin.m.boy...@gmail.com wrote: bump. walnutmon wrote: One thing I am trying to implement in my most recent wicket application is a hook in from another site written in JSP. I'm starting simple, with a hand-off URL that gives a few peices of information that allows the user to be logged into the wicket app based on crednetials that had them logged into the jsp app. I want to write test cases like follows. @Test public void testLogInUrl() { String loginURL = http://somplace.com/wicket/login/?stuff=otherstuff;; goToUrl(loginUrl); assertRenderedPage(UserPage.class); assertLabel(name, someGuysName); } Anyone have any idea how to approach this? -- View this message in context: http://www.nabble.com/Wicket%3A-Testing-Request-URLs-tp21035024p21075048.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 -- View this message in context: http://www.nabble.com/Wicket%3A-Testing-Request-URLs-tp21035024p21313205.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
how to remove jsessionid parameters in the url at the first time ppl visit the site?
Firstly, i should say i have already read about those past threads which are concerned with the jsessionid appending in url problem. My experiment proved the conclusion: the first time people visit the site, the application server (tomcat) would append the jsessionid into the url no matter whether your browser has enabled cookie. then if you continue clicking other links on the page ,or if you close the windows in your Firefox and reopen it again, the jsessionid parameters would disappear because the cookie has been set. Now here is my scenario. My program should be integrated with other forums or portal sites. Those sites send their account profiles to my server by HTTP request with encrypted parameters.(but not HTTPS). Meanwhile, my program mount a url (like loginx) for such requests which does some authentication and throws new RestartResponseAtInterceptPageException to Home page if success. Unfortunately, my Home page is constructed with some Frame Pages which means users would NOT get browser url changing when they click links or submit forms in the page. so the origin jsessionid set by tomcat like we mentioned above remains forever.What's the worse, users would get into others account if they could receive the url existing in the browser address bar by some way. That's terrible for my system. BTW, I'm using mod_proxy of Lighttpd to proxy the dynamic request to the back end Tomcat server which does NOT have any load balance setting or other cluster usage. I've tried several methods which turn out to be useless 1) find out some configuration settings which may force the tomcat use cookie rather than both set the cookie and rewrite the url at the first time. 2) mount another page as a proxy connecting with my loginx page and Home page, use setResponsePage at its constructor method. So my question is : how could I avoid appending jsessionid parameters in the url permanently even at the first time people visit my site? Thanks in advance. Appreciate if any advices.
Re: how to remove jsessionid parameters in the url at the first time ppl visit the site?
create your own BufferedWebResponse and overwrite this method: public CharSequence encodeURL(CharSequence url) and do nothing, just return the url johan On Tue, Jan 6, 2009 at 18:14, Quan Zhou betoget...@gmail.com wrote: Firstly, i should say i have already read about those past threads which are concerned with the jsessionid appending in url problem. My experiment proved the conclusion: the first time people visit the site, the application server (tomcat) would append the jsessionid into the url no matter whether your browser has enabled cookie. then if you continue clicking other links on the page ,or if you close the windows in your Firefox and reopen it again, the jsessionid parameters would disappear because the cookie has been set. Now here is my scenario. My program should be integrated with other forums or portal sites. Those sites send their account profiles to my server by HTTP request with encrypted parameters.(but not HTTPS). Meanwhile, my program mount a url (like loginx) for such requests which does some authentication and throws new RestartResponseAtInterceptPageException to Home page if success. Unfortunately, my Home page is constructed with some Frame Pages which means users would NOT get browser url changing when they click links or submit forms in the page. so the origin jsessionid set by tomcat like we mentioned above remains forever.What's the worse, users would get into others account if they could receive the url existing in the browser address bar by some way. That's terrible for my system. BTW, I'm using mod_proxy of Lighttpd to proxy the dynamic request to the back end Tomcat server which does NOT have any load balance setting or other cluster usage. I've tried several methods which turn out to be useless 1) find out some configuration settings which may force the tomcat use cookie rather than both set the cookie and rewrite the url at the first time. 2) mount another page as a proxy connecting with my loginx page and Home page, use setResponsePage at its constructor method. So my question is : how could I avoid appending jsessionid parameters in the url permanently even at the first time people visit my site? Thanks in advance. Appreciate if any advices.
Re: How to avoid blank node labels in TreeTable?
Actually, rewriting the treetable is probably the only solid solution to this problem. Back then it was not possible to replace table rows using ajax thus the layout was constructed using CSS, which unfortunately causes lot of problems. Rewriting the TreeTable with regular table layout should not be that difficult. -Matej On Tue, Jan 6, 2009 at 4:49 PM, bburton ben.bur...@teachscape.com wrote: Did you ever find a solution to this problem? I'm having the same issue, and I was thinking about rewriting TreeTable (which I would really like to avoid if possible). Hannes-15 wrote: Hi all, if text is too long to fit into column width of PropertyTreeColumn, then it gets blanked. This results in empty node labels in tree, what is a problem, the more levels the tree has. So I would prefer clipping instead blanks... Any hints for a highly enthusiastic wicket rookie? Best regards Hannes - 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://www.nabble.com/How-to-avoid-blank-node-labels-in-TreeTable--tp20105360p21312982.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
Extending to all components
Is there an easy way to add/override a function to all my Wicket classes (panels, pages, forms, etc.)? For example, I have a custom session. Rather than having to cast (MySession)getSession() , I just want getSession() to return a MySession. Two solutions come to mind, but neither seems optimal. First, I could create a MyPanel for all my panels to extend, a MyPage for all my pages to extend, etc. and have MyPanel and MyPage override getSession(). However, that means a lot of duplicated code. Second, I could update the Wicket source code, which would be quick and easy, but then make upgrading Wicket difficult. Is there a simple Java solution that allows me to change/add function definitions into existing inheritance hierarchies?
Re: HOW TO REDIRECT
throw a RestartResponseAtInterceptPageException On Tue, Jan 6, 2009 at 4:13 AM, PSkarthic kart...@touchpointindia.comwrote: The doubt raised because of the word exception in that command. Once again Thank you very much for your support. Karthic. -- View this message in context: http://www.nabble.com/HOW-TO-REDIRECT-tp21307007p21307822.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 -- Jeremy Thomerson http://www.wickettraining.com
Re: Extending to all components
We added the following to our Session: public static final MySession get() { return (MySession) Session.get(); } And then we just call MySession.get() instead of calling getSession(). Scott On Tue, Jan 6, 2009 at 9:59 AM, Dane Laverty danelave...@chemeketa.edu wrote: Is there an easy way to add/override a function to all my Wicket classes (panels, pages, forms, etc.)? For example, I have a custom session. Rather than having to cast (MySession)getSession() , I just want getSession() to return a MySession. Two solutions come to mind, but neither seems optimal. First, I could create a MyPanel for all my panels to extend, a MyPage for all my pages to extend, etc. and have MyPanel and MyPage override getSession(). However, that means a lot of duplicated code. Second, I could update the Wicket source code, which would be quick and easy, but then make upgrading Wicket difficult. Is there a simple Java solution that allows me to change/add function definitions into existing inheritance hierarchies? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Extending to all components
If i'm not completly wrong there is a Session.get(). You could write a Helper which is casting that session instance. So you could use it everywhere you want. SessionConverter.java public static MySession getConverted() { return (MySession) Session.get(); } and in component where you want to access it MySession s = SessionConverter.getConverted(); Only an idea. Cheers Per - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Extending to all components
You don't need a helper if you do what Mr. Swank recommended. With JDK5, you can have covariant return types. So, just set up a new get() method that returns your exact session type. On Tue, Jan 6, 2009 at 1:11 PM, Per Newgro per.new...@gmx.ch wrote: If i'm not completly wrong there is a Session.get(). You could write a Helper which is casting that session instance. So you could use it everywhere you want. SessionConverter.java public static MySession getConverted() { return (MySession) Session.get(); } and in component where you want to access it MySession s = SessionConverter.getConverted(); Only an idea. Cheers Per - 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: Extending to all components
Since get() is a static method there is no relationship (i.e. overriding) between MySession.get() and Session.get(). Hence you do not even need Java 5. On Tue, Jan 6, 2009 at 10:25 AM, James Carman jcar...@carmanconsulting.com wrote: You don't need a helper if you do what Mr. Swank recommended. With JDK5, you can have covariant return types. So, just set up a new get() method that returns your exact session type. On Tue, Jan 6, 2009 at 1:11 PM, Per Newgro per.new...@gmx.ch wrote: If i'm not completly wrong there is a Session.get(). You could write a Helper which is casting that session instance. So you could use it everywhere you want. SessionConverter.java public static MySession getConverted() { return (MySession) Session.get(); } and in component where you want to access it MySession s = SessionConverter.getConverted(); Only an idea. Cheers Per - 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: ComponentResolver and CompoundPropertyModels
autocomponents are components that only exist during the render phase, thus they are removed after. what you have to do is add a component instead of autoadd. if your model is not being updated set a breakpoint in updatemodel() and see what it is doing, also make sure there are no validation errors. -igor On Mon, Jan 5, 2009 at 12:43 PM, Ricardo Mayerhofer ricardo.ekm.lis...@gmail.com wrote: Thanks Jan, I will look into it! Igor, you were right. Auto components are deleted. I commented that part of the code, so now I can access the component (and its model) on form's submit. Therefore, the property is not being setted on the form model yet... Do you have any idea why? BTW, why auto components are deleted after rendering? Jan Kriesten-2 wrote: Hi, auto components are removed after rendering is complete if i recall correctly, so there is nothing processing the submitted input. there are a couple of problems with that approach, same for embedding components in markup with the wicket:component I approached a similar problem auto-adding components with templates. My solution can be found here: http://www.footprint.de/fcc/2008/11/some-wicket-scala/ Instead of handling wxComponent you might filter for other tags - so that might be the solution for you, too. Hope this helps. Best regards, --- Jan. - 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://www.nabble.com/ComponentResolver-and-CompoundPropertyModels-tp21209434p21298927.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
Multiple Sorting in a DataTable
Hi Wicket Users, Has anyone tried to implement multiple sorting in a data table? I was thinking of trying to do something simliar to the filtertoolbar but for sorting. Thanks for any input. Karen -- View this message in context: http://www.nabble.com/Multiple-Sorting-in-a-DataTable-tp21316708p21316708.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: Extending to all components
Duh! :) Good point. On Tue, Jan 6, 2009 at 1:40 PM, Scott Swank scott.sw...@gmail.com wrote: Since get() is a static method there is no relationship (i.e. overriding) between MySession.get() and Session.get(). Hence you do not even need Java 5. On Tue, Jan 6, 2009 at 10:25 AM, James Carman jcar...@carmanconsulting.com wrote: You don't need a helper if you do what Mr. Swank recommended. With JDK5, you can have covariant return types. So, just set up a new get() method that returns your exact session type. On Tue, Jan 6, 2009 at 1:11 PM, Per Newgro per.new...@gmx.ch wrote: If i'm not completly wrong there is a Session.get(). You could write a Helper which is casting that session instance. So you could use it everywhere you want. SessionConverter.java public static MySession getConverted() { return (MySession) Session.get(); } and in component where you want to access it MySession s = SessionConverter.getConverted(); Only an idea. Cheers Per - 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: Wizard and redirect to a Page + backbutton
I have the same problem, did you find a solution for it? Thanks Pills wrote: Hello, I've a little problem with wicket. I'm trying to debug the following use case: In a wizard, I sometimes need to redirect the user to a page outside the wizard (that is: quit the wizard). I use the standard setResonsePage method with my page class, on the onActivenStepChanged event. #onActiveStepChanged ... if (lastStep instanceof ChooseLoginMode createaccount.equals(clm.loginmode)) { ((WizardModel)getWizardModel()).setActiveStep(lastStep); // Doesn't work... *setResponsePage(PageSubscribe.class); *// backbutton gets messed or *redirectToInterceptPage(new PageSubscribe());* // idem } But when the user click to the browser's backbutton, the wizard isn't in a correct state. It display the step #1 but its model and logic is for step #2, or even more weird state... What would be your advice to fix that kind of issue? Any idea are welcome (this appened at least 4 times the two past days on our production machine) ;) Thanks! - 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://www.nabble.com/Wizard-and-redirect-to-a-Page-%2B-backbutton-tp19310387p21317164.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: examples of Wizard and working back button
I have the same problem, did you find a solution for it? Thanks, novotny wrote: Hi, I should have been more clear- I mean an example where the browser back button works like the previous button in the 1-2-3 example. I have a simple wizard already working but if a user is on Step 3 and hits browser back button it takes them to 1. Thanks, Jason Jeremy Thomerson-5 wrote: If by back button you mean a previous button, here's a regular old wizard example, as easy as 1-2-3: 1 - http://www.google.com/search?q=wicket+examples 2 - http://www.wicket-library.com/wicket-examples/ 3 - http://www.wicket-library.com/wicket-examples/wizard/ Hope this helps. On Tue, Dec 2, 2008 at 8:09 PM, novotny novo...@gridsphere.org wrote: Hi, I'm looking for a code example of writing a wizard in wicket with a working back button. The code at http://cwiki.apache.org/WICKET/building-wizard-functionality.html is no longer available and I was wondering if it was an old example anyway. Any help is greatly appreciated! Thanks, Jason -- View this message in context: http://www.nabble.com/examples-of-Wizard-and-working-back-button-tp20805386p20805386.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 -- Jeremy Thomerson http://www.wickettraining.com -- View this message in context: http://www.nabble.com/examples-of-Wizard-and-working-back-button-tp20805386p21317216.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
where to find SpringComponentInjector class
Hi: can some one tell me which jars holds the class SpringComponentInjector. It doesn't look like the part of the core (I am using netbeans id that has pre-installed wicket jars). I also appreciate if some one tell me the url from where I can download the jar containing SpringComponentInjector. Thanks, RJ. -- View this message in context: http://www.nabble.com/where-to-find-SpringComponentInjector-class-tp21317448p21317448.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: Wizard and redirect to a Page + backbutton
Hi, Unfortunately, not really. Now I don't rely on the wizard's events anymore and use a regular link instead, this works better If you find a way to make a clean redirection from inside onActiveStepChanged, I'll highly appreciate it ;) jorgesantoro wrote: I have the same problem, did you find a solution for it? Thanks Pills wrote: Hello, I've a little problem with wicket. I'm trying to debug the following use case: In a wizard, I sometimes need to redirect the user to a page outside the wizard (that is: quit the wizard). I use the standard setResonsePage method with my page class, on the onActivenStepChanged event. #onActiveStepChanged ... if (lastStep instanceof ChooseLoginMode createaccount.equals(clm.loginmode)) { ((WizardModel)getWizardModel()).setActiveStep(lastStep); // Doesn't work... *setResponsePage(PageSubscribe.class); *// backbutton gets messed or *redirectToInterceptPage(new PageSubscribe());* // idem } But when the user click to the browser's backbutton, the wizard isn't in a correct state. It display the step #1 but its model and logic is for step #2, or even more weird state... What would be your advice to fix that kind of issue? Any idea are welcome (this appened at least 4 times the two past days on our production machine) ;) Thanks! - 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
addComponentInstantiationListener method
Hi: I am using the following code from wicket wiki to add a Springcomponent injector to addComponentInstantiationListener to hook spring application context, but the code is not compiling. addComponentInstantiationListener(new SpringComponentInjector(this, ctx)); When I dug further I found that addComponentInstantiationListener accepts a parameter of type IComponentInstantiationListener and SpringComponentInjector doesn't implement this interface. Am I missing some thing? BTW I am using wicket 1.4 rc1 binaries. Regards, RJ -- View this message in context: http://www.nabble.com/addComponentInstantiationListener-method-tp21318461p21318461.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 avoid blank node labels in TreeTable?
Matej, I was really hoping do avoid doing that if possible, as I'm not (yet) that comfortable with Wicket. If I were going to do this, would it be as simple as changing the tags to td in the response.write calls of onComponentTagBody and wrapping everything in tr/table where appropriate? I'd also have to carry over the CSS hooks for cell formatting I presume, but is that about the scope of it? I've only been working with Wicket for a few weeks, but it seems really flexible. Any advice you have would be highly appreciated. -Ben Matej Knopp-2 wrote: Actually, rewriting the treetable is probably the only solid solution to this problem. Back then it was not possible to replace table rows using ajax thus the layout was constructed using CSS, which unfortunately causes lot of problems. Rewriting the TreeTable with regular table layout should not be that difficult. -Matej On Tue, Jan 6, 2009 at 4:49 PM, bburton ben.bur...@teachscape.com wrote: Did you ever find a solution to this problem? I'm having the same issue, and I was thinking about rewriting TreeTable (which I would really like to avoid if possible). Hannes-15 wrote: Hi all, if text is too long to fit into column width of PropertyTreeColumn, then it gets blanked. This results in empty node labels in tree, what is a problem, the more levels the tree has. So I would prefer clipping instead blanks... Any hints for a highly enthusiastic wicket rookie? Best regards Hannes - 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://www.nabble.com/How-to-avoid-blank-node-labels-in-TreeTable--tp20105360p21312982.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 -- View this message in context: http://www.nabble.com/How-to-avoid-blank-node-labels-in-TreeTable--tp20105360p21319429.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: XSLT in a Panel
I believe that is what I am looking for; however, I am not able to get the objects to work. Are there any Hello World examples of those objects in action? igor.vaynberg wrote: see XsltTransformer and XsltTransformerBehavior -igor On Mon, Jan 5, 2009 at 4:08 PM, jeredm jer...@maplewoodsoftware.com wrote: I have a rather extensive report that is done in an application that I am porting to a Wicket application. This report relies on a SQL Server XML select (for xml explicit) that nests data so that I don't know how to do a single database select that will give me all the data I need in a flat format. The application I am porting from uses a simple xsl transform to handle the display of the report. Is there a way that I can make a Wicket Panel using an xsl transform that is nested inside a generic wicket panel? I want to keep the transform portable, so that I can use is only in a panel that needs it and do not have to manipulate how the application handles mounting of pages, for example. Here is the sort of code I am looking for: public class ReportPanel extends Panel { ... public ReportPanel(String id){ super(id); layoutPanel(); } private void layoutPanel(){ // Most are not real objects here, but this is what I would like to do ObjectThatHoldsXML myXML = ... XSLFilePointerObject myXSL = ... TransformedComponent mySPANTag = new TransformedComponent(reportPanel, new Model(XSLTHTMLTransformerObject.transform(myXML, myXSL)); ... add(mySpanTag); } } If anybody has a short Hello World example that would be great. I looked through http://www.wicket-library.com/wicket-examples/staticpages/ and I don't think that the implementation is what I need (I could very likely be understanding it incorrectly). Thanks for the help! Jered -- View this message in context: http://www.nabble.com/XSLT-in-a-Panel-tp21301555p21301555.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 -- View this message in context: http://www.nabble.com/XSLT-in-a-Panel-tp21301555p21319445.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: XSLT in a Panel
You can use xmlbean to transfer your xml to java objects and then create the report, just an idea ;) Thanks Jawad --- On Tue, 1/6/09, jeredm jer...@maplewoodsoftware.com wrote: From: jeredm jer...@maplewoodsoftware.com Subject: Re: XSLT in a Panel To: users@wicket.apache.org Date: Tuesday, January 6, 2009, 9:55 PM I believe that is what I am looking for; however, I am not able to get the objects to work. Are there any Hello World examples of those objects in action? igor.vaynberg wrote: see XsltTransformer and XsltTransformerBehavior -igor On Mon, Jan 5, 2009 at 4:08 PM, jeredm jer...@maplewoodsoftware.com wrote: I have a rather extensive report that is done in an application that I am porting to a Wicket application. This report relies on a SQL Server XML select (for xml explicit) that nests data so that I don't know how to do a single database select that will give me all the data I need in a flat format. The application I am porting from uses a simple xsl transform to handle the display of the report. Is there a way that I can make a Wicket Panel using an xsl transform that is nested inside a generic wicket panel? I want to keep the transform portable, so that I can use is only in a panel that needs it and do not have to manipulate how the application handles mounting of pages, for example. Here is the sort of code I am looking for: public class ReportPanel extends Panel { ... public ReportPanel(String id){ super(id); layoutPanel(); } private void layoutPanel(){ // Most are not real objects here, but this is what I would like to do ObjectThatHoldsXML myXML = ... XSLFilePointerObject myXSL = ... TransformedComponent mySPANTag = new TransformedComponent(reportPanel, new Model(XSLTHTMLTransformerObject.transform(myXML, myXSL)); ... add(mySpanTag); } } If anybody has a short Hello World example that would be great. I looked through http://www.wicket-library.com/wicket-examples/staticpages/ and I don't think that the implementation is what I need (I could very likely be understanding it incorrectly). Thanks for the help! Jered -- View this message in context: http://www.nabble.com/XSLT-in-a-Panel-tp21301555p21301555.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 -- View this message in context: http://www.nabble.com/XSLT-in-a-Panel-tp21301555p21319445.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: examples of Wizard and working back button
No, still looking :-( jorgesantoro wrote: I have the same problem, did you find a solution for it? Thanks, novotny wrote: Hi, I should have been more clear- I mean an example where the browser back button works like the previous button in the 1-2-3 example. I have a simple wizard already working but if a user is on Step 3 and hits browser back button it takes them to 1. Thanks, Jason Jeremy Thomerson-5 wrote: If by back button you mean a previous button, here's a regular old wizard example, as easy as 1-2-3: 1 - http://www.google.com/search?q=wicket+examples 2 - http://www.wicket-library.com/wicket-examples/ 3 - http://www.wicket-library.com/wicket-examples/wizard/ Hope this helps. On Tue, Dec 2, 2008 at 8:09 PM, novotny novo...@gridsphere.org wrote: Hi, I'm looking for a code example of writing a wizard in wicket with a working back button. The code at http://cwiki.apache.org/WICKET/building-wizard-functionality.html is no longer available and I was wondering if it was an old example anyway. Any help is greatly appreciated! Thanks, Jason -- View this message in context: http://www.nabble.com/examples-of-Wizard-and-working-back-button-tp20805386p20805386.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 -- Jeremy Thomerson http://www.wickettraining.com -- View this message in context: http://www.nabble.com/examples-of-Wizard-and-working-back-button-tp20805386p21321853.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
using AutoCompleteTextField with wicket 1.4-rc1
Hi, I saw the example of the autocomplete textfield at http://www.wicket-library.com/wicket-examples/ajax/autocomplete.1 and I'm trying to use it. Problem is it doesn't look like it responds at all when I start typing in the textfield. I see that the rendered input field does not have a onchange attribute added like the example does. Does anyone know what I'm missing? Here is my html and java below? form wicket:id=form1 Country: input type=text wicket:id=ac size=50/ /form and my java (same as the example) FormVoid form = new FormVoid(form1); add(form); form.add(new AutoCompleteTextFieldString(ac, new ModelString()) { protected IteratorString getChoices(String input) { if (Strings.isEmpty(input)) { return Collections.EMPTY_LIST.iterator(); } ListString choices = new ArrayListString(10); Locale[] locales = Locale.getAvailableLocales(); for (int i = 0; i locales.length; i++) { final Locale locale = locales[i]; final String country = locale.getDisplayCountry(); if (country.toUpperCase().startsWith(input.toUpperCase())) { choices.add(country); if (choices.size() == 10) { break; } } } return choices.iterator(); } }); } Thanks a bunch, Jason - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
DataView vs ListView
I've been trying to understand when DataView would come in handy. I have a SQL database table with about 1,000,000 rows. The user can enter a search string, and my application returns a list of all the rows that match the search string. This list might be over 10,000 rows. At first I thought this would be a perfect situation for a DataView, since it involves large numbers of rows, and I don't necessarily want to get all 10,000 rows if the user only needs to look at the first 20. However, I'm finding that, since DataView re-queries the database with each page view of the results list, any time advantage I might have gotten initially is quickly lost. It seems that using a PageableListView, I just query the database once and I'm good. So my question is, am I misunderstanding the purpose of the DataView? All of the online examples I find for DataView use Java databases rather than SQL relational databases. Is the DataView only useful if you already have some kind of a Java database to back it up? Or is there some way that I can take advantage of DataView in this situation without having to re-query the database whenever the user clicks to a different page of the result list?
Re: RestartResponseAtInterceptPageException and the query string
A new session should not be created. Check the session ID via Wicket. If it changes, you should probably check the headers for your request/responses to figure out where it changes, and maybe that will allow you to understand why. On Tue, 2009-01-06 at 11:14 +0200, Arie Fishler wrote: Thanks a lot. I will take a look. It seems like for some reason when hitting the intercept page it creates a new sessiontherefore I cannot use the session to store things to achieve the required communication between the calls. Basically I do want to use RestartResponseAtInterceptPageException. because of its return functionality So it seems I am kind of stuck...not here, not there...but thanks for clearing it to me on my possibilities. On Tue, Jan 6, 2009 at 6:29 AM, David Leangen wic...@leangen.net wrote: Since nobody has replied yet... You can do this with RestartResponseException but not RestartResponseAtInterceptPageException. The difference between the two is that the former will simply break the current path and restart somewhere else, I guess kinda like a goto statement. In the latter case, you break to somewhere to do some temporary processing, and return to the point you left off when that temporary processing is done, maybe like a subroutine. This is ideal, for example, for the login scenario. RestartResponseAtInterceptPageException was not designed to accept parameters, so you just can't do it that way. (As to why it was designed that way, you'll have to ask the people who designed it.) What you can do is set a meta key. So long as you remain within the same session, you can temporary store data to the session. It may not be exactly what you want (parameters), but it will allow you to accomplish the same thing. I.e. in org.apache.wicket.Session: public final java.io.Serializable getMetaData(MetaDataKey key) public final void setMetaData(MetaDataKey key, Serializable object) Good luck! =dml On Wed, 2008-12-31 at 18:58 +0200, Arie Fishler wrote: Hi All, First...Happy new year to everybody! I apologize for raising this question again as I did it in the past in some other form but actually this was not really resolved for me. I am using RestartResponseAtInterceptPageException to redirect to some sign-in page or similar. I think it was Martijn that mentioned that the default for the redirect is that the QUERY STRING of the original message is passed to the sign-in page. StillI do not see this happening. I want to get the original query string or at least be able to provide some parameters to that sign in page. How do I achieve this? To make the issue clear I have this sequence. http://domain.com/wicket/pageX?a=1b=2 This does some logic and then throws RestartResponseAtInterceptPageException which redirects to http://domain.com/wicket/signIn but what I wanted to get is http://domain.com/wicket/signIn*?a=1b=2 http://domain.com/wicket/signIn?a=1b=2 * or even add some of my own parameters http://domain.com/wicket/signIn* ?a=1b=2c=3 http://domain.com/wicket/signIn?a=1b=2c=3* ** Can anyone help? Thanks!! - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: DataView vs ListView
This is totally dependent on your implementation. From what you write, I gather that your expense is doing the search - therefore querying the search for every page might be very expensive. For me, I use Lucene to do the search, and then only load the exact rows I want, so it is much more effective to use the DataView rather than ListView, because my biggest expense is just loading the objects. (Also, Lucene seems to get quicker with multiple searches of the same criteria in near succession) -- Jeremy Thomerson http://www.wickettraining.com On Tue, Jan 6, 2009 at 7:07 PM, Dane Laverty danelave...@chemeketa.eduwrote: I've been trying to understand when DataView would come in handy. I have a SQL database table with about 1,000,000 rows. The user can enter a search string, and my application returns a list of all the rows that match the search string. This list might be over 10,000 rows. At first I thought this would be a perfect situation for a DataView, since it involves large numbers of rows, and I don't necessarily want to get all 10,000 rows if the user only needs to look at the first 20. However, I'm finding that, since DataView re-queries the database with each page view of the results list, any time advantage I might have gotten initially is quickly lost. It seems that using a PageableListView, I just query the database once and I'm good. So my question is, am I misunderstanding the purpose of the DataView? All of the online examples I find for DataView use Java databases rather than SQL relational databases. Is the DataView only useful if you already have some kind of a Java database to back it up? Or is there some way that I can take advantage of DataView in this situation without having to re-query the database whenever the user clicks to a different page of the result list?
anyone has some suggestion? thanks a lot
-- View this message in context: http://www.nabble.com/Help%2CDownloadLink%2C-when-file-is-not-existed%2C-not-error-message-tp21307695p21323395.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: anyone has some suggestion? thanks a lot
Buy low, sell high? jk On Tue, Jan 06, 2009 at 05:55:08PM -0800, wch2001 wrote: -- View this message in context: http://www.nabble.com/Help%2CDownloadLink%2C-when-file-is-not-existed%2C-not-error-message-tp21307695p21323395.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: how to remove jsessionid parameters in the url at the first time ppl visit the site?
Thanks for your reply. This morning I create a new class extends BufferedWebResponse and override encodeURL method as you mentioned. The result remains the same. I do print out the origin url passing in , It has already contains the substring of ;jsessionid=, so it won't help if I justreturn the url. so I intend to cut the url whenever it contains jsessionid parameter, but I still get this appear even when I do erase it in my method body and the return of it indeed doesNOT have that parmater anymore. It drives me crazy. Here it is what I do in the final. @Override public CharSequence encodeURL(CharSequence url) { final CharSequence encodeURL = super.encodeURL(url); String s = encodeURL.toString(); int i = 0; if (s.indexOf(jsessionid=) = 0) { i = s.indexOf(?); if (i = 0) { return encodeURL.subSequence(i, encodeURL.length()); } else { return encodeURL; } } else { return encodeURL; } } the encodeURL doesNOT have sessionid parameter, but my url in browser address bar is still like http://192.168.1.164:8080/test/do/;jsessionid=6oghp91zh4es?x=1e7mGct0E7Evt3ol1co31g I'm not sure about where I have made a mistake. Please help me, thanks very much. On Wed, Jan 7, 2009 at 1:24 AM, Johan Compagner jcompag...@gmail.comwrote: create your own BufferedWebResponse and overwrite this method: public CharSequence encodeURL(CharSequence url) and do nothing, just return the url johan On Tue, Jan 6, 2009 at 18:14, Quan Zhou betoget...@gmail.com wrote: Firstly, i should say i have already read about those past threads which are concerned with the jsessionid appending in url problem. My experiment proved the conclusion: the first time people visit the site, the application server (tomcat) would append the jsessionid into the url no matter whether your browser has enabled cookie. then if you continue clicking other links on the page ,or if you close the windows in your Firefox and reopen it again, the jsessionid parameters would disappear because the cookie has been set. Now here is my scenario. My program should be integrated with other forums or portal sites. Those sites send their account profiles to my server by HTTP request with encrypted parameters.(but not HTTPS). Meanwhile, my program mount a url (like loginx) for such requests which does some authentication and throws new RestartResponseAtInterceptPageException to Home page if success. Unfortunately, my Home page is constructed with some Frame Pages which means users would NOT get browser url changing when they click links or submit forms in the page. so the origin jsessionid set by tomcat like we mentioned above remains forever.What's the worse, users would get into others account if they could receive the url existing in the browser address bar by some way. That's terrible for my system. BTW, I'm using mod_proxy of Lighttpd to proxy the dynamic request to the back end Tomcat server which does NOT have any load balance setting or other cluster usage. I've tried several methods which turn out to be useless 1) find out some configuration settings which may force the tomcat use cookie rather than both set the cookie and rewrite the url at the first time. 2) mount another page as a proxy connecting with my loginx page and Home page, use setResponsePage at its constructor method. So my question is : how could I avoid appending jsessionid parameters in the url permanently even at the first time people visit my site? Thanks in advance. Appreciate if any advices.
Re: how to remove jsessionid parameters in the url at the first time ppl visit the site?
I tried to override void redirect(String url) method, and also strip out the jsessionid in it. My problem solved. But I'm not sure whether it would do something harmful to performance or other functions. I would let you know after my fully test. Thank you Johan. It's so kind of you! On Wed, Jan 7, 2009 at 10:45 AM, Quan Zhou betoget...@gmail.com wrote: Thanks for your reply. This morning I create a new class extends BufferedWebResponse and override encodeURL method as you mentioned. The result remains the same. I do print out the origin url passing in , It has already contains the substring of ;jsessionid=, so it won't help if I justreturn the url. so I intend to cut the url whenever it contains jsessionid parameter, but I still get this appear even when I do erase it in my method body and the return of it indeed doesNOT have that parmater anymore. It drives me crazy. Here it is what I do in the final. @Override public CharSequence encodeURL(CharSequence url) { final CharSequence encodeURL = super.encodeURL(url); String s = encodeURL.toString(); int i = 0; if (s.indexOf(jsessionid=) = 0) { i = s.indexOf(?); if (i = 0) { return encodeURL.subSequence(i, encodeURL.length()); } else { return encodeURL; } } else { return encodeURL; } } the encodeURL doesNOT have sessionid parameter, but my url in browser address bar is still like http://192.168.1.164:8080/test/do/;jsessionid=6oghp91zh4es?x=1e7mGct0E7Evt3ol1co31g I'm not sure about where I have made a mistake. Please help me, thanks very much. On Wed, Jan 7, 2009 at 1:24 AM, Johan Compagner jcompag...@gmail.comwrote: create your own BufferedWebResponse and overwrite this method: public CharSequence encodeURL(CharSequence url) and do nothing, just return the url johan On Tue, Jan 6, 2009 at 18:14, Quan Zhou betoget...@gmail.com wrote: Firstly, i should say i have already read about those past threads which are concerned with the jsessionid appending in url problem. My experiment proved the conclusion: the first time people visit the site, the application server (tomcat) would append the jsessionid into the url no matter whether your browser has enabled cookie. then if you continue clicking other links on the page ,or if you close the windows in your Firefox and reopen it again, the jsessionid parameters would disappear because the cookie has been set. Now here is my scenario. My program should be integrated with other forums or portal sites. Those sites send their account profiles to my server by HTTP request with encrypted parameters.(but not HTTPS). Meanwhile, my program mount a url (like loginx) for such requests which does some authentication and throws new RestartResponseAtInterceptPageException to Home page if success. Unfortunately, my Home page is constructed with some Frame Pages which means users would NOT get browser url changing when they click links or submit forms in the page. so the origin jsessionid set by tomcat like we mentioned above remains forever.What's the worse, users would get into others account if they could receive the url existing in the browser address bar by some way. That's terrible for my system. BTW, I'm using mod_proxy of Lighttpd to proxy the dynamic request to the back end Tomcat server which does NOT have any load balance setting or other cluster usage. I've tried several methods which turn out to be useless 1) find out some configuration settings which may force the tomcat use cookie rather than both set the cookie and rewrite the url at the first time. 2) mount another page as a proxy connecting with my loginx page and Home page, use setResponsePage at its constructor method. So my question is : how could I avoid appending jsessionid parameters in the url permanently even at the first time people visit my site? Thanks in advance. Appreciate if any advices.
Re: anyone has some suggestion? thanks a lot
I always found the suggestion don't eat yellow snow to hold true. Any specific topic you were thinking of? :) On Tue, Jan 6, 2009 at 7:59 PM, John Krasnay j...@krasnay.ca wrote: Buy low, sell high? jk On Tue, Jan 06, 2009 at 05:55:08PM -0800, wch2001 wrote: -- View this message in context: http://www.nabble.com/Help%2CDownloadLink%2C-when-file-is-not-existed%2C-not-error-message-tp21307695p21323395.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
sorry, what do u mean for that?
-- View this message in context: http://www.nabble.com/Help%2CDownloadLink%2C-when-file-is-not-existed%2C-not-error-message-tp21307695p21324403.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: sorry, what do u mean for that?
It was a bad joke. You asked for suggestions but didn't explain what your problem was. jk On Tue, Jan 06, 2009 at 07:51:25PM -0800, wch2001 wrote: -- View this message in context: http://www.nabble.com/Help%2CDownloadLink%2C-when-file-is-not-existed%2C-not-error-message-tp21307695p21324403.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: sorry, what do u mean for that?
i dont think it was that bad. -igor On Tue, Jan 6, 2009 at 9:21 PM, John Krasnay j...@krasnay.ca wrote: It was a bad joke. You asked for suggestions but didn't explain what your problem was. jk On Tue, Jan 06, 2009 at 07:51:25PM -0800, wch2001 wrote: -- View this message in context: http://www.nabble.com/Help%2CDownloadLink%2C-when-file-is-not-existed%2C-not-error-message-tp21307695p21324403.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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: anyone has some suggestion? thanks a lot
The first time I saw snow I was 29 years old... So, I was implicitly following your suggestion most of my life:-). I always found this answer/suggestion, given by Elvis Presley, rather interesting: “Why buy a cow when you can get milk through a fence?” Jeremy Thomerson-5 wrote: I always found the suggestion don't eat yellow snow to hold true. Any specific topic you were thinking of? :) On Tue, Jan 6, 2009 at 7:59 PM, John Krasnay j...@krasnay.ca wrote: Buy low, sell high? jk On Tue, Jan 06, 2009 at 05:55:08PM -0800, wch2001 wrote: -- View this message in context: http://www.nabble.com/Help%2CDownloadLink%2C-when-file-is-not-existed%2C-not-error-message-tp21307695p21323395.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 -- View this message in context: http://www.nabble.com/Help%2CDownloadLink%2C-when-file-is-not-existed%2C-not-error-message-tp21307695p21325383.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: sorry, what do u mean for that?
My question is I am doing downloadLink , when the file is existed, it is ok to download it, but when the file is not existed, no any error message No file exist! to popup! According to debug, i can see it already go to the line: target.appendJavascript(alert('No file exist!')); John Krasnay wrote: It was a bad joke. You asked for suggestions but didn't explain what your problem was. jk On Tue, Jan 06, 2009 at 07:51:25PM -0800, wch2001 wrote: -- View this message in context: http://www.nabble.com/Help%2CDownloadLink%2C-when-file-is-not-existed%2C-not-error-message-tp21307695p21324403.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 -- View this message in context: http://www.nabble.com/Help%2CDownloadLink%2C-when-file-is-not-existed%2C-not-error-message-tp21307695p21325599.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: sorry, what do u mean for that?
Yellow snow should do it... 2009/1/7 wch2001 wch2...@hotmail.com: My question is I am doing downloadLink , when the file is existed, it is ok to download it, but when the file is not existed, no any error message No file exist! to popup! According to debug, i can see it already go to the line: target.appendJavascript(alert('No file exist!')); John Krasnay wrote: It was a bad joke. You asked for suggestions but didn't explain what your problem was. jk On Tue, Jan 06, 2009 at 07:51:25PM -0800, wch2001 wrote: -- View this message in context: http://www.nabble.com/Help%2CDownloadLink%2C-when-file-is-not-existed%2C-not-error-message-tp21307695p21324403.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 -- View this message in context: http://www.nabble.com/Help%2CDownloadLink%2C-when-file-is-not-existed%2C-not-error-message-tp21307695p21325599.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: sorry, what do u mean for that?
Well, interestingly enough, I still fail to find a question in your question. Maybe a little more code and an accurate description of your problem would help us give you a more sane answer, which we'd happily do. On Wed, Jan 7, 2009 at 12:19 AM, wch2001 wch2...@hotmail.com wrote: My question is I am doing downloadLink , when the file is existed, it is ok to download it, but when the file is not existed, no any error message No file exist! to popup! According to debug, i can see it already go to the line: target.appendJavascript(alert('No file exist!')); John Krasnay wrote: It was a bad joke. You asked for suggestions but didn't explain what your problem was. jk On Tue, Jan 06, 2009 at 07:51:25PM -0800, wch2001 wrote: -- View this message in context: http://www.nabble.com/Help%2CDownloadLink%2C-when-file-is-not-existed%2C-not-error-message-tp21307695p21324403.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 -- View this message in context: http://www.nabble.com/Help%2CDownloadLink%2C-when-file-is-not-existed%2C-not-error-message-tp21307695p21325599.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 -- Jeremy Thomerson http://www.wickettraining.com
Re: sorry, what do u mean for that?
I use DownloadLink, when file is not existed, there is not any info message. how to solve it? thanks a lot Jeremy Thomerson-5 wrote: Well, interestingly enough, I still fail to find a question in your question. Maybe a little more code and an accurate description of your problem would help us give you a more sane answer, which we'd happily do. On Wed, Jan 7, 2009 at 12:19 AM, wch2001 wch2...@hotmail.com wrote: My question is I am doing downloadLink , when the file is existed, it is ok to download it, but when the file is not existed, no any error message No file exist! to popup! According to debug, i can see it already go to the line: target.appendJavascript(alert('No file exist!')); John Krasnay wrote: It was a bad joke. You asked for suggestions but didn't explain what your problem was. jk On Tue, Jan 06, 2009 at 07:51:25PM -0800, wch2001 wrote: -- View this message in context: http://www.nabble.com/Help%2CDownloadLink%2C-when-file-is-not-existed%2C-not-error-message-tp21307695p21324403.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 -- View this message in context: http://www.nabble.com/Help%2CDownloadLink%2C-when-file-is-not-existed%2C-not-error-message-tp21307695p21325599.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 -- Jeremy Thomerson http://www.wickettraining.com -- View this message in context: http://www.nabble.com/Help%2CDownloadLink%2C-when-file-is-not-existed%2C-not-error-message-tp21307695p21326158.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: sorry, what do u mean for that?
I use DownloadLink, when file is not existed, there is not any info message. how to solve it? I want to show some message like No file finds when the file is not existed thanks a lot Jeremy Thomerson-5 wrote: Well, interestingly enough, I still fail to find a question in your question. Maybe a little more code and an accurate description of your problem would help us give you a more sane answer, which we'd happily do. On Wed, Jan 7, 2009 at 12:19 AM, wch2001 wch2...@hotmail.com wrote: My question is I am doing downloadLink , when the file is existed, it is ok to download it, but when the file is not existed, no any error message No file exist! to popup! According to debug, i can see it already go to the line: target.appendJavascript(alert('No file exist!')); John Krasnay wrote: It was a bad joke. You asked for suggestions but didn't explain what your problem was. jk On Tue, Jan 06, 2009 at 07:51:25PM -0800, wch2001 wrote: -- View this message in context: http://www.nabble.com/Help%2CDownloadLink%2C-when-file-is-not-existed%2C-not-error-message-tp21307695p21324403.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 -- View this message in context: http://www.nabble.com/Help%2CDownloadLink%2C-when-file-is-not-existed%2C-not-error-message-tp21307695p21325599.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 -- Jeremy Thomerson http://www.wickettraining.com -- View this message in context: http://www.nabble.com/Help%2CDownloadLink%2C-when-file-is-not-existed%2C-not-error-message-tp21307695p21326180.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: sorry, what do u mean for that?
Maybe try asking the question in your native language? ** Martin 2009/1/7 wch2001 wch2...@hotmail.com: I use DownloadLink, when file is not existed, there is not any info message. how to solve it? I want to show some message like No file finds when the file is not existed thanks a lot Jeremy Thomerson-5 wrote: Well, interestingly enough, I still fail to find a question in your question. Maybe a little more code and an accurate description of your problem would help us give you a more sane answer, which we'd happily do. On Wed, Jan 7, 2009 at 12:19 AM, wch2001 wch2...@hotmail.com wrote: My question is I am doing downloadLink , when the file is existed, it is ok to download it, but when the file is not existed, no any error message No file exist! to popup! According to debug, i can see it already go to the line: target.appendJavascript(alert('No file exist!')); John Krasnay wrote: It was a bad joke. You asked for suggestions but didn't explain what your problem was. jk On Tue, Jan 06, 2009 at 07:51:25PM -0800, wch2001 wrote: -- View this message in context: http://www.nabble.com/Help%2CDownloadLink%2C-when-file-is-not-existed%2C-not-error-message-tp21307695p21324403.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 -- View this message in context: http://www.nabble.com/Help%2CDownloadLink%2C-when-file-is-not-existed%2C-not-error-message-tp21307695p21325599.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 -- Jeremy Thomerson http://www.wickettraining.com -- View this message in context: http://www.nabble.com/Help%2CDownloadLink%2C-when-file-is-not-existed%2C-not-error-message-tp21307695p21326180.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: sorry, what do u mean for that?
Roll your own link: LinkFile downloadLink = new LinkFile(yourID, yourModelThatReturnsAFile) { private static final long serialVersionUID = 1L; @Override public void onClick() { File file = getModelObject(); if (file.exists()) { IResourceStream rs = new FileResourceStream(file); getRequestCycle().setRequestTarget(new ResourceStreamRequestTarget(rs)); } else { error(getString(nonexistent-file)); } } }; That code is mostly copied from DownloadLink. -- Jeremy Thomerson http://www.wickettraining.com On Wed, Jan 7, 2009 at 1:35 AM, wch2001 wch2...@hotmail.com wrote: I use DownloadLink, when file is not existed, there is not any info message. how to solve it? I want to show some message like No file finds when the file is not existed thanks a lot Jeremy Thomerson-5 wrote: Well, interestingly enough, I still fail to find a question in your question. Maybe a little more code and an accurate description of your problem would help us give you a more sane answer, which we'd happily do. On Wed, Jan 7, 2009 at 12:19 AM, wch2001 wch2...@hotmail.com wrote: My question is I am doing downloadLink , when the file is existed, it is ok to download it, but when the file is not existed, no any error message No file exist! to popup! According to debug, i can see it already go to the line: target.appendJavascript(alert('No file exist!')); John Krasnay wrote: It was a bad joke. You asked for suggestions but didn't explain what your problem was. jk On Tue, Jan 06, 2009 at 07:51:25PM -0800, wch2001 wrote: -- View this message in context: http://www.nabble.com/Help%2CDownloadLink%2C-when-file-is-not-existed%2C-not-error-message-tp21307695p21324403.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 -- View this message in context: http://www.nabble.com/Help%2CDownloadLink%2C-when-file-is-not-existed%2C-not-error-message-tp21307695p21325599.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 -- Jeremy Thomerson http://www.wickettraining.com -- View this message in context: http://www.nabble.com/Help%2CDownloadLink%2C-when-file-is-not-existed%2C-not-error-message-tp21307695p21326180.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: sorry, what do u mean for that?
Thanks , Jeremy, I tried to use AjaxSubmitLink , to @Override protected void onSubmit(AjaxRequestTarget target, Form form) { final File f1 = new File(path.trim() + / + fname); if (f1.exists()) { final String fn = f1.getName(); IResourceStream resourceStream = new FileResourceStream(new org.apache.wicket.util.file.File(f1)); getRequestCycle().setRequestTarget(new ResourceStreamRequestTarget(resourceStream) { @Override public String getFileName() { return fn; } }); } } But when i clicked the AjaxSubmitLink, i can not get the popup window for saving. I mean when i clicked the ajaxsumbitlink, there is nothing , not like downloadlink to popup window. can u give me some suggestion? thanks Jeremy Thomerson-5 wrote: Roll your own link: LinkFile downloadLink = new LinkFile(yourID, yourModelThatReturnsAFile) { private static final long serialVersionUID = 1L; @Override public void onClick() { File file = getModelObject(); if (file.exists()) { IResourceStream rs = new FileResourceStream(file); getRequestCycle().setRequestTarget(new ResourceStreamRequestTarget(rs)); } else { error(getString(nonexistent-file)); } } }; That code is mostly copied from DownloadLink. -- Jeremy Thomerson http://www.wickettraining.com On Wed, Jan 7, 2009 at 1:35 AM, wch2001 wch2...@hotmail.com wrote: I use DownloadLink, when file is not existed, there is not any info message. how to solve it? I want to show some message like No file finds when the file is not existed thanks a lot Jeremy Thomerson-5 wrote: Well, interestingly enough, I still fail to find a question in your question. Maybe a little more code and an accurate description of your problem would help us give you a more sane answer, which we'd happily do. On Wed, Jan 7, 2009 at 12:19 AM, wch2001 wch2...@hotmail.com wrote: My question is I am doing downloadLink , when the file is existed, it is ok to download it, but when the file is not existed, no any error message No file exist! to popup! According to debug, i can see it already go to the line: target.appendJavascript(alert('No file exist!')); John Krasnay wrote: It was a bad joke. You asked for suggestions but didn't explain what your problem was. jk On Tue, Jan 06, 2009 at 07:51:25PM -0800, wch2001 wrote: -- View this message in context: http://www.nabble.com/Help%2CDownloadLink%2C-when-file-is-not-existed%2C-not-error-message-tp21307695p21324403.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 -- View this message in context: http://www.nabble.com/Help%2CDownloadLink%2C-when-file-is-not-existed%2C-not-error-message-tp21307695p21325599.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 -- Jeremy Thomerson http://www.wickettraining.com -- View this message in context: http://www.nabble.com/Help%2CDownloadLink%2C-when-file-is-not-existed%2C-not-error-message-tp21307695p21326180.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 -- View this message in context: http://www.nabble.com/Help%2CDownloadLink%2C-when-file-is-not-existed%2C-not-error-message-tp21307695p21326415.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