blob: d6f79a43a52a78ef0dd2f831c7734bdc565090cc [file] [log] [blame]
<!--
Copyright (c) 2010, 2018 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
http://www.eclipse.org/legal/epl-2.0.
This Source Code may also be made available under the following Secondary
Licenses when the conditions for such availability set forth in the
Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
version 2 with the GNU Classpath Exception, which is available at
https://www.gnu.org/software/classpath/license.html.
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
<sun:table id="sysPropsTable" style="padding: 10pt" title="$resource{i18n.common.AdditionalProperties}"
deselectMultipleButton="$boolean{true}"
deselectMultipleButtonOnClick="setTimeout('admingui.table.changeOneTableButton(\\\\\'#{pageSession.topActionGroup}\\\\\', \\\\\'#{pageSession.tableId}\\\\\');', 0)"
selectMultipleButton="$boolean{true}"
selectMultipleButtonOnClick="setTimeout('admingui.table.changeOneTableButton(\\\\\'#{pageSession.topActionGroup}\\\\\', \\\\\'#{pageSession.tableId}\\\\\');', 0)" >
<!afterCreate
getClientId(component="$this{component}" clientId=>$page{tableId});
/>
<!beforeCreate
createList(result="#{pageSession.tableList}", size="0");
// get instance attrs
gf.restRequest(endpoint="#{pageSession.parentUrl}", method="get", result="#{requestScope.result}");
setPageSessionAttribute(key="configRef", value="#{requestScope.result.data.extraProperties.entity.configRef}");
// get config sys props
gf.restRequest(endpoint="#{selfUrl}", method="GET", result="#{requestScope.results}");
setPageSessionAttribute(key="sysProps", value="#{requestScope.results.data.extraProperties.systemProperties}");
foreach(var="prop", list="#{pageSession.sysProps}") {
createMap(result="#{row}");
mapPut(map="#{row}", key="name", value="#{prop.name}");
mapPut(map="#{row}", key="currentValue", value="#{!empty prop.value ? prop.value : prop.defaultValue}");
mapPut(map="#{row}", key="overrideValue", value="#{!empty prop.value ? prop.value : ''}");
listAdd(list="#{pageSession.tableList}", value="#{row}");
}
/>
<!facet actionsTop>
<sun:panelGroup id="topActionsGroup1">
<!afterCreate
getClientId(component="$this{component}" clientId=>$page{topActionGroup});
/>
<sun:button id="addSharedTableButton" disabled="#{false}" text="$resource{i18n.button.AddProperty}" >
<!command
getUIComponent(clientId="$pageSession{propertyTableRowGroupId}", component=>$attribute{tableRowGroup});
addRowToTable(TableRowGroup="$attribute{tableRowGroup}", NameList={"name", "currentValue", "overrideValue"});
/>
</sun:button>
<sun:button id="button1" text="$resource{i18n.button.DeleteProperties}" disabled="#{true}" primary="#{false}">
<!command
getUIComponent(clientId="$pageSession{propertyTableRowGroupId}", component=>$attribute{trg});
getSelectedTableRowKeys(tableRowGroup="${trg}" rowKeys=>$attribute{rowKeys});
deleteTableRows(tableRowGroup="${trg}" rowKeys="${rowKeys}");
commitTableRowGroup(tableRowGroup="${trg}");
/>
</sun:button>
</sun:panelGroup>
</facet>
<sun:tableRowGroup id="rowGroup1" selected="#{td.value.selected}" data={"$pageSession{tableList}", "$pageSession{tableList2}"} sourceVar="td">
<!beforeCreate
// Add extra table properties...
createList(size="0", result="#{pageSession.tableList2}");
foreach(var="row" list="#{pageSession.tableList}") {
selectiveEncode(value="#{row.name}" result="#{requestScope.tlEncName}");
gf.createAttributeMap(
keys={"selected", "encodedName", "description"},
values={"$boolean{false}", "$attribute{tlEncName}", ""},
map="#{requestScope.tlMap}");
listAdd(list="#{pageSession.tableList2}", value="#{requestScope.tlMap}");
}
/>
<!afterCreate
getClientId(component="$this{component}" clientId=>$page{propertyTableRowGroupId});
/>
<sun:tableColumn headerText="$resource{i18n.common.SelectHeader}" selectId="select" rowHeader="$boolean{false}" id="col1">
<sun:checkbox id="select"
selected="#{td.value.selected}"
selectedValue="$boolean{true}"
onClick="setTimeout('admingui.table.changeOneTableButton(\\\\\'#{pageSession.topActionGroup}\\\\\', \\\\\'#{pageSession.tableId}\\\\\'); admingui.table.initAllRows(\\\\\'#{pageSession.tableId}\\\\\');', 0);"
/>
</sun:tableColumn>
<sun:tableColumn headerText="$resource{i18n.systemProps.colInstanceName}" sort="name" rowHeader="$boolean{false}" id="col2">
<sun:textField columns="$int{40}" maxLength="#{sessionScope.fieldLengths['maxLength.common.PropertyName']}" id="col1St" value="#{td.value.name}" />
</sun:tableColumn>
<sun:tableColumn id="currentValueCol" headerText="$resource{i18n.systemProps.ColCurrentValue}" sort="currentValue" rowHeader="$boolean{false}" id="col3">
<h:outputText id="currentVal" value="#{td.value.currentValue}" />
</sun:tableColumn>
<sun:tableColumn id="overrideValCol" headerText="$resource{i18n.inst.ColOverrideValue}" sort="overrideValue" rowHeader="$boolean{false}">
<sun:textField id="overrideVal" columns="$int{40}" maxLength="#{sessionScope.fieldLengths['maxLength.common.PropertyValue']}" value="#{td.value.overrideValue}"/>
</sun:tableColumn>
"<br/>
</sun:tableRowGroup>
</sun:table>