Vojtech Szocs has posted comments on this change.

Change subject: userportal, webadmin: changed all custom Cell classes to set IDs
......................................................................


Patch Set 2:

(6 comments)

https://gerrit.ovirt.org/#/c/38701/2/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/cell/DecoratedImageResourceCell.java
File 
frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/cell/DecoratedImageResourceCell.java:

Line 15:         @Template("<div id=\"{4}\" style=\"position: relative; left: 
0; top: 0;\"><span style=\"position: relative; left: 0px; top: 
0px;\">{0}</span><span style=\"position: absolute; left: {2}px; top: 
{3}px;\">{1}</span></div>")
Line 16:         SafeHtml doubleImageContainer(SafeHtml imageHtml, SafeHtml 
decoratorHtml, int left, int top, String id);
Line 17:     }
Line 18: 
Line 19:     // TODO is there a reason this doesn't lazy instantiate like the 
other cells?
No reason that I'm aware of, feel free to add code for lazy template instance 
creation.
Line 20:     private static final CellTemplate template = 
GWT.create(CellTemplate.class);
Line 21: 
Line 22:     public DecoratedImageResourceCell() {
Line 23:         super();


https://gerrit.ovirt.org/#/c/38701/2/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/cell/PasswordTextInputCell.java
File 
frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/cell/PasswordTextInputCell.java:

Line 7: 
Line 8: public class PasswordTextInputCell extends TextInputCell {
Line 9: 
Line 10:     interface PasswordTemplate extends SafeHtmlTemplates {
Line 11:         @Template("<input id=\"\" type=\"password\" value=\"{1}\" 
tabindex=\"-1\"></input>")
Aren't we missing "{0}" to inject the ID value in above template?
Line 12:         SafeHtml inputWithValue(String id, String value);
Line 13: 
Line 14:         @Template("<input id=\"\" type=\"password\" 
tabindex=\"-1\"></input>")
Line 15:         SafeHtml input(String id);


Line 10:     interface PasswordTemplate extends SafeHtmlTemplates {
Line 11:         @Template("<input id=\"\" type=\"password\" value=\"{1}\" 
tabindex=\"-1\"></input>")
Line 12:         SafeHtml inputWithValue(String id, String value);
Line 13: 
Line 14:         @Template("<input id=\"\" type=\"password\" 
tabindex=\"-1\"></input>")
Aren't we missing "{0}" to inject the ID value in above template?
Line 15:         SafeHtml input(String id);
Line 16:     }
Line 17: 
Line 18:     private static PasswordTemplate template;


https://gerrit.ovirt.org/#/c/38701/2/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/cell/SafeHtmlCell.java
File 
frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/cell/SafeHtmlCell.java:

Line 23: 
Line 24:     @Override
Line 25:     public void render(Context context, SafeHtml value, 
SafeHtmlBuilder sb, String id) {
Line 26:         if (value != null) {
Line 27:             sb.appendHtmlConstant("<div id=\" " + id + "\" 
style='display:block'>"); //$NON-NLS-1$ //$NON-NLS-2$
Any reason why there is a space after

 id="

?
Line 28:             sb.append(value);
Line 29:             sb.appendHtmlConstant("</div>"); //$NON-NLS-1$
Line 30:         }
Line 31:     }


https://gerrit.ovirt.org/#/c/38701/2/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/column/AbstractColumn.java
File 
frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/column/AbstractColumn.java:

Line 13:         super(cell);
Line 14:     }
Line 15: 
Line 16:     public CellWithElementId<C> getCell() {
Line 17:         return (CellWithElementId<C>) getCell();
Shouldn't we return "super.getCell()" here?
Line 18:     }
Line 19: 
Line 20:     @Override
Line 21:     public void configureElementId(String elementIdPrefix, String 
columnId) {


https://gerrit.ovirt.org/#/c/38701/2/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/widget/table/cell/HostStatusCell.java
File 
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/widget/table/cell/HostStatusCell.java:

Line 80: 
Line 81:         // Generate the HTML for the cell including the exclamation 
mark only if
Line 82:         // power management is not enabled or there are network 
configuration
Line 83:         // changes that haven't been saved yet:
Line 84:         sb.appendHtmlConstant("<div id=\"" + id + " \" 
style=\"text-align: center;\">"); //$NON-NLS-1$ //$NON-NLS-2$
Any reason why there is a space after ID value and before ending quote mark?

e.g. currently it's:

 id=\"" + id + " \"

shouldn't this be:

 id=\"" + id + "\"

?
Line 85:         sb.append(statusImageHtml);
Line 86:         boolean getnet_config_dirty =
Line 87:                 vds.getNetConfigDirty() == null ? false : 
vds.getNetConfigDirty().booleanValue();
Line 88:         boolean showPMAlert = vds.getVdsGroupSupportsVirtService() && 
!vds.isPmEnabled();


-- 
To view, visit https://gerrit.ovirt.org/38701
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I0cec903914043ebb48a03d9ba17db15b130c65ef
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Greg Sheremeta <gsher...@redhat.com>
Gerrit-Reviewer: Alexander Wels <aw...@redhat.com>
Gerrit-Reviewer: Einav Cohen <eco...@redhat.com>
Gerrit-Reviewer: Greg Sheremeta <gsher...@redhat.com>
Gerrit-Reviewer: Vojtech Szocs <vsz...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to