Re: [Wicket-user] Binding the "Enter" key with a button
Hi One solution but not the ideal one would be (assuming go is a submit button), to override the onSubmit of the form and to perform the action which you would do in your Go.So when u hit enter form would be submitted and action for go would be invoked. But may not what u r actally looking for On 6/22/07, David Leangen <[EMAIL PROTECTED]> wrote: I hope this isn't an obvious question again... I did try searching. ;-) Could somebody kindly point me to some doc that explains how to bind a key to a form component? In this case, I want to bind the "Enter" key with my "Go" button. Thanks! - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] How can we change a component dynamically in Wicket ?
Hi I can see a few things gond wrong here... 1> First in the onclick method , this does not refer to the original parent to which label was added initially as label is the component u want to replace 2> When u want to add a new component to replace the original component in the parent heirarchy , u need to call replace method or replaceWith method 3> Dont create the textfield right at the beginning. Do it in the onClick method. Here it just hangs out there until user clicks the link -swaroop On 6/21/07, ccc rrr <[EMAIL PROTECTED]> wrote: Hi, I want to change a component in html, for example: *1)Test.html* Click here *2)Test.java* public class Test extends WebPage { private int count = 0; Label label = null; TextField textField = null; public Login() { super(); label = new Label("label", new PropertyModel(this, "count")); label.setOutputMarkupId(true); textField = new TextField("label", new PropertyModel(this, "count")); textField.setOutputMarkupId(true); AjaxLink ajaxLink = new AjaxLink("ajaxLink") { public void onClick(AjaxRequestTarget request) { count++; if (count % 2 == 0) { this.add(label); request.addComponent (label); } else { this.add(textField); request.addComponent(textField); } } }; this.add(label); this.add(ajaxLink); } public int getCount() { return count; } public void setCount(int count) { this.count = count; } } However, when I client the link, the Ajax message shows as: INFO: INFO: Initiating Ajax GET request on /wicket/mytest/?wicket:interface=:0:ajaxLink::IBehaviorListener&wicket:behaviorId=0&random= 0.17448336090136768 INFO: Invoking pre-call handler(s)... INFO: Received ajax response (53 characters) INFO: ERROR: Error while parsing response: Could not find root element INFO: Invoking post-call handler(s)... INFO: Invoking failure handler(s)... - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Problem with request sent with double quotes present in component value [Dropdown option value not being escaped]
hi igor, Tested with 1.2.6 and same result. Also had a look at trunk code. Looks the same. -swaroop On 6/11/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote: why not download 1.2.6 and try yourself? let us know if its fixed or not. -igor On 6/11/07, Swaroop Belur < [EMAIL PROTECTED]> wrote: > > Hi All > > I have a dropdown choice in which I happened to render string values > for So as i have mentioned earlier in this thread, some option values were > having double quotes in them > and therefore coming as "" in the server side. > > I found that by escaping the markup for option values as well in > AbstractChoice#appendOptionHtml > i was able to get the value. > > Is this scenatio fixed in versions > 1.2.4 ? > If not is it possible for the wicket team to have a look at this as > well > > -Thanks > swaroop belur > > > > > > On 6/8/07, Swaroop Belur <[EMAIL PROTECTED] > wrote: > > > > Hi All > > > > Wicket 1.2.4 > > > > I hava a dropdownchoice with round tip to the server enabled on > > selection change. > > > > The problem is when i select a string which is delimited by double > > quotes, the value comes up as > > an empty string at the server side. The class which initially > > processes is MultipartServletWebRequest . > > > > It appears that DiskFileItem#get() method returns empty array. > > > > It works properly for single quotes. > > > > How do I overcome this problem. Please help. > > > > > > -Thanks > > swaroop belur > > > > > > > > > > > > > - > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > > - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Problem with request sent with double quotes present in component value [Dropdown option value not being escaped]
Hi All I have a dropdown choice in which I happened to render string values for 1.2.4 ? If not is it possible for the wicket team to have a look at this as well -Thanks swaroop belur On 6/8/07, Swaroop Belur <[EMAIL PROTECTED]> wrote: Hi All Wicket 1.2.4 I hava a dropdownchoice with round tip to the server enabled on selection change. The problem is when i select a string which is delimited by double quotes, the value comes up as an empty string at the server side. The class which initially processes is MultipartServletWebRequest . It appears that DiskFileItem#get() method returns empty array. It works properly for single quotes. How do I overcome this problem. Please help. -Thanks swaroop belur - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] Problem with request sent with double quotes present in component value
Hi All Wicket 1.2.4 I hava a dropdownchoice with round tip to the server enabled on selection change. The problem is when i select a string which is delimited by double quotes, the value comes up as an empty string at the server side. The class which initially processes is MultipartServletWebRequest . It appears that DiskFileItem#get() method returns empty array. It works properly for single quotes. How do I overcome this problem. Please help. -Thanks swaroop belur - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] A couple of issues while handling bookmarkable pages....
Hi Wicket: 1.2.4 Thanks for the reply. Actually they are relative paths with no wicket ids. It was my mistake since the mounted url had a additional component in path. There was an extra path component in mount url, I guess that was the reason for images not to be shown. So i copied the images to folder where the mounted url could find it. On 6/4/07, Al Maw <[EMAIL PROTECTED]> wrote: Swaroop Belur wrote: > This is to do with images . If the page is mounted, images are not > shown otherwise images are shown. It appears that images do not get > picked up if I mount a page. > > Otherwise if i click on a link in some other page [ which is not > mounted] and which takes me to the page i am interested in , I am > able to view the images ... Any ideas here? We'll need some more detail here. How are you adding your images? Are they just in the HTML, with no Wicket Component attached to them? Which Wicket version are you using? If you're on a 1.3.0-SNAPSHOT, is it fairly up-to-date? Al -- Alastair Maw Wicket-biased blog at http://herebebeasties.com - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] A couple of issues while handling bookmarkable pages....
Problem 1: In my application, I have mounted a couple of urls. Steps: 1> log on using bookmarkable url 2> click on a link in that page which presents me with different panel which replaces an exisiting panel. [ So basically the view that a user gets is different from when he logs in after clicking this link] 3>Do an operation in this new panel which causes a pop up to be shown to the user. 4> Do a save operation in the pop up window and using javascript refresh the base window. The problem is that when the base window refreshes, user is shown the panel he is first shown i.e after logging in. The expected behaviour should have been to show the view contaning the new panel from which pop up was launched. In other words the user is not presented with same view in the browser when the base window refreshes. I understand the problem is because the URL was mounted ; because it works properly if it is not mounted. [ The request target again becomes a bookmarkablepagerequesttarget which actually just sends the user back to where the page was mounted to I suppose. ] Can anyone suggest the best way to show the correct view to the user i.e the code should take care of both scenarios - mounted and not mounted. I was thinking of replacing the first panel with the second if this kind of action happends. that is I have to store somewhere that the user did a save from the popup . I am not sure whether this is really a good way to do it. Any better ideas ?? Problem 2: This is to do with images . If the page is mounted, images are not shown otherwise images are shown. It appears that images do not get picked up if I mount a page. Otherwise if i click on a link in some other page [ which is not mounted] and which takes me to the page i am interested in , I am able to view the images ... Any ideas here? -Regards swaroop belur - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] A problem with using SubmitLink
Thanks Eelco for the response... Have filed a jira issue :- https://issues.apache.org/jira/browse/WICKET-546 Thanks swaroop On 5/8/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote: > 1> why doesnt current onComponentTag call super.onComponetTag ? It is being called in Wicket 1.3. It looks like a bug it isn't in 1.2.x, but the fix is probably not as straightforward as just adding the super call. Please open up a JIRA request if you need this fixed. > 2> How do i ensure that my javascript call gets invoked before the submit > operation? There currently does not seem to be a facility for that. At this point, for 1.2, you're probably best of creating your own submitlink class that does exactly what you want. For 1.3, it does still seem to be impossible to do this, so I'm wondering whether Johan has an idea on this. Eelco - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] A problem with using SubmitLink
Hi Wicket version 1.2.4 Note: The scenario explained below works perfectly well for a Link. Usage : I am using a submit Link in my form to perform a delete operation . I disable the link when there is nothing to delete [ I maintain a list for this ] and when the user checks some items to be deleted , i enable the link and add a onClick attribute to call a javascript confirmation box via a behavior. Finally i use AjaxRequestTarget.addComponent to render. Problem : Wicket complains that the delete link cannot be found even though i set markupid to true in all relevant places. So while debugging i figured out that onComponentTag of SubmitLink does not call super.onComponentTag . By introducing this call in the method, I could see the id value[markup id] in source code. HOWEVER this did not solve my problem fully because onClick did not call my Javascript function. So on examining the Ajax Debug window output, I could see 2 onclicks added for submitlink response. Questions : 1> why doesnt current onComponentTag call super.onComponetTag ? 2> How do i ensure that my javascript call gets invoked before the submit operation? -Regards swaroop - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] NPE in find method of MarkupFragmentFinder class...
Hello all In the find method there is this piece of code which compares a tag's ID to another component's id Code snippet [ ... markupStream.setCurrentIndex(component.markupIndex); MarkupElement elem = markupStream.get(); if (elem instanceof ComponentTag) { ComponentTag tag = (ComponentTag)elem; if (tag.getId().equals(component.getId())) { // Ok, found it return markupStream; } } . ] Background: I am designing a page which has a collapsable panel. I feel that I have called setOutputMarkupId in the relevant places for the panels to be refreshed because when panel refresh happens the second time i click (a plus icon to expand ) The problem is that It does NOT happen the first time and i simply click the second time and panel refreshes. [ i am using ajaxrequesttarget.replace and ajaxrequesttarget.addcomponent] Problem The problem i am facing is that the every odd numbered ajax request gives a NPE for tag.getId() So while debugging thru this section, I observed that eclipse shows the stringified expression of this tag (instance of ComponentTag) as ..?? My Modification I just added a null pointer check for tag.getID and then on it worked properly for every odd numbered Ajax Request . Any suggestions ? -Swaroop - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] An issue while using IAutoCompleteRenderer
Hi all I am trying to use a renderer which implements IAutoCompleteRenderer for auto completion on a textfield. My problem is in the case when there are no matching Strings to the input in render method [Because renderHeader always gets called ..thats what i figured] I was trying to directly implement this interface so that i cud customize the result using some html other that just tags for example. So while it works just fine when there are inputs, the problem comes up when there are no matching results. Thats when it looks bad in the UI. My custom html shows up with no results. So i was wondering whether it was possible for wicket to figure out in any way that there are no matching results and hence shud NOT output the header and footer ? Thanks swaroop belur - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] Query regarding formation of URL for a link
Hello All This is w.r.t url generated for links. I was looking at the wicket examples page and did a view source for a link. One link had this URL : http://localhost:8080/wicket-examples/linkomatic;jsessionid=7hp5u436aji7?wicket:interface=:0:actionLink::ILinkListener My doubt is regarding ILinkListener. I was wondering whether it is absolutely necessary to have it in the URL. My reasoning is this - since wicket can find out the type of component by looking at component id which in this case happens to be actionLink. So if wicket can find out that it is a link component , then it can automcatically call the onClick() method of this link component. Was the listener included because there is a possibility of more than one listener being implemented by the actionLink component and hence wicket needs to know which listener's method shud get triggered. ? Regards swaroop belur - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user