Monday, January 22, 2018
Thursday, January 18, 2018
Python script to parse attribute names of XML file
------------------------------------------------------------------------------------
import xml.etree.ElementTree as ET
import csv
tree = ET.parse("ResidentData.xml")
root = tree.getroot()
# open a file for writing
Resident_data = open('/tmp/ResidentData.csv', 'w')
# create the csv writer object
csvwriter = csv.writer(Resident_data)
resident_head = []
count = 0
for member in root.findall('Resident'):
resident = []
name = member.get('name_value')
resident.append(name)
csvwriter.writerow(resident)
Resident_data.close()
______________________________________________________________________________________
XML_________________________________________________________________
<State>
<Resident Id="100">
<Name name_value="Name123">Sample Name</Name>
<PhoneNumber name_value="Phone123">1234567891</PhoneNumber>
<EmailAddress name_value="Email123">sample_name@example.com</EmailAddress>
</Resident>
<Resident Id="101">
<Name name_value="12name1234">Sample Name1</Name>
<PhoneNumber name_value="12Phone1234">1234567891</PhoneNumber>
<EmailAddress name_value="12Email1234">sample_name1@example.com</EmailAddress>
</Resident>
</State>
________________________________________________________________________________
Sample Output
________________________________________________________________________________
Name123
12name1234
Reference:
https://docs.python.org/2/library/xml.etree.elementtree.html
http://blog.appliedinformaticsinc.com/how-to-parse-and-convert-xml-to-csv-using-python/
Thursday, December 14, 2017
create Environmental variable on weblogic
Get the value by System.getProperty("var");
https://stackoverflow.com/questions/23620163/best-way-to-set-environmental-variables-in-weblogic-startup
Using tableLayout, rowLayout & cellFormat
<trh:tableLayout cellPadding="5" cellSpacing="0" id="tl1" width="100%"
rendered="#{pageFlowScope.save != 'N'}">
<trh:rowLayout id="rl1" inlineStyle="background-color: #99CCCC">
<trh:cellFormat id="cf1" width="78%">
<af:outputText id="ot5" value="TRH Header Data 1"
inlineStyle="font-weight:bold;"/>
</trh:cellFormat>
<trh:cellFormat id="cf2" width="22%">
<af:outputText id="ot6" value="Trh Header 2" inlineStyle="font-weight:bold;"/>
</trh:cellFormat>
</trh:rowLayout>
</trh:tableLayout>
<af:listView value="#{bindings.EmployeeSurveyStmtsROVO.collectionModel}" var="item"
emptyText="#{bindings.EmployeeSurveyStmtsROVO.viewable ? 'No statement found.' : 'Access Denied.'}"
selectedRowKeys="#{bindings.EmployeeSurveyStmtsROVO.collectionModel.selectedRow}"
selectionListener="#{bindings.EmployeeSurveyStmtsROVO.collectionModel.makeCurrent}"
fetchSize="#{bindings.EmployeeSurveyStmtsROVO.rangeSize}" id="lv1"
rendered="#{pageFlowScope.save != 'N'}">
<af:listItem id="li1">
<trh:tableLayout cellPadding="5" cellSpacing="0" id="tl2" width="100%">
<trh:rowLayout id="rl2">
<trh:cellFormat id="cf3" width="8%" halign="right" valign="top">
<af:link icon="/resources/images/uipro1.gif" id="l10"/>
</trh:cellFormat>
<trh:cellFormat id="cf4" width="70%" valign="top">
<af:outputFormatted value="#{item.bindings.emp.inputValue}" id="of1"/>
</trh:cellFormat>
<trh:cellFormat id="cf5" valign="top">
<af:selectOneChoice value="#{empty bindings.Response.inputValue ? bindings.DefaultValue.inputValue : bindings.Response.inputValue}"
label="" unselectedLabel="Please make your selection"
readOnly="#{bindings.Status.inputValue != 'S' and bindings.Status.inputValue != 'W'}"
required="#{bindings.Response.hints.mandatory}"
shortDesc="#{bindings.Response.hints.tooltip}" id="soc4">
<f:selectItems value="#{bindings.Response.items}" id="si4"/>
<f:validator binding="#{bindings.Response.validator}"/>
</af:selectOneChoice>
</trh:cellFormat>
</trh:rowLayout>
</trh:tableLayout>
</af:listItem>
</af:listView>
Labels:
rowLayout & cellFormat,
trh,
Using tableLayout
Using panelGridLayout, panelGridRow & panelGridCell
<af:panelGridLayout id="pgl2">
<af:gridRow marginTop="20px" marginBottom="20px" height="auto" id="gr1">
<af:gridCell id="gc1" width="100%" halign="center">
<af:outputText value="Review : #{pageFlowScope.Employee}" id="ot1"
inlineStyle="font-size:large;" partialTriggers="b2"/>
</af:gridCell>
</af:gridRow>
</af:panelGridLayout>
<af:gridRow marginTop="20px" marginBottom="20px" height="auto" id="gr1">
<af:gridCell id="gc1" width="100%" halign="center">
<af:outputText value="Review : #{pageFlowScope.Employee}" id="ot1"
inlineStyle="font-size:large;" partialTriggers="b2"/>
</af:gridCell>
</af:gridRow>
</af:panelGridLayout>
Background image for Panel Group Image for showing certificates
<?xml version='1.0' encoding='UTF-8'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1" xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
<af:panelGroupLayout id="pgl1" inlineStyle='background-image:url("../../resources/images/offwhite.jpg");'
layout="scroll">
<af:richTextEditor value="#{pageFlowScope.cert}" id="rte1" label="" readOnly="true" simple="true"
contentStyle="width:100%">
<?audit suppress oracle.adf.faces.compnotlabelled?>
</af:richTextEditor>
</af:panelGroupLayout>
</jsp:root>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1" xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
<af:panelGroupLayout id="pgl1" inlineStyle='background-image:url("../../resources/images/offwhite.jpg");'
layout="scroll">
<af:richTextEditor value="#{pageFlowScope.cert}" id="rte1" label="" readOnly="true" simple="true"
contentStyle="width:100%">
<?audit suppress oracle.adf.faces.compnotlabelled?>
</af:richTextEditor>
</af:panelGroupLayout>
</jsp:root>
attached image is the offwhite.jpg file
Tuesday, December 5, 2017
ADF JDeveloper 12.2.1 new feature - Remote Taskflows ;
ADF JDeveloper 12.2.1 new feature - Remote Taskflows ; Now JSF page from One Application can point to Taskflow in another application. There is no need to create a shared library and make it dependent to main application
Demo video from Shay Shmeltzer's Weblog
Demo video from Shay Shmeltzer's Weblog
Labels:
ADF,
JDeveloper 12.2.1,
remote taskflows,
weblogic
Subscribe to:
Posts (Atom)

