How to evalute the name of an attribute at runtime?

hi, I have a custom tag that accepts dynamic attributes. I would like to pass attributes names that are defined at run time, by EL, but didn't find a way to do it
this is what I tried without success
${name1} <!-- "email" -->
${name2} <!-- "username" -->
<mytags:customtag>
   <jsp:attribute name="${name1}"> some jsp here </jsp:attribute>
   <jsp:attribute name="${name2}"> some jsp here </jsp:attribute>
</mytags:customtag>it seems that jsp:attribute name attribute is rtexprvalue="false", so it doesn't evaluate name1 to "email".
Is there a way to do what I'm trying here?
Edited by: DMD_ANFINI on Apr 12, 2010 2:23 PM

You can use dynamic attributes for custom tags created with tag file. Please see the sample code given below;
<%@ tag body-content=’empty’ dynamic-attributes=’tagAttrs’%>
<%@ attribute name=’optionsList’ type=’java.util.List’ required=’true’ rtexprvalue=’true’ %>
<%@ attribute name=’name’ required=’true’ %>
<%@ taglib uri=”http://java.sun.com/jsp/jstl/core” prefi x=”c” %>
<select name=’${name}’
<c:forEach var=”attrEntry” items=”${tagAttrs}”>
    ${attrEntry.key}=’${attrEntry.value}’
</c:forEach>
>
<c:forEach var=”option” items=”${optionsList}”>
    <option value=’${option}’> ${option} </option>
</c:forEach>
</select>A * R

Similar Messages

  • How to change the name of (Guided procedure) GP Runtime View?

    Hello all!
    At Design time in GP (Guided Procedure), I have added a runtime view at the tab "Runtime Views" named Additional Resources to a GP process.  At runtime, when the process is started,  at the left bar appears the button "Additional Resources". Is there a way to change this name? Any idea can be helpfull :).
    Kindly Regards,
    Luiza

    Hi,
    an other solution is change the block property QUERY_DATA_SOURCE_TYPE from "Table" to "Sub-query" , than change at run time the property QUERY_DATA_SOURCE_NAME.
    First create block and add items
    The QUERY_DATA_SOURCE_NAME will be for ex. "Select 'A' as col1, 'B' AS col2, 'C' as col3 from dual"
    Set into items the column name property to col1 , col2 ...
    At run time change the query to "Select 'Z' as col1, 'X' as col2 , 'Y' as col3 from dual"
    in this way you can change the source of column value.
    Caution because if you change value type from varchar2 to date you must cast date into varchar2.
    May be that this way is valid only for view data not for insert-update, i don't remember.
    bye
    Message was edited by:
    Killernero

  • How to get the name of a Tab at runtime

    Helllo,
    I am using a Tab Strip with 5 Tab pages. At runtime i want to know which tab has the focus at the moment to user hist a button.
    How can i do that
    Bertil

    When we click on a Tab, we would like to fire out to another view. Attached are coding:
      public static void wdDoModifyView(IPrivateRatingMainView wdThis, IPrivateRatingMainView.IContextNode wdContext, 
                                  com.sap.tc.webdynpro.progmodel.api.IWDView view, boolean firstTime)
         IWDTabStrip iwdTabStrip = (IWDTabStrip)view.getElement("tsRatingMain");
         String selectedTab = iwdTabStrip.getSelectedTab();
         crrsLogger.info("selectedTab " + selectedTab);
         wdContext.currentContextElement().setQualitativeTab(selectedTab);
      public void onActionRatingMode(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent, java.lang.String mode )
        String selectedTab = wdContext.currentContextElement().getQualitativeTab();
        crrsLogger.info("onActionRatingMode selectedTab " + selectedTab);
        if (selectedTab.equals("tabQualitative"))
             crrsLogger.info("Execute Fire Plug");
             wdThis.wdFirePlugToLargeCorp();
      But, the problem is, "wdModifyView" is always called first before "onActionRatingMode". So, the value of selectedTab is always refer to the previously called tab.
      Any suggestion is kind appreciated.

  • Jdev - How to set the default format for Attribute Name

    Hi, I am using Jdeveloper 10.1.2.0.0 (build 1811), is it possible to change the format of the attribute name generated such that it follows the name as created in the database?
    For example, if in the database the column name is 'some_column_name' , when you create an entity object, the automatically generated attribute name will become 'SomeColumnName'. Is it possible to make it such that the generated attribute name follow the database column name i,.e 'some_column_name'

    That means i still have to change the name for each attribute?
    Could it make it such that when the entity obejct is created, the name is already following as it is from the database? i.e some_column_name in the database will not become SomeColumnName in the entity object.

  • How to get the name of the current tab.

    Hi Experts,
    I have two tabs in my tab strip and a button common to both the tabs.Can you please let me know how to get the name of the current tab in the event method of the push button.
    Thanks in advance.
    Regards,
    Arun

    1.Declare an Action for OnSelect event of Tabstrip. This event is triggered whenever any change in tab occurs.
    2. Declare an Import Parameter in this method
       Tab type String.
    3. This parameter has value of the selected TAB.
    4. You can set this value in some Attribute in Attribute Tab in this event only (OnSelect):
         wd_this->Att  = Tab.
    Att is the attribute created by you in Attributes Tab of View. ( of type String)
    5. Now the selected Tab ID is stored in this Attribute Att.
    6. In the Onaction of Button , retrieve the selected tab value from this attribute using :
               Data : lv type string.
                lv =  wd_this->Att
    Now lv has your selected TAB ID.
    I hope it would help you.
    Edited by: Saurav Mago on Oct 13, 2009 2:22 PM

  • BOL: How to read the value of an attribut

    Hiii experts,
    I'm new in ABAP programming.
    My intention is to read the value of a context attribut.
    This attribut ist not in form of a struct attribut. To read an struct attribut, I know to get the value, for example:
    value ?= me->typed_context->BP_ADDR->collection_wrapper->get_current( ).
      CHECK value IS BOUND.
      value->get_property_as_value(
        EXPORTING
          iv_attr_name = 'CITY'
        IMPORTING
          ev_result    = value_city).
    But my problem is, that I have an attribut, which you can not find in the BOL browser, because it is not in form of a struct.
    Can anybody help me, how to read the value of this kind of attributs.
    Thank you very much in advance fpr your help,
    John

    Hii Clemens,
    first of all, my concern deals with WebUI.
    I expect to read the value of an attribut. I know how to read the value of an attribut, which can be found with the same description in the bol browser, as you know you can read it with:
    value ?= me->typed_context->BP_ADDR->collection_wrapper->get_current( ).
      CHECK value IS BOUND.
      value->get_property_as_value(
        EXPORTING
          iv_attr_name = 'CITY'
        IMPORTING
          ev_result    = value_city).
    Now, I have an attribut of an context node which has a different name as in bol browser. If I want to read the value with the code above I get an error message. Thatswhy I referenced a collection of the context node to read this attribut.
    Can anybody say me how the value of the attribut, can I use the methode get_property ?
    greetings,
    J

  • How to change the name and description of a wim using DISM

    With Imagex we could update the name and description of the wim with on easy command:
    imagex /info img_file [img_number or
    img_name] [new_name] [new_desc]
    e.g.
    imagex /info Win7Combined.WIM 1 "Win7(x86)" "Windows 7 x86"
    Since the ImageX tool is deprecated in Windows 8 and has been replaced with DISM, can someone explain how to update the name and description with one easy command using DISM like we could with Imagex?

    It looks like this person had the same issue. Have you seen this
    link
    It talks about exporting an Index into a new WIM. Which, in a way, would be renaming it. It's really recreating it and you have to give it a name. But it seems to work.
    Dustin Estes - MCP | www.dustinestes.com

  • How to find the Names of Most costly Views or Most Time consuming views

    Hi All,
    I had a database consisting of almost 200 views,as a part of Optimization process i want to find out the most costlier views.How to do that.Actually i want the names of the VIEWS,so that i can optimize that.Can any one help me out?
    I had one more doubt in our Database a view is created like view A( which is created by joining several tables).so do i need to add index on this view separately or does it take the index of the tables which i joined? And in our Database i  had created
    a VIEW which is derived from other views(the Joining objects are views not tables),so while i select recoreds from this views which is derived from other views it is taking a lot of time.Is tehre any problem with that?

    Please avoid such double post spread over several forums:
    http://social.msdn.microsoft.com/Forums/en-US/bae4042a-10b8-4d12-aa46-88a05ea37a76/how-to-find-the-names-of-most-costly-views-or-most-time-consuming-views?forum=sqldataaccess
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • How to refractor the name of a View Object ?

    I dont see how to change the name of view. It was refractor in the prior version.

    The same operation is used in 11g to rename a VO and works as expected in the most current internal builds.
    --Ric                                                                                                                                                                                                                                       

  • How to change the "name of column" property of an text item in runtime?

    How to change the "name of column" property of an text item in runtime?
    I look the properties of items in help and found nothing about this!
    It's possible?

    Hi,
    an other solution is change the block property QUERY_DATA_SOURCE_TYPE from "Table" to "Sub-query" , than change at run time the property QUERY_DATA_SOURCE_NAME.
    First create block and add items
    The QUERY_DATA_SOURCE_NAME will be for ex. "Select 'A' as col1, 'B' AS col2, 'C' as col3 from dual"
    Set into items the column name property to col1 , col2 ...
    At run time change the query to "Select 'Z' as col1, 'X' as col2 , 'Y' as col3 from dual"
    in this way you can change the source of column value.
    Caution because if you change value type from varchar2 to date you must cast date into varchar2.
    May be that this way is valid only for view data not for insert-update, i don't remember.
    bye
    Message was edited by:
    Killernero

  • How to display the name of my metric in a PivotTable.

    Hi I am working with OBIEE Plus
    How to display the name of my metric in a PivotTable.
    Why when I add a field to the sector of the measures in a PivotTable field name disappears.
    Help please
    Thanks beforehand

    Where are your 'measure labels' ? These show what the metric is.

  • How to list the name of recipient in Sent mail folder

    In the Gmail folder in Mail, is a Sent Mail folder. It lists FROM, SUBJECT, and DATE RECEIVED. My wife is the only account using the Mail appl. She would like to know how to have the name of the mail recipient listed, rather than her name as the sender since she already knows that info.
    Thanks.
    Jerry

    Jerry,
    That should happen automatically in Mail.
    Click the Gmail Sent folder. Where the names of the columns is displayed, there should be a dot next to the first column name. Right-click or control-click to get the menu. Click to check To. If you don't want to see From bring up the menu again and click it to uncheck.
    Done.
    -Wayne
    Message was edited by: ParentalUnit

  • How to get the name of a Data Element of a generic Table!

    Hi guys!
    In my function i have the following import paramenter
    i_outtab type standard table
    now i import a table and i want to get the dataelement of the fields.
    is there a way to do this??

    Hello Thomas
    Perhaps the following sample report may be useful for you.
    *& Report  ZUS_SDN_RTTI_STRUCT_COMPONENTS
    *& <a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1145711"></a>
    *& Thread: How to get the name of a Data Element of a generic Table!
    REPORT  zus_sdn_rtti_struct_components.
    TYPE-POOLS: abap.
    TYPES: BEGIN OF ty_s_outtab.
    TYPES: bukrs    TYPE bukrs.
    TYPES: kunnr    TYPE kunnr.
    TYPES: END OF ty_s_outtab.
    DATA: gdo_data    TYPE REF TO data.
    DATA: gs_outtab   TYPE ty_s_outtab.
    DATA: go_typedescr  TYPE REF TO cl_abap_typedescr,
          go_structdescr  TYPE REF TO cl_abap_structdescr,
          go_datadescr    type ref to cl_abap_datadescr.
    DATA: gs_comp        TYPE abap_compdescr,
          gd_dtel        type string,
          gt_dfies        type ddfields.
    FIELD-SYMBOLS:
      <gs_struct> TYPE ANY.
    START-OF-SELECTION.
      BREAK-POINT.
      GET REFERENCE OF gs_outtab INTO gdo_data.
      ASSIGN gdo_data->* TO <gs_struct>.
      go_typedescr = cl_abap_typedescr=>describe_by_data( <gs_struct> ).
      go_structdescr ?= go_typedescr.
      BREAK-POINT.
      LOOP AT go_structdescr->components INTO gs_comp.
        go_datadescr = GO_STRUCTDESCR->GET_COMPONENT_TYPE( gs_comp-name ).
        gd_dtel = go_datadescr->get_relative_name( ).
        write: / syst-tabix, 'Data element =', gd_dtel.
      ENDLOOP.
    END-OF-SELECTION.
    Regards
      Uwe

  • Every time I download a file to my macbook pro, it saves it to downloads but changes the name and inserts % sign.  Please advise how to correct the name that it is saved under.

    Every time I download a file to my macbook pro, it saves it to downloads but changes the name and inserts % sign.  Please advise how to correct the name that it is saved under.

    Anything Downloaded with a Particular Apple ID is tied to that Apple ID and Cannot be Merged or Transferred to a Different Apple ID.
    Apple ID FAQs
    http://support.apple.com/kb/HE37

  • How to change the name of a BADI Implementation?

    Hello experts,
    Does anyone knows how to change the name of the BADI Implementation? I just create a new Implementation but we need to rename it.
    Thanks in advance,
    AK

    Hi,
    Please go to transaction SE19, enter your implementation name.
    Then go to menu: Implementation -> Rename -> ...
    Regards,
    Ferry Lianto

Maybe you are looking for