blob: 0dcf459e275a213b154d83b0a81e26f1d437341a [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="configs" title="$resource{i18njms.jmsPhysDestinations.tableTitle}"
deselectMultipleButton="$boolean{true}"
deselectMultipleButtonOnClick="setTimeout('admingui.table.toggleButtons(\\\\\'#{pageSession.topActionGroup}\\\\\', \\\\\'#{pageSession.tableId}\\\\\');', 0)"
selectMultipleButton="$boolean{true}"
selectMultipleButtonOnClick="setTimeout('admingui.table.toggleButtons(\\\\\'#{pageSession.topActionGroup}\\\\\', \\\\\'#{pageSession.tableId}\\\\\');', 0)" >
<!afterCreate
getClientId(component="$this{component}" clientId=>$page{tableId});
/>
<!facet actionsTop>
<sun:panelGroup id="topActionsGroup1">
<!afterCreate
getClientId(component="$this{component}" clientId=>$page{topActionGroup});
/>
<sun:button id="newButton" text="$resource{i18n.button.New}" >
<!command
gf.redirect(page="/jms/physdest/jmsPhysicalDestinationNew.jsf?target=#{pageSession.target}&parentPage=#{pageSession.selfPage}");
/>
</sun:button>
<sun:button id="deleteButton" text="$resource{i18n.button.Delete}" disabled="#{true}" primary="#{false}"
onClick="if (getConfirm(this,'$resource{i18n.msg.JS.confirmDeletePhysicalDestinations}') ) {submitAndDisable(this, '$resource{i18n.button.Processing}');}; return false;" >
<!command
getUIComponent(clientId="$pageSession{configsTableRowGroupId}", component=>$attribute{tableRowGroup});
getSelectedSingleMapRows(TableRowGroup="${tableRowGroup}" selectedRows=>$attribute{selectedRows});
foreach (var="dest" list="$attribute{selectedRows}") {
createMap(result="#{requestScope.attrsMap}");
mapPut(map="#{requestScope.attrsMap}" key="desttype" value="#{dest.type}" );
mapPut(map="#{requestScope.attrsMap}" key="id" value="#{dest.name}" );
gf.restRequest(endpoint="#{pageSession.resourceUrl}/delete-jmsdest",
attrs="#{requestScope.attrsMap}", method="delete", result="#{requestScope.result}");
}
setAttribute(key="selectedRows" value="${selectedRows}");
gf.redirect(page="#{request.contextPath}/#{pageSession.selfPage}");
/>
</sun:button>
<sun:button id="flushButton" text="$resource{i18njms.jmsPhysDestinations.purge}" disabled="#{true}" primary="#{false}"
onClick="return submitAndDisable(this, '$resource{i18n.button.Processing}');" >
<!command
getUIComponent(clientId="$pageSession{configsTableRowGroupId}", component=>$attribute{tableRowGroup});
getSelectedSingleMapRows(TableRowGroup="${tableRowGroup}" selectedRows=>$attribute{selectedRows});
prepareAlertMsg(summary="$resource{i18njms.jmsPhysDestinations.purged}", type="success");
foreach (var="dest" list="$attribute{selectedRows}") {
createMap(result="#{requestScope.attrsMap}");
mapPut(map="#{requestScope.attrsMap}" key="desttype" value="#{dest.type}" );
mapPut(map="#{requestScope.attrsMap}" key="id" value="#{dest.name}" );
gf.restRequest(endpoint="#{pageSession.resourceUrl}/flush-jmsdest", attrs="#{requestScope.attrsMap}", method="post", result="#{requestScope.result}");
// TODO: handle failures
}
/>
</sun:button>
</sun:panelGroup>
</facet>
<sun:tableRowGroup id="rowGroup1" selected="#{td.value.selected}" data={"$pageSession{destList}", "$pageSession{tableList2}"} sourceVar="td">
<!beforeCreate
// Add extra table properties...
createList(size="0", result="#{pageSession.tableList2}");
foreach(var="row" list="#{pageSession.destList}") {
gf.createAttributeMap(
keys={"selected", "name", "type"},
values={"$boolean{false}", "#{row.name}", "#{row.type}"},
map="#{requestScope.tlMap}");
listAdd(list="#{pageSession.tableList2}", value="#{requestScope.tlMap}");
}
/>
<!afterCreate
getClientId(component="$this{component}" clientId=>$page{configsTableRowGroupId});
/>
<sun:tableColumn headerText="$resource{i18n.common.SelectHeader}" selectId="select" rowHeader="$boolean{false}" id="col0">
<sun:checkbox id="select"
selected="#{td.value.selected}"
selectedValue="$boolean{true}"
onClick="setTimeout('admingui.table.toggleButtons(\\\\\'#{pageSession.topActionGroup}\\\\\', \\\\\'#{pageSession.tableId}\\\\\'); admingui.table.initAllRows(\\\\\'#{pageSession.tableId}\\\\\');', 0);"
/>
</sun:tableColumn>
<sun:tableColumn id="col1" headerText="$resource{i18n.common.PropertyName}" sort="name" rowHeader="$boolean{true}">
<sun:hyperlink id="nameCol" text="#{td.value.name}"
url="#{request.contextPath}/jms/physdest/jmsPhysicalDestinationEdit.jsf?name=#{td.value.name}&type=#{td.value.type}&target=#{pageSession.target}&parentPage=#{pageSession.selfPage}" />
</sun:tableColumn>
<sun:tableColumn id="col3" headerText="$resource{i18n.common.type.header}" sort="type" rowHeader="$boolean{true}">
<staticText id="typeCol" value="#{td.value.type}" />
</sun:tableColumn>
<sun:tableColumn id="col4" headerText="$resource{i18njms.jmsPhysDestinations.stats}">
<sun:hyperlink id="statsCol" text="$resource{i18njms.jmsPhysDestinations.view}" url="#{request.contextPath}/jms/physdest/jmsPhysicalDestinationStats.jsf?name=#{td.value.name}&type=#{td.value.type}&target=#{pageSession.target}&parentPage=#{pageSession.selfPage}" />
</sun:tableColumn>
</sun:tableRowGroup>
</sun:table>