Re: GWT 2.5-rc1 feature uirender is not working as expected.
try using the same variable name which is being passed to render method of UiRenderer interface as well as when you define the ui:with tag inside .ui.xml refer below highlighted code in RED colour. interface PlayCellBinder extends UiRenderer { void render(SafeHtmlBuilder sb, PlayCellProxy *myCellRenderer*); } ui:with field='playCellProxy' type=net.rushashki.shashki64.client.cell.renderer.PlayCellProxy/ [image: Pandurang Patil on about.me] Pandurang Patil about.me/pandurangpatil http://about.me/pandurangpatil website: http://www.agnie.net twitter: @agniesoftware Cell : +91-9823241535 On Fri, Nov 28, 2014 at 8:27 PM, Aleksey Popryadukhin lynx...@gmail.com wrote: Thank you for answer. Sorry for response delaying I tried to get GWT 2.8-SNAPSHOT. I have such code: PlayCell.java public class PlayCell extends AbstractCellPlayCellProxy { private static final PlayCellBinder cellRenderer = GWT.create(PlayCellBinder.class); interface PlayCellBinder extends UiRenderer { void render(SafeHtmlBuilder sb, PlayCellProxy myCellRenderer); } @Override public void render(Context context, PlayCellProxy value, SafeHtmlBuilder sb) { if (value == null) { return; } cellRenderer.render(sb, value); } } PlayCell.ui.xml ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder' ui:with field='playCellProxy' type=net.rushashki.shashki64.client.cell.renderer.PlayCellProxy/ div ui:field=playCell div ui:field=firstName Title: ui:text from={playCellProxy.getTitle}/ /div Player: ui:text from={playCellProxy.getWhitePlayer}/ /div /ui:UiBinder PlayCellProxy.java public class PlayCellProxy { private PlayDto playDto; public PlayCellProxy(PlayDto playDto) { this.playDto = playDto; } public String getTitle() { return playDto.getTitle(); } public String getWhitePlayer() { return playDto.getWhitePlayer(); } public String getBlackPlayer() { return playDto.getBlackPlayer(); } public String getDeskHtml() { return playDto.getDeskHtml(); } } With such code page is rendered. But fields of playCellProxy are empty. четверг, 27 ноября 2014 г., 10:06:04 UTC+3 пользователь Vasu написал: you need to provide your code snippets which will enable us to help you. [image: Pandurang Patil on about.me] Pandurang Patil about.me/pandurangpatil http://about.me/pandurangpatil website: http://www.agnie.net twitter: @agniesoftware Cell : +91-9823241535 On Wed, Nov 26, 2014 at 12:15 AM, Aleksey Popryadukhin lyn...@gmail.com wrote: Hi all. I'm see this old topic but I stuck with this problem. I tried to remove the type tag but I'm getting an error anyway in compile time. @UiFactory either not working. Any clue? четверг, 26 июля 2012 г., 15:26:22 UTC+3 пользователь Vasu написал: Woow.. really quick thanks Rodrigo. Also would like to thanks Thomas for giving right direction. On Thursday, 26 July 2012 02:41:03 UTC+5:30, Rodrigo Chandia wrote: I think this patch (under review) fixes this issue: http://gwt-code-reviews.appspot.com/1794803 On Tuesday, July 24, 2012 3:27:29 PM UTC-4, Rodrigo Chandia wrote: Hmm, this seems like a bug to me. Hopefully I'll have a fix ready for rc2. On Mon, Jul 23, 2012 at 11:11 PM, Vasu wrote: Yea you are absolutely right. It worked when I removed type attribute from ui:with tag. I was wondering it has to identify type to call respective methods on the same and I realized that it tries to match the variable name with that of name of the parameter to render method (which I marked in blue color in below code). -- interface MyUiRenderer extends UiRenderer { void render(SafeHtmlBuilder sb, *Person person*); } -- So Finally working code looks like this. PersonCell.java -- public class PearsonCell extends AbstractCellPerson { interface MyUiRenderer extends UiRenderer { void render(SafeHtmlBuilder sb, Person person); } private static MyUiRendererrenderer= GWT.create(MyUiRenderer.class); @Override public void render(com.google.gwt.cell.client.Cell.Context context, Person value, SafeHtmlBuilder sb) { renderer.render(sb, value); } } -- PersonCell.ui.xml
Re: GWT 2.5-rc1 feature uirender is not working as expected.
It's magic! Thank you it works. суббота, 29 ноября 2014 г., 15:22:15 UTC+3 пользователь Vasu написал: try using the same variable name which is being passed to render method of UiRenderer interface as well as when you define the ui:with tag inside .ui.xml refer below highlighted code in RED colour. interface PlayCellBinder extends UiRenderer { void render(SafeHtmlBuilder sb, PlayCellProxy *myCellRenderer*); } ui:with field='playCellProxy' type=net.rushashki.shashki64.client.cell.renderer.PlayCellProxy/ [image: Pandurang Patil on about.me] Pandurang Patil about.me/pandurangpatil http://about.me/pandurangpatil website: http://www.agnie.net twitter: @agniesoftware Cell : +91-9823241535 On Fri, Nov 28, 2014 at 8:27 PM, Aleksey Popryadukhin lyn...@gmail.com javascript: wrote: Thank you for answer. Sorry for response delaying I tried to get GWT 2.8-SNAPSHOT. I have such code: PlayCell.java public class PlayCell extends AbstractCellPlayCellProxy { private static final PlayCellBinder cellRenderer = GWT.create(PlayCellBinder.class); interface PlayCellBinder extends UiRenderer { void render(SafeHtmlBuilder sb, PlayCellProxy myCellRenderer); } @Override public void render(Context context, PlayCellProxy value, SafeHtmlBuilder sb) { if (value == null) { return; } cellRenderer.render(sb, value); } } PlayCell.ui.xml ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder' ui:with field='playCellProxy' type=net.rushashki.shashki64.client.cell.renderer.PlayCellProxy/ div ui:field=playCell div ui:field=firstName Title: ui:text from={playCellProxy.getTitle}/ /div Player: ui:text from={playCellProxy.getWhitePlayer}/ /div /ui:UiBinder PlayCellProxy.java public class PlayCellProxy { private PlayDto playDto; public PlayCellProxy(PlayDto playDto) { this.playDto = playDto; } public String getTitle() { return playDto.getTitle(); } public String getWhitePlayer() { return playDto.getWhitePlayer(); } public String getBlackPlayer() { return playDto.getBlackPlayer(); } public String getDeskHtml() { return playDto.getDeskHtml(); } } With such code page is rendered. But fields of playCellProxy are empty. четверг, 27 ноября 2014 г., 10:06:04 UTC+3 пользователь Vasu написал: you need to provide your code snippets which will enable us to help you. [image: Pandurang Patil on about.me] Pandurang Patil about.me/pandurangpatil http://about.me/pandurangpatil website: http://www.agnie.net twitter: @agniesoftware Cell : +91-9823241535 On Wed, Nov 26, 2014 at 12:15 AM, Aleksey Popryadukhin lyn...@gmail.com wrote: Hi all. I'm see this old topic but I stuck with this problem. I tried to remove the type tag but I'm getting an error anyway in compile time. @UiFactory either not working. Any clue? четверг, 26 июля 2012 г., 15:26:22 UTC+3 пользователь Vasu написал: Woow.. really quick thanks Rodrigo. Also would like to thanks Thomas for giving right direction. On Thursday, 26 July 2012 02:41:03 UTC+5:30, Rodrigo Chandia wrote: I think this patch (under review) fixes this issue: http://gwt-code-reviews.appspot.com/1794803 On Tuesday, July 24, 2012 3:27:29 PM UTC-4, Rodrigo Chandia wrote: Hmm, this seems like a bug to me. Hopefully I'll have a fix ready for rc2. On Mon, Jul 23, 2012 at 11:11 PM, Vasu wrote: Yea you are absolutely right. It worked when I removed type attribute from ui:with tag. I was wondering it has to identify type to call respective methods on the same and I realized that it tries to match the variable name with that of name of the parameter to render method (which I marked in blue color in below code). -- interface MyUiRenderer extends UiRenderer { void render(SafeHtmlBuilder sb, *Person person*); } -- So Finally working code looks like this. PersonCell.java -- public class PearsonCell extends AbstractCellPerson { interface MyUiRenderer extends UiRenderer { void render(SafeHtmlBuilder sb, Person person); } private static MyUiRendererrenderer= GWT.create(MyUiRenderer.class); @Override public void render(com.google.gwt.cell.client.Cell.Context context, Person value, SafeHtmlBuilder sb) { renderer.render(sb, value); } }
Re: GWT 2.5-rc1 feature uirender is not working as expected.
Thank you for answer. Sorry for response delaying I tried to get GWT 2.8-SNAPSHOT. I have such code: PlayCell.java public class PlayCell extends AbstractCellPlayCellProxy { private static final PlayCellBinder cellRenderer = GWT.create(PlayCellBinder.class); interface PlayCellBinder extends UiRenderer { void render(SafeHtmlBuilder sb, PlayCellProxy myCellRenderer); } @Override public void render(Context context, PlayCellProxy value, SafeHtmlBuilder sb) { if (value == null) { return; } cellRenderer.render(sb, value); } } PlayCell.ui.xml ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder' ui:with field='playCellProxy' type=net.rushashki.shashki64.client.cell.renderer.PlayCellProxy/ div ui:field=playCell div ui:field=firstName Title: ui:text from={playCellProxy.getTitle}/ /div Player: ui:text from={playCellProxy.getWhitePlayer}/ /div /ui:UiBinder PlayCellProxy.java public class PlayCellProxy { private PlayDto playDto; public PlayCellProxy(PlayDto playDto) { this.playDto = playDto; } public String getTitle() { return playDto.getTitle(); } public String getWhitePlayer() { return playDto.getWhitePlayer(); } public String getBlackPlayer() { return playDto.getBlackPlayer(); } public String getDeskHtml() { return playDto.getDeskHtml(); } } With such code page is rendered. But fields of playCellProxy are empty. четверг, 27 ноября 2014 г., 10:06:04 UTC+3 пользователь Vasu написал: you need to provide your code snippets which will enable us to help you. [image: Pandurang Patil on about.me] Pandurang Patil about.me/pandurangpatil http://about.me/pandurangpatil website: http://www.agnie.net twitter: @agniesoftware Cell : +91-9823241535 On Wed, Nov 26, 2014 at 12:15 AM, Aleksey Popryadukhin lyn...@gmail.com javascript: wrote: Hi all. I'm see this old topic but I stuck with this problem. I tried to remove the type tag but I'm getting an error anyway in compile time. @UiFactory either not working. Any clue? четверг, 26 июля 2012 г., 15:26:22 UTC+3 пользователь Vasu написал: Woow.. really quick thanks Rodrigo. Also would like to thanks Thomas for giving right direction. On Thursday, 26 July 2012 02:41:03 UTC+5:30, Rodrigo Chandia wrote: I think this patch (under review) fixes this issue: http://gwt-code-reviews.appspot.com/1794803 On Tuesday, July 24, 2012 3:27:29 PM UTC-4, Rodrigo Chandia wrote: Hmm, this seems like a bug to me. Hopefully I'll have a fix ready for rc2. On Mon, Jul 23, 2012 at 11:11 PM, Vasu wrote: Yea you are absolutely right. It worked when I removed type attribute from ui:with tag. I was wondering it has to identify type to call respective methods on the same and I realized that it tries to match the variable name with that of name of the parameter to render method (which I marked in blue color in below code). -- interface MyUiRenderer extends UiRenderer { void render(SafeHtmlBuilder sb, *Person person*); } -- So Finally working code looks like this. PersonCell.java -- public class PearsonCell extends AbstractCellPerson { interface MyUiRenderer extends UiRenderer { void render(SafeHtmlBuilder sb, Person person); } private static MyUiRendererrenderer= GWT.create(MyUiRenderer.class); @Override public void render(com.google.gwt.cell.client.Cell.Context context, Person value, SafeHtmlBuilder sb) { renderer.render(sb, value); } } -- PersonCell.ui.xml -- ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder' ui:with field='person' / div First Name : span ui:text from='{person.getFname}' / /span p Last Name : span ui:text from='{person.getLname}' / /span /p p Email : span ui:text from='{person.getEmailid}' / /span /p /div /ui:UiBinder
Re: GWT 2.5-rc1 feature uirender is not working as expected.
Hi all. I'm see this old topic but I stuck with this problem. I tried to remove the type tag but I'm getting an error anyway in compile time. @UiFactory either not working. Any clue? четверг, 26 июля 2012 г., 15:26:22 UTC+3 пользователь Vasu написал: Woow.. really quick thanks Rodrigo. Also would like to thanks Thomas for giving right direction. On Thursday, 26 July 2012 02:41:03 UTC+5:30, Rodrigo Chandia wrote: I think this patch (under review) fixes this issue: http://gwt-code-reviews.appspot.com/1794803 On Tuesday, July 24, 2012 3:27:29 PM UTC-4, Rodrigo Chandia wrote: Hmm, this seems like a bug to me. Hopefully I'll have a fix ready for rc2. On Mon, Jul 23, 2012 at 11:11 PM, Vasu wrote: Yea you are absolutely right. It worked when I removed type attribute from ui:with tag. I was wondering it has to identify type to call respective methods on the same and I realized that it tries to match the variable name with that of name of the parameter to render method (which I marked in blue color in below code). -- interface MyUiRenderer extends UiRenderer { void render(SafeHtmlBuilder sb, *Person person*); } -- So Finally working code looks like this. PersonCell.java -- public class PearsonCell extends AbstractCellPerson { interface MyUiRenderer extends UiRenderer { void render(SafeHtmlBuilder sb, Person person); } private static MyUiRendererrenderer= GWT.create(MyUiRenderer.class); @Override public void render(com.google.gwt.cell.client.Cell.Context context, Person value, SafeHtmlBuilder sb) { renderer.render(sb, value); } } -- PersonCell.ui.xml -- ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder' ui:with field='person' / div First Name : span ui:text from='{person.getFname}' / /span p Last Name : span ui:text from='{person.getLname}' / /span /p p Email : span ui:text from='{person.getEmailid}' / /span /p /div /ui:UiBinder -- Thanks Thomas for your valuable inputs. Without that it would have been painful to identify the issue. Thanks, -Pandurang. On Thursday, 19 July 2012 13:34:11 UTC+5:30, Thomas Broyer wrote: On Thursday, July 19, 2012 5:36:13 AM UTC+2, Vasu wrote: Yes you were right, it is instantiating new Person object. But if I try to set Type to empty string validation fails and I cannot run the application. I didn't mean to set it to the empty string, but to not use the attribute: ui:with field=person / -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
Re: GWT 2.5-rc1 feature uirender is not working as expected.
you need to provide your code snippets which will enable us to help you. [image: Pandurang Patil on about.me] Pandurang Patil about.me/pandurangpatil http://about.me/pandurangpatil website: http://www.agnie.net twitter: @agniesoftware Cell : +91-9823241535 On Wed, Nov 26, 2014 at 12:15 AM, Aleksey Popryadukhin lynx...@gmail.com wrote: Hi all. I'm see this old topic but I stuck with this problem. I tried to remove the type tag but I'm getting an error anyway in compile time. @UiFactory either not working. Any clue? четверг, 26 июля 2012 г., 15:26:22 UTC+3 пользователь Vasu написал: Woow.. really quick thanks Rodrigo. Also would like to thanks Thomas for giving right direction. On Thursday, 26 July 2012 02:41:03 UTC+5:30, Rodrigo Chandia wrote: I think this patch (under review) fixes this issue: http://gwt-code-reviews.appspot.com/1794803 On Tuesday, July 24, 2012 3:27:29 PM UTC-4, Rodrigo Chandia wrote: Hmm, this seems like a bug to me. Hopefully I'll have a fix ready for rc2. On Mon, Jul 23, 2012 at 11:11 PM, Vasu wrote: Yea you are absolutely right. It worked when I removed type attribute from ui:with tag. I was wondering it has to identify type to call respective methods on the same and I realized that it tries to match the variable name with that of name of the parameter to render method (which I marked in blue color in below code). -- interface MyUiRenderer extends UiRenderer { void render(SafeHtmlBuilder sb, *Person person*); } -- So Finally working code looks like this. PersonCell.java -- public class PearsonCell extends AbstractCellPerson { interface MyUiRenderer extends UiRenderer { void render(SafeHtmlBuilder sb, Person person); } private static MyUiRendererrenderer= GWT.create(MyUiRenderer.class); @Override public void render(com.google.gwt.cell.client.Cell.Context context, Person value, SafeHtmlBuilder sb) { renderer.render(sb, value); } } -- PersonCell.ui.xml -- ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder' ui:with field='person' / div First Name : span ui:text from='{person.getFname}' / /span p Last Name : span ui:text from='{person.getLname}' / /span /p p Email : span ui:text from='{person.getEmailid}' / /span /p /div /ui:UiBinder -- Thanks Thomas for your valuable inputs. Without that it would have been painful to identify the issue. Thanks, -Pandurang. On Thursday, 19 July 2012 13:34:11 UTC+5:30, Thomas Broyer wrote: On Thursday, July 19, 2012 5:36:13 AM UTC+2, Vasu wrote: Yes you were right, it is instantiating new Person object. But if I try to set Type to empty string validation fails and I cannot run the application. I didn't mean to set it to the empty string, but to not use the attribute: ui:with field=person / -- You received this message because you are subscribed to a topic in the Google Groups Google Web Toolkit group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-web-toolkit/TWYcWRfICXk/unsubscribe . To unsubscribe from this group and all its topics, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
Re: GWT 2.5-rc1 feature uirender is not working as expected.
Woow.. really quick thanks Rodrigo. Also would like to thanks Thomas for giving right direction. On Thursday, 26 July 2012 02:41:03 UTC+5:30, Rodrigo Chandia wrote: I think this patch (under review) fixes this issue: http://gwt-code-reviews.appspot.com/1794803 On Tuesday, July 24, 2012 3:27:29 PM UTC-4, Rodrigo Chandia wrote: Hmm, this seems like a bug to me. Hopefully I'll have a fix ready for rc2. On Mon, Jul 23, 2012 at 11:11 PM, Vasu wrote: Yea you are absolutely right. It worked when I removed type attribute from ui:with tag. I was wondering it has to identify type to call respective methods on the same and I realized that it tries to match the variable name with that of name of the parameter to render method (which I marked in blue color in below code). -- interface MyUiRenderer extends UiRenderer { void render(SafeHtmlBuilder sb, *Person person*); } -- So Finally working code looks like this. PersonCell.java -- public class PearsonCell extends AbstractCellPerson { interface MyUiRenderer extends UiRenderer { void render(SafeHtmlBuilder sb, Person person); } private static MyUiRendererrenderer= GWT.create(MyUiRenderer.class); @Override public void render(com.google.gwt.cell.client.Cell.Context context, Person value, SafeHtmlBuilder sb) { renderer.render(sb, value); } } -- PersonCell.ui.xml -- ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder' ui:with field='person' / div First Name : span ui:text from='{person.getFname}' / /span p Last Name : span ui:text from='{person.getLname}' / /span /p p Email : span ui:text from='{person.getEmailid}' / /span /p /div /ui:UiBinder -- Thanks Thomas for your valuable inputs. Without that it would have been painful to identify the issue. Thanks, -Pandurang. On Thursday, 19 July 2012 13:34:11 UTC+5:30, Thomas Broyer wrote: On Thursday, July 19, 2012 5:36:13 AM UTC+2, Vasu wrote: Yes you were right, it is instantiating new Person object. But if I try to set Type to empty string validation fails and I cannot run the application. I didn't mean to set it to the empty string, but to not use the attribute: ui:with field=person / -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/7mOpyPJY5fAJ. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: GWT 2.5-rc1 feature uirender is not working as expected.
I think this patch (under review) fixes this issue: http://gwt-code-reviews.appspot.com/1794803 On Tuesday, July 24, 2012 3:27:29 PM UTC-4, Rodrigo Chandia wrote: Hmm, this seems like a bug to me. Hopefully I'll have a fix ready for rc2. On Mon, Jul 23, 2012 at 11:11 PM, Vasu wrote: Yea you are absolutely right. It worked when I removed type attribute from ui:with tag. I was wondering it has to identify type to call respective methods on the same and I realized that it tries to match the variable name with that of name of the parameter to render method (which I marked in blue color in below code). -- interface MyUiRenderer extends UiRenderer { void render(SafeHtmlBuilder sb, *Person person*); } -- So Finally working code looks like this. PersonCell.java -- public class PearsonCell extends AbstractCellPerson { interface MyUiRenderer extends UiRenderer { void render(SafeHtmlBuilder sb, Person person); } private static MyUiRendererrenderer= GWT.create(MyUiRenderer.class); @Override public void render(com.google.gwt.cell.client.Cell.Context context, Person value, SafeHtmlBuilder sb) { renderer.render(sb, value); } } -- PersonCell.ui.xml -- ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder' ui:with field='person' / div First Name : span ui:text from='{person.getFname}' / /span p Last Name : span ui:text from='{person.getLname}' / /span /p p Email : span ui:text from='{person.getEmailid}' / /span /p /div /ui:UiBinder -- Thanks Thomas for your valuable inputs. Without that it would have been painful to identify the issue. Thanks, -Pandurang. On Thursday, 19 July 2012 13:34:11 UTC+5:30, Thomas Broyer wrote: On Thursday, July 19, 2012 5:36:13 AM UTC+2, Vasu wrote: Yes you were right, it is instantiating new Person object. But if I try to set Type to empty string validation fails and I cannot run the application. I didn't mean to set it to the empty string, but to not use the attribute: ui:with field=person / -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/HCdklFkGtooJ. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: GWT 2.5-rc1 feature uirender is not working as expected.
Hmm, this seems like a bug to me. Hopefully I'll have a fix ready for rc2. On Mon, Jul 23, 2012 at 11:11 PM, Vasu pandurang.pa...@gmail.com wrote: Yea you are absolutely right. It worked when I removed type attribute from ui:with tag. I was wondering it has to identify type to call respective methods on the same and I realized that it tries to match the variable name with that of name of the parameter to render method (which I marked in blue color in below code). -- interface MyUiRenderer extends UiRenderer { void render(SafeHtmlBuilder sb, *Person person*); } -- So Finally working code looks like this. PersonCell.java -- public class PearsonCell extends AbstractCellPerson { interface MyUiRenderer extends UiRenderer { void render(SafeHtmlBuilder sb, Person person); } private static MyUiRendererrenderer= GWT.create(MyUiRenderer.class); @Override public void render(com.google.gwt.cell.client.Cell.Context context, Person value, SafeHtmlBuilder sb) { renderer.render(sb, value); } } -- PersonCell.ui.xml -- ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder' ui:with field='person' / div First Name : span ui:text from='{person.getFname}' / /span p Last Name : span ui:text from='{person.getLname}' / /span /p p Email : span ui:text from='{person.getEmailid}' / /span /p /div /ui:UiBinder -- Thanks Thomas for your valuable inputs. Without that it would have been painful to identify the issue. Thanks, -Pandurang. On Thursday, 19 July 2012 13:34:11 UTC+5:30, Thomas Broyer wrote: On Thursday, July 19, 2012 5:36:13 AM UTC+2, Vasu wrote: Yes you were right, it is instantiating new Person object. But if I try to set Type to empty string validation fails and I cannot run the application. I didn't mean to set it to the empty string, but to not use the attribute: ui:with field=person / -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/K3xzMkkBptoJ. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- Rodrigo Chandia | Software Engineer | rchan...@google.com | 678 7431725 -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: GWT 2.5-rc1 feature uirender is not working as expected.
Yea you are absolutely right. It worked when I removed type attribute from ui:with tag. I was wondering it has to identify type to call respective methods on the same and I realized that it tries to match the variable name with that of name of the parameter to render method (which I marked in blue color in below code). -- interface MyUiRenderer extends UiRenderer { void render(SafeHtmlBuilder sb, *Person person*); } -- So Finally working code looks like this. PersonCell.java -- public class PearsonCell extends AbstractCellPerson { interface MyUiRenderer extends UiRenderer { void render(SafeHtmlBuilder sb, Person person); } private static MyUiRendererrenderer= GWT.create(MyUiRenderer.class); @Override public void render(com.google.gwt.cell.client.Cell.Context context, Person value, SafeHtmlBuilder sb) { renderer.render(sb, value); } } -- PersonCell.ui.xml -- ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder' ui:with field='person' / div First Name : span ui:text from='{person.getFname}' / /span p Last Name : span ui:text from='{person.getLname}' / /span /p p Email : span ui:text from='{person.getEmailid}' / /span /p /div /ui:UiBinder -- Thanks Thomas for your valuable inputs. Without that it would have been painful to identify the issue. Thanks, -Pandurang. On Thursday, 19 July 2012 13:34:11 UTC+5:30, Thomas Broyer wrote: On Thursday, July 19, 2012 5:36:13 AM UTC+2, Vasu wrote: Yes you were right, it is instantiating new Person object. But if I try to set Type to empty string validation fails and I cannot run the application. I didn't mean to set it to the empty string, but to not use the attribute: ui:with field=person / -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/K3xzMkkBptoJ. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: GWT 2.5-rc1 feature uirender is not working as expected.
On Thursday, July 19, 2012 5:36:13 AM UTC+2, Vasu wrote: Yes you were right, it is instantiating new Person object. But if I try to set Type to empty string validation fails and I cannot run the application. I didn't mean to set it to the empty string, but to not use the attribute: ui:with field=person / -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/c421BfbJvhAJ. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: GWT 2.5-rc1 feature uirender is not working as expected.
Just a wild guess: try to remove the type= on your ui:with. Maybe the generator is confused and thinks it has to instantiate a Person object (what would normally be done with UiBinder), in which case it's no surprise that the Person's properties are all 'null'. BTW, to debug generated code, pass the -gen someFolder to the DevMode or Compiler so that it's output to disk, and then add the someFolder folder to the sources of your Eclipse launcher (or whatever the equivalent in your IDE if not using Eclipse). You'll then be able to step into the generated code. On Wednesday, July 18, 2012 6:44:07 AM UTC+2, Vasu wrote: I tried to create a sample by using UiRenderer. But Showing null values as result. And as the UiRenderer code implementation is generated I am not even able to debug it. Following is the sample I tried. Person.java -- public class Person { private Stringfname; private Stringlname; private Stringemailid; private intage; /** * @return the fname */ public String getFname() { return fname; } /** * @param fname *the fname to set */ public void setFname(String fname) { this.fname = fname; } /** * @return the lname */ public String getLname() { return lname; } /** * @param lname *the lname to set */ public void setLname(String lname) { this.lname = lname; } /** * @return the emailid */ public String getEmailid() { return emailid; } /** * @param emailid *the emailid to set */ public void setEmailid(String emailid) { this.emailid = emailid; } /** * @return the age */ public int getAge() { return age; } /** * @param age *the age to set */ public void setAge(int age) { this.age = age; } } -- PersonCell.ui.xml -- ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder' ui:with field='person' type='com.sample.renderer.Person' / div First Name : span ui:text from='{person.getFname}' / /span p Last Name : span ui:text from='{person.getLname}' / /span /p p Email : span ui:text from='{person.getEmailid}' / /span /p /div /ui:UiBinder -- PersonCell.java -- public class PersonCell extends AbstractCellPerson { interface MyUiRenderer extends UiRenderer { void render(SafeHtmlBuilder sb, Person person); } private static MyUiRendererrenderer= GWT.create(MyUiRenderer.class); @Override public void render(com.google.gwt.cell.client.Cell.Context context, Person value, SafeHtmlBuilder sb) { renderer.render(sb, value); } } -- onModuleLoad implementation -- PersonCell cell = new PersonCell(); CellListPerson cellList = new CellListPerson(cell); ListPerson list = new ArrayListPerson(); Person p = new Person(); p.setFname(Pranoti); p.setLname(Patil); p.setEmailid(pra.@gmail.com); p.setAge(30); list.add(p); p = new Person(); p.setFname(Pandurang); p.setLname(Patil); p.setEmailid(pa.@gmail.com); p.setAge(30); list.add(p); p = new Person(); p.setFname(Ravi); p.setLname(Kumar); p.setEmailid(ra.@gmail.com); p.setAge(30); list.add(p); cellList.setRowCount(list.size(), true); cellList.setRowData(list); RootPanel.get().add(cellList); -- output:
Re: GWT 2.5-rc1 feature uirender is not working as expected.
Thanks Thomas, But I guess if we remove the type, validation will fail to validate .ui.xml. Still will try and let you know the results. Thanks, -Pandurang On Wednesday, 18 July 2012 22:07:07 UTC+5:30, Thomas Broyer wrote: Just a wild guess: try to remove the type= on your ui:with. Maybe the generator is confused and thinks it has to instantiate a Person object (what would normally be done with UiBinder), in which case it's no surprise that the Person's properties are all 'null'. BTW, to debug generated code, pass the -gen someFolder to the DevMode or Compiler so that it's output to disk, and then add the someFolder folder to the sources of your Eclipse launcher (or whatever the equivalent in your IDE if not using Eclipse). You'll then be able to step into the generated code. On Wednesday, July 18, 2012 6:44:07 AM UTC+2, Vasu wrote: I tried to create a sample by using UiRenderer. But Showing null values as result. And as the UiRenderer code implementation is generated I am not even able to debug it. Following is the sample I tried. Person.java -- public class Person { private Stringfname; private Stringlname; private Stringemailid; private intage; /** * @return the fname */ public String getFname() { return fname; } /** * @param fname *the fname to set */ public void setFname(String fname) { this.fname = fname; } /** * @return the lname */ public String getLname() { return lname; } /** * @param lname *the lname to set */ public void setLname(String lname) { this.lname = lname; } /** * @return the emailid */ public String getEmailid() { return emailid; } /** * @param emailid *the emailid to set */ public void setEmailid(String emailid) { this.emailid = emailid; } /** * @return the age */ public int getAge() { return age; } /** * @param age *the age to set */ public void setAge(int age) { this.age = age; } } -- PersonCell.ui.xml -- ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder' ui:with field='person' type='com.sample.renderer.Person' / div First Name : span ui:text from='{person.getFname}' / /span p Last Name : span ui:text from='{person.getLname}' / /span /p p Email : span ui:text from='{person.getEmailid}' / /span /p /div /ui:UiBinder -- PersonCell.java -- public class PersonCell extends AbstractCellPerson { interface MyUiRenderer extends UiRenderer { void render(SafeHtmlBuilder sb, Person person); } private static MyUiRendererrenderer= GWT.create(MyUiRenderer.class); @Override public void render(com.google.gwt.cell.client.Cell.Context context, Person value, SafeHtmlBuilder sb) { renderer.render(sb, value); } } -- onModuleLoad implementation -- PersonCell cell = new PersonCell(); CellListPerson cellList = new CellListPerson(cell); ListPerson list = new ArrayListPerson(); Person p = new Person(); p.setFname(Pranoti); p.setLname(Patil); p.setEmailid(pra.@gmail.com); p.setAge(30); list.add(p); p = new Person(); p.setFname(Pandurang); p.setLname(Patil); p.setEmailid(pa.@gmail.com); p.setAge(30); list.add(p); p = new Person(); p.setFname(Ravi); p.setLname(Kumar); p.setEmailid(ra.@gmail.com); p.setAge(30); list.add(p); cellList.setRowCount(list.size(), true); cellList.setRowData(list); RootPanel.get().add(cellList);
Re: GWT 2.5-rc1 feature uirender is not working as expected.
Yes you were right, it is instantiating new Person object. But if I try to set Type to empty string validation fails and I cannot run the application. When I looked at generated code it is creating new Person object and using it. I even tried below code just if it works using @uiFactory. But even it doesn't seems to be working. PersonCell.java -- public class PearsonCell extends AbstractCellPerson { interface MyUiRenderer extends UiRenderer { void render(SafeHtmlBuilder sb, Person pearson); } private static MyUiRendererrenderer= GWT.create(MyUiRenderer.class); private Personperson; @Override public void render(com.google.gwt.cell.client.Cell.Context context, Person value, SafeHtmlBuilder sb) { person = value; renderer.render(sb, value); } @UiFactory /* this method could be static if you like */ public Person getResources() { return person; } -- Thanks, -Pandurang. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/2tyyRZ9W6QIJ. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
GWT 2.5-rc1 feature uirender is not working as expected.
I tried to create a sample by using UiRenderer. But Showing null values as result. And as the UiRenderer code implementation is generated I am not even able to debug it. Following is the sample I tried. Person.java -- public class Person { private Stringfname; private Stringlname; private Stringemailid; private intage; /** * @return the fname */ public String getFname() { return fname; } /** * @param fname *the fname to set */ public void setFname(String fname) { this.fname = fname; } /** * @return the lname */ public String getLname() { return lname; } /** * @param lname *the lname to set */ public void setLname(String lname) { this.lname = lname; } /** * @return the emailid */ public String getEmailid() { return emailid; } /** * @param emailid *the emailid to set */ public void setEmailid(String emailid) { this.emailid = emailid; } /** * @return the age */ public int getAge() { return age; } /** * @param age *the age to set */ public void setAge(int age) { this.age = age; } } -- PersonCell.ui.xml -- ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder' ui:with field='person' type='com.sample.renderer.Person' / div First Name : span ui:text from='{person.getFname}' / /span p Last Name : span ui:text from='{person.getLname}' / /span /p p Email : span ui:text from='{person.getEmailid}' / /span /p /div /ui:UiBinder -- PersonCell.java -- public class PersonCell extends AbstractCellPerson { interface MyUiRenderer extends UiRenderer { void render(SafeHtmlBuilder sb, Person person); } private static MyUiRendererrenderer= GWT.create(MyUiRenderer.class); @Override public void render(com.google.gwt.cell.client.Cell.Context context, Person value, SafeHtmlBuilder sb) { renderer.render(sb, value); } } -- onModuleLoad implementation -- PersonCell cell = new PersonCell(); CellListPerson cellList = new CellListPerson(cell); ListPerson list = new ArrayListPerson(); Person p = new Person(); p.setFname(Pranoti); p.setLname(Patil); p.setEmailid(pra.@gmail.com); p.setAge(30); list.add(p); p = new Person(); p.setFname(Pandurang); p.setLname(Patil); p.setEmailid(pa.@gmail.com); p.setAge(30); list.add(p); p = new Person(); p.setFname(Ravi); p.setLname(Kumar); p.setEmailid(ra.@gmail.com); p.setAge(30); list.add(p); cellList.setRowCount(list.size(), true); cellList.setRowData(list); RootPanel.get().add(cellList); -- output: -- First Name : null Last Name : null Email : null First Name : null Last Name : null Email : null First Name : null Last Name : null Email : null -- Any help would be much appriciated. I am not getting if I am missing something. Even I tried the sample given on GWT documenntation located at referhttps://developers.google.com/web-toolkit/doc/latest/DevGuideUiBinder#Rendering_HTML_for_Cells, getting similar results. When I tried to debug above code by applying break points inside redner() method of PersonCell, to check if I get required object over there, while it renders every cell. And I am able