How to get and set custom tag attributes

How do i get and set custom tag attributes from a jsp page?

Not sure if this is what your looking for, but....
example...
< taglibprefix:testtag attribute1="x" attribute2="y">
...of course, the attributes have to be defined in your taglib (.tld) file

Similar Messages

  • How to get and set graph propertis using UIGraph instance

    Hi,
    I have added barGraph graph component on *.jspx and also added buttons like "Get properties" and "Set Properties". On "Get Properties" button action, I want to get all the attrributes of barGraph using UIGraph and also want to get "getGroupAttributes" and "getSeriesAttributes".
    I saw examples on gettiing the Group attributes using the click event on the graph.
    Is there any way to get the attributes on some button action like "Get Properties" without any click event on graph?
    Thanks,
    Gopal

    [Copying the answer here from the internal forum discussion so that other customers can benefit]
    Hi Gopal,
    You can call getValue on the UIGraph to get the GraphDataModel, then to use the data access APIs from there.
    Once you get the DataAccess from the GraphDataModel, you can call getMemberMetadata to get the members on the row and column edge.
    This method is documented in the interface CDFDataAccess:
    http://docs.oracle.com/cd/E16162_01/apirefs.1112/e17492/oracle/dss/util/CDFDataAccess.html#getMemberMetadata%28int,%20int,%20int,%20java.lang.String%29
    You should use the following constants for the series and groups:
    DataDirector.COLUMN_EDGE=groups
    DataDirector.ROW_EDGE=series
    Use the method getEdgeExtent to find out how many members are in the series and groups:
    http://docs.oracle.com/cd/E16162_01/apirefs.1112/e17492/oracle/dss/util/CDFDataAccess.html#getEdgeExtent%28int%29
    Method getLayerMetadata is the correct way to get the names of the layers, a.k.a "dimensions" displayed in the graph.
    DataAccess is used to read the data from the Graph. You set the data in the Graph by setting tabular data, using data binding by dragging and dropping from the data control palette, or by implementing a custom DataSource and setting it on the graph.
    http://docs.oracle.com/cd/E16162_01/apirefs.1112/e17492/oracle/dss/dataView/CommonDataview.html#setDataSource%28oracle.dss.util.DataSource%29
    However, implementing a custom data source is not trivial, and you should only use that approach if you can't use tabular data or regular binding against the available data controls.
    This doc chapter might help in understanding data source requirements for different Graph types:
    http://docs.oracle.com/cd/E16162_01/web.1112/e16181/dv_graph.htm#CEGBGCDG
    Hope this helps,
    Katia

  • How to access and set the object attributes in a task flow?

    I have created a web service data control which has an operation having input as payload object. This payload object has two attributes min and max. I am calling a task flow in a dynamic region in which I want to display result of this operation for which i have to set the values for min and max. I want to set these values when I click the taskflow link. How to achieve this? I am new to adf.

    Hi Arun,
    Thanks for your reply.
    I have tried passing parameter to a task flow, but i cannot set the action to a task flow call because it already has action for a method in a dynamic region which renders the task flow at runtime. How do i set action to task flow call link? Also once i get the parameters into the page flow scope variables, i want to pass those to one of my data control operation which displays the result in that taskflow.(i dont want to create parameter form for this operation).

  • In Workflow, How to get and set table values at runtime.

    Hi All,
    I m having a doubt,
    here in my workflow, i have used a  object where in i have made a 'Z' method which is suppose to populate a table container.
    Actually after using std SOFC-COMPOSE activity my table which has 4 user id's contains only 1 user id who has runt that activity.
    So in order to get all 4 user's back in the container i made a 'Z' method, which will populate the values back in tht user_id's table.
    But it is not doing so.
    Can you please help me as to how to do it?
    I m sending u the code that i hav written in the method.
    There are 2 codes i tried.
    first:
    BEGIN_METHOD ZPOPULATE CHANGING CONTAINER.
    data : User_Release type table of zfitlevel-zuid,
           wa_user_release type zfitlevel-zuid.
    data: User type table of zfitlevel-zuid.
    swc_get_table container 'User_Release'  User_Release.
    wa_user_release = 'USNOSIJOH'.
    append wa_user_release to User_Release.
    wa_user_release = 'USNOSOSAT'.
    append wa_user_release to User_Release.
    wa_user_release = 'USNOANMER'.
    append wa_user_release to User_Release.
    swc_set_table container 'User_Release'  User_Release.
    END_METHOD.
    and second :  Suppose User is the tabel that has correct values at run-time.
    BEGIN_METHOD ZPOPULATE CHANGING CONTAINER.
    data : User_Release type table of zfitlevel-zuid,
           wa_user_release type zfitlevel-zuid.
    data: User type table of ZUSRID.
    swc_get_table container 'User'  User.
    swc_get_table container 'User_Release'  User_Release.
    User_Release[] = User[].
    swc_set_table container 'User_Release'  User_Release.
    END_METHOD.
    Please let me know if anyone can solve my doubt asap.
    Thanks & Regards,
    Alpa

    Hi
    Thanks for the reply.
    But here in my case, there is a problem.
    The table container in Workflow wil hav dynamic entries.
    It will hav to pick it from other dynamic container elements (all single line) and append them in this container table.
    For eg:
    at runtime:
    User1 = 'USABC'
    User_table = 'USABC'
                       'USLMN'
                       'USPQR'
                       'USXYZ'
    after one of these user execute a compose mail activity of SOFM-COMPOSE,
    the User_table is left with only one user id who has executed the activity compose.
    suppose USABC executes it so after that the conatiner values are:
    User1 = 'USABC'
    User_table = 'USABC'
    Now i want that this table container shud hav all 4 values even after that activity for other purpose.
    So how can i achieve that?
    Thanks & Regards,
    Alpa
    Edited by: siri on Jul 9, 2008 8:32 PM

  • How to get and set the column order in SharePoint list forms

    Hi,
    I want to read the column order of the SharePoint list forms in SharePoint 2003 sites using any of the available web services and need to set the same order
    in the newly created list in SharePoint 2010.
    I am able to read the fields from SharePoint 2003 and creating the list with same fields in SharePoint 2010, but the column order is not maintaining in
    list forms.
    Also, I need to created the views from 2003 site to 2010 site.
    Please help me...
    Thanks in advance...

    Hi,
    Please try to use the following code to programatically change the order.
    SPList list = web.Lists["Example List"];
    if (list.ContentTypes.Count > 0)
    SPContentType ct = list.ContentTypes[0];
    string[] names = {"Example_x0020_One", "Example_x0020_Two", "Example_x0020_Three"};
    ct.FieldLinks.Reorder(names);
    ct.Update();
    Here is a similar thread for your reference:
    https://social.technet.microsoft.com/Forums/en-US/ce66fd65-2882-4bda-8142-89e116d8b90f/how-to-set-the-order-of-the-fields-in-list-forms?forum=sharepointdevelopmentprevious
    Best Regards
    Dennis Guo
    TechNet Community Support

  • How to get and set a session variable from backing bean?

    Hi im using Jdev 11.1.1.2.0 and i need to set and get a session variable from backing Bean.
    Any idea?

    the class :
    package arq.resources;
    import javax.faces.context.FacesContext;
    import javax.servlet.http.HttpSession;
    public class SesionSigef {
    public FacesContext context;
    public HttpSession session;
    public SesionSigef() {
    super();
    context = FacesContext.getCurrentInstance();
    session = (HttpSession)(context.getExternalContext().getSession(true));
    public Object getVariableSesion(String atributo){
    return session.getAttribute(atributo);
    public void setVariableSesion(String atributo,Object valor){
    session.setAttribute(atributo, valor);
    the example of use :
    SesionSigef se = new SesionSigef();
    DatosRec da = new DatosRec();
    da.setDocumentoCip("Aprobar");
    se.setVariableSesion("DatosRec", da);
    thanks
    Joaquin

  • How to Get and Set personalization data from Iview with Java Webdynpro ?

    Hi All,
    I'm trying to get Iview properties from an Iview in the portal, did anyone knows how to do this?
    sample caode?
    Thanks,
    AmitY

    You can use PCD API to access iView properties
    Check this link
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/314ae7a5-0c01-0010-c198-9c7c5e8cee46
    /people/daniel.wroblewski/blog/2006/08/15/pcd-ii-creating-portal-objects

  • How do I get and set column attributes in a table or a treetable with Java?

    Using 11.1.1.4.0
    Hi,
    How do I get and set column attributes in a table or a treetable with Java? For a simple example, say I have a table and want certain roles to see all columns (including address), and other roles can see only certain columns (no address). In a Java method, I want to test if a table's column visible attribute is true and if so, set it to false before rendering it.
    Thanks in advance,
    Troy

    Hi,
    this use case would be a perfect example for using seeded MDS customization. Instead of checking what users are allowed to see or not upon rendering time, you have a customization class and thus the framework doing this for you.
    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/31-mds-sample-169173.pdf
    In this paper and sample, specific users see different layouts. It also contains a customization class that shows how this can leverage ADF Security
    Frank

  • How do I get and set cookies with JSF?

    How do I get and set cookies in a JSF managed bean?
    Regards,
    Al Malin

    Below is how I did it...I am receptive to improvements.
    FacesContext facesContext = FacesContext.getCurrentInstance();
    HttpSession session = (HttpSession)facesContext.getExternalContext().getSession(false);
    HttpServletRequest request = (HttpServletRequest)facesContext.getExternalContext().getRequest();
    HttpServletResponse response = (HttpServletResponse)facesContext.getExternalContext().getResponse();
    String cookieName = "myCookieName";
    Cookie requestCookie = null;
    Cookie[] cookies = request.getCookies();
    logger.info("looking for cookie...");
    if (cookies != null)
    for (int i = 0; i < cookies.length; i++)
    if (cookies.getName().equals(cookieName))
    requestCookie = cookies[i];
    logger.info(cookieName + " = " + requestCookie.getValue());
    logger.info("done looking for cookie");
    Cookie responseCookie = new Cookie(cookieName, "myCookieValue");
    responseCookie.setPath("/");
    response.addCookie(responseCookie);

  • How to get 2 xml(Sibling tag) content same time and merge them

    how to get 2 xml(Sibling tag) content same time and merge them and search the result value in indesign file with page number  
    Like
    <Record>
    <A>this is a text</A>
    <B>a-123</B>
    </Records>
    First we need  tag A and B value as  :
    this is a text - a-123 and then get  this text page number form the indesign doc
    plz help

    hi
    var root = app.activeDocument.xmlElements[0];
    var aTag = root.evaluateXPathExpression("//Record/INAAMF");
    var bTag = root.evaluateXPathExpression("//Record/IAFKF");
    here I got  aTag  and bTag  = empty
    may be the reason is as I forgot to menion the proper XML path as
    <Records>
    <Record>
    <A>this is a text</A>
    <B>a-123</B>
    </Record>
    <Record>
    <A>Second text</A>
    <B>a-132</B>
    </Record>
    <Record>
    <A>Thied text</A>
    <B></B>
    </Record>
    <Records>

  • Custom tag attribute calculated by scriptlet expression

    Hi,
              If I set the rtexprvalue subelement of the attribute element in my tld to
              "true", should I be able to dynamically determine the value of my custom tag
              attribute using a scriptlet expression?
              When I include the custom tag reference:
              <prod:getCategory id="category"
              categoryID="<%=request.getParameter("catID")%>" scope="page"/>
              it actually gets written to the html as:
              <prod:getCategory id="category" categoryID="2133" scope="page"/>
              and is not recognized as a jsp tag.
              I am using weblogic 6.0 sp1.
              Thanks in advance!
              daniel
              

    I had the same problem in a design a couple of months ago and could not get around it so I switched the functionality into code and out of the tag lib.
    I take it you are trying to do something like this?
    <%
    String value="hiworld";
    %>
    <mytaglib:saysomething value="<%=value%>"/>

  • Custom tag attribute question

    How to assign value of expression or variable to custom tag attribute in jsp?

    I had the same problem in a design a couple of months ago and could not get around it so I switched the functionality into code and out of the tag lib.
    I take it you are trying to do something like this?
    <%
    String value="hiworld";
    %>
    <mytaglib:saysomething value="<%=value%>"/>

  • How to get value in custom field(Part OF BOL) in search result view.

    Hi All,
    I am new to CRM WEBUI and i am facing issue in populating value in one field of search result view.
    Current requirement is .
    On product f4 , we get search help and search result view.
    one custom field need to be added in search result view ( for eg any description field).
    This description field is already  available in one of z relation  maintained in PRODUCT root object.
    Solution tried so Far:
    1. We enhance one Standard Product structure and add that description field .
    2. Add new  field( description) in result view context node as attribute by using bol attribute.
    3. Customize search result view and display that description field in result.
    By doing above three steps, field is available in  search result view.
    but issue is we are not able to get values.
    1st Approach: write code in getter and setter method . Pass the relation name and get the property of description  field
    in setter method, set the property.
    Issue : we were not able to sort the values on this description field. so scrap this 1st approach
    2nd Approach: In Event EH_Onsearch Help, we try to use collection wrapper to get current value of description
    by using relation name .
    We use component controller to set the value of description since  searchresult view-conext node->result node is bound to one comp controller node.
    but this solution also does not work..
    Please advice us  what approach we should use to get value in description field  and sorting should also work.
    Thanks in Advance.

    Hi Girish,
    1. We enhance one Standard Product structure and add that description field .
    2. Add new  field( description) in result view context node as attribute by using bol attribute.
    3. Customize search result view and display that description field in result.
    By doing above three steps, field is available in  search result view.
    but issue is we are not able to get values.
    1st Approach: write code in getter and setter method . Pass the relation name and get the property of description  field  and by using this approach we are able to get value but sorting was not working so we disable the sorting as it was not required by business.
    if u need sorting on that field.
    then u should go for value node approach and write code for getting value in get set method
    and for sorting also , need to write code.
    This is my understanding on this .
    Please reward if this solution is helpful

  • Custom tag attribute values..

              hi,
              I have created custom tags from my EJB using ejb2jsp tool. I tried the following,
              1 works and the other doesn't,
              a) This works.
              <mytag:foo param1="<%="test"%>" />
              b) this gives me a "ClassCastException" <% String value = "test"; %> <mytag:foo param1="<%=value%>"
              />
              ----++++++ java.lang.ClassCastException: java.lang.Object at javax.servlet.jsp.tagext.TagData.getAttributeString(TagData.java:165)
              at com.niteo.projects.intelXML.xbrl.ejb.jsp_tags._XBRLContentProvider_se tIdTagTEI.isValid(_XBRLContentProvider_setIdTagTEI.java:37)
              at weblogic.servlet.jsp.StandardTagLib.verifyAttributes(StandardTagLib.j ava:443)
              ----++++++
              I have tried all possible tricks, but this doesn't work. Is there something that
              I missed while creating the custom tag Or is it the way I am using the tag..?
              any help pls...
              thx in advance -jay
              

    It seems like you want to be able to clear the default attribute and set an empty attribute in you custom tag. One way around this would be to pass a blank character in. That would force the default to be cleared with the blank. You could take it a step further and trim the attribute value before storing it. Alternatively you could set an overriding attribute such as:
    <slasher:foo name="slasher" ignorewhatever="true" />
    protected String whatever = "some default Value";
    public void setWhatever(String whatever)
         this.whatever = whatever;
    public void setIgnorewhatever(String ignore)
         if(ignore.equals("true"))
              this.whatever = "";
    }Cliff

  • How to get and read a file from META-INF directory

    how to get and read a file from META-INF directory in a EJB project

    Use this.getClass().getResourceAsStream("/META-INF/filename");This should work. Probably, you would need to set the Manifest Class-Path attribute.

Maybe you are looking for