Adding vertical scrollbar to the listview
Hi, I have a list view that displays 5 blank rows. When I click the add blank row button, it adds 5 more rows to the existing 5 blank rows. Likewise, my listview may grow. Is there a possibility to add a scrollbar to my listview. Appreciate your help in this regard. Thanks J -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Adding-vertical-scrollbar-to-the-listview-tp2290796p2290796.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: Panel re-rendered twice, when the data is pulled in.
Ed, Thank you so much for the reply. Could you please send me the link to the working example. I would like to compare with the one I have. Btw, thanks for pointing out the improper usage of table fragment as panel. I have modified to div Appreciate your help in this regard. J. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Panel-re-rendered-twice-when-the-data-is-fetched-tp2268924p2271215.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: Submitting a component value on a ajax call of a different component
Why is getCallbackScript(boolean onlyTargetActivePage) is not called in the below code. I realized that it is not a @Override method. Not sure what is wrong here Instead of using typeOption.add(new AbstractDefaultAjaxBehavior(), I also tried using typeOption.add(new AjaxFormComponentUpdatingBehavior(onchange). the onUpdate method is called, but not the getCallbackScript method.. Could anybody please help me? Thanks, J -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Submitting-a-component-value-on-a-ajax-call-of-a-different-component-tp2264940p2271345.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: passing a map into PageParameters
PageParameters parameters = new PageParameters(swfParameters); This is how the hashmap is constructed in PageParameters.. Thanks, J -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/passing-a-map-into-PageParameters-tp2271341p2271351.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: Panel re-rendered twice, when the data is fetched.
Hi, I figured out the issue for panel being rendered twice :) The addresspanel.html was not started with table tag... It directly has a tr tag.. It worked fine, when I constructed the tags with proper tabletrtd../td/tr/table. Thanks a lot... J -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Panel-re-rendered-twice-when-the-data-is-fetched-tp2268924p2271624.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: Submitting a component value on a ajax call of a different component
Thank you so much for your reply. I tried using getCallbackScript on my dropdown box. But it is never been called and also the fetch value on the wicket side returns null for the dropdown box. Not sure where I am doing wrong. Please suggest. My code is as below.. /DropdownChoice**/ final DropDownChoiceString typeOption=new DropDownChoiceString(type, list){ private static final long serialVersionUID = 1L; @Override protected CharSequence getDefaultChoice(Object selected) { return option value=\\--/option; } protected boolean wantOnSelectionChangedNotifications() { return true; } }; /*adding to the form and setting outputmarkupid to true form.add(typeOption.setRequired(true).setOutputMarkupId(true)); /adding AbstractDefaultAjaxBehavior to the above dropdownchoice / typeOption.add(new AbstractDefaultAjaxBehavior() { private static final long serialVersionUID = 1L; @Override protected void respond(AjaxRequestTarget target) { // TODO Auto-generated method stub System.out.println(this is not getting printed); } @Override protected CharSequence getCallbackScript(boolean onlyTargetActivePage) { System.out.println(not getting printed); return generateCallbackScript(wicketAjaxGet(' + getCallbackUrl(onlyTargetActivePage) + mawbTypeDataOptionValue='+$Wicket.$(+mawbTypeDataOption.getMarkupId()+).value + );); } }); final TextFieldString nameTf = new TextFieldString(name); form.add(nameTf.setConvertEmptyInputStringToNull(false).setOutputMarkupId(true)); //**trying to access ddc value from onBlur of the textfield**/ nameTf.add(new AjaxEventBehavior(onBlur) { private static final long serialVersionUID = 1L; @Override protected void onEvent(AjaxRequestTarget target) { nameTf.setModelObject(); Request request = RequestCycle.get().getRequest(); String ddcValue = request.getParameter (mawbTypeDataOptionValue); System.out.println(this always prints null ++ddcValue); nameTf .modelChanged(); target.addComponent(nameTf); target.addComponent(feedbackPanel); } }); -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Submitting-a-component-value-on-a-ajax-call-of-a-different-component-tp2264940p2268754.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
Panel re-rendered twice, when the data is pulled in.
Hi, The page loads address panel with couple of text fields . When the search is made for a particular address id, the address panel is rendered twice (one panel with the data, the second panel without the data). Not sure how to avoid re-rendering of panel twice, setResponsePage(getPage()) can be a solution, but I dont want the whole page to be refreshed as I am using 4 panels in my page. The code is as below. Not sure if there is a problem in the way the markup is structured. Appreciate your help in this regard. /AddressPanel.html***/ !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html xmlns=http://www.w3.org/1999/xhtml; xmlns:wicket=http://wicket.sourceforge.net/; xml:lang=en lang=en body wicket:panel tr thAdr1:/th td align=leftinput type='text' wicket:id=address size='30' maxlength='45'//td /tr tr th align='right'Adr2:/th td align=leftinput type='text' wicket:id=address2 size='30' maxlength='45'//td /tr /wicket:panel /body /html /AddressPanel.java***/ public class AddressPanel extends Panel { public AddressPanel(String id, IModel model) { super(id); setDefaultModel(new CompoundPropertyModel(model)); add(new RequiredTextField(address)); add(new TextField(address2).setConvertEmptyInputStringToNull(false)); } } /* java file that instantiates the panel */ final Panel shipAddressPanel = new AddressPanel(shipperAddressPanel, new Model(address.getShipAddress())); shipAddressPanel.setOutputMarkupId(true); mawbForm.add(shipAddressPanel); add(mawbForm); final TextField shipIdTf = new TextField(shipperId, new PropertyModel(dtomodel, shipperId)); shipIdTf.setOutputMarkupId(true); mawbForm.add(shipIdTf); shipIdTf.add(new AjaxFormComponentUpdatingBehavior(onBlur){ private static final long serialVersionUID = 1L; @Override protected void onUpdate(AjaxRequestTarget target) { Shipper shipper= shipDao.loadShipAddress(Long.parseLong(shipIdTf.getDefaultModelObjectAsString())) Address address = new Address(); address.setShipAddress(shipper); shipAddressPanel.setDefaultModelObject(address.getShipAddress()); target.addComponent(shipAddressPanel); } }); /* the template that calls the panel ***/ !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd; html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en lang=en head/head body form wicket:id=form tabletr td valign='top' style=width:8em;height:15em; table width='100%' border='1' cellpadding='1' cellspacing='' tbody tr td class='instrLabelColor' colspan=2 align='center'SHIP From: input type='text' wicket:id=shipperId / /td /tr tr wicket:id=shipperAddressPanel/tr /tbody /table
Re: Panel re-rendered twice, when the data is pulled in.
Ed, Thanks for your reply. I already tried this. But still the problem exists. :( setResponsePage(getPage(this)) seems to be the work around for this issue. But the problem is, the other inputfields that have values on this page are lost when the panel is re-rendered. I am not sure how to solve this issue. Thanks J. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Panel-re-rendered-twice-when-the-data-is-fetched-tp2268924p2268991.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: Submitting a component value on a ajax call of a different component
Hi, I am looking to submit the selected value from the dropdown to the server , on the onblur of the textfield component. Is there a way to do it, though I have attached the AjaxFormComponentUpdatingBehavior to the textfield but not to the dropdown box. Appreciate your help in this regard. Thanks for your time. J. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Submitting-a-component-value-on-a-ajax-call-of-a-different-component-tp2264940p2266036.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: AjaxFormComponentUpdatingBehavior is not called when the textfield is set as required field.
Thanks for your input. It was very useful. J. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/AjaxFormComponentUpdatingBehavior-is-not-called-when-the-textfield-is-set-as-required-field-tp2263486p2264933.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
Submitting a component value on a ajax call of a different component
Hi, I have a dropdown box and a text field as below //dropdownbox final DropDownChoice typeOption=new DropDownChoice(type, dataList){ protected boolean wantOnSelectionChangedNotifications() { return true; } }; form.add(typeOption.setRequired(true).setOutputMarkupId(true)); //textfield TextField nameTf = new TextField(name); form.add(nameTf .setOutputMarkupId(true)); name.add(new AjaxFormComponentUpdatingBehavior(onBlur) { @Override protected void onUpdate(AjaxRequestTarget target) { name.modelChanged(); target.addComponent(name); target.addComponent(feedbackPanel); } }); How to submit a selected value from the drop down box to the ajax behavior of text component because the fields need to be updated based the selected value from the dropdown. Please suggest. Thanks for your time. J -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Submitting-a-component-value-on-a-ajax-call-of-a-different-component-tp2264940p2264940.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
AjaxFormComponentUpdatingBehavior is not called when the textfield is set as required field.
Hi, If the setRequired is set to true, then the println statement is not called, otherwise it is called. Not sure, where I am doing wrong. Please suggest. final TextFieldString name= new TextFieldString(name); name.setRequired(true); form.add(name.setConvertEmptyInputStringToNull(false).setOutputMarkupId(true)); name.add(new AjaxFormComponentUpdatingBehavior(onBlur){ @Override protected void onUpdate(AjaxRequestTarget target) { System.out.println(is this called?); target.addComponent(feedbackPanel); } }); Thanks for your time. J. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/AjaxFormComponentUpdatingBehavior-is-not-called-when-the-textfield-is-set-as-required-field-tp2263486p2263486.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 create a Popup Button
Could anybody suggest how to create a popup button. I read in the forum that a link can be attached to a button. But it did not help me. Not sure, where is the mistake in the below code. html code -- //having a link id inside a button.. input type=button wicket:id=mawbNotes value='Mawb Notes' / # java code. --- PopupSettings popupSettings = new PopupSettings(PopupSettings.LOCATION_BAR | PopupSettings.RESIZABLE | PopupSettings.SCROLLBARS).setHeight(300).setWidth(730).setTop(300).setLeft(180); //Link Link notesLink = new Link(notesLink) { @Override public void onClick() { } }; notesLink.setPopupSettings(popupSettings); //Button Button mawbNotes = new Button(mawbNotes) { @Override public void onSubmit() { setResponsePage(getPage()) } }; //adding link to a button mawbNotes.add(notesLink); //adding button to the from mawbForm.add(mawbNotes.setDefaultFormProcessing(false)); The above code does not pop up.. rather opens the page in the same window. Thanks in advance for your help. Jamuna. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-create-a-Popup-Button-tp2256714p2256714.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
DateTime rendered in a single textfield (FORMAT =MM/dd/yy kk:mm)does not hold to kk:mm values when a date is selected in a datepicker
I wrote my own class MilitaryDateTimeField extends TextFieldDateTime implements AbstractTextComponent.ITextFormatProvider which displays both date and time in a single text field in the format mentioned above. But the problem is, if I select a different date, the textfield renders with a selected date but resets the previous hours and minutes to a string kk:mm How do I retain the hours and minutes if a date changes on the textfield. Is there a way to convey to the textfield not to rerender the whole field but only the datepart. Main objective of this code is not to have more than one textfield (say textfield for date, textfield for hours etc...) Note: I am using org.joda.time.DateTime internally to achieve all the datetime in a single field.. Would appreciate your help. Thanks for your time Jamuna. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/DateTime-rendered-in-a-single-textfield-FORMAT-MM-dd-yy-kk-mm-does-not-hold-to-kk-mm-values-when-a-dr-tp2252464p2252464.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 get a value of textfield on onBlur event..
Hi, How to get the value of the textfield on onBlur event? The below code always prints null for shipIdTf.getInput() final TextField shipIdTf = new TextField(ship.id); shipIdTf.setOutputMarkupId(true); mawbForm.add(shipIdTf); shipIdTf.add(new AjaxEventBehavior(onBlur){ private static final long serialVersionUID = 1L; @Override protected void onEvent(AjaxRequestTarget target) { System.out.println(Event is triggered); System.out.println(The input value is + shipIdTf.getInput()) } }); Please suggest. Thanks for your time. Jamuna. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-get-a-value-of-textfield-on-onBlur-event-tp2248027p2248027.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 get a value of textfield on onBlur event..
Thanks for your reply. It worked. But I ran into another problem. Instead of getting the value of textfield value getInput(), I tried getting it from my model as dtoModel.getObject().getShipId(). This gives me the correct value(the value entered in the text field) for the first time. If I change the value in the text field, the model always gives me the first value but not the recent value that I changed. Looks like my model is not updated? Please suggest. I would appreciate your help in this regard. Thanks Regards, C. Jamuna -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-get-a-value-of-textfield-on-onBlur-event-tp2248027p2248223.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: Panel not refreshed from ModalWindow via Ajax Button
Could any one help me in solving this issue Jamuna. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Panel-not-refreshed-from-ModalWindow-via-Ajax-Button-tp2235354p2238945.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
Turning of the labels in the Panel when reused
Hi, I am having a panel with labels and textfields. I am reusing this panel twice next to each other on the form. Is there a way to turn off the rendering of labels only, while displaying the panel for the second time in order to avoid repetition of labels on the form. Please suggest. Jamuna -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Turning-of-the-labels-in-the-Panel-when-reused-tp2239027p2239027.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: Panel not refreshed from ModalWindow via Ajax Button
Thanks for your reply. I first went in the direction of changing the model object which did not work. Then I started using replacewith which is still a issue. Jamuna. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Panel-not-refreshed-from-ModalWindow-via-Ajax-Button-tp2235354p2239200.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
Panel not refreshed from ModalWindow via Ajax Button
Hi, Could any one please help me fixing this panel refresh issue. first time the panel is refreshed. and that too with (setResponsePage() as workaround). Afterwards it is not getting refreshed at all. Always retains the previous value... 1.I have an Ajaxbutton, on click of it- opens a ModalWindow. 2, In the modal window I am selecting a contact id, and on window call back, I am painting the panel with all the contact details (like email, phone, fax...) 3. These fields are basically set of textfields in panel. Please note first time when I select a id from my Modalwindow.. my panel is refreshed with correct values.. and also I need to use setResponsePage().. otherwise it does not work.. But, if I try to select a different id for the second timefrom my ModalWindow... my panel still has the old values. Please help. Thanks for your time. The code is as below.. //ContactPanel.java public class ContactPanel extends Panel { private static final long serialVersionUID = 1L; public ContactPanel(String id, IModel model) { super(id); setDefaultModel(new CompoundPropertyModel(model)); add(new TextField(name).setConvertEmptyInputStringToNull(false)); add(new TextField(phone).setConvertEmptyInputStringToNull(false)); add(new TextField(email).setConvertEmptyInputStringToNull(false)); add(new TextField(fax).setConvertEmptyInputStringToNull(false)); } } //ContactPanel.html !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html xmlns=http://www.w3.org/1999/xhtml; xmlns:wicket=http://wicket.sourceforge.net/; xml:lang=en lang=en body wicket:panel tr class=detailH15 th align='right'Contact:/th td nowrap='nowrap' input type='text' wicket:id=name size='15' maxlength='40' / Phone: input type='text' wicket:id=phone size='12' maxlength='30'/ /td /tr tr class=detailH15 th align='right'Email:/th td nowrap='nowrap' input type='text' wicket:id=email size='20' maxlength='50'/ Fax input type='text' wicket:id=fax size='12' maxlength='20' / /td /tr /wicket:panel /body /html //adding panel to a form Panel contactPanel = new ContactPanel(contactPanel, new LoadableDetachableModel(){ @Override protected Object load() { return extraChildrenMawbModel.getObject().getContact(); } }); contactPanel .setOutputMarkupId(true); form.add(contactPanel ); //adding AJax Button to a form final IModel inputModel =new Model(); final IModel outputModel =new Model(); AjaxButton contactLookupBtn = new AjaxButton(contactLookup){ private static final long serialVersionUID = 1L; @Override protected void onSubmit(AjaxRequestTarget target, Form arg1) { inputModel.setObject(contact); contactLookup.show(target); } }; form.add(contactLookupBtn .setDefaultFormProcessing(false)); //adding ModalWindow to the page final ModalWindow contactLookup; add(contactLookup= new ModalWindow(contactLookupWindow)); contactLookup.setPageMapName(modal-1); //Modalwindow callback code contactLookup.setWindowClosedCallback(new ModalWindow.WindowClosedCallback(){ public void onClose(AjaxRequestTarget target){ Object outputModelObj = outputModel.getObject(); if (outputModelObj != null) { final Contact contact = contactDao.loadContact((Long)outputModelObj); if (inputModel.getObject().equals(contact)) { final Panel newContactPanel = new ContactPanel(contactPanel, new LoadableDetachableModel() { @Override protected Object load() { // TODO Auto-generated method stub return extraChildrenMawbModel.getObject().getContact(); } }); newContactPanel.setOutputMarkupId(true); contactPanel.replaceWith(newContactPanel); contactPanel = newContactPanel; target.addComponent(newContactPanel); setResponsePage(getPage()) target.addComponent(feedback) } //closeButtonCallback