Edit D:\app\Administrator\product\11.2.0\dbhome_1\j2ee\OC4J_EM\applications\em\em\monitoring\regionadd.uix
<?xml version = '1.0' encoding = 'UTF-8'?> <page xmlns="http://bali.us.oracle.com/cabo/baja" xmlns:baja="http://bali.us.oracle.com/cabo/baja" xmlns:data="http://bali.us.oracle.com/cabo/marlin" xmlns:marlin="http://bali.us.oracle.com/cabo/marlin"> <baja:content xmlns="http://bali.us.oracle.com/cabo/marlin"> <dataScope> <provider> <data name="pageDetails"> <method class="oracle.sysman.eml.chronos.admin.MetaDataCaboUtil" method="getPageDetails"/> </data> <data name="regionDetails"> <method class="oracle.sysman.eml.chronos.admin.RegionEventHandler" method="getRegionDetails"/> </data> <data name="resourceBundle"> <bundle class="oracle.sysman.eml.chronos.admin.ChronosResourceBundle"/> </data> <data name="commonBundle"> <bundle class="oracle.sysman.resources.CommonResourceBundle"/> </data> <data name="selectBundle"> <bundle class="oracle.sysman.eml.rsc.target.MultiTargetMsg"/> </data> <data name="regionPageHeader"> <method class="oracle.sysman.eml.chronos.admin.RegionEventHandler" method="getRegionPageHeader"/> </data> </provider> <contents> <form name="regionDetailForm" method="post"> <contents> <stackLayout> <contents> <messageBox data:rendered="renderErrorMsgBox@regionDetails"> <boundMessage select="ProcessingError"/> </messageBox> <header> <boundAttribute name="text"> <concat> <dataObject select="PageHeader" source="regionPageHeader"/> </concat> </boundAttribute> <contents> <tableLayout width="99%" vAlign="top"> <contents> <!-- Cancel and OK buttons --> <rowLayout hAlign="right"> <contents> <flowLayout> <contents> <submitButton data:text="CANCEL@commonBundle" formName="regionDetailForm" name="event" value="cancelandreturn" unvalidated="true"/> <submitButton data:text="OK@commonBundle" formName="regionDetailForm" name="event" value="okandreturn" /> </contents> </flowLayout> </contents> </rowLayout> <!-- Instruction Text --> <rowLayout> <contents> <styledText data:text="REGION_INSTR_TEXT@resourceBundle" styleClass="OraPromptText"/> </contents> </rowLayout> <!-- Name and Description fields --> <rowLayout> <contents> <labeledFieldLayout fieldWidth="100%" labelWidth="0%"> <contents> <spacer height="20"/> <messageTextInput columns="50" data:prompt="NAME_TXT@resourceBundle" name="RegionName" required="yes" data:text="RegionNameValue@regionDetails"/> <messageTextInput columns="52" data:prompt="DESCRIPTION_TXT@resourceBundle" name="RegionDescription" required="no" data:text="RegionDescriptionValue@regionDetails" rows="3"/> </contents> </labeledFieldLayout> </contents> </rowLayout> <!-- table and forms --> <rowLayout vAlign="top"> <contents> <rowLayout vAlign="top"> <contents> <cellFormat vAlign="top"> <contents> <header data:text="SUBNET_HEADER@resourceBundle"> <contents> <table name="SubnetTable" data:alternateText="subnetAlternateText@regionDetails" data:tableData="subnetRow@regionDetails" data:columnHeaderData="subnetColumn@regionDetails" data:columnFormats="subnetColFormats@regionDetails" data:summary="SUBNET_HEADER@resourceBundle" formSubmitted="true" text="" hAlign="center" vAlign="top"> <columnHeaderStamp> <boundText select="columnName"/> </columnHeaderStamp> <tableSelection> <multipleSelection data:shortDesc="SELECT@selectBundle"> <contents> <submitButton data:text="REMOVE@commonBundle" formName="regionDetailForm" name="event" value="deleteSubnetElement"/> </contents> </multipleSelection> </tableSelection> <columnFooter> <addTableRow/> </columnFooter> <contents> <messageTextInput name="SubnetIp" columns="15" data:text="SubnetIpValue" data:shortDesc="SUBNET_IP_COL@resourceBundle"> <boundMessage data:select="SubnetIpError"/> </messageTextInput> <messageTextInput name="SubnetPrefix" columns="15" data:text="SubnetPrefixValue" onBlur="writeSubnetMask()" data:shortDesc="SUBNET_PREFIX_COL@resourceBundle"> <boundMessage data:select="SubnetPrefixError"/> </messageTextInput> <messageTextInput name="SubnetMask" columns="15" data:text="SubnetMaskValue" onBlur="writeSubnetPrefix()" data:shortDesc="SUBNET_MASK_COL@resourceBundle"> <boundMessage data:select="SubnetMaskError"/> </messageTextInput> </contents> </table> </contents> </header> </contents> </cellFormat> <cellFormat width="20" columnspan="1" wrappingDisabled="true"><contents></contents></cellFormat> <cellFormat vAlign="top"> <contents> <header data:text="DOMAIN_HEADER@resourceBundle"> <contents> <table name="DomainTable" data:columnHeaderData="domainColumn@regionDetails" data:columnFormats="domainColFormats@regionDetails" data:alternateText="domainAlternateText@regionDetails" data:tableData="domainRow@regionDetails" data:summary="DOMAIN_HEADER@resourceBundle" formSubmitted="true" text="" hAlign="center" vAlign="top"> <columnHeaderStamp> <boundText select="columnName"/> </columnHeaderStamp> <tableSelection> <multipleSelection data:shortDesc="SELECT@selectBundle"> <contents> <submitButton data:text="REMOVE@commonBundle" formName="regionDetailForm" name="event" value="deleteDomainElement"/> </contents> </multipleSelection> </tableSelection> <columnFooter> <addTableRow/> </columnFooter> <contents> <messageTextInput name="DomainElement" columns="40" data:text="DomainElementValue" data:shortDesc="DOMAIN_NAME_COL@resourceBundle"> <boundMessage data:select="DomainError"/> </messageTextInput> </contents> </table> </contents> </header> </contents> </cellFormat> </contents> </rowLayout> <formValue name="RegionId" data:value="RegionIdValue@regionDetails" /> <formValue name="OperationType" data:value="OperationTypeValue@regionDetails" /> </contents> </rowLayout> </contents> </tableLayout> </contents> </header> </contents> </stackLayout> </contents> </form> <script generatesContent="true"> <boundAttribute name="text"> <concat> function writeSubnetMask() { var proxy = new TableProxy('SubnetTable'); var rowCount = proxy.getLength(); for(var i=0; i<rowCount; i++) { var prefix = proxy.getFormElement('SubnetPrefix', i).value; var mask = prefixToMask(prefix); if (mask == '-1') { proxy.getFormElement('SubnetMask', i).value = ''; proxy.getFormElement('SubnetPrefix', i).value = ''; alert('<dataObject select="INVALID_SUBNET_PREFIX_TXT" source="resourceBundle"/>'); } else { proxy.getFormElement('SubnetMask', i).value = mask; } } } function writeSubnetPrefix() { var proxy = new TableProxy('SubnetTable'); var rowCount = proxy.getLength(); for(var i=0; i<rowCount; i++) { var mask = proxy.getFormElement('SubnetMask', i).value; var prefix = maskToPrefix(mask); if (prefix == '-1') { proxy.getFormElement('SubnetMask', i).value = ''; proxy.getFormElement('SubnetPrefix', i).value = ''; alert('<dataObject select="INVALID_SUBNET_MASK_TXT" source="resourceBundle"/>'); } else { proxy.getFormElement('SubnetPrefix', i).value = prefix; } } } function prefixToMask(prefix) { if (prefix != '') { if (!validateInt(prefix)) { return '-1'; } var iPrefix = prefix * 1; if ((iPrefix < 1) || (iPrefix > 32)) { return '-1'; } else { var x; if ((x = iPrefix - 24) >= 0) { mask = '255.255.255.'+(((1 << x) - 1) << (8 - x)); } else if ((x = iPrefix - 16) >= 0) { mask = '255.255.'+(((1 << x) - 1) << (8 - x))+'.0'; } else if ((x = iPrefix - 8) >= 0) { mask = '255.'+(((1 << x) - 1) << (8 - x))+'.0.0'; } else { mask = ''+(((1 << iPrefix) - 1) << (8 - iPrefix))+'.0.0.0'; } return mask; } } else { return prefix; } } function maskToPrefix(mask) { if (mask != '') { var m = new Array(); m = mask.split('.'); if (m.length != 4) { return -1; } if (!validateInt(m[0]) && !validateInt(m[1]) && !validateInt(m[2]) && !validateInt(m[3])) { return -1; } m[0] = m[0] * 1; m[1] = m[1] * 1; m[2] = m[2] * 1; m[3] = m[3] * 1; var iMask = (m[0] << 24) + (m[1] << 16) + (m[2] << 8) + m[3]; var oneFound = new Boolean(false); var prefix = 32; for(var i=0; i<32; i++) { var x = iMask & 1; if ((x == 1) && (oneFound == false)) { oneFound = true; } else if (x == 0) { if (oneFound == true) { return '-1'; } prefix = prefix - 1; } iMask = iMask >> 1; } return prefix; } else { return mask; } } function validateInt(iString) { return (('' + parseInt(iString)) == iString); } </concat> </boundAttribute> </script> </contents> </dataScope> </baja:content> </page>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de