Re: [Wicket-user] Updates within Panels in datatable
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? igor.vaynberg wrote: On 7/31/07, salmas [EMAIL PROTECTED] 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@lists.sourceforge.net 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@lists.sourceforge.net 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@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] Updates within Panels in datatable
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? -- 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@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] Is it possible to update a single row in a table?
I have to mimic an application which was written using javascript/XSLT in which changes in a table affecting single rows are managed by updating only the affected row(s). I believe that this is done by surrounding the row in a span. Is this possible in wicket? I am using a Datatable. Thanks -- View this message in context: http://www.nabble.com/Is-it-possible-to-update-a-single-row-in-a-table--tf4158981.html#a11832787 Sent from the Wicket - User 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@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Is it possible to update a single row in a table?
Igor, do I need the latest code for both wicket and extensions or just extensions? igor.vaynberg wrote: On 7/27/07, salmas [EMAIL PROTECTED] wrote: igor.vaynberg wrote: On 7/27/07, salmas [EMAIL PROTECTED] wrote: Thanks Igor, How could I do this? thats easy, you start by searching this list for datatable ajax row which will find this: http://www.nabble.com/Repaint-single-row-of-a-DataTable-tf4111859.html#a11756569 and this http://www.nabble.com/Repaint-single-cell-of-DataTable%2C-where-cell-is-a-Fragment-tf4118377.html#a11748633 the first thread has a quickstart that demonstrates the functionality. -igor I have to mimic an application which was written using javascript/XSLT in which changes in a table affecting single rows are managed by updating only the affected row(s). I believe that this is done by surrounding the row in a span. Is this possible in wicket? I am using a Datatable. yes -igor Thanks -- View this message in context: http://www.nabble.com/Is-it-possible-to-update-a-single-row-in-a-table--tf4158981.html#a11832787 Sent from the Wicket - User 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@lists.sourceforge.net 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@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- View this message in context: http://www.nabble.com/Is-it-possible-to-update-a-single-row-in-a-table--tf4158981.html#a11832925 Sent from the Wicket - User 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@lists.sourceforge.net 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@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- View this message in context: http://www.nabble.com/Is-it-possible-to-update-a-single-row-in-a-table--tf4158981.html#a11835522 Sent from the Wicket - User 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
Re: [Wicket-user] Is it possible to update a single row in a table?
I have the exact same issue as the poster in the threads you sent. When I add the repeater item to the AjaxTarget I get java.lang.IllegalArgumentException: markupId cannot be empty It works if I add the entire table to the target. It looks like you changed things to fix this? I am using wicket 1.2.6 and wicket extensions 1.2.6. Do I need a newer version? igor.vaynberg wrote: On 7/27/07, salmas [EMAIL PROTECTED] wrote: igor.vaynberg wrote: On 7/27/07, salmas [EMAIL PROTECTED] wrote: Thanks Igor, How could I do this? thats easy, you start by searching this list for datatable ajax row which will find this: http://www.nabble.com/Repaint-single-row-of-a-DataTable-tf4111859.html#a11756569 and this http://www.nabble.com/Repaint-single-cell-of-DataTable%2C-where-cell-is-a-Fragment-tf4118377.html#a11748633 the first thread has a quickstart that demonstrates the functionality. -igor I have to mimic an application which was written using javascript/XSLT in which changes in a table affecting single rows are managed by updating only the affected row(s). I believe that this is done by surrounding the row in a span. Is this possible in wicket? I am using a Datatable. yes -igor Thanks -- View this message in context: http://www.nabble.com/Is-it-possible-to-update-a-single-row-in-a-table--tf4158981.html#a11832787 Sent from the Wicket - User 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@lists.sourceforge.net 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@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- View this message in context: http://www.nabble.com/Is-it-possible-to-update-a-single-row-in-a-table--tf4158981.html#a11832925 Sent from the Wicket - User 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@lists.sourceforge.net 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@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- View this message in context: http://www.nabble.com/Is-it-possible-to-update-a-single-row-in-a-table--tf4158981.html#a11835025 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by: Splunk Inc. Still grepping
[Wicket-user] navigating up from a frame
I am within the right frame of a frameset. The frameset has a tree in the left frame. When the user clicks most of the links in the tree I want to refresh the right frame. However, sometimes I want to navigate to a frameless page (tree gone and show another frame in the app). I don't know that I need to do this until I am inside the right frame and check a setting. I should do this automatically and not have a user click a link or something. When I do setResponsePage(MyPage.class); from within the right frame only the right frame refreshes. How can I replace the entire frameset with MyPage.class? Thanks -- View this message in context: http://www.nabble.com/navigating-up-from-a-frame-tf4104180.html#a11671602 Sent from the Wicket - User mailing list archive at Nabble.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
Re: [Wicket-user] navigating up from a frame
The following works, thanks Igor! class TopPageRequestTarget implements IRequestTarget { private Class pageClass; public TopPageRequestTarget(Class toPageClass) { super(); pageClass=toPageClass; } public void respond(RequestCycle requestCycle) { requestCycle.getResponse().write(htmlheadscriptparent=' + requestCycle.urlFor(PageMap.forName(pageClass.getName()), pageClass, null) + ';/script/head/html); } public java.lang.Object getLock(RequestCycle requestCycle) { System.out.println(getLock called); return null; } public void detach(RequestCycle requestCycle) { System.out.println(detach called); } } igor.vaynberg wrote: On 7/18/07, salmas [EMAIL PROTECTED] wrote: I am within the right frame of a frameset. The frameset has a tree in the left frame. When the user clicks most of the links in the tree I want to refresh the right frame. However, sometimes I want to navigate to a frameless page (tree gone and show another frame in the app). I don't know that I need to do this until I am inside the right frame and check a setting. I should do this automatically and not have a user click a link or something. When I do setResponsePage(MyPage.class); from within the right frame only the right frame refreshes. How can I replace the entire frameset with MyPage.class? so you dont want to append target=top to the link but decide this after link has been clicked? toppagerequesttarget implements requesttarget { private final Class? extends Page pageClass; respond(requestcycle rc) { rc.getresponse().write(htmlheadwindow.top.location=' +rc.urlfor(pageClass);+';/head/html); } } then instead of setResponsePage(MyPage.class) do getRequestCycle().setRequestTarget(new toppagerequesttarget(MyPage.class); -igor Thanks -- View this message in context: http://www.nabble.com/navigating-up-from-a-frame-tf4104180.html#a11671602 Sent from the Wicket - User mailing list archive at Nabble.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 -- View this message in context: http://www.nabble.com/navigating-up-from-a-frame-tf4104180.html#a11674485 Sent from the Wicket - User mailing list archive at Nabble.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
Re: [Wicket-user] Textfield inside RadioChoice
Thanks, Igor, I switched to radiogroup/radio, however I still have issues because I want to add the textfield to just a few of the options, my options should look like tr wicket:id=options td input type=radio wicket:id=workflowoption /input /td td option name /td /tr for some of the options but then others might look like tr wicket:id=options td input type=radio wicket:id=workflowoption /input /td td option name /td td input maxlength=30 size=15 name=amount wicket:id=amount / /td /tr It looks like the radiogroup assumes that the markup is a template, if I add the textfield to one item then I must add it to the rest. I suppose I could use different panels for each item but that seems so long winded for what I am trying to do. Any suggestions? igor.vaynberg wrote: use radiogroup/radio components instead -igor On 6/19/07, Saad, Salma [EMAIL PROTECTED] wrote: I have to show a textfield next to a radiochoice widget. Below is an excerpt from a panel that I am doing this in table border=0 tr td input type=radioAccept /input input maxlength=30 size=15 name=test wicket:id=test/ /td td input type=radioDeny /input /td /tr /table I get the following error ERROR 2007-06-19 16:33:59,261 wicket.RequestCycle - Expected close tag for '' Possible attempt to embed component(s) 'input maxlength=30 size=15 name=test wicket:id=test/' in the body of this component which discards its body [markup = file:/C:/javaProjects/eclipse-workspace/automated_payments/WEB-INF/classes/com/mizuho/futures/wicket/WorkflowFrame$RadioPanel.html, index = 4, current = 'input maxlength=30 size=15 name=test wicket:id=test/' (line 22, column 8)] *wicket.markup.MarkupException*: So it looks like I cannot have a textfield inside of a . Is there another way to get the textfield to show in that location? I also tried passing HTML in the choice list code using something like the following List options = Arrays.asList(new String[] { Accept, Decline,Override:,Pay: tr td input maxlength=30 size=15 name =test wicket:id=test/ /td /tr,Collect: }); choice.setEscapeModelStrings(*false*); add(choice); However, the HTML is still escaped despite the setEscapeModelStrings(false), I added a label to the same panel as the radioChoice and tested it with setEscapeModelStrings(false) and it worked. Does setEscapeModelStrings(false) not work in radioChoice widgets? Perhaps I am missing something.. -- CONFIDENTIAL: This e-mail, including its contents and attachments, if any, are confidential. It is neither an offer to buy or sell, nor a solicitation of an offer to buy or sell, any securities or any related financial instruments mentioned in it. If you are not the named recipient please notify the sender and immediately delete it. You may not disseminate, distribute, or forward this e-mail message or disclose its contents to anybody else. Unless otherwise indicated, copyright and any other intellectual property rights in its contents are the sole property of Mizuho Securities USA Inc. E-mail transmission cannot be guaranteed to be secure or error-free. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. Although we routinely screen for viruses, addressees should check this e-mail and any attachments for viruses. We make no representation or warranty as to the absence of viruses in this e-mail or any attachments. Please note that to ensure regulatory compliance and for the protection of our customers and business, we may monitor and read e-mails sent to and from our server(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
Re: [Wicket-user] Textfield inside RadioChoice
I solved my issue by using setEscapeModelStrings(false) which works now and sending extra html to the label in the option. Thanks so much for your help. igor.vaynberg wrote: use radiogroup/radio components instead -igor On 6/19/07, Saad, Salma [EMAIL PROTECTED] wrote: I have to show a textfield next to a radiochoice widget. Below is an excerpt from a panel that I am doing this in table border=0 tr td input type=radioAccept /input input maxlength=30 size=15 name=test wicket:id=test/ /td td input type=radioDeny /input /td /tr /table I get the following error ERROR 2007-06-19 16:33:59,261 wicket.RequestCycle - Expected close tag for '' Possible attempt to embed component(s) 'input maxlength=30 size=15 name=test wicket:id=test/' in the body of this component which discards its body [markup = file:/C:/javaProjects/eclipse-workspace/automated_payments/WEB-INF/classes/com/mizuho/futures/wicket/WorkflowFrame$RadioPanel.html, index = 4, current = 'input maxlength=30 size=15 name=test wicket:id=test/' (line 22, column 8)] *wicket.markup.MarkupException*: So it looks like I cannot have a textfield inside of a . Is there another way to get the textfield to show in that location? I also tried passing HTML in the choice list code using something like the following List options = Arrays.asList(new String[] { Accept, Decline,Override:,Pay: tr td input maxlength=30 size=15 name =test wicket:id=test/ /td /tr,Collect: }); choice.setEscapeModelStrings(*false*); add(choice); However, the HTML is still escaped despite the setEscapeModelStrings(false), I added a label to the same panel as the radioChoice and tested it with setEscapeModelStrings(false) and it worked. Does setEscapeModelStrings(false) not work in radioChoice widgets? Perhaps I am missing something.. -- CONFIDENTIAL: This e-mail, including its contents and attachments, if any, are confidential. It is neither an offer to buy or sell, nor a solicitation of an offer to buy or sell, any securities or any related financial instruments mentioned in it. If you are not the named recipient please notify the sender and immediately delete it. You may not disseminate, distribute, or forward this e-mail message or disclose its contents to anybody else. Unless otherwise indicated, copyright and any other intellectual property rights in its contents are the sole property of Mizuho Securities USA Inc. E-mail transmission cannot be guaranteed to be secure or error-free. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. Although we routinely screen for viruses, addressees should check this e-mail and any attachments for viruses. We make no representation or warranty as to the absence of viruses in this e-mail or any attachments. Please note that to ensure regulatory compliance and for the protection of our customers and business, we may monitor and read e-mails sent to and from our server(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 -- View this message in context: http://www.nabble.com/Textfield-inside-RadioChoice-tf3949153.html#a11216266 Sent from the Wicket - User mailing list archive at Nabble.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
Re: [Wicket-user] Wicket 1.2.6 Development mode serialization checks and remote EJB's
It's not a case of an unknown reference causing the not serializable exception. I know which object is not serializable and it is the concrete proxy object created by WebLogic for my remote EJB. I ended up checking if I was in development mode and then using a transient variable and then using a another variable which is not transient when the app is running in a production environment. I was hesitant to simply mark the EJB as transient in case it caused issues in the production environment. Thanks all for your replies, they helped confirm that there wasn't a workaround other than marking it transient. Regards Johan Compagner wrote: cant you make the non serializable object transient? and make sure that you can relookup the object when it is null? johan On 6/4/07, Saad, Salma [EMAIL PROTECTED] wrote: I have a wicket page (java class) which uses a service locater to execute messages on a remote EJB. Though there is no direct reference to the EJB from my wicket page there is a reference to the service locater which uses JNDI to get a reference to the remote EJB. I get the following error (FYI, This error does not happen in wicket 1.2 but happens in wicket 1.2.6). WicketMessage: Internal error cloning object. Make sure all dependent objects implement Serializable. Class: com.abc.wicket.LoginPage Root cause: java.io.NotSerializableException: com. abc.ejb. AFacadeBean. AFacadeBean_7gl30w_EOImpl The EJB implements javax.ejb.SessionBean which extends the serializable interface but the EJB proxy object returned by the WebLogic server does NOT implement serialzable. Below is the class hierarchy of the object located through JNDI. (I printed this using reflectiion) com. abc.ejb. AFacadeBean. AFacadeBean _7gl30w_HomeImpl -weblogic.ejb20.internal.StatelessEJBHome --weblogic.ejb20.internal.BaseEJBHome ---java.lang.Object So it seems that I cannot use EJB's in wicket pages, (I am doing this indirectly through service locaters to decouple the pages from the back end). Any advice about what to do in this situation would be appreciated. Currently I am running in deployment mode since this avoids the checking. I have given some thought to marking the EJB transient in my service locator but would like to hear any insights/design suggestions/advice -- CONFIDENTIAL: This e-mail, including its contents and attachments, if any, are confidential. It is neither an offer to buy or sell, nor a solicitation of an offer to buy or sell, any securities or any related financial instruments mentioned in it. If you are not the named recipient please notify the sender and immediately delete it. You may not disseminate, distribute, or forward this e-mail message or disclose its contents to anybody else. Unless otherwise indicated, copyright and any other intellectual property rights in its contents are the sole property of Mizuho Securities USA Inc. E-mail transmission cannot be guaranteed to be secure or error-free. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. Although we routinely screen for viruses, addressees should check this e-mail and any attachments for viruses. We make no representation or warranty as to the absence of viruses in this e-mail or any attachments. Please note that to ensure regulatory compliance and for the protection of our customers and business, we may monitor and read e-mails sent to and from our server(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 -- View this message in context: http://www.nabble.com/Wicket-1.2.6-Development-mode-serialization-checks-and-remote-EJB%27s-tf3866878.html#a11008736 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version
Re: [Wicket-user] Wicket 1.2.6 Development mode serialization checks and remote EJB's
Eelco, I realized that you are recommending using Spring or looking up the bean on the fly some other way but I am working for a place where Spring is not part of the approved stack and they have an established way that access to EJB's is coded. I am a contracter here and I have to do things exactly how it has been established by the architecture team. I will forward your comments to them so that they can see the advantage of your approach,I am sure they will be interested in the suggestion. Eelco Hillenius wrote: It's not a case of an unknown reference causing the not serializable exception. I know which object is not serializable and it is the concrete proxy object created by WebLogic for my remote EJB. I ended up checking if I was in development mode and then using a transient variable and then using a another variable which is not transient when the app is running in a production environment. I was hesitant to simply mark the EJB as transient in case it caused issues in the production environment. Thanks all for your replies, they helped confirm that there wasn't a workaround other than marking it transient. But there is. You can turn the check off, even for development mode. See IDebugSettings#setSerializeSessionAttributes[1] What you probably want in the end though, is a construct like @SpringBean or just look the bean up right at the moment you need it without holding the reference. Eelco [1] http://wicket.sourceforge.net/apidocs/wicket/settings/IDebugSettings.html - 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 -- View this message in context: http://www.nabble.com/Wicket-1.2.6-Development-mode-serialization-checks-and-remote-EJB%27s-tf3866878.html#a11010404 Sent from the Wicket - User mailing list archive at Nabble.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
Re: [Wicket-user] Wicket 1.2.6 Development mode serialization checks and remote EJB's
It would be a simple thing to look up the bean in each method in the service locater as versus keeping a reference. However, this is not how the existing service locaters here have been coded and they've been clear about wanting the new stuff to mimic the old stuff. The best way to solve the issue would be to get rid of EJB altogather since the usage requirements of the project are pretty light but I'm not here to change the world (none of these arguments would be easy), just to get their project coded for them as per their requirements. They are going to be maintaining it so I suppose it's fair to code it exactly like the existing code. Eelco Hillenius wrote: Eelco, I realized that you are recommending using Spring or looking up the bean on the fly some other way but I am working for a place where Spring is not part of the approved stack and they have an established way that access to EJB's is coded. Not really. I mean a @SpringBean *construct*, like you can find in the Spring integration project. That project generates proxies for every @SpringBean annot found. These proxies are light and serializable, and internally hold a transient reference to the actual spring bean. When serialized, the spring bean instance is discarded; the proxy will locate it again when it is called. You said you can't use annotations, so that trick wouldn't go here for you. There used to be a project[1] (now only for 1.2.x) that used commons attributes[2] for the same purpose, but we're not maintaining it for 1.3 anymore (though it is stored as a wicket-stuff project now[3]). Alternatively, you can just locate the bean just in time. Are you sure you need to keep a reference to it in your component(s)? And consider that *if* you need a reference, it's probably per-request (so you'll want a new one when a new request starts). If that is true, you can just set the reference lazily (get it when you actually access it), and null it in the components onDetach method (override that method; it will be called when a request is handled) so that it won't be serialized. Eelco [1] http://svn.apache.org/repos/asf/incubator/wicket/branches/wicket-1.2.x/wicket-spring-annot [2] http://jakarta.apache.org/commons/attributes/ [3] https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicket-spring-cattr - 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 -- View this message in context: http://www.nabble.com/Wicket-1.2.6-Development-mode-serialization-checks-and-remote-EJB%27s-tf3866878.html#a11011221 Sent from the Wicket - User mailing list archive at Nabble.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