|
Glassfish example source code file (physDestTable.jsf)
The Glassfish physDestTable.jsf source code<!-- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. Copyright (c) 2010-2011 Oracle and/or its affiliates. All rights reserved. The contents of this file are subject to the terms of either the GNU General Public License Version 2 only ("GPL") or the Common Development and Distribution License("CDDL") (collectively, the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html or packager/legal/LICENSE.txt. See the License for the specific language governing permissions and limitations under the License. When distributing the software, include this License Header Notice in each file and include the License file at packager/legal/LICENSE.txt. GPL Classpath Exception: Oracle designates this particular file as subject to the "Classpath" exception as provided by Oracle in the GPL Version 2 section of the License file that accompanied this code. Modifications: If applicable, add the following below the License Header, with the fields enclosed by brackets [] replaced by your own identifying information: "Portions Copyright [year] [name of copyright owner]" Contributor(s): If you wish your version of this file to be governed by only the CDDL or only the GPL Version 2, indicate your decision by adding "[Contributor] elects to include this software in this distribution under the [CDDL or GPL Version 2] license." If you don't indicate a single choice of license, a recipient has the option to distribute your version of this file under either the CDDL, the GPL Version 2 or to extend the choice of license to its licensees as provided above. However, if you add GPL Version 2 code and therefore, elected the GPL Version 2 license, then the option applies only if the new code is made subject to such option by the copyright holder. --> <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}); prepareSuccessfulMsg(); 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="#{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}); // flushJMSDestination(selectedRows="${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 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> // TODO: Fix these links. Combine all of the phys dest pages into one <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}&parent=#{pageSession.selfPage}" /> </sun:tableColumn> </sun:tableRowGroup> </sun:table> Other Glassfish examples (source code examples)Here is a short list of links related to this Glassfish physDestTable.jsf source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.