admin@glassfish.java.net

Re: Code Review

From: Ken Paulsen <Ken.Paulsen_at_Sun.COM>
Date: Mon, 04 Jun 2007 21:38:02 -0700

It's hard to tell from the diffs, but I didn't see anything wrong.   FYI (in case you don't already know), you can do property="true" instead of #{true} or $boolean{true} now... JSFT does the right thing in those cases now (same for $int{} and other type conversions).

Go ahead and check it in!

Thanks,

Ken

Ana Caballero wrote:
Please review for Bug#6565295.  The state of the table buttons are enabled/disabled based on user selection.  Below are the diffs.  Please let me know if it's okay to checkin.
Thanks,
Ana


Index: managementRules.jsf
===================================================================
RCS file: /cvs/glassfish/admin-gui/src/docroot/mgmtRules/managementRules.jsf,v
retrieving revision 1.5
diff -r1.5 managementRules.jsf
89a90
> #include "changeButtonsJS.inc"       Index: mgmtRulesTable.inc
===================================================================
RCS file: /cvs/glassfish/admin-gui/src/docroot/mgmtRules/mgmtRulesTable.inc,v
retrieving revision 1.3
diff -r1.3 mgmtRulesTable.inc
38,40c38,45
<     deselectMultipleButton="$boolean{true}" deselectMultipleButtonOnClick="setTimeout('disableActions()', 0)"
<     selectMultipleButton="$boolean{true}" selectMultipleButtonOnClick="setTimeout('disableActions()', 0)"
<     >
---
>         deselectMultipleButton="$boolean{true}"
>         deselectMultipleButtonOnClick="setTimeout('changeThreeTableButtons()', 0)"
>         selectMultipleButton="$boolean{true}"
>         selectMultipleButtonOnClick="setTimeout('changeThreeTableButtons()', 0)" >
>          <!afterCreate
>             getClientId(component="$this{component}" clientId=>$page{tableId});
>         />
>
42a48,50
>           <!afterCreate
>                 getClientId(component="$this{component}" clientId=>$page{topActionGroup});
>             />
46c54
<              <sun:button id="deleteButton" text="$resource{i18n.button.Delete}" disabled="#{false}" primary="#{false}"
---
>              <sun:button id="button1" text="$resource{i18n.button.Delete}" disabled="#{true}" primary="#{false}"
59c67
<              <sun:button id="enableButton" text="$resource{i18n.button.Enable}" primary="#{false}"
---
>              <sun:button id="button2" text="$resource{i18n.button.Enable}"  disabled="#{true}" primary="#{false}"
69c77
<              <sun:button id="disableButton" text="$resource{i18n.button.Disable}" primary="#{false}"
---
>              <sun:button id="button3" text="$resource{i18n.button.Disable}" disabled="#{true}" primary="#{false}"
87,88c95,99
<             <sun:checkbox id="select" selected="#{td.value.selected}" selectedValue="$boolean{true}" />
<     </sun:tableColumn>   ---
>             <sun:checkbox id="select"
>                 selected="#{td.value.selected}"
>                 selectedValue="$boolean{true}"
>                 onClick="setTimeout('initAllRows(); changeThreeTableButtons()', 0)"
>             />    </sun:tableColumn>  



$page{configName}); getMgmtRuleValues(ConfigName="#{configName}", AllRules=>$attribute{allRules}); getMgmtRulesList(ConfigName="#{configName}", Result=>$attribute{listOfRows} ); setPageSessionAttribute(key="tableTitle" value="$resource{i18n.headings.mgmtRules}"); setPageSessionAttribute(key="listPageLink" value="managementRules.jsf"); setPageSessionAttribute(key="createLink" value="mgmtRulesNew1.jsf"); setPageSessionAttribute(key="editLink" value="/mgmtRules/mgmtRulesEdit.jsf"); setPageSessionAttribute(key="confirmDeleteMsg" value="$resource{i18n.msg.JS.confirmDeleteMgmtRules}"); /> #include "shared/restart.inc" #include treeBreadcrumbs.inc #include "alertMsg.inc" "
#include "mgmtRules/mgmtRulesTable.inc"
#include "changeButtonsJS.inc"



$page{tableId}); /> $page{topActionGroup}); /> $attribute{tableRowGroup}); getSelectedSingleMapRows(TableRowGroup="$attribute{tableRowGroup}" selectedRows=>$attribute{selectedRows}); deleteManagementRules(ConfigName="#{configName}", selectedRows="${selectedRows}" ); setAttribute(key="selectedRows" value="${selectedRows}"); redirect(page="#{listPageLink}?configName=#{configName}"); /> $attribute{tableRowGroup}); getSelectedSingleMapRows(TableRowGroup="$attribute{tableRowGroup}" selectedRows=>$attribute{selectedRows}); enableDisableManagementRules(ConfigName="#{configName}", Enable="#{true}" selectedRows="${selectedRows}" ); setAttribute(key="selectedRows" value="${selectedRows}"); redirect(page="#{listPageLink}?configName=#{configName}"); /> $attribute{tableRowGroup}); getSelectedSingleMapRows(TableRowGroup="$attribute{tableRowGroup}" selectedRows=>$attribute{selectedRows}); enableDisableManagementRules(ConfigName="#{configName}", Enable="#{false}" selectedRows="${selectedRows}" ); setAttribute(key="selectedRows" value="${selectedRows}"); redirect(page="#{listPageLink}?configName=#{configName}"); /> $page{mgmtRulesTableRowGroupId}); />