Array of Embedded Attributes

Is it possible to have some document definitions for a XML file that contains an array of Embedded Attributes.
Perhaps something like a table:
<table>
<row>
<cell1>..</cell1>
<cell2>..</cell2>
</row>
<row>
<cell1>..</cell1>
<cell2>..</cell2>
</row>
</table>
How would the XML Configuration Files look like for this example?
null

See
http://technet.oracle.com:89/ubb/Forum36/HTML/000295.html

Similar Messages

  • Type definitions w/ embedded attributes

    I am hoping you can help me resolve a problem in creating valid type definitions
    with embedded attributes. I've followed the vcard example from the Dev Guide; yet there is something that I am missing. I've have not included </BEANCLASSPATH> in the type definitions, as they were described as optional. If the addition of </BEANCLASSPATH> is necessary,do I need to create beans for each embedded structure within the parent? Following are the errant type definitions and their respective error codes returned from the parser:
    PARENT (PROPTYPE2) TYPE DEFINITION
    <?xml version="1.0" standalone="yes" ?>
    <ClassObject>
    <name>PropType2</name>
    <Description>Demo of Prop Pilot 1</Description>
    <Superclass RefType="name">
    Document
    </Superclass>
    <Attributes>
    <Attribute>
    <Name>Title</Name>
    <DataType>String</DataType>
    <Datalength>128</Datalength>
    </Attribute>
    <Attribute>
    <Name>Salutation</Name>
    <DataType>PublicObject</DataType>
    <ClassDomain RefType="name">PropType2SalutationDomain
    </ClassDomain>
    </Attribute>
    </Attributes>
    </ClassObject>
    PARSER ERROR:
    500 STOR:IFS-12605: XMLPARSER: COULD NOT FIND OBJECT BY NAME
    (PropType2SalutationDomain)
    EMBEDDED (SALUTATION) TYPE DEFINITION
    <?xml version="1.0" standalone="yes" ?>
    <ClassObject>
    <name>PropType2Salutation</name>
    <Description>Demo Prop Salutation Info</Description>
    <Superclass RefType="name">
    ApplicationObject
    </Superclass>
    <Attributes>
    <Attribute>
    <Name>Client</Name>
    <DataType>String</DataType>
    </Attribute>
    <Attribute>
    <Name>ClientTitle</Name>
    <DataType>String</DataType>
    </Attribute>
    <Attribute>
    <Name>Address</Name>
    <DataType>String</DataType>
    </Attribute>
    <Attribute>
    <Name>Date</Name>
    <DataType>String</DataType>
    </Attribute>
    <Attribute>
    <Name>BodyText</Name>
    <DataType>String</DataType>
    </Attribute>
    <Attribute>
    <Name>Zoan</Name>
    <DataType>String</DataType>
    </Attribute>
    <Attribute>
    <Name>ZoanTitle</Name>
    <DataType>String</DataType>
    </Attribute>
    </Attributes>
    </ClassObject>
    PARSER ERROR:
    500 STOR:IFS-30002: UNABLE TO CREATE NEW LIBRARY OBJECT
    SALUTATION DOMAIN
    <?xml version="1.0" standalone="yes" ?>
    <ClassDomain>
    <name>PropType2SalutationDomain</name>
    <DomainType>1</DomainType>
    <Class>
    <ArrayElement RefType="name">PropType2Salutation
    </ArrayElement>
    </Class>
    </ClassDomain>
    PARSER ERROR:
    500 STOR:IFS-12620 PARSER: SYNTAX ERROR (CLASS)
    Thanks in advance for your help.

    <?xml version="1.0" standalone="yes" ?>
    <ClassObject>
    <name>PropType2</name>
    <Description>Demo of Prop Pilot 1</Description>
    <Superclass RefType="name">
    Document
    </Superclass>
    <Attributes>
    <Attribute>
    <Name>Title</Name>
    <DataType>String</DataType>
    <Datalength>128</Datalength>
    </Attribute>
    <Attribute>
    <Name>Salutation</Name>
    <DataType>PublicObject</DataType>
    <ClassDomain RefType="name">PropType2SalutationDomain
    </ClassDomain>
    </Attribute>
    </Attributes>
    </ClassObject>There is nothing wrong with the above. It will work once
    the ClassDomain 'PropType2SalutationDomain' is successfully
    created.
    >
    PARSER ERROR:
    500 STOR:IFS-12605: XMLPARSER: COULD NOT FIND OBJECT BY
    NAME
    (PropType2SalutationDomain)
    EMBEDDED (SALUTATION) TYPE DEFINITION
    <?xml version="1.0" standalone="yes" ?>
    <ClassObject>
    <name>PropType2Salutation</name>
    <Description>Demo Prop Salutation Info</Description>
    <Superclass RefType="name">
    ApplicationObject
    </Superclass>
    <Attributes>
    <Attribute>
    <Name>Client</Name>
    <DataType>String</DataType>
    </Attribute>
    <Attribute>
    <Name>ClientTitle</Name>
    <DataType>String</DataType>
    </Attribute>
    <Attribute>
    <Name>Address</Name>
    <DataType>String</DataType>
    </Attribute>
    <Attribute>
    <Name>Date</Name>
    <DataType>String</DataType>
    </Attribute>
    <Attribute>
    <Name>BodyText</Name>
    <DataType>String</DataType>
    </Attribute>
    <Attribute>
    <Name>Zoan</Name>
    <DataType>String</DataType>
    </Attribute>
    <Attribute>
    <Name>ZoanTitle</Name>
    <DataType>String</DataType>
    </Attribute>
    </Attributes>
    </ClassObject>The problem here is that 'Date' is not a valid column name;
    SQL does not allow 'Date' as a column name.
    >
    PARSER ERROR:
    500 STOR:IFS-30002: UNABLE TO CREATE NEW LIBRARY OBJECT
    SALUTATION DOMAIN
    <?xml version="1.0" standalone="yes" ?>
    <ClassDomain>
    <name>PropType2SalutationDomain</name>
    <DomainType>1</DomainType>
    <Class>
    <ArrayElement RefType="name">PropType2Salutation
    </ArrayElement>
    </Class>
    </ClassDomain>The correct tag would be 'Classes', not 'Class'.
    null

  • Arrays for collection attribute in html:options

    I would like to use an array with Struts' options tag,
    using the array index for the options' 'value' attributes.
    <html-el:select property="style" value="${listForm.style}">
    <html-el:options collection="styles" property="index" labelProperty="value"/>
    </html-el:select>
    "index" being the index into the array, and 'value' the String at styles[index].
    Is this possible?

    You can do this with the FormattedDataSet using the ##rowNum variable.
    steve - http://www.fdsapi.com - The easiest way to generate dynamic xml and html.

  • Array as class attribute?

    I'm currently in the process of learning Objective-C and Cocoa, however I've run into an issue with some of my code.
    I want to have an array that other objects will be able to access from my main class, so I set it to be an attribute of that class in the interface: NSObject section of my class header with the following line of code:
    NSMutableArray *qArray;
    The main issue I'm getting with this is that although the array can be accessed properly, I'm not sure how to initialise it. I used the following code that seemed to work, but only when called from the same IBAction, if sent from another control or menu then it would crash to the debugger:
    qArray = [NSMutableArray array];
    I'm guessing that qArray is being destroyed after the IBAction is finished, but how would I initialise it otherwise?

    The message +array is called a "convenience method", it returns an auto-released instance of the class, here it's an NSArray. So you have two solution, one one hand you simply use the alloc/init methods :
    qArray = [[NSArray allocWithZone: [self zone]] init]; // you can use the simple +alloc method if you want.
    Or you can retain the object returned by +array, like that :
    qArray = [[NSArray array] retain];
    In both cases, you need at the end to send the object a -release or -autorelease message :
    [qArray release];
    NB : the brackets might be not displayed in that message.

  • Working with ExtensionData attribute (byte arrays)

    Hello all,
    I am working with the ExtensionData attribute in PowerShell, which is in byte array form. What I am wanting to do is change a part of this ExtensionData attribute, but still keep the byte array form. What I am currently trying makes the change successfully,
    but I lose the byte array form. For example, before changing the ExtensionData attribute, Group1's ExtensionData attribute is populated on several lines within the attribute. After changing the attribute, Group1's ExtensionData attribute has all the same values,
    but is now contained on a single line. Here is the code used:
    #Finding Group1's ExtensionData attribute, in string form
    $ExtensionData = Get-ADGroup "Group1" -Properties extensiondata | select -ExpandProperty extensiondata | ForEach-Object {
    [System.Text.Encoding]::ASCII.GetString($_)
    #Let's assume Group1's ExtensionData attribute looks like this (multiple lines):
    #OldLine1
    #OldLine2
    #OldLine3
    $StringOld = "OldLine1"
    $StringNew = "NewLine1"
    #making sure line I want to change is present in string form of ExtensionData attribute, then we change the part we want
    If($ExtensionData -match $StringOld){
    $ExtensionData -replace "$StringOld","$StringNew"
    #Now we convert our new ExtensionData string form back to ASCII form
    $change = [System.Text.Encoding]::ASCII
    $NewExtensionData = $change.GetBytes($ExtensionData)
    #Now, we can replace Group1's ExtensionData attribute with our new ExtensionData attribute
    Set-ADGroup Group1 -Replace @{extensiondata=$NewExtensionData}
    #However, now Group1's ExtensionData attribute looks like this (no multiple lines):
    #NewLine1OldLine2OldLine3
    How can I replace a line in the ExtensionData attribute and still keep the multiple lines within the attribute?

    David,
    Thanks again for taking time to help me out with this problem! I've solved my problem, but had to perform a few steps along the way. Long story short, I slightly modified the code you provided using -match and -replace for the strings, and then
    when I tried to use -replace on the set-adgroup cmdlet, PowerShell griped and said value already present.
    However, I was able to get it to work by clearing the extensiondata attribute first and then using -add. This put the bytes into the extensiondata attribute as expected, but there were 2 problems with this. First, it looked like each byte was it's own array
    within the attribute. Second, the original ExtensionData attribute had strings in it, not bytes. I have since realized that bytes is how PowerShell reads the array, but not how ADUC displays it.
    What I did was use the following code:
    cls
    $ExtensionData = @(
    Get-ADGroup "Group1" -Properties extensiondata |
    Select-Object -ExpandProperty extensiondata |
    ForEach-Object {
    [System.Text.Encoding]::ASCII.GetString($_)
    $StringOld = "OldString"
    $StringNew = "NewString"
    for ($i = 0; $i -lt $ExtensionData.Count; $i++)
    if ($ExtensionData[$i] -match $StringOld)
    $ExtensionData[$i] = $ExtensionData[$i] -replace "$Stringold","$StringNew"
    Set-ADGroup SmartDL-test -replace @{extensiondata=$ExtensionData}
    As you can see, I still use -match and -replace to swap out the part of ExtensionData that I want. But it turns out I didn't need to convert the strings into bytes before using the set-adgroup command. I was able to just replace the part of the extensiondata
    collection I wanted, and then just paste the entire new collection into the attribute, and for my purposes it appeared to work.
    Anyway, I really appreciate your help on this, and it must be difficult helping someone troubleshoot when you can't see specifically what they're trying to do. Your post was extremely helpful however, and it led to the solution that worked for me. Thanks
    again!

  • Horizontal mapping + embedded one-to-one problem

    Hi,
    this message corresponds to the article "Embedded One-to-One mapping
    problem". But this article is more exactly then the first without less
    unnessary information.
    I got an abstract super-class Person which is mapped horizontal.
    Student inherits from Person.
    Person contains an attribute called location(instance of Class Location)
    which should be mapped "embedded one-to-one".
    Since Person is mapped horizontal no table will be used for Person.
    I get following exception when running mappingtool on action "buildSchema"
    kodo.jdbc.meta.MappingInfoNotFoundException: No mapping information was
    found for "xxx.yyy.zzz.persistence.jdo.business.Location.lat"
    I think Kodo tries to map the field "location" since the field is declared
    as embedded. But it can not embed the field since Person is horizontal
    mapped and no table for Person exists where the corresponding field of
    Location could be placed in. Also it is not possible to set the "embedded"
    attribute in the subclass Student for the field "location" because it must
    be specified in the superclass.
    Can you help me ?
    Thanks a lot,
    Felix
    Additional information:
    =======================
    Exception stack trace:
    [mappingtool] kodo.jdbc.meta.MappingInfoNotFoundException: No mapping
    information was found for "xxx.yyy.zzz.persistence.jdo.business.Location".
    [mappingtool] at
    kodo.jdbc.meta.RuntimeMappingProvider.getMapping(RuntimeMappingProvider.java:44)
    [mappingtool] at
    kodo.jdbc.meta.MappingRepository.getMappingInternal(MappingRepository.java:352)
    [mappingtool] at
    kodo.jdbc.meta.MappingRepository.getMapping(MappingRepository.java:307)
    [mappingtool] at
    kodo.jdbc.meta.MappingRepository.getMapping(MappingRepository.java:162)
    [mappingtool] at
    kodo.jdbc.meta.MappingTool.buildSchema(MappingTool.java:646)
    [mappingtool] at kodo.jdbc.meta.MappingTool.run(MappingTool.java:951)
    [mappingtool] at
    kodo.jdbc.ant.MappingToolTask.executeOn(MappingToolTask.java:175)
    [mappingtool] at com.solarmetric.ant.TaskBase.execute(TaskBase.java:105)
    [mappingtool] at
    org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
    [mappingtool] at org.apache.tools.ant.Task.perform(Task.java:364)
    [mappingtool] at org.apache.tools.ant.Target.execute(Target.java:301)
    [mappingtool] at
    org.apache.tools.ant.Target.performTasks(Target.java:328)
    [mappingtool] at
    org.apache.tools.ant.Project.executeTarget(Project.java:1215)
    [mappingtool] at
    org.apache.tools.ant.Project.executeTargets(Project.java:1063)
    [mappingtool] at org.apache.tools.ant.Main.runBuild(Main.java:632)
    [mappingtool] at org.apache.tools.ant.Main.startAnt(Main.java:183)
    [mappingtool] at
    org.apache.tools.ant.launch.Launcher.run(Launcher.java:197)
    [mappingtool] at
    org.apache.tools.ant.launch.Launcher.main(Launcher.java:56)
    Here is the JDO-Metadata:
    <?xml version="1.0" encoding="UTF-8"?>
    <jdo>
    <package name="xxx.yyy.zzz.persistence.jdo.business">
    <class name="Location"/>
    <class name="Person" identity-type="application"
    objectid-class="PersonId">
    <field name="location" embedded="true"/>
    <field name="id" primary-key="true"/>
    </class>
    <class name="Student" identity-type="application"
    persistence-capable-superclass="Person"/>
    </package>
    </jdo>
    Here is the mapping-metadata:
    <?xml version="1.0" encoding="UTF-8"?>
    <mapping>
    <package name="xxx.yyy.zzz.persistence.jdo.business">
    <class name="Person">
    <jdbc-class-map type="horizontal"/>
    </class>
    <class name="Student">
    <jdbc-class-map type="base" table="STUDENT"/>
    <jdbc-version-ind type="version-number" column="JDOVERSION"/>
    <jdbc-class-ind type="in-class-name" column="JDOCLASS"/>
    <field name="Person.birthDate">
    <jdbc-field-map type="value" column="BIRTHDATE"/>
    </field>
    <field name="Person.city">
    <jdbc-field-map type="value" column="CITY"/>
    </field>
    <field name="Person.id">
    <jdbc-field-map type="value" column="ID"/>
    </field>
    <field name="Person.location">
    <jdbc-field-map type="embedded"
    null-ind-column="NULL_INDICATOR" synthetic="false">
    <field name="lat">
    <jdbc-field-map type="value" column="LATITUDE"/>
    </field>
    <field name="lon">
    <jdbc-field-map type="value" column="LONGITUDE"/>
    </field>
    </jdbc-field-map>
    </field>
    <field name="Person.name">
    <jdbc-field-map type="value" column="NAME"/>
    </field>
    <field name="Person.picture">
    <jdbc-field-map type="value" column="PICTURE"/>
    </field>
    <field name="Person.state">
    <jdbc-field-map type="value" column="STATE"/>
    </field>
    <field name="Person.street">
    <jdbc-field-map type="value" column="STREET"/>
    </field>
    <field name="Person.zipcode">
    <jdbc-field-map type="value" column="ZIPCODE"/>
    </field>
    </class>
    <class name="Location">
    <jdbc-class-map type="none"/>
    <field name="lat">
    <jdbc-field-map type="none"/>
    </field>
    <jdbc-class-map type="none"/>
    <field name="lon">
    <jdbc-field-map type="none"/>
    </field>
    </class>
    </package>
    </mapping>
    Here are the class definitions:
    Class Location:
    public class Location {
         private int lat;
         private int lon;
    Class Person:
    public abstract class Person {
    private int id;
    private String name;
    private String street;
    private String city;
    private String state;
    private String zipcode;
    private Date birthDate;
    private String picture;
    private Location location;
    Class Person:
    public class Student extends Person {

    You'll probably have much better luck sending this question to
    [email protected]; the newsgroup is generally for quick questions
    about certain features or problems the community might be able to solve
    without input from SolarMetric developers.

  • Embeding symbols from a swf created with mxmlc

    Hello everyone,
    I am trying to bundle my resources in seperate swf files then use them in another flex project. I create this bundles from a wizard i wrote in AIR. AIR app calls mxmlc to compile bundle.as and i dynamicaly load bundle.swf. I can access resources from this bundled swf using ApplicationDomain.getDefinition(). No problem there
    However i also want to use my wizard to edit prexisting bundles. Problem is i cannot embed resource from original bundle to new bundle. I mainly use Sprite and ByteArray assets in bundles.
    To simplfy problem i prepared following test. Created a bundle application to create bundle swf in flex. The project has 4 files: 2 .as files, 1 .png file, 1 .swf file( from FLA which has a symbol linked "Fill" )
    // Bundle.as
    package
              import flash.display.*;
              public class Bundle extends Sprite
                        public function Bundle()
                                  var fla:DisplayObject = new Fla();
                                  addChild(fla);
                                  var image:DisplayObject = new Image();
                                  addChild(image);
    // Image.as
    package
              import flash.display.Bitmap;
              [Embed(source='plus.png')]
              public class Image extends Bitmap
    // Fla.as
    package
              import flash.display.Sprite;
              [Embed(source='fla.swf', symbol="Fill")]
              public class Fla extends Sprite
                        public function Fla()
    Project above compiles without problem and i can see both assets on screen.
    Then i create a second project which will use swf created from project above.
    package
              import flash.display.*;
              public class Application extends Sprite
                        [Embed(source='Bundle.swf', symbol='Fla')]    /// Flex cannot embed this
                        private var flaClass:Class;
                        [Embed(source='Bundle.swf', symbol='Image')]  /// But it can embed this
                        private var imageClass:Class;
                        public function Application()
                                  var fla:DisplayObject = new flaClass();
                                  addChild(fla);
                                  var image:DisplayObject = new imageClass();
                                  addChild(image);
    The second project can only see Bitmap  asset as symbol. But could not find Sprite asset.
    We depend heavily on vector graphics from Flash, and byte array assets embeded with
    [Embed(source='x.ba', mimeType="application/octet-stream")]
    I could write byte array assets into a temp dir and embed them again but i cannot do it with Sprites. How can i solve this problem.

    Interesting problem. What happens if you encapsulate the embed in the first Bundle?
    Something like this:
    package
              import flash.display.Sprite;
              public class Fla extends Sprite
                       [Embed(source='fla.swf', symbol="Fill")]
                       private var flaClass:Class;
                        public function Fla()
                            var flaAsset:DisplayObject = new flaClass();
                            addChild(flaAsset);
    *edit*
    Fixed typo in code.
    Message was edited by: drkstr_1

  • Update the embedded field

    we have following problem:
    class A has class B as embedded attribute.
    If we write:
    tx1: a = readA();
    tx2: a.b.setName("new Name"); makePersistent(a)
    the changes in field "name" will not be saved.
    If we write:
    tx2: a.b = new B("new Name"); makePersistent(a)
    the field "name" will be updated !
    What is wrong with a.b.setName("new Name"); ???
    thanks
    andre

    Originally posted by: dorian.birsan.net
    Pretty much like you described.
    Normally, if you move your update site, people who bookmarked it would also
    be afected.
    You could keep site.xml at the old location and have everything else moved.
    Make use of the <archive> element in site.xml to point to jar files at other
    locations.
    Even better, redirect from old site to new site, using your web server
    functionality.
    -dorian
    "Bert Hyman" <[email protected]> wrote in message
    news:[email protected]..
    > It appears that unless a feature has a URL embedded in the "Update Site
    > URL" field, neither the "Scan for Updates" feature of "Manage
    > Configuration" nor the "Search for updates ..." feature of "Find and
    > Install" are useable. Adding an update site in the "Search for new
    > features" function doesn't carry over for later updates.
    >
    > I guess that means that we'd better get the URL for our feature update
    > site nailed down pretty permanently before we let it out of the barn.
    >
    > Otherwise, we'll have to tell our users to disable, then uninstall, then
    > search for new features if we ever move it.
    >
    > Do I understand this correctly?
    >
    > --
    > Bert Hyman | Unisys - Roseville MN
    > [email protected] | (651) 635-7791 | net2: 524-7791

  • Array.length Question

    Hello,
    I am trying to find out what class array's length attribute comes from and how array is able to use it.
    I have been studying the API but cannot find it or work it out.
    Thanks,
    Harold Clements

    Arrays are considered part of the language and are not listed in the API.
    But length appears to behave like a public field, mostly.
    Have you checked the language spec? It's available free online.

  • Editing attributes

    I am pulling, Voltage, Current, and Time data
    from a keithley 2400. I want to set the time data as the time attribute
    for the Voltage and Current data. The data is read from the insturment
    buffer as a 1D array. I then use a decimate array to seperate the data
    and a build array to combine the current and voltage data into a 2D
    array. Then I output that array to convert to varient data and then to
    set attribute. I use the time data array as the attribute value. When
    converting back to labview data I loose that time attribute. I preform
    a number of operations on the data using express VI's, ie FFT, and need
    the proper time data not the default interger step. Also it would be
    nice to adjust the names of the data so that they appear in the header.
    Any help would be great thanks.
    Ed
    PS sorry no net allowed in lab so I cant post the VI

    You don't need a variant but a waveform!
    In a waveform you can store attributes like timestamps (make sure every point get's it's own timestamp or use dt and t0).
    If you set the 'NI_Name' property your data will have a name.
    Ton
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!

  • Additional ViewObject attribute

    Hi,
    I opened my friend's application which include a view controller and model, in his created ViewObjects, he can see Object, Array etc as attribute type of ViewObject attribute but if i created a new application, and a ViewObject. If i want to create for example, productName attribute in the viewObject, i can only see some basic attribute types for it (Boolean, String etc). I tried to copy all the libraries he has in his Model project to my newly created model project, still cannot see those additional attribute.
    Anyone has any idea on where do those attributes come from?

    hi,
    I have valid db connection
    Im talking about attribute type. I dont have : object, array, ordImageDomain, ordVideoDomain, REF, Character etc. Im much more interested in Object and Array attribute type but i only have the basic types. All i have is BigDecimal, Blob, Boolean, Clob, Date, Float, Integer, Long, String, Time, TimeStamp

  • Getting array's current index

    Hi,
    I have just started using core tags. I have an array of "Item" object and displaying all its attributes in HTML table. I have another array of "int" which holds the indexes what attributes to display.
    For ex: Each and every "Item" in the array has 10 attributes and "int" array has a size of 2 with values 1&2. That means attribute1&attribute2 need to be displayed in HTML screen. How is it possible?
    <c:forEach var="item" items="${sessionScope.items}">
    <tr>
    <c:forEach var="attr" items="${item.attrs}">
    <td>${attr}</td>
    </c:forEach>
    </tr>
    </c:forEach>
    In the above code, it displays all the 10 attributes. My requirement is it should display only 1&2 (values coming from int[], these value may be changed). So I want to display only the attributes which are mentioned in int array.
    Should I use scriptlets? Can any one suggest me how to achieve this using JSTL tags?
    thanks in advance.

    oops just tried to test it and there was a prob but, this should work...
    Note: varStatus provides the count but the array index starts at 1 and not 0.
    <c:forEach items="${sessionScope.items}" var="item">
              <c:forEach items="${sessionScope.intArray}" var="nextInt">
                <c:forEach items="${item.attrbs}" var="attrb" varStatus="statusAttr">
                  <c:if test="${nextInt eq statusAttr.count-1}"> 
                    <c:out value="${attrb[nextInt]}"/>
                  </c:if>
              </c:forEach>
            </c:forEach>
          </c:forEach>

  • Embedded Notifications Problem

    Hi,
    Is there any possible way to retrieve the content (text, tables, whatever) from an embedded attribute (BODY) of a Notification? I am trying to understand how do all this work but I am a little bit confused.
    It is possible to get the email html notification message so I can see the body in there?
    I am integrating an external application to EBS. I can use the PL/SQL
    WF_NOTIFICATIONS.getBody() but when the body has an embedded region I get something like
    Attribute HR_NTF_EMBEDDED_REGION refers to Framework Region JSP:/OA_HTML/OA.jsp?OAFunc=-HR_COMP_NTF_SS-&NtfId=-35815463-.Any ideas?

    Thanks, but I was actually asking about the links that OEM has in the email content sent out as part of a notification. (So you can click the link in the notification and it takes you to the appropriate spot in the Grid console). I've since heard from Oracle support that modifying these embedded links to use the load balanced hostname (rather than the individual OMS hostname) is not possible and is something they say they're working on for 11g.

  • Sparkline Chart in OBIEE

    Hi,
    How to built Sparkline chart with OBIEE? Is it possible to built it by any customization?
    Appreciate any help.
    Thanks,
    Vino

    Hi RMN,
    I've wanted to blog in the past, but I've got a pesky contract that says anything I blog about is my company's property (which doesn't sit too well with me). So I opted to help people in the public forum instead, that way others can read it and pass it around. So feel free to re-post this anywhere you want to.
    High-level: My approach was to create two Answer Requests, Sparkline Graph and Sparkline Pivot table. In OBIEE, the charts/graphs are embedded flash objects. My goal was to put a place holder embed tag for the sparkline graph in the pivot table and then use javascript to update the embed tag SRC attribute based upon an xmlHTTPRequest to the Sparkline Graph.
    Keep in mind, I programmed and tested on Mozilla. I just tested on IE and it doesn't work. Some of the xmlHTTPRequest commands need to be tweaked for cross platform compliance. I'll work on that when I get some free time, but meanwhile, feel free to go over this.
    Part 1)
    a) Create your Sparkline Graph first. In the screen shot I posted above, my graph metric is filtered on a plant-by-plant basis and projects the given measure over a calendar year, by month.
    b) Make sure you size it small. I moved the sliders to the first mark on both the horizontal and vertical.
    c) Remove any markings like grid-lines, titles, etc, to your liking.
    d) Save this request and note the name and the full request path
    Part 2)
    a) Create your pivot table report. As you can see, I pivot by month and each row is based on the Plant number. What ever your graph is prompted on, you need those fields in the row of the pivot table.
    b) Go into the formatting on your column that makes up the pivot row, in my case it's Plant Name, and add the following custom CSS style: font-family:Sparkline. This lets the javascript find what value to pass to the detail report.
    c) Create your sparkline column (i.e. add any column to the report). Format it as HTML and put the following into it. '<embed type="application/x-shockwave-flash" name="sparkline" width="100" height ="60" wmode="transparent" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" src=""/>'
    d) Copy and paste the following javascript into a static text object with HTML enabled. You will need to change the path of the request in the URL variable to your particular Sparkline graph path. Search for "chart_url" in the code. This uses standard GO URL syntax. In my case the path is "/users/administrator/Java%20Script%20Test/Sparkline%20Detail" and the column is "Scorecard.Plant". Replace those values as appropriate in your situation. The rest of the code should be fine as is. It basically looks for all the values tagged with the font-family:Sparkline and makes calls to your graph report. It then parses that call and pulls EMBED tag and gets the SRC attribute. It finally updates all those place holders with the appropriate SRC value.
    <script type="text/javascript">
    var debug =0; // set debug variable
    if (debug === 1) { document.write("Begining to get addSparkline function " + "<BR>");}
    if (debug === 1) { document.write("Setting up reg_exp variables" + "<BR>");}
    var sparkline_re = /Sparkline/;
    var chart_request = new XMLHttpRequest();
    var values = new Array();
    if (debug === 1) { document.write("Setup array for values" + "<BR>");}
    var elements = document.getElementsByTagName('*');
    if (debug === 1) { document.write("Get all tags" + "<BR>");}
    for( var element = 0; element <elements.length; element++)
         //if (debug === 1) { document.write("Looping over Elements: " + element + "<BR>");}
         if( !(sparkline_re.test( elements\[element\].getAttribute('style') )))
              // Not the sparkline area pass!
              //if (debug === 1) { document.write("Didn't find the style continue: " + elements\[element\].style.fontfamily+"<BR>");}
              //if (debug === 1) { document.write("Didn't find the class continue: " + elements\[element\].className + "<BR>");}
              continue;
         if (debug === 1) { document.write("Found the sparkline value element" + "<BR>");}
         var value = "\"" + elements\[element\].innerHTML + "\"";
         if (debug === 1) { document.write("Get the inner HTML" + "<BR>");}
         values.push(value);
         if (debug === 1) { document.write("Value is : " + value + "<BR>");}
    var embeds = document.getElementsByTagName('embed');
    if (debug === 1) { document.write("Get array of embeds" + embeds.length + "<BR>");}
    for ( var embed = 0; embed <embeds.length; embed++)
         if (debug === 1) { document.write("Looping over Embeds: " + embed + "<BR>");}
         var startIdx;
         var endIdx;
         var innerHTML;
         var chart_url = "saw.dll?Go&Action=Navigate&path=/users/administrator/Java%20Script%20Test/Sparkline%20Detail&col1=Scorecard.Plant&val1=" + values\[embed\];
         if (debug === 1) { document.write("Created XMLHttpRequest" + "<BR>");}
         if (debug === 1) { document.write("Setup the onreadystatechange function" + "<BR>");}
         chart_request.open("GET",chart_url,false);
         if (debug === 1) { document.write("Opened URL: " + chart_url + "<BR>");}
         chart_request.send(null);
         if (debug === 1) { document.write("Set send to NULL" + "<BR>");}
         startIdx = chart_request.responseText.indexOf("<embed");
         endIdx = chart_request.responseText.indexOf("</embed>");
         innerHTML = chart_request.responseText.substr(startIdx,endIdx-startIdx);
         startIdx = innerHTML.indexOf("saw.dll");
         endIdx = innerHTML.indexOf("\"",startIdx);
         embeds\[embed\].src = innerHTML.substr(startIdx,endIdx);
    if (debug === 1) { document.write("Finished" + "<BR>");}
    </script>
    Good luck and tell me if you have any troubles implementing this.
    Best regards,
    -Joe
    Edited by: Joe Bertram on Dec 22, 2009 11:56 AM

  • Help, Java newbie a little over my head with LDAP

    I'm actually a network admin but I've been dabling in Java for a little while now.
    I am trying to write an app that will allow me to insert and remove attributes to entries in Active Directory.
    I have found some sample code which I have altered to make a "proof of concept" before I start on the actuall app I want.
    The problem I am having is writing into the AD. I can query entries with no error but when I try a modification I get an "DSA is unwilling to perform" LDAPException. I am pretty sure it's not a permissions issue but from reading stuff on here I am begnining to think that it may have something to do with SSL connections. There is commented out code below where I experimented with this but I was unable to connect the the AD when this was in. "unable to connect to the directory server error".
    If anyone can offer me any advice I would be most grateful.
    package LDAPTest;
    import netscape.ldap.*;
    import java.util.*;
    import com.novell.service.ndssdk.jndi.ldap.ssl.*;
    // Simple program to experiment with searching LDAP
    public class FilterSearch
    public static void main(String[] args)
    if(args.length != 6)
    System.out.println("Usage: java FilterSearch " +
    "<host> <port> "+
    "<authdn> <password> "+
    "<basedn> <filter> ");
    System.exit(1);
    String host = args[0];
    int port = Integer.parseInt(args[1]);
    String authid = args[2];
    String authpw = args[3];
    String base = args[4];
    String filter = args[5];
    String[] ATTRS = {"memberOf"};
    int status = -1;
    //SSL experiment that would not connect to the AD server.
    //LDAPConnection ld = new LDAPConnection(new LDAPSSLSocketFactory("com.novell.service.ndssdk.jndi.ldap.ssl.LdapSecureSocketFactory"));
    LDAPConnection ld = new LDAPConnection();
    System.out.println("done connection");
    try
    //Connect to server and authenticate
    ld.connect(host, port,authid,authpw);
    System.out.println("Search filter = " +filter);
    LDAPSearchResults res = ld.search(base, ld.SCOPE_SUB, filter, null, false);
    //Loop on results until complete
    while(res.hasMoreElements())
    try
    //Next Directory entry
    LDAPEntry entry = res.next();
    prettyPrint(entry, ATTRS, ld);
    status=0;
    catch(LDAPReferralException e)
    System.out.println(e);
    continue;
    catch(LDAPException e)
    System.out.println(e.toString() );
    continue;
    LDAPAttribute atrib = new LDAPAttribute("memberOf", "CN=Tight VNC,OU=Staging Transmitter Channels,DC=marimba,DC=local");
    LDAPModification mod = new LDAPModification(LDAPModification.ADD, atrib);
    System.out.println(ld.isAuthenticated());
    try{
    // This is the code the throws the Exception DSA is unwilling to perform.
    ld.modify("CN=smstest0005,CN=MarimbaComputers,CN=Computers,DC=marimba,DC=local", mod);}
    catch(LDAPException e){
    System.out.println(e);}
    catch(LDAPException e)
    System.out.println(e.toString() );
    //Done, so disconnect
    if((ld!=null) && (ld.isConnected()))
    try
    ld.disconnect();
    catch(LDAPException e)
    System.out.println(e.toString());
    System.exit(status);
    public static void prettyPrint(LDAPEntry entry, String[] attrs, LDAPConnection ld)
    System.out.println("DN: " + entry.getDN());
    //Use array to pick attributes. We could have
    //enumerated them all user LDAPEntry.getAttributes
    //but this gives us control of the display order
    for(int i = 0; i < attrs.length; i++)
    LDAPAttribute attr = entry.getAttribute( attrs);
    if (attr == null )
    System.out.println(attrs[i] + " not present");
    continue;
    Enumeration enumVals = attr.getStringValues();
    //Enumerate on values for this attribute
    boolean hasVals = false;
    while ((enumVals!=null) && enumVals.hasMoreElements())
    String val = (String)enumVals.nextElement();
    System.out.println(attrs[i] + ": " + val);
    hasVals=true;
    if(!hasVals)
    System.out.println(attrs[i] + " has no values");
    System.out.println("----------------------");

    OK, I have learned a little about JNDI today and have attempted to implement this using JNDI instead.
    I am now getting the OperationNotSupportedException when attempting to add an attribute to an item in Active Directory.
    here's the code, can anybody who has managed to add data into AD help with this?
    cheers.
    package JNDI;
    import javax.naming.*;
    import javax.naming.directory.*;
    import java.util.*;
    class Getattr
    public static void main(String[] args)
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.ldap.LdapCtxFactory");
    env.put(Context.PROVIDER_URL, "ldap://hostname:389/");
    env.put(Context.SECURITY_PRINCIPAL, args[0]);
    env.put(Context.SECURITY_CREDENTIALS, args[1]);
    try {
    // Create the initial directory context
    DirContext ctx = new InitialDirContext(env);
    // Ask for all attributes of the object
    Attributes attrs = ctx.getAttributes("CN=smstest0005,CN=MarimbaComputers,CN=Computers,DC=marimba,DC=local");
    for (NamingEnumeration ae = attrs.getAll(); ae.hasMore();)
    Attribute attr = (Attribute)ae.next();
    System.out.println("attribute: " + attr.getID());
    /* Print each value */
    for (NamingEnumeration e = attr.getAll(); e.hasMore();System.out.println("value: " + e.next()));
    // Specify the changes to make
    ModificationItem mod[] = new ModificationItem[1];
    mod[0] = new ModificationItem(DirContext.ADD_ATTRIBUTE,
    new BasicAttribute("memberOf", "CN=Tight VNC,OU=Staging Transmitter Channels,DC=marimba,DC=local"));
    ctx.modifyAttributes("CN=smstest0005,CN=MarimbaComputers,CN=Computers,DC=marimba,DC=local", mod);
    // Find the surname attribute ("memberOf") and print it
    //System.out.println("memberOf: " + attrs.get("memberOf").get());
    } catch (NamingException e) {
    System.err.println("Problem getting attribute:" + e);

Maybe you are looking for