Instantiating XML and XMLList through FABridge?
Is it possible to instantiate XML object , XMLList object
from FABridge?
It is giving me errors when I try to instantiate XMLList :
(this error message is thrown by FireBug)
Uncaught exception: Error calling method on NPObject! [plugin
exception: Error in Actionscript. Use a try/catch block to find
error.].
Also , it couldnt call XML methods from FABridge.
Hi ,
I create an MenubarLXMLList with two sub menus only the MenuA should not be displayed and MenuB is displayed perfectly,
how can i solve this issue.
and my code is=====
<mx:XMLListCollection>
<mx:XMLList>
<menu label="{resourceManager.getString('mainBundle','MenuA')}" >
<menuitem label="{resourceManager.getString('mainBundle','one')} " isBranch="true" >
</menuitem>
<menuitem label="{resourceManager.getString('mainBundle','two')} " isBranch="true" >
</menuitem>
</menu>
<menu label="{resourceManager.getString('mainBundle','MenuB')}">
<menuitem label="{resourceManager.getString('mainBundle','one')}" isBranch="true" >
</menuitem>
<menuitem label="{resourceManager.getString('mainBundle','two')}" isBranch="true" >
</menuitem>
</menu>
</mx:XMLList>
</mx:XMLListCollection>
Thanks in advance,
Uday Kumar C.
Similar Messages
-
Why the tree show different while i use XML and XMLList as the data provider
Code is as follows:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:services="services.*" layout="vertical">
<services:CommonSvc id="ws" NameSpace="ws.wsSysDict" creationComplete="ws.getXmlList()"/>
<mx:Tree width="100%" height="100%" labelField="@Name" dataProvider="{ws.xml}" fontSize="18" showRoot="false"/>
</mx:Application>
Shown below:
as you see above,the font show Incomplete, if i change the dataprovider as follows:
<mx:Tree width="100%" height="100%" labelField="@Name" dataProvider="{ws.xml.obj}" fontSize="18" showRoot="false" />
it show complete when i use xmllist as the tree's dataprovider
why it show like that while i use the xml as the tree's dataprovider,hope anybody's helpingXML is a single node, XMLList is multiple nodes. ShowRoot will affect the
display -
Populate Local XML File, and Loop through it
I created a local property of type XML. I want to populate this variable with the results of a SQL query, and store it in local memory. Then later, I will loop through this file and perform actions. Basically I am going to have to loop through this resultset many times, and if I can store it in memory, I won't have to re-qurey the DB>
#1 Is this possible?
Right now, I use a repeater on the SQL, and assign the rowset/rowset/row to the local XML Variable.(Assign XML). SHould I use Assign XML, or APpend XML for the Link Type
THen later I am trying a repeater to loop through the flle, and I have no idea where to point the xpath expression to.
Thanks for the help in advance,
JEffFrom what I understand you are trying to do - Rather than repeating on the SQL query you can link the "Result" of the SQL Query action to the local property (type xml) [and yes you just say Assign XML instead of Append or anything else].
What this would do is assign the local variable the results of the SQL Query in an xMII XML format and then you can further work on this XML.
But rather than using the local variable you can repeat on the SQL Query Action (the way you are doing currently) and manipulate what ever you want to. There is no question of requerying the DB as ur DB would be queried only one time (the SQL Query Action Block will ensure this) and then the repeater would be repeating only on the resulset rendered by the SQL Query action.
Did this make it clearer or have I not understood your problem? -
OS = Windows 7
When I visit a site like youtube whith private browsing enabled and with the add-on named "shockwave flash" in firefox add-on list installed and activate the flashplayer by going to a video the following files are created in the folder C:\Users\MyUserName\AppData\Local\Temp\plugtmp-1
plugin-crossdomain.xml
plugin-strings-nl_NL-vflLqJ7vu.xlb
The contents of plugin-crossdomain contain both the "youtube.com" adress as "s.ytimg.com" and is as follows:
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
-<cross-domain-policy> <allow-access-from domain="s.ytimg.com"/> <allow-access-from domain="*.youtube.com"/> </cross-domain-policy>
The contents of the other file I will spare you cause I think those are less common when I visit other sites but I certainly don't trust the file. The crossdomain.xml I see when I visit most other flashpayer sites as well.
I've also noticed multiple plugin-crossdomain-1.xml and onwards in numbers, I just clicked a youtube video to test, got 6 of them in my temp plus a file named "plugin-read2" (no more NL file cause I changed my country, don't know how youtube knows where I'm from, but that's another subject, don't like that either). I just noticed one with a different code:
<?xml version="1.0"?>
-<cross-domain-policy> <allow-access-from domain="*"/> </cross-domain-policy>
So I guess this one comprimises my browsing history a bit less since it doesn't contain a webadress. If these files are even meant to be deposited in my local\temp folder. The bigger problem occurs when they stay there even after using private browsing, after clearing history, after clearing internet temporary files, cache, whatever you can think of. Which they do in my case, got more than 50 plugtmp-# folders in the previous mentioned local\temp folder containing all website names I visited in the last months. There are a variety of files in them, mostly ASP and XML, some just say file. I have yet to witness such a duplicate folder creation since I started checking my temp (perhaps when firefox crashes? I'd say I've had about 50 crashes in recent months).
I started checking my temp because of the following Microsoft Security Essential warnings I received on 23-4-12:
Exploit:Java/CVE-2010-0840.HE
containerfile:C:\Users\Username\AppData\Local\Temp\jar_cache2196625541034777730.tmp
file:C:\Users\Username\AppData\Local\Temp\jar_cache2196625541034777730.tmp->pong/reversi.class
and...
Exploit:Java/CVE-2008-5353.ZT
containerfile:C:\Users\Noname\AppData\Local\Temp\jar_cache1028270176376464057.tmp
file:C:\Users\Noname\AppData\Local\Temp\jar_cache1028270176376464057.tmp->Testability.class
Microsoft Security Essentials informed me that these files were quarantained and deleted but when going to my temp file they were still there, I deleted them manually and began the great quest of finding out what the multiple gigabytes of other files and folders were doing in that temp folder and not being deleted with the usual clearing options within firefox (and IE).
Note that I have set my adobe flasplayer settings to the most private intense I could think of while doing these tests (don't allow data storage for all websites, disable peer-to peer stuff, don't remember exactly anymore, etc.). I found it highly suspicious that i needed to change these settings online on an adobe website, is that correct? When right-clicking a video only limited privacy options are available which is why I tried the website thing.
After the inital discovery of the java exploit (which was discovered by MSE shortly after I installed and started my first scan with Malwarebytes, which in turn made me suspicious whether I had even downloaded the right malwarebytes, but no indication in the filename if I google it). Malwarebytes found nothing, MSE found nothing after it said it removed the files, yet it didn't remove them, manually scanning these jar_cache files with both malwarevytes and MSE resulted in nothing. Just to be sure, I deleted them anyways like I said earlier. No new jar_cache files have been created, no exploits detected since then. CCleaner has cleaned most of my temp folder, I did the rest, am blocking all cookies (except for now shortly), noscript add-on has been running a while on my firefox (V 3.6.26) to block most javascripts except from sites like youtube. I've had almost the same problem using similar manual solutions a couple of months ago, and a couple of months before that (clearing all the multiple tmp folders, removing or renaming jar_cache manually, running various antmalware software, full scan not finding a thing afterwards, installing extra add-ons to increase my security, this time it's BetterPrivacy which I found through a mozilla firefox https connection, I hope, which showed me nicely how adobe flash was still storing LSO's even after setting all storage settings to 0 kb and such on the adobe website, enabling private browsing in firefox crushed those little trolls, but still plugtmp trolls are being created, help me crush them please, they confuse me when I'm looking for a real threat but I still want to use flash, IE doesn't need those folders and files, or does it store them somewhere else?).
I'm sorry for the long story and many questions, hope it doesn't scare you away from helping me fight this. I suspect it's people wanting to belong to the hackergroup Anonymous who are doing this to my system and repeating their tricks (or the virus is still there, but I've done many antivirus scans with different programs so no need to suggest that option to me, they don't find it or I run into it after a while again, so far, have not seen jar_cache show up). Obviously, you may focus on the questions pertaining firefox and plugtmp folders, but if you can help me with any information regarding those exploits I would be extremely grateful, I've read alot but there isn't much specific information for checking where it comes from when all the anti-virus scanners don't detect anything anymore and don't block it incoming. I also have downloaded and installed process monitor but it crashes when I try to run it. The first time I tried to run it it lasted the longest, now it crashes after a few seconds, I just saw the number of events run up to almost a million and lots of cpu usage. When it crashed everything returned back to normal, or at least that's what I'm supposed to think I guess. I'll follow up on that one on their forum, but you can tell me if the program is ligit or not (it has a microsoft digital signature, or the name micosoft is used in that signature).update:
I haven't upgraded my firefox yet because of a "TVU Web Player" plugin that isn't supported in the new firefox and I'm using it occasionally, couldn't find an upgrade for it. Most of my other plugins are upgraded in the green (according to mozilla websitechecker):
Java(TM) Platform SE 6 U31 (green)
Shockwave for Director (green - from Adobe I think)
Shockwave Flash (green - why do I even need 2 of these adobe add-ons? can I remove one? I removed everything else i could find except the reader i think, I found AdobeARM and Adobe Acrobat several versions, very confusing with names constantly switching around)
Java Deployment Toolkit 6.0.310.5 (green, grrr, again a second java, why do they do this stuff, to annoy people who are plagued with java and flash exploits? make it more complicating?)
Adobe Acrobat (green, great, it's still there, well I guess this is the reader then)
TVU Web Player for FireFox (grey - mentioned it already)
Silverlight Plug-In (yellow - hardly use it, I think, unless it's automatic without my knowing, perhaps I watched one stream with it once, I'd like to remove it, but just in case I need it, don't remember why I didn't update, perhaps a conflict, perhaps because I don't use it, or it didn't report a threat like java and doesn't create unwantend and history compromising temp files)
Google Update (grey - can I remove? what will i lose? don't remember installing it, and if I didn't, why didn't firefox block it?)
Veetle TV Core (grey)
Veetle TV Player (grey - using this for watching streams on veetle.com, probably needs the Core, deleted the broadcaster that was there earlier, never chose to install that, can't firefox regulate that when installing different components? or did i just miss that option and assumed I needed when I was installing veetle add-on?)
Well, that's the list i get when checking on your site, when i use my own browseroptions to check add-ons I get a slightly different and longer list including a few I have already turned off (which also doesn't seem very secure to me, what's the point in using your site then for anything other than updates?), here are the differences in MY list:
I can see 2 versions of Java(TM) Platform SE 6 U31, (thanks firefox for not being able to copy-paste this)
one "Classic Java plug-in for Netscape and Mozilla"
the other is "next generation plug-in for Mozilla browsers".
I think I'll just turn off the Netscape and Mozilla one, don't trust it, why would I need 2? There I did it, no crashes, screw java :P
There's also a Mozilla Default plugin listed there, why does firefox list it there without any further information whether I need it or not or whether it really originates from Mozilla firefox? It doesn't even show up when I use your website plugin checker, so is there no easy way by watching this list for me to determin I can skip worrying about it?
There's also some old ones that I recently deactivated still listed like windows live photo gallery, never remember adding that one either or needing it for anything and as usual, right-clicking and "visit homepage" is greyed out, just as it is for the many java crap add-ons I encountered so far.
Doing a quick check, the only homepage I can visit is the veetle one. The rest are greyed out. I also have several "Java Console" in my extentions tab, I deactivated all but the one with the highest number. Still no Java Console visible though, even after going to start/search "java", clicking java file and changing the settings there to "show" console instead of "hide" (can't remember exact details).
There's some other extentions from noscript, TVU webplayer again, ADblock Plus and now also BetterPrivacy (sidenote, a default.LSO remains after cleanup correct? How do I know that one isn't doing anything nasty if it's code has been changed or is being changed? To prevent other LSO's I need to use both private browsing and change all kinds of restrictions online for adobe flashplayer, can anyone say absurd!!! if you think you're infected and want to improve your security? Sorry that rant was against Adobe, but it's really against Anonymous, no offense). -
Download XML Publisher report through URL
Hi Gurus,
I need to download pdf that which is generated using data template(.xml) and Layout template(.rtf) from XML Publisher through URL by passing required parameter.
Could anyone please help me on this. This is one of our client requirement. Its really very urgent.
Thanks,
Vino.is it ebs?
if yes i can not be sure what it is work for ebs
for ebs related bip you can ask in General EBS Discussion -
SAP BW data in ODS to XML and sending this XML file to 3rd Party
Hi Gurus,
We are having a scenario in which we have to convert our data in ODS to XML and need to provide this XML file to our clients so that they can use this XML file in their 3rd party system.
Now the issue is that i have created ABAP program for converting into XML.
If I execute this program, since i have given path as my Desktop, the converted XML file gets saved on my Desktop.
But the problem is how i can provide this XML file to the client.
Is there any way of converting this XML file to html and send them the URL ......
plz suggest me.... what can be done......
my ABAP code u can see in the following link
Extract SAP BW Data into XML
thanks and regards,
P.Madhusudhan RajuHi,
Pls go through the link below it may help you
http://www.sdn.sap.com/irj/scn/index;jsessionid=(J2EE3417100)ID1537206350DB01670597797729934632End?rid=/library/uuid/8c10aa90-0201-0010-98a0-f071394bc9ae&overridelayout=true
Regards,
Marasa. -
Cannot view PDF created by passing xml and XSL-FO using UTL_HTTP
Hi,
Using UTL_HTTP Iam trying to contact a servlet which uses the input XML and XSL/FO to produce a PDF.However, when I run the procedure , I get the following error 'File does not begin with -%PDF' ? I checked the output on the console and the blob values does not start with %PDF . Below is the sample from my code , please let me know if Iam commiting a mistake somewhere. I confirmed that the servlet itself is working fine by confirming with test webpage that takes xml and stylesheet input and generates a PDF when 'submitted' to servlet on the click of a button.
INSERT INTO TESTPDF ( PDF_REPORT ) VALUES ( Empty_Blob() ) RETURNING PDF_REPORT INTO vBlobRef;
vReportURL :='/rufop/fop?xml='||xmldoc||'&xsltRPath=../../test/PAXSL.xsl';
req := UTL_HTTP.BEGIN_REQUEST (url=>vReportURL, method=>'POST');
resp := utl_http.get_response(req);
loop
begin
Utl_Http.read_raw(resp, vData);
Dbms_Lob.writeAppend ( lob_loc => vBlobRef , amount => Utl_Raw.length(vData) , buffer => vData );
exception
when utl_http.end_of_body then
exit;
end;
end loop;
Utl_Http.end_response(resp);
owa_util.mime_header('application/pdf',false);
htp.p('Content-Disposition: inline; filename="test.pdf"');
htp.p('Content-Length: '|| dbms_lob.getlength(vBlobRef));
owa_util.http_header_close;
wpg_docload.download_file(vBlobRef);
Thanks in advance,
JenHello guys! I have been assigned the same task,i.e to generate pdf through xml using xsl stylesheet.
I have a procedure which is creating the xml and the stylesheet. But I have no idea how to write the procedure which passes this xml to fo engine. I am very new to this. Can anyone please share your thoughts with me so as how to accomplish this? By reading blogs on internet I figured I would have to use UTIL_HTTP but don't know how.
Sunny
Edited by: 887252 on May 29, 2012 1:24 AM -
Passing parameters for a query throught XML and capturing response in the same
Hi All,
I have defined a RequestParameters object and i am passing paramerts for a query through XML and trying to capture the result in the same and send back to the source. In this case i am send XML from excel.
Below is my XML format.
<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Insert xmlns="http://tempuri.org/">
<dataContractValue>
<dsRequest>
<dsRequest>
<SOURCE></SOURCE>
<ACTION>Insert</ACTION>
<RequestParams>
<RequestParams>
<ACC_NO>52451</ACC_NO>
<EMP_CITY>HYD</EMP_CITY>
<EMP_NAME>RAKESH</EMP_NAME>
<EMP_CONTACT>99664</EMP_CONTACT>
<EMP_JOM>NOV</EMP_JOM>
<EMP_SALARY>12345</EMP_SALARY>
</RequestParams>
<RequestParams>
<ACC_NO>52452</ACC_NO>
<EMP_CITY>HYD</EMP_CITY>
<EMP_NAME>RAKESH</EMP_NAME>
<EMP_CONTACT>99664</EMP_CONTACT>
<EMP_JOM>NOV</EMP_JOM>
<EMP_SALARY>12345</EMP_SALARY>
</RequestParams>
</RequestParams>
</dsRequest>
<dsRequest>
<SOURCE></SOURCE>
<ACTION>Update</ACTION>
<RequestParams>
<RequestParams>
<ACC_NO>52449</ACC_NO>
<EMP_CITY>HYD1</EMP_CITY>
<EMP_NAME>RAKESH1</EMP_NAME>
<EMP_SALARY>1345</EMP_SALARY>
</RequestParams>
<RequestParams>
<ACC_NO>52450</ACC_NO>
<EMP_CITY>HYDer</EMP_CITY>
<EMP_NAME>RAKEH</EMP_NAME>
<EMP_SALARY>1235</EMP_SALARY>
</RequestParams>
</RequestParams>
</dsRequest>
</dsRequest>
</dataContractValue>
</Insert>
</s:Body>
</s:Envelope>
Where i have a List of dsRequest and RequestParams, where i can send any number of requests for Insert,Update. I have two a XML element defined in RequestParams "RowsEffected","error" where the result will be caputred and is updated
to the response XML.
I have 6 defined in RequestParams
EMP_SALARY(int),ACC_NO(int),EMP_CITY(string),EMP_NAME(string),EMP_CONTACT(string),EMP_JOM(string)
My Question is:
When i am trying to build response XML with the following code, the parameters which are not given in the Request XML are also appearing in the Response.
ResponseParams.Add(
newdsResponse()
ACTION = OriginalParams[a].ACTION,
SOURCE = OriginalParams[a].SOURCE,
Manager = OriginalParams[a].Manager,
RequestParams = OriginalParams[a].RequestParams
Where the OriginalParams is dsRequest
Ex: In my update query i will only send three parameters, but in my response building with ablove code, i am getting all the variables defined as INT in the RequestParameters.
Is there any way i can avoid this and build response with only the parameters given in the Request ??
Appreciate ur help..Thanks
Cronsey.Hi Kristin,
My project is, User will be giving the parameters in the excel, and using VBA, the values are captured and an XML is created in the above mentioned format and is send to web service for the Insert/Update.
I created a webservice which reads the values from <datacontract> and it consist of list of <dsRequests> where any number of Insert/Upate commands can be executed, with in which it contains a list of <RequestParams> for multiple insertion/Updation.
//function call
OriginalParams = generator.Function(query, OriginalParams);
where OriginalParams is List<dsRequest>
//inside function
command.Parameters.Add()// parameters adding
int
val = command.ExecuteNonQuery();
after the execution,an XML element is added for the response part.and it is looped for all the RequestParams.
OriginalParams[i].Result.Add(
newResult()
{ ERROR = "No Error",
ROWS_EFFECTEFD = 1 });
//once all the execution is done the response building part
for(inta
= 0; a < OriginalParams.Count; a++)
ResponseParams.Add(
newdsResponse()
Result = OriginalParams[a].Result
QUEST: When i am trying to build response XML with the following code, the parameters which are not given in the Request XML are also appearing in the Response.
Ex: In my update query i will only send three parameters, but in my response building with ablove code, i am getting all the variables defined as INT in the RequestParameters.
Is there any way i can avoid this and build response with only the parameters given in the Request ??
Appreciate ur help..Thanks
Cronsey. -
hi all
It would be appreciated if any one let me know how to edit
bitmap which is imported in flash using xml and save the edited
bitmap back to xml in flash.
Is it posible to save the bitmap data in flash?
thanks in advanceYes you can... but like I said before you need to upload the
data from the changes you make to a server.
In terms of the solution... its unlikely that you'll find one
specifically for your needs. You will have to learn whatever you
don't know how already and maybe adapt some existing examples to
your needs.
To change the visual state of a movie clip... you just do all
the regular things that you want to do to it using flash... scale,
rotation, drawing API , textfields etc in actionscript. If you
don't know how to how to do that stuff, then you need to learn that
first. That's basic actionscript.
You can capture the visual state of a movieclip using the
BitmapData class. That includes a loaded jpeg. You can also
manipulate bimatp data using the same class. You should read up on
that if you don't know how to use it or check out the examples
below for uploading info.
For uploading to the server:
Here's an as2 solution that took 15 secs to find using
google:
http://www.quasimondo.com/archives/000645.php
If you're using as3, google search for "jpeg encoder as3" and
look through that info. There are also historical answers in the
forums here related to this type of thing that might help as
well. -
Data source for Deposit Advice (XML) and Live CheckWrite (XML) reports
Hello All,
We need to customize the Deposit Advice (XML) and Live Check Write(XML) reports to accomodate a few business requirements. We already have customizations for these reports in non-XML versions. For Ex: USPAYPST.rdf for Deposit Advice report. As these non-XML RDF reports are going to be unsupported by Oracle soon, we need to customize the XML versions of these report available in R12.1.3.
As these reports are kicked off by the PYUGEN spawned program, therefore I need information on the data source for these reports as soon as possible.
Looking forward to your prompt help.
Thanks,
RahulNow, I have anew problem here. I modified the USPAYPST.rdf report for Deposit Advice and then changed concurrent program output to XML from Text.
I attached a RTF template to the concurrent program to have the output in XML.
When I run Deposit Invoice Report from the SRS window, it finishes off normally and log file says the number of records processed but no output file is generated.
I also tried looking into the XML generated through View XMl and there too no output file is generated.
I am confused if the Deposit Advice program can only generate Text output. As PYUGEN is the executable for this report, I have no idea if XML file can even be generated.
All pointers to this issue are welcome.
Thanks,
Rahul -
Toplink xml binding session.xml and servlet
I made a project with toplink-jaxb mapping
with simple pojo object it works fine.
I made another project with servlet
and the same session.xml and java classes
but when my process start it throw an exception :
jaxbexception : Provider oracle.toplink.ox.jaxb.JAXBContextFactory could not be instantiated:
It is like the process could not read the session.xml files, but this file and two xml file for the mapping are in the classpath (in WEB-INF/classes).
Have i to put these files in another place ?
Thanks.Hi,
thank you for your response but
here is the code :
javax.xml.bind.JAXBContext jaxbContext = javax.xml.bind.JAXBContext.newInstance(
"fr.cnav.cramse.pgpe.contactsnationaux"),this.getClass().getClassLoader());
but i still got the same exception :
05/03/01 08:24:33 exceptionProvider oracle.toplink.ox.jaxb.JAXBContextFactory could not be instantiated: java.lang.NoSuchMethodError: oracle.toplink.publicinterface.Session oracle.toplink.tools.sessionmanagement.SessionManager.getSession(oracle.toplink.tools.sessionconfiguration.XMLSessionConfigLoader, java.lang.String, java.lang.ClassLoader, boolean, boolean)
I have also a stange message in the log window in jdev :
Cutting log (size: 101767, max: 100000)Component returned failure code: 0x80470002 (NS_BASE_STREAM_CLOSED) [nsIFileOutputStream.write]Component returned failure code: 0x80470002 (NS_BASE_STREAM_CLOSED) [nsIFileOutputStream.write]Component returned failure code: 0x80470002 (NS_BASE_STREAM_CLOSED) [nsIFileOutputStream.write]Cutting log (size: 101866, max: 100000)Error cleaning up log: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISeekableStream.seek]
Thank you for your help. -
I followed a procedure described in a book.
1. insert "Inventory.xml" file to a project "WpfXmlDataBinding" .
2. add the XML data source through the data panel of "blend for 2013", named it "InventoryXmlDataStore" and store it in the current document.
3. dragged and droppped the nodes from the Data panel onto the artboard.
Then I checked my Xaml file against the one provided by the book
Xaml file by the book:
<Window.Resources>
<!-- This part is missing in my xaml file --><XmlDataProvider x:Key="InventoryDataSource"
Source="\Inventory.xml"
d:IsDataSource="True"/>
<!-- This part is missing in my xaml file -->
<DataTemplate x:Key="ProductTemplate">
<StackPanel>
<TextBlock Text="{Binding XPath=@ProductID}"/>
<TextBlock Text="{Binding XPath=Cost}"/>
<TextBlock Text="{Binding XPath=Description}"/>
<CheckBox IsChecked="{Binding XPath=HotItem}"/>
<TextBlock Text="{Binding XPath=Name}"/>
</StackPanel>
</DataTemplate>
</Window.Resources>
<Grid>
<ListBox HorizontalAlignment="Left"
ItemTemplate="{DynamicResource ProductTemplate}"
ItemsSource="{Binding XPath=/Inventory/Product}"
Margin="89,65,0,77" Width="200"/>
</Grid>
my Xaml file:
<Window x:Class="WpfXmlDataBinding.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="922" Width="874">
<Window.Resources>
<DataTemplate x:Key="ProductTemplate">
<StackPanel>
<TextBlock Text="{Binding XPath=@ProductID}"/>
<TextBlock Text="{Binding XPath=Cost}"/>
<TextBlock Text="{Binding XPath=Description}"/>
<CheckBox IsChecked="{Binding XPath=HotItem}"/>
<TextBlock Text="{Binding XPath=Name}"/>
</StackPanel>
</DataTemplate>
</Window.Resources>
<Grid DataContext="{Binding Source={StaticResource InventoryXmlDataStore}}">
<ListBox HorizontalAlignment="Left" Height="370"
ItemTemplate="{DynamicResource ProductTemplate}"
ItemsSource="{Binding XPath=/Inventory/Product}"
Margin="65,55,0,0" VerticalAlignment="Top" Width="270"/>
</Grid>
</Window>
All looks quite the same except the <XmlDataProvider ....> part under <Window.Resources>, which is gone completely in my Xaml file.
1, Why?
2, How many different ways to deal with xml data source through WPF?
Thanks, guys.
(ps My "WpfXmlDataBinding" runs without problem through.)Never do yourself down Richard.
Leave that to other people.
It's quite common for smart developers to think they're not as good as they are.
I coach a fair bit and it's a surprisingly common feeling.
And to repeat.
Never use anything ends .. provider. They're for trivial demo apps. Transform xml into objects and use them. Write it back as xml. Preferably, use a database.
You want to read a little mvvm theory first.
http://en.wikipedia.org/wiki/Model_View_ViewModel
Whatever you do, don't read Josh Smiths explanation. I used to recommend it but it confuses the heck out newbies. Leave that until later.
Laurent Bugnion did a great presentation at mix10. Unfortunately that doesn't seem to be working on the MS site, but I have a copy. Download and watch:
http://1drv.ms/1IYxl3z
I'm writing an article at the moment which is aimed at beginners.
http://social.technet.microsoft.com/wiki/contents/articles/30564.wpf-uneventful-mvvm.aspx
The sample is just a collection of techniques really.
I have a sample which involves no real data but is intended to illustrate some aspects of how viewmodels "do stuff" and how you use datatemplates to generate UI.
I can't remember if I recommended it previously to you:
https://gallery.technet.microsoft.com/WPF-Dialler-simulator-d782db17
And I have working samples which are aimed at illustrating line of business architecture. This is an incomplete step by step series but I think more than enough to chew on once you've done the previous stuff.
http://social.technet.microsoft.com/wiki/contents/articles/28209.wpf-entity-framework-mvvm-walk-through-1.aspx
The write up for step2 is work in progress.
https://gallery.technet.microsoft.com/WPF-Entity-Framework-MVVM-78cdc204
Hope that helps.
Recent Technet articles: Property List Editing;
Dynamic XAML -
How to save xml and xsl function to a data grid column
hi. wondering, i have a xml and a xsl file, and have the transform class, and so need to save the xml and the xsl file, and display the results on a particular data grid column and to loop through the data grid columns. so, how do i use the xml save function
class, any examples or point me to articles, where i can read how to do this. need to display a file, with a different colour and font. any ideas. thanks. marvin.hi. need to save a xml and xsl file and display the results on data grid. how do i do this. any
sample code or articles i can read about thanks. marvin.
http://startrekcafe.stevesdomain.net http://groups.yahoo.com/groups/JawsOz
Hi.
Okay, well, did ask on the msdn forums, and some one replied, and so, will paste the code he suggested.
But getting a lot of errors.
Can you help me out.
Where am I going wrong.
So, I can then get this to work, then it shows the colours and the fonts on the specified data grid.
Can you help.
Want to get this working and passed today if possible.
Will pasate the code and the errors below.
Can you help.
Where am I going wrong.
Marvin.
// Set up the data set.
DataSet ds =
new
DataSet();
// Set up the data table.
DataTable dt =
new
DataTable();
// Ad the data table to the data set.
ds.Tables.Add(dt);
// Write the xml document to the data grid column.
ds.WriteXML(@"c:\Docs\Education\CertificateFourProgramming\CoreInfrastructure\DevelopingXMLApplications\Assignments\CurrentCount.xml");
ds.WriteXML(@"c:\Docs\Education\CertificateFourProgramming\CoreInfrastructure\DevelopingXMLApplications\Assignments\OnOrder.xml");
ds.ReadXML(@"c:\Docs\Education\CertificateFourProgramming\CoreInfrastructure\DevelopingXMLApplications\Assignments\CurrentCount.xml");
ds.ReadXML(@"c:\Docs\Education\CertificateFourProgramming\CoreInfrastructure\DevelopingXMLApplications\Assignments\OnOrder.xml");
// Set up the data table and the data set and set to 0.
dgvDisplayData.DataSource = ds.Tables[0];
Error 1 Invalid token '(' in class, struct, or interface member declaration
C:\Docs\Education\CertificateFourProgramming\CoreInfrastructure\DevelopingXMLApplications\Assignments\WoodStocks\WoodStocks\frmData.cs 215
18 WoodStocks
Error 2 Invalid token ')' in class, struct, or interface member declaration
C:\Docs\Education\CertificateFourProgramming\CoreInfrastructure\DevelopingXMLApplications\Assignments\WoodStocks\WoodStocks\frmData.cs 215
21 WoodStocks
Error 3 Invalid token '(' in class, struct, or interface member declaration
C:\Docs\Education\CertificateFourProgramming\CoreInfrastructure\DevelopingXMLApplications\Assignments\WoodStocks\WoodStocks\frmData.cs 219
16 WoodStocks
Error 4 Invalid token '(' in class, struct, or interface member declaration
C:\Docs\Education\CertificateFourProgramming\CoreInfrastructure\DevelopingXMLApplications\Assignments\WoodStocks\WoodStocks\frmData.cs 221
16 WoodStocks
Error 5 Invalid token '(' in class, struct, or interface member declaration
C:\Docs\Education\CertificateFourProgramming\CoreInfrastructure\DevelopingXMLApplications\Assignments\WoodStocks\WoodStocks\frmData.cs 222
15 WoodStocks
Error 6 Invalid token '(' in class, struct, or interface member declaration
C:\Docs\Education\CertificateFourProgramming\CoreInfrastructure\DevelopingXMLApplications\Assignments\WoodStocks\WoodStocks\frmData.cs 223
15 WoodStocks
Error 7 Invalid token '=' in class, struct, or interface member declaration
C:\Docs\Education\CertificateFourProgramming\CoreInfrastructure\DevelopingXMLApplications\Assignments\WoodStocks\WoodStocks\frmData.cs 227
31 WoodStocks
Error 8 Array size cannot be specified in a variable declaration (try initializing with a 'new' expression)
C:\Docs\Education\CertificateFourProgramming\CoreInfrastructure\DevelopingXMLApplications\Assignments\WoodStocks\WoodStocks\frmData.cs 227
43 WoodStocks
Error 9 Invalid token ';' in class, struct, or interface member declaration
C:\Docs\Education\CertificateFourProgramming\CoreInfrastructure\DevelopingXMLApplications\Assignments\WoodStocks\WoodStocks\frmData.cs 227
45 WoodStocks
Can you help me out.
Thanks.
http://startrekcafe.stevesdomain.net http://groups.yahoo.com/groups/JawsOz -
PO output with XML and PDF format
Hi All,
I need PO output with XML and PDF format. when I give print it shld go to vendor with xml and pdf format through mail. please kindly guide me on this .
Thanks in advance
JKhi,
try this code to get in pdf form
REPORT zsuresh_test.
Variable declarations
DATA:
w_form_name TYPE tdsfname VALUE 'ZSURESH_TEST',
w_fmodule TYPE rs38l_fnam,
w_cparam TYPE ssfctrlop,
w_outoptions TYPE ssfcompop,
W_bin_filesize TYPE i, " Binary File Size
w_FILE_NAME type string,
w_File_path type string,
w_FULL_PATH type string.
Internal tables declaration
Internal table to hold the OTF data
DATA:
t_otf TYPE itcoo OCCURS 0 WITH HEADER LINE,
Internal table to hold OTF data recd from the SMARTFORM
t_otf_from_fm TYPE ssfcrescl,
Internal table to hold the data from the FM CONVERT_OTF
T_pdf_tab LIKE tline OCCURS 0 WITH HEADER LINE.
This function module call is used to retrieve the name of the Function
module generated when the SMARTFORM is activated
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = w_form_name
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
fm_name = w_fmodule
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Calling the SMARTFORM using the function module retrieved above
GET_OTF parameter in the CONTROL_PARAMETERS is set to get the OTF
format of the output
w_cparam-no_dialog = 'X'.
w_cparam-preview = space. " Suppressing the dialog box
" for print preview
w_cparam-getotf = 'X'.
Printer name to be used is provided in the export parameter
OUTPUT_OPTIONS
w_outoptions-tddest = 'LP01'.
CALL FUNCTION w_fmodule
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
control_parameters = w_cparam
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
output_options = w_outoptions
USER_SETTINGS = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO =
job_output_info = t_otf_from_fm
JOB_OUTPUT_OPTIONS =
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 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.
t_otf[] = t_otf_from_fm-otfdata[].
Function Module CONVERT_OTF is used to convert the OTF format to PDF
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
FORMAT = 'PDF'
MAX_LINEWIDTH = 132
ARCHIVE_INDEX = ' '
COPYNUMBER = 0
ASCII_BIDI_VIS2LOG = ' '
PDF_DELETE_OTFTAB = ' '
IMPORTING
BIN_FILESIZE = W_bin_filesize
BIN_FILE =
TABLES
otf = T_OTF
lines = T_pdf_tab
EXCEPTIONS
ERR_MAX_LINEWIDTH = 1
ERR_FORMAT = 2
ERR_CONV_NOT_POSSIBLE = 3
ERR_BAD_OTF = 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.
To display File SAVE dialog window
CALL METHOD cl_gui_frontend_services=>file_save_dialog
EXPORTING
WINDOW_TITLE =
DEFAULT_EXTENSION =
DEFAULT_FILE_NAME =
FILE_FILTER =
INITIAL_DIRECTORY =
WITH_ENCODING =
PROMPT_ON_OVERWRITE = 'X'
CHANGING
filename = w_FILE_NAME
path = w_FILE_PATH
fullpath = w_FULL_PATH
USER_ACTION =
FILE_ENCODING =
EXCEPTIONS
CNTL_ERROR = 1
ERROR_NO_GUI = 2
NOT_SUPPORTED_BY_GUI = 3
others = 4
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Use the FM GUI_DOWNLOAD to download the generated PDF file onto the
presentation server
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE = W_bin_filesize
filename = w_FULL_PATH
FILETYPE = 'BIN'
APPEND = ' '
WRITE_FIELD_SEPARATOR = ' '
HEADER = '00'
TRUNC_TRAILING_BLANKS = ' '
WRITE_LF = 'X'
COL_SELECT = ' '
COL_SELECT_MASK = ' '
DAT_MODE = ' '
CONFIRM_OVERWRITE = ' '
NO_AUTH_CHECK = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
WRITE_BOM = ' '
TRUNC_TRAILING_BLANKS_EOL = 'X'
WK1_N_FORMAT = ' '
WK1_N_SIZE = ' '
WK1_T_FORMAT = ' '
WK1_T_SIZE = ' '
IMPORTING
FILELENGTH =
tables
data_tab = T_pdf_tab
FIELDNAMES =
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
OTHERS = 22
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
reward points if useful,
siri -
Ejb-jar.xml and orion-ejb-jar.xml configuration issue
Chris,
We have an application that uses the Oracle 10g Application Server and WebSphere MQ v5.3 w/ fixpack 9.
Our application is a J2EE messaging system which essentially consists of Message Driven Beans, the EJB
realization of the J2EE Java Message Service (JMS) API. Our application has Message Driven Beans which
listen to queues and send messages to queues -- a simple messaging system. Currently we can listen to queues, but
cannot send messages to queues in the Oracle 10g Application Server environment.
Any J2EE application server has its own implementation of Java Naming Directory Interface (JNDI) API that
deployed J2EE applications utilize to lookup resources such as Data Sources, JMS Destinations (i.e. MQ Queue),
JMS QueueConnectionFactories (i.e. MQ QManagers).
Our application uses the 3rd party JMS Provider, WebSphere MQ.
MQ ships with a JMSAdmin tool which allows one to create JMS administered objects (i.e. objects a java
application searches for in some JNDI directory) that reside in some JNDI context. We create a JNDI context for
MQ resources, queues and QManagers. We configure the MQ provided
JMSAdmin tool with two property name/value pairs:
PROVIDER_URL=file:/opt/mqm/JNDI-Directory
INITIAL_CONTEXT_FACTORY=com.sun.jndi.fscontext.RefFSContextFactory
A resultant .bindings file is created in /opt/mqm/JNDI-Directory which represents our JDNI context
containing our JMS administered objects. A standalone java application that needs to directly access this
JNDI context can simply conduct a JNDI lookup on the following context: "java:comp/resource/MQSeries/". An
example of how a standalone application would lookup a JMS administered object named "qNumber1" would be to
lookup "java:comp/resource/MQSeries/qNumber1". This lookup would result in the standalone java application
having a JMS reference to an MQ Queue.
There is a major difference in how an enterprise EJB application deployed into a J2EE Container (Oracle 10g App Server)
conducts a JNDI lookup on a 3rd party resource such as MQ as a JMS Provider. A typical EJB application deployed
into a J2EE container as an .ear (enterprise archive) file has implicit access to the application server's own
JNDI context. This JNDI context is usually "java:comp/env/". Looking up the Application Server's own Data Source or
it's own JMS Resources is easy. An application that needs references to these Application Server provided resources
simply conducts a lookup for "java:comp/env/jms/someQ" or "java:comp/env/jdbc/myDataSource".
The problem we face is mapping our MQ JNDI context to the Oracle App Server's own JNDI context. We believe this is
accomplished through mappings defined in both the ejb-jar.xml (EJB Descriptor) and the application server specific
counterpart, orion-ejb-jar.xml. Note that Oracle 10g Application Server uses the popular orion J2EE container for
hosting J2EE enterpise applications.
Our Message Driven Beans (MDBs)currently listen to the Queue at the JNDI location "prodQ". Our problem is that we cannot
get our MDB to send messages to any queues. Note that the MQ implementation of the queues and Queue Managers work
flawlessly with standalone java applications. It's safe to say that the MQ objects are working.
We are looking for a solid example of how the ejb-jar.xml and the orion-ejb-jar.xml map 3rd party JMS provider
JNDI locations to the App Server's JNDI context.
Below is how we have attempted to configure our own ejb-jar.xml and orion-ejb-jar.xml:
ejb-jar.xml begin >>>>>>>>>>>>>>><?xml version = '1.0' encoding = 'UTF-8'?>
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
<ejb-jar>
<display-name>Production Message Driven Bean</display-name>
<enterprise-beans>
<message-driven>
<display-name>prodMdb</display-name>
<ejb-name>prodMdb</ejb-name>
<ejb-class>message.handler.AIDMSMessageConsumerBean</ejb-class>
<transaction-type>Bean</transaction-type>
<message-driven-destination>
<destination-type>javax.jms.Queue</destination-type>
</message-driven-destination>
<resource-ref>
<res-ref-name>prodQCF</res-ref-name>
<res-type>javax.jms.QueueConnectionFactory</res-type>
<res-auth>Application</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
<resource-ref>
<res-ref-name>prodQ</res-ref-name>
<res-type>javax.jms.Queue</res-type>
<res-auth>Application</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
<resource-ref>
<res-ref-name>prodR</res-ref-name>
<res-type>javax.jms.Queue</res-type>
<res-auth>Application</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
</message-driven>
</enterprise-beans>
</ejb-jar>
<<<<<<<< ejb-jar.xml end <<<<<<<<<<<<<<<<<<<<<<<<<<<<<
begin orion-ejb-jar.xml >>>>>>>>>>>>>>>>>>>>>>>>>>><orion-ejb-jar>
<enterprise-beans>
<message-driven-deployment name="prodMdb" connection-factory-location="java:comp/resource/MQSeries/prodQCF" destination-location="java:comp/resource/MQSeries/prodR">
<resource-ref-mapping location="prodQ" name="prodQ">
<lookup-context location="java:comp/resource/MQSeries/" >
<!-- <context-attribute name="java.naming.factory.initial"
value="com.sun.jndi.fscontext.RefFSContextFactory" /> -->
</lookup-context>
</resource-ref-mapping>
<resource-ref-mapping location="prodR" name="prodR">
<lookup-context location="java:comp/resource/MQSeries/" >
<!-- <context-attribute name="java.naming.factory.initial"
value="com.sun.jndi.fscontext.RefFSContextFactory" /> -->
</lookup-context>
</resource-ref-mapping>
</message-driven-deployment>
</enterprise-beans>
</orion-ejb-jar>
<<<<<<<<< end orion-ejb-jar.xml <<<<<<<<<<<<<<<<<<<<<<<<If you look at the contents of a deployment plan (Plan.xml) when you have it generated
<deployment-plan ...>
<module-override>
<module-name>ejb.jar</module-name>
<module-type>ejb</module-type>
<module-descriptor external="true">
<root-element>weblogic-ejb-jar</root-element>
<uri>META-INF/weblogic-ejb-jar.xml</uri>
</module-descriptor>
<module-descriptor external="false">
<root-element>ejb-jar</root-element>
<uri>META-INF/ejb-jar.xml</uri>
</module-descriptor>
<module-descriptor external="true">
<root-element>persistence-configuration</root-element>
<uri>META-INF/persistence-configuration.xml</uri>
</module-descriptor>
<module-descriptor external="false">
<root-element>persistence</root-element>
<uri>META-INF/persistence.xml</uri>
</module-descriptor>
</module-override>
</deployment-plan>You can see which files can be external and which can be not. The weblogic-ejb-jar.xml can be external
but in this case you need a deployment plan to point weblogic to the file. The ejb-jar.xml cannot be
external (see external=false)
The benefit of storing the weblogic-ejb-jar.xml is that your administrator can fine tune certain
configurations by using a deployment plan, instead of having to extract the contents from the jar file
and then repackage it again.
No need to worry about a clustered environment, you can place the jar and the deployment plan
on the server where the admin server is located, when you deploy an application you deploy it to
the cluster and everything is taken care off.
More information on deployment plans can be found here: http://download.oracle.com/docs/cd/E11035_01/wls100/deployment/config.html
Maybe you are looking for
-
Error while invoking a WS-Security secured web service from Oracle BPEL..
Hi , We are facing some error while invoking a WS-Security secured web service from our BPEL Process on the windows platform(SOA 10.1.3.3.0). For the BPEL process we are following the same steps as given in an AMIS blog : - [http://technology.amis.nl
-
How can I sort movies by price in iTunes?
How can I sort movies by price in iTunes?
-
Error: add datafile to an tablespace
I have a 10g database in Sun machine. I issued the following command and got this error. What the problem: SQL> l 1 alter TABLESPACE "TEST" add DATAFILE 2 '/local/ORACLE/product/10.2.0/oradata/orcl/test_02.dbf' SIZE 10m 3* EXTENT MANAGEMENT LOCAL UNI
-
I don't know what's going on, but basically, alot of the albums/artists have the wrong album covers...ie, I see an album using another artist's album cover, sometimes for more than one artist. I can have up to 3 different albums all using the same im
-
Last Purchase price Warehouse wise for given date
Hai all.... I Want query report for Last purchase price for all items, warehouse wise for given date, i tried following query SELECT T10.ItemCode, (Select i1.Itemname from oitm i1 where i1.itemcode = T10.[ItemCode]) as 'ItemName',