Re: AjaxEditableLabel not saving after migration to 6.3
I believe this is a bug in wicket 6.3, because I switched to wicket 6.4 and it miraculously works again without code changes on my side. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/AjaxEditableLabel-not-saving-after-migration-to-6-3-tp4654769p4655314.html Sent from the Users forum 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: AjaxEditableLabel not saving after migration to 6.3
Hi, By default AEL submits on ENTER key press or blur event. Does it work with blur ? Check with Firebug or similar whether an Ajax call is made at all. Check whether http://www.wicket-library.com/wicket-examples-6.0.x/ajax/editable-label<http://www.wicket-library.com/wicket-examples-6.0.x/ajax/editable-label?0> works with your browser. On Thu, Dec 13, 2012 at 4:16 PM, N. Metzger wrote: > Hi all, > > I recently migrated from 1.5.5 to 6.3. My objective is to display a list of > group members with the ability to insert or update an expiration date for a > specific member. It worked correctly before, but now I'm having problems > with my AjaxEditableLabel nested in a PropertyColumn. I can click the label > and type something, but on hitting enter, nothing changes and the > onSubmit() > is never called. As I said, it worked in 1.5. > > Below is a code excerpt. > > Any pointers would be appreciated, > Natalie > > > private class PersonTabPanel extends Panel > { > public PersonTabPanel(String id){ > super(id); > > AjaxFallbackDefaultDataTable dataTable = new > AjaxFallbackDefaultDataTable("memberTable", definePersonColumns(), > new > MemberDataProvider(currentGroup, > "MEMBER", "PERSON"), ELEMENTS_PER_PAGE); > dataTable.setItemReuseStrategy(new > DefaultItemReuseStrategy()); > add(dataTable); > } > } > > public List> definePersonColumns(){ > List> columns = new > ArrayList>(); > > columns.add(new PropertyColumn(new > Model("Last Name"), "lastname", "lastname")); > columns.add(new PropertyColumn(new > Model("First Name"), "displayedFirstName", "displayedFirstName")); > columns.add(new PropertyColumn(new > Model("Email Address"), "emailAddress", "emailAddress")); > > if (isMemberEditAuthorized(currentGroup.getGroupCode()) ){ > > columns.add(new PropertyColumn(new > Model("Expiration (MM/DD/YY)"), "expirationDate", "expirationDate") > { > @Override > public void > populateItem(Item> cellItem, String > componentId, > final IModel > rowModel) > { > AjaxEditableLabel editableLabel = new > AjaxEditableLabel(componentId, > new > PropertyModel(rowModel, "expirationDate")){ > @Override > protected void onSubmit(AjaxRequestTarget target){ > int groupCode = currentGroup.getGroupCode(); > Date expiration = (Date) > getDefaultModelObject(); > if (expiration != null) > expiration = new Date(expiration.getTime() > + > 86399000L); //expires at 23:59:59 on the given date > > MemberInterface selectedMember = > (MemberInterface) rowModel.getObject(); > int gidm = selectedMember.getGidm(); > String memberType = > selectedMember.getMemberType(); > > try { > expireMember(sessionId, midm, groupCode, > gidm, memberType, expiration); > logger.debug("{}:{}: Set a member > expiration > date to "+ > expiration+" for GIDM " +gidm, > sessionId, midm); > } catch (Exception e) { > logger.error("Caught an exception while > updating a group member expiration", e); > error("An error occurred while updating the > expiration date."); > } > > getLabel().setVisible(true); > getEditor().setVisible(false); > target.add(this); > target.appendJavaScript("window.status='';"); > target.add(feedback); > } > > @Override > protected String defaultNullLabel(){ > return ("[click to edit]"); > } > > @Override > protected void onError
AjaxEditableLabel not saving after migration to 6.3
Hi all, I recently migrated from 1.5.5 to 6.3. My objective is to display a list of group members with the ability to insert or update an expiration date for a specific member. It worked correctly before, but now I'm having problems with my AjaxEditableLabel nested in a PropertyColumn. I can click the label and type something, but on hitting enter, nothing changes and the onSubmit() is never called. As I said, it worked in 1.5. Below is a code excerpt. Any pointers would be appreciated, Natalie private class PersonTabPanel extends Panel { public PersonTabPanel(String id){ super(id); AjaxFallbackDefaultDataTable dataTable = new AjaxFallbackDefaultDataTable("memberTable", definePersonColumns(), new MemberDataProvider(currentGroup, "MEMBER", "PERSON"), ELEMENTS_PER_PAGE); dataTable.setItemReuseStrategy(new DefaultItemReuseStrategy()); add(dataTable); } } public List> definePersonColumns(){ List> columns = new ArrayList>(); columns.add(new PropertyColumn(new Model("Last Name"), "lastname", "lastname")); columns.add(new PropertyColumn(new Model("First Name"), "displayedFirstName", "displayedFirstName")); columns.add(new PropertyColumn(new Model("Email Address"), "emailAddress", "emailAddress")); if (isMemberEditAuthorized(currentGroup.getGroupCode()) ){ columns.add(new PropertyColumn(new Model("Expiration (MM/DD/YY)"), "expirationDate", "expirationDate") { @Override public void populateItem(Item> cellItem, String componentId, final IModel rowModel) { AjaxEditableLabel editableLabel = new AjaxEditableLabel(componentId, new PropertyModel(rowModel, "expirationDate")){ @Override protected void onSubmit(AjaxRequestTarget target){ int groupCode = currentGroup.getGroupCode(); Date expiration = (Date) getDefaultModelObject(); if (expiration != null) expiration = new Date(expiration.getTime() + 86399000L); //expires at 23:59:59 on the given date MemberInterface selectedMember = (MemberInterface) rowModel.getObject(); int gidm = selectedMember.getGidm(); String memberType = selectedMember.getMemberType(); try { expireMember(sessionId, midm, groupCode, gidm, memberType, expiration); logger.debug("{}:{}: Set a member expiration date to "+ expiration+" for GIDM " +gidm, sessionId, midm); } catch (Exception e) { logger.error("Caught an exception while updating a group member expiration", e); error("An error occurred while updating the expiration date."); } getLabel().setVisible(true); getEditor().setVisible(false); target.add(this); target.appendJavaScript("window.status='';"); target.add(feedback); } @Override protected String defaultNullLabel(){ return ("[click to edit]"); } @Override protected void onError(AjaxRequestTarget target){ target.add(feedback); } }; cellItem.add(editableLabel); } }); [Rest of code omitted] -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/AjaxEditableLabel-not-saving-after-migration-to-6-3-tp4654769.html Sent from the Users forum 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: AjaxEditableLabel not saving
I've added URIEncoding="UTF-8" in tomcat's server.xml and its' working now. Thank you. Johan Compagner wrote: > > Why not use the default of wicket utf8. > If you really want to use another one then you have to configure > wicket's encoding setting. So that wicket does set the right headers > and encodes the output right > > > -- View this message in context: http://www.nabble.com/AjaxEditableLabel-not-saving-tp14413223p14491183.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AjaxEditableLabel not saving
Why not use the default of wicket utf8. If you really want to use another one then you have to configure wicket's encoding setting. So that wicket does set the right headers and encodes the output right On 12/22/07, TahitianGabriel <[EMAIL PROTECTED]> wrote: > > I'm already using the iso-8859-1 in a meta tag in my html file. > I have also try in the setHeader function and it's not working. > Do you have a correct behavior with accented character? > > > > > Azarias Tomás wrote: > > > > Try to change Content-Type of Page to "text/html; charset=iso-8859-1". > > > > > > -- > View this message in context: > http://www.nabble.com/AjaxEditableLabel-not-saving-tp14413223p14467161.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AjaxEditableLabel not saving
Yes I do. I am using Wicket 1.3.0rc2 with Wicket Extension 1.3.0rc1. 2007/12/22, TahitianGabriel <[EMAIL PROTECTED]>: > > > I'm already using the iso-8859-1 in a meta tag in my html file. > I have also try in the setHeader function and it's not working. > Do you have a correct behavior with accented character? > > > > > Azarias Tomás wrote: > > > > Try to change Content-Type of Page to "text/html; charset=iso-8859-1". > > > > > > -- > View this message in context: > http://www.nabble.com/AjaxEditableLabel-not-saving-tp14413223p14467161.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- AT(R)
Re: AjaxEditableLabel not saving
I'm already using the iso-8859-1 in a meta tag in my html file. I have also try in the setHeader function and it's not working. Do you have a correct behavior with accented character? Azarias Tomás wrote: > > Try to change Content-Type of Page to "text/html; charset=iso-8859-1". > > -- View this message in context: http://www.nabble.com/AjaxEditableLabel-not-saving-tp14413223p14467161.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AjaxEditableLabel not saving
Johan Compagner wrote: > > did somebody made a jira issue for this with a small test case then? > so that we do fix this for the final > I did. https://issues.apache.org/jira/browse/WICKET-1239 Artur -- View this message in context: http://www.nabble.com/AjaxEditableLabel-not-saving-tp14413223p14455821.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AjaxEditableLabel not saving
did somebody made a jira issue for this with a small test case then? so that we do fix this for the final On Dec 21, 2007 7:58 AM, TahitianGabriel <[EMAIL PROTECTED]> wrote: > > I've downgraded to RC1 also, but the accented characters are not handled > correctly neither in RC1 or RC2... > > By the way I'm using Tomcat... > > > Azarias Tomás wrote: > > > > I 've downgrade to wicket-extensions 1.3.0-rc1, and it's working. > > > > AT > > > > 2007/12/20, TahitianGabriel <[EMAIL PROTECTED]>: > >> > >> > >> I have the same problem with wicket RC2 and tomcat 6. > >> Where can I find RC3 to try it as it has not been release yet? > >> > >> Also when I enter accented characters in the editable label (like 'é', > >> 'è', > >> 'à', ...) they are turn into stange unreadable characters (I've tried > >> with > >> both rc1 ans rc2)... Any Idea? > >> > >> > >> > >> > > > > > > -- > View this message in context: > http://www.nabble.com/AjaxEditableLabel-not-saving-tp14413223p14451264.html > Sent from the Wicket - User mailing list archive at > Nabble.com<http://nabble.com/> > . > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: AjaxEditableLabel not saving
Try to change Content-Type of Page to "text/html; charset=iso-8859-1". 2007/12/21, TahitianGabriel <[EMAIL PROTECTED]>: > > > I've downgraded to RC1 also, but the accented characters are not handled > correctly neither in RC1 or RC2... > > By the way I'm using Tomcat... > > > Azarias Tomás wrote: > > > > I 've downgrade to wicket-extensions 1.3.0-rc1, and it's working. > > > > AT > > > > 2007/12/20, TahitianGabriel <[EMAIL PROTECTED]>: > >> > >> > >> I have the same problem with wicket RC2 and tomcat 6. > >> Where can I find RC3 to try it as it has not been release yet? > >> > >> Also when I enter accented characters in the editable label (like 'é', > >> 'è', > >> 'à', ...) they are turn into stange unreadable characters (I've tried > >> with > >> both rc1 ans rc2)... Any Idea? > >> > >> > >> > >> > > > > > > -- > View this message in context: > http://www.nabble.com/AjaxEditableLabel-not-saving-tp14413223p14451264.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- AT(R)
Re: AjaxEditableLabel not saving
I've downgraded to RC1 also, but the accented characters are not handled correctly neither in RC1 or RC2... By the way I'm using Tomcat... Azarias Tomás wrote: > > I 've downgrade to wicket-extensions 1.3.0-rc1, and it's working. > > AT > > 2007/12/20, TahitianGabriel <[EMAIL PROTECTED]>: >> >> >> I have the same problem with wicket RC2 and tomcat 6. >> Where can I find RC3 to try it as it has not been release yet? >> >> Also when I enter accented characters in the editable label (like 'é', >> 'è', >> 'à', ...) they are turn into stange unreadable characters (I've tried >> with >> both rc1 ans rc2)... Any Idea? >> >> >> >> > > -- View this message in context: http://www.nabble.com/AjaxEditableLabel-not-saving-tp14413223p14451264.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AjaxEditableLabel not saving
I 've downgrade to wicket-extensions 1.3.0-rc1, and it's working. AT 2007/12/20, TahitianGabriel <[EMAIL PROTECTED]>: > > > I have the same problem with wicket RC2 and tomcat 6. > Where can I find RC3 to try it as it has not been release yet? > > Also when I enter accented characters in the editable label (like 'é', > 'è', > 'à', ...) they are turn into stange unreadable characters (I've tried with > both rc1 ans rc2)... Any Idea? > > > > > igor.vaynberg wrote: > > > > and what about rc3? > > > > -igor > > > > > > > > > > -- > View this message in context: > http://www.nabble.com/AjaxEditableLabel-not-saving-tp14413223p14442238.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: AjaxEditableLabel not saving
I have the same problem with wicket RC2 and tomcat 6. Where can I find RC3 to try it as it has not been release yet? Also when I enter accented characters in the editable label (like 'é', 'è', 'à', ...) they are turn into stange unreadable characters (I've tried with both rc1 ans rc2)... Any Idea? igor.vaynberg wrote: > > and what about rc3? > > -igor > > > > -- View this message in context: http://www.nabble.com/AjaxEditableLabel-not-saving-tp14413223p14442238.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AjaxEditableLabel not saving
igor.vaynberg wrote: > > and what about rc3? > I didn't try it yet. The diffrence is in method newEditor. In RC1 it is: protected FormComponent newEditor(MarkupContainer parent, String componentId, IModel model) { TextField editor = new TextField(componentId, model); editor.setOutputMarkupId(true); editor.setVisible(false); editor.add(new EditorAjaxBehavior()); return editor; } In RC2: protected FormComponent newEditor(MarkupContainer parent, String componentId, IModel model) { TextField editor = new TextField(componentId, model) { private static final long serialVersionUID = 1L; protected void onModelChanged() { super.onModelChanged(); AjaxEditableLabel.this.onModelChanged(); } protected void onModelChanging() { super.onModelChanging(); AjaxEditableLabel.this.onModelChanging(); //here is error - java.lang.IllegalAccessError: tried to access method org.apache.wicket.Component.onModelChanging()V from class org.apache.wicket.extensions.ajax.markup.html.AjaxEditableLabel$1 } }; editor.setOutputMarkupId(true); editor.setVisible(false); editor.add(new EditorAjaxBehavior()); return editor; } Should I open issue? Artur -- View this message in context: http://www.nabble.com/AjaxEditableLabel-not-saving-tp14413223p14423831.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AjaxEditableLabel not saving
Eelco Hillenius wrote: > >> I had the same problem after migration from rc1 to rc2 :( > > > Not sure what changed, but did you upgrade both wicket and wicket-stuff to > rc2? > > Yes, I upgraded everything to rc2. wicket-extensions too. Artur -- View this message in context: http://www.nabble.com/AjaxEditableLabel-not-saving-tp14413223p14422978.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AjaxEditableLabel not saving
> > > > I am this exception when editing an AjaxEditableLabel : > > > > java.lang.IllegalAccessError: tried to access method > > org.apache.wicket.Component.onModelChanging()V from class > > org.apache.wicket.extensions.ajax.markup.html.AjaxEditableLabel$1 > > at > > > > I had the same problem after migration from rc1 to rc2 :( Not sure what changed, but did you upgrade both wicket and wicket-stuff to rc2? Eelco
Re: AjaxEditableLabel not saving
and what about rc3? -igor On Dec 19, 2007 9:54 AM, Artur W. <[EMAIL PROTECTED]> wrote: > > > Azarias Tomás wrote: > > > > Hi, > > > > I am this exception when editing an AjaxEditableLabel : > > > > java.lang.IllegalAccessError: tried to access method > > org.apache.wicket.Component.onModelChanging()V from class > > org.apache.wicket.extensions.ajax.markup.html.AjaxEditableLabel$1 > > at > > > > I had the same problem after migration from rc1 to rc2 :( > > > Artur > > -- > View this message in context: > http://www.nabble.com/AjaxEditableLabel-not-saving-tp14413223p14421788.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AjaxEditableLabel not saving
Azarias Tomás wrote: > > Hi, > > I am this exception when editing an AjaxEditableLabel : > > java.lang.IllegalAccessError: tried to access method > org.apache.wicket.Component.onModelChanging()V from class > org.apache.wicket.extensions.ajax.markup.html.AjaxEditableLabel$1 > at > I had the same problem after migration from rc1 to rc2 :( Artur -- View this message in context: http://www.nabble.com/AjaxEditableLabel-not-saving-tp14413223p14421788.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AjaxEditableLabel not saving
Hi, I am this exception when editing an AjaxEditableLabel : java.lang.IllegalAccessError: tried to access method org.apache.wicket.Component.onModelChanging()V from class org.apache.wicket.extensions.ajax.markup.html.AjaxEditableLabel$1 at org.apache.wicket.extensions.ajax.markup.html.AjaxEditableLabel$1.onModelChanging (AjaxEditableLabel.java:273) at org.apache.wicket.Component.modelChanging(Component.java:2058) at org.apache.wicket.Component.setModelObject(Component.java:2823) at org.apache.wicket.markup.html.form.FormComponent.updateModel( FormComponent.java:992) at org.apache.wicket.markup.html.form.FormComponent.processInput( FormComponent.java:874) at org.apache.wicket.extensions.ajax.markup.html.AjaxEditableLabel$EditorAjaxBehavior.respond (AjaxEditableLabel.java:121) at org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest( AbstractDefaultAjaxBehavior.java:285) at org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents (BehaviorRequestTarget.java:100) at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents (AbstractRequestCycleProcessor.java:90) at org.apache.wicket.RequestCycle.processEventsAndRespond( RequestCycle.java:1094) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1169) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1248) at org.apache.wicket.RequestCycle.request(RequestCycle.java:489) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java :354) at org.apache.wicket.protocol.http.WicketFilter.doFilter( WicketFilter.java:194) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter( ServletHandler.java:1084) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java :360) at org.mortbay.jetty.security.SecurityHandler.handle( SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java :181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java :722) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:404) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java :139) at org.mortbay.jetty.Server.handle(Server.java:324) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java :505) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete( HttpConnection.java:828) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380) at org.mortbay.io.nio.SelectChannelEndPoint.run( SelectChannelEndPoint.java:395) at org.mortbay.thread.BoundedThreadPool$PoolThread.run( BoundedThreadPool.java:450) -- AT(R)