|
View:
New views
5 Messages
—
Rating Filter:
Alert me
|
|
|
Updates within Panels in datatable
by salmas
::
Rate this Message:
Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message I have a datatable in which each row contains two panels. In one panel I have a textfield and a radio button and in the other panel I have a button. So there can be many textfields and buttons. When the user clicks the button in panel 2 in one of the rows I need to read the values in the textfield and radiobutton. In the buttons I have
button.setDefaultFormProcessing(false); So that onSubmit is called instead of the form processor. I have two issues: - Even though I do nothing in onSubmit (which I know does get called) the table is reloaded (button.getRequest() shows the request for the page to reload). I'd like to stop the auto redraw and do an AJAX update from within onSubmit instead, I am not sure how to stop the table reload when the button is clicked. - from within onSubmit() in panel2 the textfield and the radio button in panel1 show their original values and not the values that I typed in prior to pressing the button. The widgets have PropertyModels. To load the panels I overrode public void populateItem(Item item, String componentId, IModel model) in the table columns and then added the panels where appropriate. What can I do to update the data in panel1 when the button in Panel2 is clicked? |
|
|
Re: Updates within Panels in datatable
by igor.vaynberg
::
Rate this Message:
Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message On 7/31/07, salmas <ssaad@...> wrote:
> > - Even though I do nothing in onSubmit (which I know does get called) the > table is reloaded (button.getRequest() shows the request for the page to > reload). I'd like to stop the auto redraw and do an AJAX update from > within > onSubmit instead, I am not sure how to stop the table reload when the > button > is clicked. use ajax submit button - from within onSubmit() in panel2 the textfield and the radio button in > panel1 show their original values and not the values that I typed in prior > to pressing the button. The widgets have PropertyModels. To load the > panels > I overrode public void populateItem(Item item, String componentId, IModel > model) in the table columns and then added the panels where appropriate. > What can I do to update the data in panel1 when the button in Panel2 is > clicked? see datatable.setitemreusestrategy(...) -igor -- > View this message in context: > http://www.nabble.com/Updates-within-Panels-in-datatable-tf4196594.html#a11935400 > Sent from the Wicket - User (OLD) mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > IMPORTANT NOTICE: > > This mailing list is shutting down. Please subscribe to the Apache Wicket > user list. Send a message to: "users-subscribe at wicket.apache.org" and > follow the instructions. > _______________________________________________ > Wicket-user mailing list > Wicket-user@... > https://lists.sourceforge.net/lists/listinfo/wicket-user > This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ IMPORTANT NOTICE: This mailing list is shutting down. Please subscribe to the Apache Wicket user list. Send a message to: "users-subscribe at wicket.apache.org" and follow the instructions. _______________________________________________ Wicket-user mailing list Wicket-user@... https://lists.sourceforge.net/lists/listinfo/wicket-user |
|
|
Re: Updates within Panels in datatable
by salmas
::
Rate this Message:
Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message Hi Igor:
I cannot use the AjaxSubmitButton because I need to change the button's model dynamically and this functionality is broken in Wicket 1.2 and I can’t use the 1.3 beta because my company doesn’t want to use beta software for a production release. I ended up using a regular Button and then updating the table using an AJAX Target in the buttons onSubmit method. Please do let me know if you have a better suggestion for what I can do here. I tried ReuseIfModelsEqualStrategy strategy = new ReuseIfModelsEqualStrategy(); table.setItemReuseStrategy(strategy); but this did not help. Do I need to create a custom strategy? If so what should I do in it?
|
|
|
Re: Updates within Panels in datatable
by igor.vaynberg
::
Rate this Message:
Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message On 8/1/07, salmas <ssaad@...> wrote:
> > > Hi Igor: > > I cannot use the AjaxSubmitButton because I need to change the button's > model dynamically and this functionality is broken in Wicket 1.2 and I > can't > use the 1.3 beta because my company doesn't want to use beta software for > a > production release. I ended up using a regular Button and then updating > the > table using an AJAX Target in the buttons onSubmit method. Please do let > me > know if you have a better suggestion for what I can do here. nothing other then upgrade to 1.3 I tried > ReuseIfModelsEqualStrategy strategy = new > ReuseIfModelsEqualStrategy(); > table.setItemReuseStrategy(strategy); > > but this did not help. Do I need to create a custom strategy? If so what > should I do in it? no, you need to override equals and hashcode on whatever model is returned by idataprovider -igor igor.vaynberg wrote: > > > > On 7/31/07, salmas <ssaad@...> wrote: > >> > >> - Even though I do nothing in onSubmit (which I know does get called) > the > >> table is reloaded (button.getRequest() shows the request for the page > to > >> reload). I'd like to stop the auto redraw and do an AJAX update from > >> within > >> onSubmit instead, I am not sure how to stop the table reload when the > >> button > >> is clicked. > > > > > > use ajax submit button > > > > - from within onSubmit() in panel2 the textfield and the radio button in > >> panel1 show their original values and not the values that I typed in > >> prior > >> to pressing the button. The widgets have PropertyModels. To load the > >> panels > >> I overrode public void populateItem(Item item, String componentId, > IModel > >> model) in the table columns and then added the panels where > appropriate. > >> What can I do to update the data in panel1 when the button in Panel2 is > >> clicked? > > > > > > see datatable.setitemreusestrategy(...) > > > > -igor > > > > > > -- > >> View this message in context: > >> > http://www.nabble.com/Updates-within-Panels-in-datatable-tf4196594.html#a11935400 > >> Sent from the Wicket - User (OLD) mailing list archive at Nabble.com. > >> > >> > >> > ------------------------------------------------------------------------- > >> This SF.net email is sponsored by: Splunk Inc. > >> Still grepping through log files to find problems? Stop. > >> Now Search log events and configuration files using AJAX and a browser. > >> Download your FREE copy of Splunk now >> http://get.splunk.com/ > >> _______________________________________________ > >> IMPORTANT NOTICE: > >> > >> This mailing list is shutting down. Please subscribe to the Apache > Wicket > >> user list. Send a message to: "users-subscribe at wicket.apache.org" > and > >> follow the instructions. > >> _______________________________________________ > >> Wicket-user mailing list > >> Wicket-user@... > >> https://lists.sourceforge.net/lists/listinfo/wicket-user > >> > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by: Splunk Inc. > > Still grepping through log files to find problems? Stop. > > Now Search log events and configuration files using AJAX and a browser. > > Download your FREE copy of Splunk now >> http://get.splunk.com/ > > _______________________________________________ > > IMPORTANT NOTICE: > > > > This mailing list is shutting down. Please subscribe to the Apache > Wicket > > user list. Send a message to: "users-subscribe at wicket.apache.org" and > > follow the instructions. > > _______________________________________________ > > Wicket-user mailing list > > Wicket-user@... > > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > > > -- > View this message in context: > http://www.nabble.com/Updates-within-Panels-in-datatable-tf4196594.html#a11951843 > Sent from the Wicket - User (OLD) mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > IMPORTANT NOTICE: > > This mailing list is shutting down. Please subscribe to the Apache Wicket > user list. Send a message to: "users-subscribe at wicket.apache.org" and > follow the instructions. > _______________________________________________ > Wicket-user mailing list > Wicket-user@... > https://lists.sourceforge.net/lists/listinfo/wicket-user > This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ IMPORTANT NOTICE: This mailing list is shutting down. Please subscribe to the Apache Wicket user list. Send a message to: "users-subscribe at wicket.apache.org" and follow the instructions. _______________________________________________ Wicket-user mailing list Wicket-user@... https://lists.sourceforge.net/lists/listinfo/wicket-user |
|
|
Re: Updates within Panels in datatable
by salmas
::
Rate this Message:
Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message Hi Igor:
It's been awhile since I posted to this thread but I have been out sick for about two weeks. Is there a way that I can have a button which has a java handler for an onclick event but does not submit the page (redraw the table) I believe that this would solve my problem. I cannot use the 1.3 beta since the company I am working for doesn't want to use that yet. Thanks
|
| Free embeddable forum powered by Nabble | Forum Help |