How To render content tree flex parent asset using search state tag

i m creating asset in flex parent and  and i placed this  in a tree tab. i want to get the attribute value inside level2 in content tree.
          For eg:
          1.product
               2.cctv
                    -480cam    
                     -520 cam
               2.standalone
                    -hseries
                    -pioneer
Now i want to get the values of (480,520)if i render cctv...same way retreive attribute value (hseries,pioneert) if i use standalone
               how this possible using searchstate tag please anyone know help me.This is my code.....
<searchstate:create name="pro22" op="and"/>
<searchstate:addstandardconstraint name="pro22" attribute="AssetAttrl2" immediateonly="true" typename="HF_Attribute_A"/>
<assetset:setsearchedassets name="pro33" assettypes="HF_Product_P" constraint="pro22" fixedlist="true"/>
<assetset:getassetlist name="pro33" listvarname="imagelist11" list="listout" />
<ics:if condition='<%= ics.GetList("imagelist11") !=null && ics.GetList("imagelist11").hasData()%>'>
<ics:then>
<ics:listloop listname="imagelist11">
<ics:listget fieldname="assetid" listname="imagelist11" output="imag22"/>
<render:calltemplate tname="HF_3rdlevelProductPage" c="HF_Product_P" cid='<%=ics.GetVar("imag22") %>' ></render:calltemplate><br/>
</ics:listloop>
</ics:then>
</ics:if>

WCS flex asset model supports a concept called "inheritance". This means, all the attribute values at parent level can be accessed at child level.  You can use this to search all the Product_C assets using an attribute at parent level.
<listobject:create name="lo" columns="value" />
<listobject:addrow name="lo">
<listobject:argument name="value" value="cctv"/>
</listobject:addrow>
<listobject:tolist name="lo" listvarname="matchlist"/>
<searchstate:create name="pro22" op="and"/>
<searchstate:addstandardconstraint name="pro22" attribute="AssetAttrl2" list="matchlist" typename="HF_Attribute_A"/>
<assetset:setsearchedassets name="pro33" assettypes="HF_Product_C" constraint="pro22" fixedlist="true"/>
The above serach state gives you all the products matching CCTV.
Hope this helps
Ravi G

Similar Messages

  • How to insert an image file as blob using JDBC Statement

    Hi,
    I'm new on java.
    I want the code to insert an image file in Oracle database whose data type is blob.
    i want to use JDBC statement not the prepared statement.
    Please help me out.

    user8739226 wrote:
    thanks for the solution.
    I want to ask one thing
    let say i've created a method in a bean in which i'm passing three parameters.
    One is tablename as String, Second is Name of tablefields as Object, Third is Values as Object
    Like:
    public synchronized int insert(String table,Object[] fields, Object[] values)Ah now we're getting somewhere. I was trying to come up with a situation where using a regular Statement over PreparedStatement would be viable and came up with practically nothing.
    In the method body i'm accessing the table fields and values and combining them into the insert sql query.
    how can i do this using preparedstatment.
    how do i come to know here in this bean that this value is int or string or date at runtime to use setInt, setString, setdate or setBlob respectively.That's your problem. Bad design. You want to make some sort of universal insert method that can insert anything anywhere. But it doesn't really make sense, because whenever you're trying to insert something, you know exactly what you want to insert and where. You could use a PreparedStatement at that point (although encapsulate it in its own method). Now you're trying to create your own poorly designed framework over JDBC that doesn't solve problems, only increases them.
    Above was the only reason i saw, i was using statement instead of preparedstatment as statement was looking easy in this situation.
    please, give me the solution of above using preparedstatment.No, rather you should reconsider your design. What advantage does your insert() method give you over, let's say using a regular PreparedStatement. Granted, you can put your connection opening and other boilerplate code in the method. But if that's your only problem, then your insert method isn't gonna be much use. You could always switch to JPA for example and work with that.

  • How to get all tree node parents upon select

    I have a tree, and when user clicks an item in the tree, I want to get all the parents of the selectedItem node.
    So if I have this XML:
    <products>
        <item>
            <sku>1001</sku>
            <quantity value="100" />
        </item>
        <item>
            <sku>2001</sku>
            <quantity value="250" />
        </item>
        <item>
            <sku>3001</sku>
            <quantity value="300" />
        </item>
    </products>  
    If user clicks on the 1001 sku, I want to get something like this:
    <products><item><sku>
    Also if I have a custom component, perhaps based on tree or but maybe not, and if this custom component shows the actual XML and used can click on XML elements or XML attributes, how can I use the selected item to get the parent nodes, so if they click on the value="100", I want to get this:
    <products><item><sku><quantity>
    I need this because I have a set of fields, and users will drag their XML node elements or attributes to my fields, to define a mapping between their XML and my fields.
    The selectedItem is just a snippet of XML cut off from its source XMLListCollection, and I might be able to search the XMLListCollection, but what if there were say <sku> elements at more than one level in the XML? I'm guessing a search might return multiple hits for a selected element, when I want the actual parent nodes for the actual selected node.
    Thanks very much!

    var path:Array=[]
    var parent:XML = xxxx.selectedItem.parent()
    while(parent){
    path.push(parent.localName())
    parent = parent.parent()
    Or, i didn't get your question and xxxx.selectedItem is "detached" XML snippet ?

  • How to post the Down payment for assets using the investment measure?

    Hi,
    We want to post the down payment using the investment measure for some of the assets. Please tell me how to post it and how to clear it.
    I have searched the net but till now I am unable to find something with which I can do that.
    Thanks in advance...
    Regards
    Nitin

    Hi,
    Please reply as I am facing problems with posting the down payments using the investment measure and I have tried and read alot but nothing as such I have been able to found.
    Thanks and Reply
    Nitin

  • How do I align a flex field segment using personalizations?

    This is my first attempt at an OAF form personalization.  I added three DFF segments (read only) to the requisition headers portion of the iProcurement requisitions form.  I'll do my best here to try and show what has happened, I hope this will maintain the formatting.  So column on the left side of the form looks like this:
                      Description:   This is a test
                      Created by:    Me
                   Creation Date:   03-DEC-2013
    Confirming Order: Yes
    Capital Expense: No
                         Deliver to:   Test
    So, you can see that the two flexfield segments, Confirming Order and Capital Expense are way over to the left and not aligning with the rest of the fields.   I'm wondering if someone can tell me how to get those to line up with the rest of the form fields.  I have the same issue with a third flexfield segment n the right side of the form.  The other fields in the column are Message Styled Text.  And if I add a field that is of that type it will line up.   Although, when using that type of field or the flex field, I have to set the CSS style, it doesn't automatically inherit it as I thought it would.  I did a view source to see what it was on the other fields then filled that in for the CSS Class for the field I had created.  So, I must be missing something else here for these not to line up.  Any guidance is appreciated.  Thanks.

    I just found this note: 
    DFF Segments Are Not Aligning Correctly When Added Through Personalizations (Doc ID 1594546.1)
    It sounds like it isn't possible, unless someone knows of a workaround.

  • How to fetch content from UCM in WLP using VCR

    Hi,
    I configured the connection between weblogic portal v10.3.2 and UCM 11g using VCR adapter guide. But i am struck in how to fetch the content from UCM/VCR and display it in Weblogic portal.
    Please guide me on how to fetch the content from UCM/VCR and display it in Weblogic Portlet ( JSF Portlet). is there any api is available to get the content from ucm and display it in portlet.
    Appreciate your support here.
    Thanks a lot,
    Suresh

    Suresh,
    Please check the name of the VCR configured in the UCm.
    You can use a batch file to load the VCR on to your Weblogic server. Using the name you can retrieve the contents from UCM.
    Please let us know other configuration details to help you further

  • How to create content based portlet in 10g using JCR Data Control.

    I have created a webecenter Application (portlet,content repository,jsf ) in jdeveloper 10.1.3.4.
    and created a DatacontrolRepository connection for conent server , so inside the data control pallette I get all the methods such as search, AdvancedSearch,getItems.
    Now I am trying to drop the getItems() method return value from JCR data control as a Table inside my JSR 168 standard portlet which i created.
    But I am not able to see any of the content in my portlet.
    If I drag the same method getItems() on to my jspx page ( inside my ViewController) its working as expected.
    Please guide me how can get the content on portlet.

    Hi,
    Thanks for your reply..but i already have this demo and it doesn't contain an example for a pie graph..if u know where i can find any example for a pie graph and how to pass data to it i would be so thankful
    Thanks again.
    Eyad Basheer

  • How to move XML tree to another level using DOM api ?

    <p>
    Hi,
    </p>
    <p>
    I have a followin function
    </p>
    <p>
    <font face="courier new,courier"><strong>    public void printEmployeesAsXML(){
    </strong></font>
    </p>
    <p>
    <font face="courier new,courier"><strong>        ViewObject vo = getEmployees();
            Node no = vo.writeXML(-1,XMLInterface.XML_OPT_ALL_ROWS);
            XMLNode oraXML = (XMLNode)no; 
            try {
                    oraXML.print(System.out);
                } catch (IOException e) {
                    e.printStackTrace();
        } </strong></font>
    </p>
    <p>
    <font face="courier new,courier"><strong>that gives me following XML:</strong></font>
    </p>
    <p>
    <font face="courier new,courier"><strong>&lt;Employees&gt;
       &lt;Employee&gt;
          &lt;Empno&gt;7369&lt;/Empno&gt;
          &lt;LastName&gt;SMITH&lt;/LastName&gt;
          &lt;Job&gt;CLERK&lt;/Job&gt;
          &lt;Manager&gt;7902&lt;/Manager&gt;
          &lt;HireDate&gt;1980-12-17&lt;/HireDate&gt;
          &lt;Salary&gt;800&lt;/Salary&gt;
          &lt;Deptno&gt;20&lt;/Deptno&gt;
       &lt;/Employee&gt;</strong></font>
    <font face="courier new,courier"><strong>&lt;/Employees&gt;</strong></font>
    </p>
    <p>
    I always wil have only one row, so I need following XML:
    <font face="courier new,courier"><strong>
       &lt;Employee&gt;
          &lt;Empno&gt;7369&lt;/Empno&gt;
          &lt;LastName&gt;SMITH&lt;/LastName&gt;
          &lt;Job&gt;CLERK&lt;/Job&gt;
          &lt;Manager&gt;7902&lt;/Manager&gt;
          &lt;HireDate&gt;1980-12-17&lt;/HireDate&gt;
          &lt;Salary&gt;800&lt;/Salary&gt;
          &lt;Deptno&gt;20&lt;/Deptno&gt;
       &lt;/Employee&gt;</strong></font>
    </p>
    <p>
    Question is how to remove <strong>&lt;/Employees&gt;</strong> tag using w3c DOM API and move tree one level above
    </p>
    <p>
    Kuba 
    </p>
    <p>
    </p>

    The XSLT for the required transformation is as follows:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="xml"/>
    <xsl:template match="/Employees">
    <xsl:copy-of select="Employee"/>
    </xsl:template>
    </xsl:stylesheet>

  • How to compare content of two text file using StreamTokenizer

    hi....
    i have two text files...containg field like(name,number,scheme) and(number,date,value)... i want to create a third file containg field like (name,number,date,scheme,value) by using these two table. how to create

    I think this code can solve your problem.
    private static final String DELIM = ",";
    * Compile two files.
    * @param file1 String the input file 1
    * @param file2 String the input file 2
    * @param file3 String the output file
    * @throws IOException error in reading/writing
    public void compileFiles(String file1, String file2, String file3) throws
            IOException {
            BufferedReader reader1 = new BufferedReader(new InputStreamReader(
                new FileInputStream(file1)));
            BufferedReader reader2 = new BufferedReader(new InputStreamReader(
                new FileInputStream(file2)));
            BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(
                new FileOutputStream(file3)));
            String line1 = reader1.readLine();
            String line2 = reader2.readLine();
            while (line1 != null && line2 != null) {
                writer.write(compileLines(line1, line2));
                writer.newLine();
                line1 = reader1.readLine();
                line2 = reader2.readLine();
            reader1.close();
            reader2.close();
            writer.close();
        private String compileLines(String line1, String line2) {
            StringTokenizer tok1 = new StringTokenizer(line1, DELIM);
            StringTokenizer tok2 = new StringTokenizer(line2, DELIM);
            String name = tok1.nextToken();
            String number = tok1.nextToken();
            String scheme = tok1.nextToken();
            // ignore number
            tok2.nextToken();
            String date = tok2.nextToken();
            String value = tok2.nextToken();
            StringBuffer buffer = new StringBuffer();
            buffer.append(name);
            buffer.append(DELIM);
            buffer.append(number);
            buffer.append(DELIM);
            buffer.append(date);
            buffer.append(DELIM);
            buffer.append(scheme);
            buffer.append(DELIM);
            buffer.append(value);
            return buffer.toString();
        }

  • How to read contents of a file version using version url

    Hi,
    I have a file in a document library say "MyFile.txt". Versioning is enabled and there are three version of it
    What i want now is that , by passing the url of version i got from SPFileVersion class, i must be able to read the contents of it.
    Can anyone pls help me
    Arjun Menon U.K

    You can use the following line of code to get the content of a specific version
    SPFolder fld = web.Folders["Documents"];
    SPFile file = fld.Files["Documents/MyFile.txt"];
    //specific version
    SPFileVersion version = file.Versions[1];
    //Get the data
    byte [] dBytes = version.OpenBinary();
    Refer to the following posts for more information, hope it helps
    http://blogs.msdn.com/b/karthick/archive/2006/03/28/563045.aspx
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/8d2619bf-34e9-421b-85c1-792b2a9e8ae9/spfileversioncollection-specific-version?forum=sharepointdevelopmentlegacy
    --Cheers

  • How to render audio with sample rate 48000hz using jmf

    hi,
    In my application i need to play the audio with jmf player with sampling rate 48000hz. but i found that jmf player plays the audio with sampling rate of 44100hz only.but my application needs to play the audio with sampling rate of 48000hz .please help me how to do this using jmf .
    thanks in advance,

    hi,
    In my application i need to play the audio with jmf player with sampling rate 48000hz. but i found that jmf player plays the audio with sampling rate of 44100hz only.but my application needs to play the audio with sampling rate of 48000hz .please help me how to do this using jmf .
    thanks in advance,

  • How to get the sum in BSEG table using select statement

    hai all
    i made the internal tale "itab1" .. i want to get the som  feild of  DMBTR in BSG table my code is here but its not working gave som error massage (Aggregate functions and the addition DISTINCT are not supported in field lists for pooled and cluster tables.)  plz tel me how should i do it..... i want to get the som of that feild....          
    loop at itab1
         SELECT sum( DMBTR  ) from bseg INTO itab1-DMBTR141_45
             where GJAHR = itab1-GJAHR
             and   BELNR = itab1-BELNR.
    endloop.
    regard
    nawa

    SELECT BELNR GJAHR SHKZG DMBTR
                 from bseg
                 INTO table it_bseg
                 for all entries in itab1
                 where GJAHR = itab1-GJAHR
                   and BELNR = itab1-BELNR.
    loop at it_bseg.
        IF it_bseg-shkzg = 'H'.
          it_bseg-dmbtr = it_bseg-dmbtr * ( -1 ).
        ELSE.
          it_bseg-dmbtr = it_bseg-dmbtr.
        ENDIF.
        MODIFY it_bseg.
    endloop.
    loop at it_bseg.
    READ TABLE itab1 with key belnr = it_bseg-belnr
                               gjahr = it_bseg-gjahr.
    if sy-subrc = 0.
    collect it_bseg into it_bseg_amount.
    endif.
    endloop.
    U can use the collect statement
    Regards
    Gopi

  • How to take input in arraylist in jsp using spring Frawork tags

    hi all i am using this code in my jsp using spring framework ..n in this code i am finding difficulties to take input in arraylist...can any one suggest me proper method for it
    <core:forEach items="${addUpcModel.resultList}" var="result">
    <td width="4%" class="normal"><core:out value="${result.vendorSize}"/></td>
    </core:forEach>
    </tr>
    <tr class="white">
         <td class="normal">Quantity</td>
    <core:forEach items="${addUpcModel.resultList}" var="result">
    <spring:bind path="addUpcModel.upcDO.quantityOrder">
              <td class="normal"><span class="normallink">
              <input name="<core:out value="${status.expression}"/>" type="text" size="10" maxlength="10"
              onKeyPress="return numbersonly(this, event)"
              value="<core:out value="${status.value}"/>"/>
              </span></td>
         </spring:bind>          
    </core:forEach>     
    i want to take quantity order in array format..as how many columns .it will be decide by database ...in arraylist

    af:outputText has an attribute escape which you can set try.
    You should try af:outputTextFormatted too.
    Timo

  • How to pass select-options in key while using Read Statement.

    Hi SAP gurus,
    I was using a select stmt. with were clause of Select-options it was working fine,
    now my scenerio is changed i need to read an internal table
    with key of select-options....
    how to read internal table with key S_MATNR (Select-options).

    Hi,
    We can certainly do this.
    We need to loop the internal table with select-options condition.
    Example  :
    LOOP AT ITAB WHERE FIELD =  S_FIELD.
    ENDLOOP.
    This should solve your problem.
    Plz reward if useful.
    Thanks,
    Dhanashri.

  • How to get all values from an interval using select statement

    Hi,
    Is it possible to write a select statement that returns all values from an interval? Interval boundaries are variable.
    something like this:
    select (for x in 1,1024 loop x end loop) from dual
    (this, of course, doesn't work)
    The result in this example should be 1024 rows of numbers from 1 to 1024. These numbers are parameters, so it is not possible to create a table with predefined values.
    Thanks in advance for your help,
    Mia.

    For your simple case, with a lower boundary of 1, you can use:
    SELECT rownum
    FROM all_objects
    WHERE rownum <= 1024For a set of number between say 50 - 100, you can use something like:
    SELECT rownum + (50 - 1)
    FROM all_objects
    WHERE rownum <= (100 - 50 + 1)Note, that all_objects was used only because it generally has a lot of rows. Any table with at least the number of rows in your range will work.
    TTFN
    John

Maybe you are looking for

  • Generation of Interactive file dynamically based on a XML document.

    Hi Experts, I got a new requirement for a dynamic interactive PDF form, can somebody help me if its possible to do so and is fo how ..? I will have a dynamic XML file generated and placed in a location with list of fields, attributes, events and webs

  • Adobe Premiere has encountered a serious error and needs to shut down.

    I encounter this every once in awhile and it's super irritating. I've cleared the cache a few times and even created new project files and saved them elsewhere to try and avoid the issue. Are there any updates or patches available? Premiere Pro CS6 6

  • I did the update and synced.  my awesome note information is gone. Can I get it back?

    On my Iphone 4 when I connected to itunes, i did the updaet, and synced the phone.  I have the app Awesome Notes.  I had  a lot of information on it.  All is gone now.  What am I doing wrong when I sync or update that I lose all my information.  Can

  • NTSC vs. PAL vs. SECAM

    Hello, I am having a project translated for distribution around the globe, with countries that use all three formats. I just want to clarify a few things. My research has led me to believe that: 1.) PAL DVDs will work in SECAM countries, as there is

  • Window Authorization of SAP B1

    Hi all,            what kind of authorization(windows) do we need to run SAP B1. I want to list all the possible reason if add-ons gives error 'cannot connect to DI API, Corrupt Memory'. Thanks Rahul