Dynamic item labels

What is the best way to get item labels to be dynamic? I would like to store item labels in a table in the database and retrieve them when the page is rendered.
This way I only have to change the label in one place and both the application and other reports based on this data will see the changes.
The only way I could think of is to have item labels like &P1_LABEL1., &P1_LABEL2. and so on and then have a OnLoad process populate all these hidden items.
But this way I am "using up" a bunch of items that count toward the 100-item-per-page limit. If I have 10 real items on the page, using this technique, I would have 20.
Any other ideas?
Thanks

Not sure I understand you, Scott.
If I understand you correctly,
For each item I want to render, I would have
a. Display as Text
b. Actual item
For (a), I would choose to have a blank label and source the item with my dynamic label
For (b), I would again choose a blank label.
I would put items (a) and (b) on the same line (and/or) field.
So, I am really displaying 2 items but making them appear to be 1 "regular" item.
But then the "label" and the item are not really connected to each other, if I move one, the other wont move automatically, etc.
Is that what you are suggesting?
Thanks

Similar Messages

  • Dynamic action to change item label

    Hi All,
    How can I use dynamic action to change item label?
    thanks.

    Hi,
    fac586 wrote:
    Why and when do you want to dynamically change a label? This would have a detrimental effect on usability and accessibility.
    Consider a visually impaired user of your app using a screen reader. The screen reader identifies a checkbox labelled "Free Cake". They like the sound of that, so navigate to the checkbox to tick it. Your dynamic action fires when it gets focus and changes the label to "Give all my money to Fadi".I think this would confuse even a sighted user! I don't know the OP full requirements or constraints but I can bet the OP does not want to change the item label when the user navigates to it.
    I have to say that I don't like forms that change as the user enters data. I think that enabling and disabling fields is OK, but not hiding or showing or changing labels or field types.
    In any case, if you have to do it, an alternative to changing an item label is to have 2 separate items: one hidden and one shown. Then, using some triggering event, you can hide one and show the other.
    Because there are built-in dynamic actions to hide and show items but not to change item labels, one might thing that one approach is more acceptable than the other. However, if those 2 separate items occupy the same spot in the page, from a user point of view (or screen reader for that matter) I don't see any difference between those two approaches (in my view, both bad practices.)
    And because of its lots of nested tables, lack of headings etc, apex pages are not screen-reader friendly anyway... This is an interesting plugin for firefox that shows how your page would be read by a screen reader:
    http://www.standards-schmandards.com/projects/fangs/
    fac586 wrote:
    You can use an "execute javascript" dynamic action type to do it.Yes, you can. But should you?I don't know. As I mentioned above, I don't like the idea. However, as I also mentioned above, I don't know anything about the OP constraints or requirements.

  • Apex Page Input Item Label Conditional Style at run time

    Hi,
    Apex version 4.2.1.00.08
    We have an issue after migrating to apex 4.2.1. We have a select list and use another couple of dummy items to be used as its label instead of giving the text value to the LABEL control. Only one of the dummy items is shown as a label for the select list conditionally based on another value. It was working fine with the earlier versions upto 4.1, but with the introduction of grid in 4.2, its now displaying the select list on a new row (ie the lable in one row and the select list on the next row).
    However, we really would like to solve this by having a way to display the label of the select list either in "required format style" or as an "optional style". The display style should be determined only at runtime.
    Example. Say P100_MY_SELECT_LIST is the select list
    The label for this item is "My Select List Label"
    I have another dummy item P100_DUMMY
    if P100_dummy = 1 then the label "My Select List Label" should be displayed in red and with an * *My Select List LabelOtherwise it should be in black and without * My Select List LabelPlease help how to do this.
    Thanks in advance.
    Regards,
    Natarajan

    Well, I deviated with the various other things, and finally needed to get it fixed now. I find my own solution by having a Label Template which creates an ID for every label of the input item and calling a couple of javascript functions thro dynamic action.
    1) Create a label template "FormFieldDynamic" as follows
    In the template definition "Before Label"
    <img src="#IMAGE_PREFIX#requiredicon_status2.gif" alt="Required Field Icon" /><label for="#CURRENT_ITEM_NAME#" id="#CURRENT_ITEM_NAME#_LABEL" tabindex="999" class="itemLabel">in the "after label"
    </label>Note, I am having the image for the * always with the laebl and creating an ID for the label with id="#CURRENT_ITEM_NAME#_LABEL" .
    I have created a couple of javascript function to show the label dynamically as required or optional.
    function setLabelRqd(item) {
         var v = item+'_LABEL';
         var pid = document.getElementById(v);
         if (!((pid===null)||(pid===undefined))){
              pid.style.color = "red";
              $('#'+v).prev().show();
    function setLabelOpt(item) {
         var v = item+'_LABEL';
         var pid = document.getElementById(v);
         if (!((pid===null)||(pid===undefined))){
              pid.style.color = "black";
              $('#'+v).prev().hide();
    }Use the template if the input item (label) is dynamically set as Required or Optional at runtime based on a value of another item.
    How to:
    1.     Select the template FormFieldDynamic for the input item.
    2.    Create a dynamic action triggering on the change event of the page item which holds the conditional value to set the input item label as required or as optional.
    Under the When Section
    a.     Event => Change
    b.    Selection Type => Item(s)
    c.     Item(s) => PXXX_ITEM_NAME (The item that holds the conditional value to set the label for the input item
    d.    Condition => equal to
    e.     Value => Enter the value  for which the label needs to be displayed in Required format.
    f.     Set True Action
                                                              i.    Action => Execute Javascript Code  (Identification)
                                                             ii.    Fire on Page Load => checked (Execution Option)
                                                           iii.    Code => setLabelRqd(‘PXXX_ITEM_NAME’);  (Settings)  /*Call the javascript function to set the label as required*/
                                                            iv.    Selection Type => Item(s) (Affected Elements)
                                                             v.    Item(s) => PXXX_INPUT_ITEM1[,PXXX_INPUT_ITEM2]…
    g.     Set False Action
                                                              i.    Action => Execute Javascript Code  (Identification)
                                                             ii.    Fire on Page Load => checked (Execution Option)
                                                           iii.    Code => setLabelOpt(‘PXXX_ITEM_NAME’);  (Settings) /*Call the javascript function to set the label as optional*/
                                                            iv.    Selection Type => Item(s) (Affected Elements)
                                                             v.    Item(s) => PXXX_INPUT_ITEM1[,PXXX_INPUT_ITEM2]…It finally works for me :) and hope this will be helpful to others too. I will greatly appreciate anyone to mention it here if this helps for him.
    Thanks,
    Natarajan

  • Change item Label based on Another item's value

    Hi guys,
    I need to set an item label (A) based on the value of another item (B). I did the following:
    I Created a dynamic action.
    When B changes:
    1- submit the value of B
    2- Refresh item A
    The label of the item A is : myitem &B.
    Any ideas ????
    Best Regards,
    Fateh

    Fateh wrote:
    Ok... Thanks a lot... but before closing the thread and for better understanding.
    I put this code on Execute when Page Loads:
    $("#P1_A").change(function(){
    if($v(this)=="Rent"){
    $('#mylabel > label > span').text('Is it for Sale also');
    }else{
    $('#mylabel > label > span').text('Is it for Rent also');
    }However, the label does not change. Any ideas why this is not working????
    Regards,
    Fateh
    $v(this)
    you are mixing jquery and apex API, it won't work
    and missing *});* at the end, and when adding to the page load you should wrap them in $(document).ready( code here.... });
    $(document).ready(function () {
         $("#P1_A").change(function () {
              if ($(this).val() == "Rent") {
                   $('#mylabel > label > span').text('Is it for Sale also');
              } else {
                   $('#mylabel > label > span').text('Is it for Rent also');
    });

  • Dynamically change label template

    I'm using Apex 4.0.2 and I'm trying to dynamically change the label template for a field from Optional to Required.
    I have one form and in a specific situation (known on page load) an item on this page changes from optional to required. I have a conditional validation on this item, so the user gets an error when the item is null and the condition is met.
    But I would also like to change the item label template from Optional to Required. Is this possible in some way?
    Maybe it is possible or easier with a different template. Currently they are:
    Required Before Label  template:
    <label for="#CURRENT_ITEM_NAME#" tabindex="999"><img src="#IMAGE_PREFIX#apps/required.gif" alt="#VALUE_REQUIRED#" tabindex="999" /><span class="required">
    Optional template:
    <label for="#CURRENT_ITEM_NAME#" tabindex="999">Edited by: InoL on Aug 1, 2011 4:09 PM

    I got the same effect (more or less, just adding a star in front of the label) with jquery:
    $("label[for='P4_REL_ID']").prepend('<img tabindex="999" alt="Value Required" src="/i/apps/required.gif">');

  • Item Label with special Character

    Hi All,
    I trying to Conditionly  name the ladel of an item with two different special character accoding to the condition
    Two characters are
    asterisk    *            
    Diamond  -  equivalent HTML code is & #9830;
    {Code}
       IF (codition is true )
       THEN
          :P1_X := '*';
       ELSE
          :P1_X := '<sup>&#9830;</sup>';
       END IF;
    {Code}
    When i try to sustitute this value to my Item label using &P1_X , it is displaying the whole value (<sup> &#9830;</sup>) instead diamond symbol.
    Can any one help me out in this ?
    Thanks in advance for your help.
    Regards,
    Aru

    The label can be change on page load using some jQuery, for example:
    $('[for="P1_X"] SPAN').html('♦');and
    $('[for="P1_X"] SPAN').html('');You may need to adjust it based on your item template.
    Depends of your condition, the label can be set using Dynamic Action or a javascript function called on page load (you may need to set the condition True/False in an hidden item on your page so the JS will be able to check it).

  • Dynamic tab labels

    I would like to have a dynamic tab label for use of multiple languages.
    Now I use condional tabs with text labels, which works for two languages but may be prohibitive when there are more languages.

    Not sure I understand you, Scott.
    If I understand you correctly,
    For each item I want to render, I would have
    a. Display as Text
    b. Actual item
    For (a), I would choose to have a blank label and source the item with my dynamic label
    For (b), I would again choose a blank label.
    I would put items (a) and (b) on the same line (and/or) field.
    So, I am really displaying 2 items but making them appear to be 1 "regular" item.
    But then the "label" and the item are not really connected to each other, if I move one, the other wont move automatically, etc.
    Is that what you are suggesting?
    Thanks

  • Setting colors for item labels in JFreeChart (WaferMapRenderer)

    Hi,
    first of all, sorry for posting a JFreeChart related posting on this forum, but I didn't get a solution right now (I even didn't find anything useful on the JFreeChart website/forum). Here's my question...
    I'm trying to set the color for item labels in the legend but with no success.
    Here's a code example:
    final JFreeChart chart = ChartFactory.createWaferMapChart(
        "Wafer Map Demo",         // title
        dataset,                  // wafermapdataset
        PlotOrientation.VERTICAL, // vertical = notchdown
        true,                     // legend          
        true,                    // tooltips
        false
    WaferMapPlot plot = (WaferMapPlot) chart.getPlot();
    WaferMapRenderer renderer = new WaferMapRenderer();
    renderer.setSeriesItemLabelPaint(0, Color.red);
    renderer.setSeriesItemLabelPaint(1, Color.blue);
    plot.setRenderer(renderer);The default behavior of the WaferMapRenderer is also strange because the item label as well as the item marker is painted black so you cannot distinguish different fields of the wafer map. Is this a bug or am I doing something wrong (or missing somehting)?
    Any help would be greatly appreciated.
    Thanks and best regards,
    - Stephan

    Your folder action script doesn't work because of one simple error:
    set label index of every item of entire contents of processFolder to 7
    Nowhere in your script is 'processFolder' defined, so AppleScript has no idea what you're trying to do.
    Given that you (correctly) iterate through added_items, the correct format would be:
    on adding folder items to this_folder after receiving added_items
      repeat with item_ in added_items
        tell application "Finder"
          set label index of item_ to 7
        end tell
      end repeat
    end adding folder items to
    In other words, this changes the label index of each item just added.
    That should work provided you're dropping files into this folder. If you're dropping folders then this would set the label index of the folder itself, but not necessarily the items within that folder. For that you'd need to add a check to see if item_ was a folder and add code to handle folders.
    Also note that this kind of folder action will only work on the folder itself - that is, if you have folder A that contains subfolder B, then dropping a file into subfolder B won't trigger the script and won't change that item's label. To do that you'd have to attach your folder action to subfolder B.

  • Problem with Item Labels in ORacle 10g

    Hi,
    We have unchecked the item labels in oracle discoverer 10g. when we create the portlet(after moved server from 10.1.0.2 to 10.1.2), it showing item labels for the discoverer report.
    we dont want item labels to be displayed in portlets.
    Can one any tell us why this occurs?
    Thanks in advance.

    Hello,
    We have unchecked Item Labels (not to display the column names in the cross tab) in Discoverer plus (Tools ----> Options -----> Sheet -----> Show Item Labels).
    And created the discoverer worksheet portlet in Oracle Portal with Options to display the cross tab.
    The Item Labels are displaying in this discoverer worksheet portlet.
    We donot want to display the Item Labels.
    How can i achieve this?
    Thanks,

  • App. Express -- Change font size in the item label.

    I would like to size the item label so I did this and it did not work
    in the label I put <span style="font-size:12px;">ITEM 1</span> and
    <span style="font-weight:bold;">ITEM 1</span>
    What wrong?

    Hello,
    The basic “trick” here is to duplicate the proper label template (you can of course change the original label template, but that’s less advisable) in order to add an ID to the text/link part.
    In my example, the template is base on the “Optional Label with Help” template, and the “Before Label” field contains the following:
    <label for="#CURRENT_ITEM_NAME#" tabindex="999"><a class="t2OptionalwithHelp" id="L_#CURRENT_ITEM_NAME#" href="javascript:popupFieldHelp('#CURRENT_ITEM_ID#','&SESSION.')" tabindex="999">In order to maintain ID uniqueness, the new ID just adds “L_” to the item name.
    Now I have direct access to the text/link, and I can manipulate it using JavaScript. In the example, I added the following to the region footer:
    <script type="text/javascript">
    $x('L_P160_ITEM2').style.fontSize = '20px';
    $x('L_P160_ITEM3').style.fontSize = '30px';
    $x('L_P160_ITEM3').style.color = 'green';
    </script>Regards,
    Arie.
    Hi Carl,
    As usual I was busy typing and didn’t see your reply. I agree that a specific example would be the best and easiest way to help.
    Message was edited by:
    ageller1

  • How to add one new tab at item label in me21n

    hi experts,
    i  am very new in badi .can any one please tell me how to add
    one tab in me21n at item label. i already checked  sample code for
    badi me_gui_po_cust. i create one implementation and write same code.
    this code is coming in debugging mode but cant see that tab while executing 
    me21n.
    please help me out.
    thanks in advance
    manasi

    Hi Manasi,
    acording to me you are on the right path.Some help
    1.ME_GUI_PO_CUST.
    For Creating Customer own Screen - Purchase Order..
    Details :
    Go to the sample code of this BADI.
    For this create a Function group with the screen that u want in PO.
    In the First method u want to append the screen . There is one parameter im_element.
    In this parameter u can mention that in which part u want the screen .Header/Item.
    2. ME_PROCESS_PO_CUST
    In this BADI u can Check the Complete PO at various Level.
    ie Header Level ,Item Level, At the time of Save, Post .
    Now Create a Include in your Function group and paste the below code.
    DATA: call_subscreen TYPE sy-dynnr, "#EC NEEDED
    call_prog TYPE sy-repid, "#EC NEEDED
    call_view TYPE REF TO cl_screen_view_mm, "#EC NEEDED
    call_view_stack TYPE REF TO cl_screen_view_mm OCCURS 0, "#EC NEEDED
    global_framework TYPE REF TO cl_framework_mm, "#EC NEEDED
    global_help_view TYPE REF TO cl_screen_view_mm, "#EC NEEDED
    global_help_prog TYPE sy-repid. "#EC NEEDED
    FORM SET_SUBSCREEN_AND_PROG *
    --> DYNNR *
    --> PROG *
    --> VIEW *
    --> TO *
    --> CL_SCREEN_VIEW_MM *
    FORM set_subscreen_and_prog USING dynnr TYPE sy-dynnr
    prog TYPE sy-repid
    view TYPE REF TO cl_screen_view_mm.
    call_subscreen = dynnr.
    call_prog = prog.
    call_view = view.
    ENDFORM. "set_subscreen_and_prog
    Hope to solve ur probs.....
    Regards
    Renu

  • Problem in displaying text inside the item label - JFREECHART

    Hi All,
    I dont know whether this is the right place or not to post the queries related to jfreechart here .
    I am facing a problem in displaying the text inside the item label in jfreeChart. I am trying to print the text in 2 lines one below the other at the top of each bar in waterfall chart.
    Please find the code below in next post. The problem i am facing is it is neglecting the new line character . If any one knows how to display the text one below the other please help me out .
    Thanks in advance .
    Regards,
    Diw

    i am facing the problem in pasting the complete code as its exceeds the message text limitiation, please find the link below for the code .
    http://www.java-forums.org/java-2d/12087-problem-displaying-text-inside-item-label-jfreechart.html#post36648
    Early response will be appreciated . Thanks in advance
    Regards,
    Diw
    Edited by: Diw on Sep 30, 2008 11:15 AM
    Edited by: Diw on Sep 30, 2008 11:16 AM

  • SQL Subscription field shows * only with Dynamic Text Label in SQL query

    We are using Hyperion Analyzer 7.2.x for showing budget and actual data. I have to show this financial data based on the security e.g. person in IT can see only IT dept. data. Hence I want to use dynamic text label <<userid>> for the security based on the person logging in to Analyzer.
    But when I use dynamic text label <<userid>> in the SQL query in SQL Spreadsheet, SQL Subscription field shows * only selection option. Does anyone have idea how to solve this problem?
    Thanks in advance for your help.
    -SV

    Hi
    Okay i know this is a bit crazy way.....but i think this is the solution for your issue.
    Create a report without the where clause (<<useris>>) then add a filter (sql subscription) then you can find all the values that are there in the SQL field (try to increase the query limit it is set to 250 as default) then edit the spreadsheet and add the where clause (<<userid>>).
    This will help you having the filter and the dynamic text label. I think there is an issue when you try to filter it with a where clause.
    Hope it helps.
    CK

  • Dynamic Items - Restoring values on error

    I've got a page with some dynamic items. When I display a error on the page the values do not restore to reflect changes that the user made, rather the values stored in the DB. This makes sense as my code does not check to see if a error occurred.
    I'd like to check if a error occurred and if it did I can restore the user changes using the htmldb_application.g_fxx(x) function. So I'm wondering how do I know if a error occurred? i.e. is their a variable like the REQUEST variable which will be set if a error occurred?
    Now a bit on a side topic, when dealing with error validation of dynamic items I run into the following issue. I do the validation through one pl/sql check. It checks that all the fields have values in it. Imagine there are 5 fields (1 through 5), and the first 2 are empty. My error message says "Field 1 is empty... Field 2 is empty"... That all works but the page just says "1 error has occurred" and I have to list all the problems under that 1 error. I'd like it say "2 errors have occurred" instead. How can I do that when I only have 1 validation function? Is their a variable that I can increment for each error I find?

    update

  • Page Item Labels

    How do I refer to a page item label? I want to hide it (along with its associated page item) by using html_HideElement.
    Thanks,
    Chris

    Chris,
    You know, it's never too early to start using jQuery. If you put an example what you're trying to do on apex.oracle.com, provide the workspace name, and valid credentials, I'll jump into the application and show you how to do this.
    Regards,
    Dan
    http://danielmcghan.us
    http://sourceforge.net/projects/tapigen

Maybe you are looking for

  • Windows 7 Desktop synchronisation - Windows cannot access \\server\users\name\desktop

    Hi there My client has a laptop which won't load the desktop when disconnected from the network. When you log on (while disconnected) you get the error "Windows cannot access \\server\users\name\desktop" Works as expected while connected to the netwo

  • Mega 180 TV Card---the straight scoop...

    There seems to be a lot of confusion as to what TV card and what TV card drivers work well in the Mega 180.   After a whole bunch of trial and error----here's what seems to be the scoop. the dope, the real deal----to the best of my knowledge..... ---

  • Making Pages the Default

    Is it possible to have Pages '09 serve as the default application to open documents? Whenever I receive a word document from someone and try to open it, it opens it in TextEdit. I would prefer that it opened it in Pages so that I could avoid the step

  • Steps for creating pop-up text on a specific customer when creating a order

    We want to be able to have a pop-up text for some customers, for instance informing the user to mark the order a special way. How is this done? Also, if we want for some customer always mark the PO number (VBKD-BSTKD) with the same reference, how can

  • Project -  need help rather quickly

    I am doing a 2 minute/ish long small project which will involve images flowing across the screen......with text which appears over them. Thats it taken down to basics. http://www.coremelt.com/products/products-for-final-cut-studio/imageflow-demo-re e