Pulling particular attributes from the XML Object
Hi !
My requirement is onChange of a value from the first drop down, particular values needs to load in the second drop down. Values that needs to pull are designed in XML Object as Map entries Key,Pair Values.
We can pull the first drop down values from the XML Object using Rule library and find the following code snippet ;
<block>
<set name='appData'>
<invoke name='getExtension'>
<invoke name='getObject'>
<ref>ctx</ref>
<invoke name='findType' class='com.waveset.object.Type'>
<s>Configuration</s>
</invoke>
<s>Config_SDD_ReferenceData</s>
</invoke>
</invoke>
</set>
<ref>appData</ref>
</block>
Here, Config_SDD_ReferenceData.xml is the file where the map entries are written and the ref name is appData. Later in BPE the code "appData.units" are referred in ValueMap property.
But we are stuggling to populate the second drop down values based on the valu selected in the first drop down.
Please find the XML Object also;
<Attribute name='units'>
<Map>
<MapEntry key='1' value='units1'/>
<MapEntry key='2' value='units2'/>
<MapEntry key='3' value='units3'/>
</Map>
</Attribute>
Thanks in advance.
u could use removeChild() method of the node interface....get the parent node named 'xxxxxx' from the DOM and perform a removeChild operation on it specifying the senderID, receiverID and dateTimeStamp Nodes as arguments to the method....
Hope this helps
VP
Similar Messages
-
Selecting custom attributes from the default helpdesk screen?
Can i select and see custom attributes from the default helpdesk screen? I dont want to have to click through to the details tab as things can and have been missed. See picture attached.
This topic first appeared in the Spiceworks CommunityI have worked out the issue. I was attempting to access attributes from the BOR Object "WorkItem" as opposed to elements in the workflow container. When I created a custom container element called "ReferenceID" (as the element name) and used this in my XML it worked successfully.
I hope this helps someone else in the future. -
Error: The report source could not be retrieved from the state object.
I have been trying to create a report in a JSF page. The relevant parts are below:
Inside the JSP page, this is the code:
<jsp:useBean id="MyBean" class="com.nm.facade.rto.POJOViewerBean" scope="session" />
<jsp:setProperty name="MyBean" property="reportLocation" value="Report1.rpt" />
<v:reportPageViewer reportSource="#{MyBean.reportSource}"
displayToolbarPrintButton="true"
printMode="ActiveX"
zoomPercentage="100"
displayToolbarExportButton="true"
displayToolbarRefreshButton="true"
viewerName="My Viewer"
></v:reportPageViewer>
In the backing bean, this is the relevant code:
public Object getReportSource() throws ReportSDKException
if (propertiesChanged || reportSource == null)
propertiesChanged = false;
if (reportLocation == null)
throw new RuntimeException("The reportLocation property must be set before a report source is retrieved");
ReportClientDocument rcd = new ReportClientDocument();
rcd.setReportAppServer(ReportClientDocument.inprocConnectionString);
rcd.open(reportLocation, 0);
DatabaseController dbc = rcd.getDatabaseController();
//Create the POJO collection and populate it with data
ReportData[] data =
new ReportData("B.B.", "King", 6, new Date(25, 9, 16)),
new ReportData("Muddy", "Waters", 7, new Date(15, 4, 4)),
new ReportData("John Lee", "Hooker", 8, new Date(16, 8, 16)),
new ReportData("Otis", "Rush", 9, new Date(34, 4, 29)),
new ReportData("Buddy", "Guy", 10, new Date(36, 7, 30))
//Create the result set from the collection of POJOs
POJOResultSetFactory factory = new POJOResultSetFactory(ReportData.class);
factory.setVerbose(true);
POJOResultSet results = factory.createResultSet(data);
ResultSetMetaData metaData = results.getMetaData();
//Set the resultset as the report datasource
//Get the table name from the 'Set Datasource Location' dialog in the Crystal Reports designer
String reportTable = "getReportDataDataSource";
dbc.setDataSource(results, reportTable, reportTable);
IReportSource reportSource = rcd.getReportSource();
if (reportSource == null)
throw new RuntimeException("Unable to get a report source.");
return reportSource;
In the CRConfig.xml, this is what is there:
<?xml version="1.0" encoding="utf-8"?>
<CrystalReportEngine-configuration>
<reportlocation>../reports</reportlocation>
<timeout>0</timeout>
<ExternalFunctionLibraryClassNames>
<classname></classname>
</ExternalFunctionLibraryClassNames>
</CrystalReportEngine-configuration>
The report template 'Report1.rpt' is packaged under WEB-INF/reports in the war file.
When I try to generate the report by accessing the JSF page, I am getting an error: "The report source could not be retrieved from the state object. "
I am not sure what is wrong. Can someone help me in resolving this issue?
Edited by: renshai on Jul 9, 2009 3:21 AMMy formatting gets lost and the message looks unintelligible. After some experimentation, I found that if the message exceeds some length, the formatting is removed. Since I couldn't find any way to delete this post, I made another post with the same subject. Please ignore this post and help me to find a solution for the problem posted in the other thread with the same subject. Thanks in advance.
-
Reflection: attributes from the base class
Is there a way to get the attributes from the base class of a derived class via reflection? I only found methods to get the attributes from the derived class.
Example:
class A
int a = 4;
class B extends A
int b = 5;
Object unknown = new B();
Code/Idea to get all attributes from baseclass A using unknown (here: a=4)?Thank you all for your hints. The mistake I make, was to use the baseclass, and not the derived class for getting the attributes. By using an extra parameter of type class I got all attributes in their context.
private StringBuffer getDump(Object obj, Class cl)
dmp.append(cl.getName() + " {\n");
Field[] attribute = cl.getDeclaredFields(); <--- only the fields of the current class
for (int j = 0; j < attribute.length; j++)
attribute[j].setAccessible(true);
try
if (attribute[j].getType().isPrimitive() || attribute[j].getType() == String.class)
dmp.append(attribute[j].getName() + "=" + attribute[j].get(obj) + "\n");
else
if (((attribute[j].getModifiers() & Modifier.STATIC) != Modifier.STATIC) &&
(attribute[j].getType().getName().startsWith("java.lang") == false) &&
((attribute[j].getModifiers() & Modifier.FINAL) != Modifier.FINAL))
dmp.append(getDump(attribute[j].get(obj), attribute[j].get(obj).getClass())); <- recursive call
catch (IllegalAccessException ex)
ex.printStackTrace();
dmp.append("}");
return dmp;
} -
How to add attributes in the xml tag
hi,
i have two tables employee,department
employee table
empno number,
empname varchar2(100),
deptno number,
department table
deptno number,
deptname varchar2(100)
i want xml file in the above mentioned two tables.The xml file is as follows,
<?xml version="1.0" encoding="UTF-8" ?>
<EmployeeInfo>
<Data type="employee">
<empno>1</empno>
<empname>siva</empname>
<deptno>10</deptno>
</data>
<Data type="department">
<deptno>10</empno>
<deptname>IT</empname>
</data>
</EmployeeInfo>
can anybody please give plsql code for this requirement.i need to add attributes in the xml tag.Its urgent
By
SivaA general example (based on the OE sample data/tables)
SQL>SELECT XMLElement("Emp",
2 XMLAttributes(employee_id AS "id"
3 , '10' "dept"),
4 first_name||' '||last_name) as result
5 FROM employees e
6 WHERE department_id = 10;
RESULT
<Emp id="200" dept="10">Jennifer Whalen</Emp> -
Hi
We are having trouble storing inventory scans from some workstations.
We have a windows ONLY environment, with middle tier servers. (ZEN65SP1,
W2KSP4).
Some workstations are storing fine. The Storer function is working and we
can see the storer functions for the 'good' workstations in the Inventory
service window.
However some workstations can't store to the inventory db, but DO populate
eDir ZENworks inventory 'minimal information' but show "Scanner(Warning) :
027: Unable to read the sequence number from the Workstation object." in
the Scan Status...
The Inventory service window shows no attempt by these workstations - it's
almost as though the scan file is not arriving (though eDir knows/displays
the scan file name)
How does the workstation access the scandir in Windows only/middle tier
environment? Does the scan xml stream get sent to the MT via http and then
on to the scandir via CIFS?
Any suggestions/explanations welcome!!
Many thanks
DavidDavid,
It appears that in the past few days you have not received a response to your
posting. That concerns us, and has triggered this automated reply.
Has your problem been resolved? If not, you might try one of the following options:
- Do a search of our knowledgebase at http://support.novell.com/search/kb_index.jsp
- Check all of the other support tools and options available at
http://support.novell.com.
- You could also try posting your message again. Make sure it is posted in the
correct newsgroup. (http://support.novell.com/forums)
Be sure to read the forum FAQ about what to expect in the way of responses:
http://support.novell.com/forums/faq_general.html
If this is a reply to a duplicate posting, please ignore and accept our apologies
and rest assured we will issue a stern reprimand to our posting bot.
Good luck!
Your Novell Product Support Forums Team
http://support.novell.com/forums/ -
Error while deleting a row from the Entity Object
Hi OAF Guys,
i am unable to delete the newly created row from the entity object.
let me explain my scenario.
1. i have a table of which some of the columns are mandatory.
2. I am writing the code in the validateEntity to check wether the user really enter anything into the fields.
3. My problem is, when the user creates row and wanted to delete the row without entering any details, the validate entity of the EO gets fired which will not allows to delete the row.
Is there any workaround for this problem.
Regards,
Nagesh Manda.Hi Tapash,
I am very sorry for not providing you the complete details of my scenario. Here i am explaining
1. what code you have placed while creating the row and in validation method on EOImpl.
while creating a new row i am initializing the primary key of the EO with the sequence value.
2.When you say, you are unable to delete the row, are you getting a error message ? if yes, custom message or fwk error ?
its not the fwk error, its the custom message which wrote in my validateEntity method of EO to check whether the user had entered all the necesary columns or not.
3.How are you trying to delete the row ?
while the user clicks on the delete switcher i am getting the primary key of the row and searching for the row in the vo and finally deleting it.
The problem arises when the user creates a row, and later doesnt want to enter the details and delete it. Here while deleting the row the validateEntity method of the EO gets fired and doesnt allow me to do so :(.
Any way appreciate your help tapash.
Regards,
Nagesh Manda. -
Unable to read payload from the message object in XI
Hello Guys,
Please help me about my problem in XI version 7.0.im quite new here.
im trying to test my config but error message occured. "Unable to read payload from the message object"
when i checked the comm channel this is the error message :
Error during database connection to the database URL 'jdbc:sqlserver://172.16.40.20:1433;databasename=TRAVEL:SelectMethod=cursor' using the JDBC driver 'com.microsoft.sqlserver.jdbc.SQLServerDriver': 'com.sap.aii.adapter.jdbc.sql.DriverManagerException: Cannot establish connection to URL 'jdbc:sqlserver://172.16.40.20:1433;databasename=TRAVEL:SelectMethod=cursor': com.microsoft.sqlserver.jdbc.SQLServerException: Cannot open database "TRAVEL:SelectMethod=cursor" requested by the login. The login failed.'
when i tried my login in sql it works...but in this message the login is failed..what shall i do..
Please advice.
Thanks in advance
aVaDuDzHi
Check with the connection string & Authorization of user you have used.
MSSQL string is
jdbc:microsoft:sqlserver://dbhost:1433;databaseName=example;SelectMethod=Cursor
While doing JDBC its good to refer Note 831162 lot of problems can be resolved.
Thanks
Gaurav -
How to get the name of color from the Color Object??
hi all,
i want to get the color name from the Color Object i.e say if the Color object is something like
c=new Color(128,128,128);
I should be a able to say this object is of gray color dynamically
Can anyone help???You can't do this. There is no label for a color - what is 0x439803 called? 'Mud?' 'Rustic sludge?' 'Poo brown?' - and then that's just English, it might need to be 'Brun de Kaka' or something.
If you want to check against a certain predefined color you could do the following,
if (Color.GRAY.equals(myColor))Otherwise you'll have to write your own code to label colors. -
Is there a way to remove the index from the XML output?
Hi,
It is easy to remove the index from the WebHelp output.
We also want to remove it from the XML output.
How do I do that?
Thanks,
Rakefet@Jeff: In the Single Source Layouts recipe box is a layout for XML. Although, I'm really not sure why folks would use it, other than to possibly export the project data to another system of some sort.
@Rakefet: One thought is to try creating a new blank Index. Then choose the empty Index when you use XML Output.
Cheers... Rick -
Unable to read payload from the message object
Hi
I have a scenario where i am send request to http receiver and getting the response. When I am testing through WFETCH it is working fine. But when i am testing through XI I am getting the follwoing error
Unable to read payload from the message object
I have tested the XI payload in mapping. I have done all kinds of testing but it is still giving the same error.
One more strange thing is
I have done one BPM scenario where Data is coming from Source to BPM( which is asyn) and then from it will go from BPM to Target (which is sync) But when I am checking the SXMB_MONI... it showing the messages like this
Source to BPM
Target to BPM
Target to BPM.
But i think it should show message like
Source to BPM
BPM to Target
Target to BPM
why i am getting the floHi
Check with the connection string & Authorization of user you have used.
MSSQL string is
jdbc:microsoft:sqlserver://dbhost:1433;databaseName=example;SelectMethod=Cursor
While doing JDBC its good to refer Note 831162 lot of problems can be resolved.
Thanks
Gaurav -
Hi,
I have the following issue when deploying:
Solution Deployment : Missing one or more of the following attributes from the root node in solution .wsp: assembly '', type ''
The solution is a farm solution (was never sandbox) and it deploys fine.
It was updated several times with success. We did not see this issue until recently when we had some other issue (unrelated) and looked at the logs. The solution is updated without problem and updates are available for the user. But we can see this error
in the logs at the update time.
Any idea what might cause this?
Pop AnisiaHi,
This error is wide meaning, as it can come from differences between SP versions, variables types used, bad manifest file, WebConfiguration ...
You can try to redeploy the solution.
retracted the solution,removed all the previous ref, removed dll from GAC and folder from 14\features and reset the iis, deploying it again.
Here are some similar issue post, you can use as a reference:
https://social.technet.microsoft.com/Forums/office/en-US/72ac9a02-3a51-48b8-9e36-3b24a2d4da74/missing-one-or-more-of-the-following-attributes-from-the-root-node-in-solution-alertbdcwsp?forum=sharepointgeneralprevious
https://social.technet.microsoft.com/Forums/office/en-US/331af288-5ba6-48a7-9e9d-ac4e4bc8f8fa/missing-one-or-more-of-the-following-attributes-from-the-root-node-in-solution-xxxwsp-assembly-?forum=sharepointdevelopmentprevious
In additional, you can check the ULS log (C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\LOGS) to get the detailed information.
I hope this helpful.
Best Regards,
Lisa Chen
TechNet Community Support
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
[email protected] -
Code for reading particular fields from the file placed in application
hi,
code for reading particular fields from the file placed in application server in to the internal table.Hi,
Use the GUI_UPLOAD FM to upload the File into ur Internal Table.
DATA : FILE_TABLE TYPE FILE_TABLE OCCURS 0,
fwa TYPE FILE_TABLE,
FILENAME TYPE STRING,
RC TYPE I.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOG
EXPORTING
WINDOW_TITLE = 'Open File'
DEFAULT_EXTENSION =
DEFAULT_FILENAME =
FILE_FILTER =
INITIAL_DIRECTORY =
MULTISELECTION =
WITH_ENCODING =
CHANGING
FILE_TABLE = FILE_TABLE
RC = RC
USER_ACTION =
FILE_ENCODING =
EXCEPTIONS
FILE_OPEN_DIALOG_FAILED = 1
CNTL_ERROR = 2
ERROR_NO_GUI = 3
NOT_SUPPORTED_BY_GUI = 4
others = 5
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
READ TABLE FILE_TABLE INDEX 1 into fwa.
FILENAME = fwa-FILENAME.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = filename
FILETYPE = 'DAT'
IMPORTING
FILELENGTH =
TABLES
data_tab = itab
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
OTHERS = 6 .
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Regards,
Balakumar.G
Reward Points if helpful. -
Possiblity to import any particular table from the full dmp file
Hi,
I am using Oracle 10G database.
I a have dmp file.
I need to import only a particular from that dmp file.
Is there any possiblity to import a particular table from the whole dump.
Thanks and Regards,
Ansaf.Ansaf wrote:
Hi,
I am using Oracle 10G database.
I a have dmp file.
I need to import only a particular from that dmp file.
Is there any possiblity to import a particular table from the whole dump.
Thanks and Regards,
Ansaf.
You can specify like below example
impdp hr TABLES=employees, xxx, xxxCheers -
How to query from the xml table a single, specified element.
I'm quite new in Xml Db. Pleas, can anybody tell me how to query from the xml table below a single element (i.e. the element 'rapportoparentela = NIPOTE' related to the element 'codicefiscale = CRRVNC76R52G337R', or the element 'rapportoparentela = FIGLIO' related to the element 'codicefiscale = CRRRNT51L23G337Q')?
- <dati xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<codiceinterno />
<codicefiscaleassistito>CRRMNL81R31G337H</codicefiscaleassistito>
- <famigliare>
<codicefiscale>CRRVNC76R52G337R</codicefiscale>
<rapportoparentela>NIPOTE</rapportoparentela>
</famigliare>
- <famigliare>
<codicefiscale>CRRRNT51L23G337Q</codicefiscale>
<rapportoparentela>FIGLIO</rapportoparentela>
</famigliare>
- <famigliare>
<codicefiscale>CBRPRN15S65E080W</codicefiscale>
<rapportoparentela>I.S.</rapportoparentela>
</famigliare>
- <famigliare>
<codicefiscale>CRRMNL81R31G337H</codicefiscale>
<rapportoparentela>NIPOTE</rapportoparentela>
</famigliare>
- <famigliare>
<codicefiscale>BCCCML54C50I845G</codicefiscale>
<rapportoparentela>NUORA</rapportoparentela>
</famigliare>
</dati>
Using SELECT extractValue(value(t),'/rapportoparentela') into result FROM NF_XMLT X,
TABLE ( xmlsequence (extract(value(X),'/dati/famigliare/rapportoparentela'))) t
I get all the elements 'rapportoparentela' and I want to get only one specified.
Regards.
PieroPiero,
you can add the condition "CRRVNC76R52G337R" to your xpath-expression like:
SELECT extractValue(value(t),'/rapportoparentela')
FROM NF_XMLT x
,TABLE ( xmlsequence (extract(value(X),'/dati/famigliare[rapportoparentela="CRRVNC76R52G337R"]'))) tto select only those famigliare-elements that have a child-element rapportoparentela with value "CRRVNC76R52G337R".
When you stored your XML in an XMLType column in the table, i think the following queries are better:
SELECT extractValue(x.your_XMLType_column,'/dati/famigliare/rapportoparentela')
FROM NF_XMLT x
WHERE extractValue(x.your_XMLType_column,'/dati/famigliare/codicefiscale')
= 'CRRVNC76R52G337R'or
SELECT extractValue(x.your_XMLType_column,'/dati/famigliare/rapportoparentela')
FROM NF_XMLT x
WHERE existsNode(x.your_XMLType_column,'/dati/famigliare[codicefiscale="CRRVNC76R52G337R"]')
!= 0
Maybe you are looking for
-
Data acquisition loop with queue
What I would like to do is have a data acquisition loop that samples a load cell at 500Hz and have another loop that runs much slower to run a state machine and display some data in real time. The reason I want to sample the load cell so fast is to
-
Sub total in ALV GRID using oops concept
Hi, If Plant (VBAP-WERKS) is not the same for all items on a Sales Order (VBAK-VBELN is the same for al items) then create a separate line on the report for each different plant specified in the line items. Copy all fields from the original order li
-
What happened to my contact pictures in text messaging?
A couple of nights ago, my list of text conversations are not showing the contact's picture. When I go into a specific conversation, the picture is there, but not when I am in the whole list of conversations. Has anyone had this problem? I have tried
-
How locate OS X or iOS device?
Not sure if this is the right spot to post or not, so please forgive if incorrect location. I am running Lion 10.7.2 on a new MBAir and a 2010 iMac. In both machines iCloud has Find My Mac checked. I alos have an iPhone with iOS5. How do I find th
-
Email Button in Publisher Template
Hi Guru's, I am a newbie and have the following requirement to fulfill in a BEA Publisher 6.5 based template. The portlet is a News template based portlet, in which we want to add a Button called Feedback. This Feedback button should be added to each