Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Populating a dropdown list in a DCT
System
I am using 5.5.2 non java UI. I have used a cgi callout to populate a dropdown box with the data from a .txt file, it works fine. But is there a way I can populate a dropdown box in a DCT with data from an xml file. I assume it could only be done with formAPI - but with which method etc?
Find more posts tagged with
Comments
Migrateduser
Actually this would be easier to do with <inline> instead of FormAPI. Remember that FormAPI runs on the *client*, while <inline> code runs while the DCT form is being initialized on the *server*.
Reading an XML source file in your <inline> code is simple, depending on the format of the xml source, you can either use normal file IO to read it and regexes to extract what you want, or a more formal XML parser that can construct hashes or arrays out of the XML structure for you.
See the XML:
arser module, or even TeamSite::XMLParser, which is IWOV's own version, designed for DCRs but usable for other XML documents too. Both are in the iwperl distribution in 5.5.2.
bw
Bob Walden [bob.walden@interwoven.com]
Interwoven Education Group
IM: Yahoo, MSN bob_walden
gzevin
to add to bob's post.
In fact, as you remember, the input of inline callout IS an XML file. HOW you make this file, no-one cares - it could be either XML source, text, database query.. anything