Displaying "Required Label with Help" icon dynamically

Hi,
I have an item say 'Dept Name', P1_DEPT_NAME
This field is mandatory in case of CREATE and optional in case of UPDATE.
- so in case of CREATE, I need to put the ICON (Required Label with Help) along with the Label 'Dept Name'
- in case of UPDATE, I don't need the ICON (Required Label with Help) along with the Label 'Dept Name' as it is an optional field.
How can I change the label dynamically.
the path of the icon is shown below but don't know where to put this as per my requirement.
<img src="#IMAGE_PREFIX#themes/theme_12/required.gif" alt="Required Field" />Thanks,
Deepak

Thanks..Shijesh
I have put the following code in Region Footer.
<script type="text/javascript">
var req =  $v('pRequest')  // getting the request
if (req == 'CREATE')    // if request = CREATE
   document.getElementById("IMG_ID").src ="<img src=#IMAGE_PREFIX#themes/theme_12/required.gif/>";       //set the image src to create image icon  
else
   document.getElementById("IMG_ID").src ="<img src=#IMAGE_PREFIX#themes/theme_12/optional.gif/>"; // set the image src to update icon
</script>Also, have update the item label with the following -
<img src="" id="IMG_ID" />
But images are not coming up.
also, every time either CREATE or UPDATE...it's going to the else part..that means it doesn't identifying the REQUEST value, I have checked couple of times but I am passing the exact REQUEST value.
Thanks,
Deepak

Similar Messages

  • Apex 3.0 Q: "Optional Label with Help" default when creating new form?

    When I create a new application, usually one of the first things I do is set the default item label to "Optional", so I don't have the annoying popup help link.
    Now, when you create a new Form region, based on a table, for all the items the label is set to "Optional label with help". Am I right in hoping this is something that was overlooked when developing Apex, and that it will be fixed in version 3.0, so that it sets the items to the default label as set in the Shared Components?
    And is there a way to change the labels for a lot of items at the same time, other than changing the theme templates?

    AFAIK, label help in default manner is based on column coments of a table.
    Later there is now way to easy reedit these values but manually...

  • Change the popup window size in the "optional label with help" template?

    G'Day Apex/javascript gurus,
    I am using Apex 4.0 where I coded an HTML table for help text in one item. Now, when an user click for help in this item then the HTML table is bigger than the size of the pop up window so the client has to re size it a bit to see it fully. To fix this, I tried to create a new "optional level with help" template where I can control the size of the pop up window and make it bigger to fit my HTML table so the client does not have to resize but I could not find any parameter in the original template:
    <label for="#CURRENT_ITEM_NAME#"><span class="t9optionalwithhelp"> "javascript:popupFieldHelp('#CURRENT_ITEM_ID#','&SESSION.')" tabindex="999" that help me to achieve that
    I am not an expert in javascript but I appreciate greatly if somebody here could help me to create a new label (with help) template where I can control the size of the popup window.
    Kind regards
    Carlos
    Edited by: creyes on Aug 1, 2011 1:22 AM

    Hello Carlos,
    You can overload the APEX javascript with your own, on the page you want it to happen. You can do that in the Page Definition - Function and Global Variable Declaration.
    Copy the below code into there and change the width and height of the popup.
    function popupFieldHelp(pItemId, pSessionId){
        // Show jQuery div based dialog if not running in screen reader mode, if not fall back to old popup
        if (!$x('pScreenReaderMode')) {
            apex.jQuery.getJSON(
            'wwv_flow_item_help.show_help?p_item_id=' + pItemId + '&p_session=' + pSessionId + '&p_output_format=JSON',
            function(pData){
              var lDialog = apex.jQuery("#apex_popup_field_help");
              if (lDialog.length===0) {
                // add a new div with the retrieved page
                lDialog = apex.jQuery('<div id="apex_popup_field_help">'+pData.helpText+'</div>');
                // open created div as a dialog
                lDialog
                  .dialog({
                    title: pData.title,
                    bgiframe: true,
                    width: 500,
                    height: 350,
                    show: 'drop',
                    hide: 'drop' });
              } else {
                // replace the existing dialog and open it again
                lDialog
                  .html(pData.helpText)
                  .dialog('option', 'title', pData.title)
                  .dialog('open');
        } else {
            popupFieldHelpClassic(pItemId, pSessionId);
        return;
    }; // popupFieldHelpHope that makes sense,
    Dimitri
    http://dgielis.blogspot.com
    http://www.apex-evangelists.com

  • How to display a button with an icon?

    Hi,
    I'd like to display an SAP-icon on a button.
    In this thread How can I show an Icon in the tapStripItem-title?
    Thomas Jung gave the following example:
    > I don't know if this definetely works with tabstrips
    > items but it does work with buttons and toolbar
    > buttons.  What I do is create a BEE and render that
    > to a string. I then use that string as the text of
    > the element I want to place my image into:
    >
    >   <%
    >   data image type ref to cl_htmlb_image.
    >   data: image_string type string.
    >   create object image.
    >   image->id = `UserSelectionCancel2`.
    >   image->src = cl_bsp_mimes=>sap_icon( `ICON_CHECKED` D`).
    >   image->tooltip = ``.
    >   clear image_string.
    >   image_string = image->IF_BSP_BEE~RENDER_TO_STRING( G( page_context ).
    >   %>
    > <xhtmlb:toolbarButton id            = "UserSelectionCancel"
    > onClientClick = "closeiframe();"
    > enabled       = "<%= enabled %>"
    > text          = "<%= image_string %>" />
    I didn't find anything else about this topic and
    tried to adopt this for a button, but that doesn't work for me either.
    <htmlb:button id            = "byButt"
       text    = "<%= image_string %> ENTER"
       onClick = "myClickHandler"  />
    Is there a way/documentation to get this done?
    Thanks in advance.
    Cheers.
    -Alf

    > This technique is really just using a BEE, there is
    > documentation on the BEE concept in the online help
    > and Brian McKellar has a weblog on the subject as
    > well.
    OK, I think I get the idea. Will check the stuff. Thanks.
    > Notice the strange D at the end of the line. This
    > isn't in the original posting. Perhaps this is just
    > bad cut and paste.
    Just bad copy paste. Yes.
    > You say that this isn't working for you - but you
    > don't describe the results. Is there an error?  Does
    > it render anything in the button at all?  Does the
    > raw HTML get rendered?
    I just saw coding in the button.
    > You want to make sure that the
    > text doesn't get encoded - which would cause the HTML
    > source to display instead. On the htmlb:button you
    > will want to set the attribute encode = FALSE.
    OK, that was right on spot. This shows me the Icon! Strike!
    > Also I am not sure that you can also pass in text
    > with the image like that.  You might have to create a
    > full BEE and add the image and a textView separately
    > into the BEE.  Then render the entire BEE to a string.
    I'll check the documentation on BEE and give it a try.
    Thanks for your answer.
    Thats a starting point for me.
    Alf

  • Display the name with help of f4

    Hi Experts,
    I want to display name of customer when i select customer no. with F4 in dialog program.
    Best Regards.
    Pravin

    Hi,
    see this code.
    TABLES:kna1.
    data:BEGIN OF itab OCCURS 0,
      kunnr like kna1-kunnr,
      name1 like kna1-name1,
      END OF itab.
    SELECT-OPTIONS:s_kunnr for kna1-kunnr.
    AT SELECTION-SCREEN on VALUE-REQUEST FOR s_kunnr-low.
    SELECT * from kna1 into CORRESPONDING FIELDS OF TABLE itab UP TO 20 rows.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
    *     DDIC_STRUCTURE         = ' '
          RETFIELD               = 'KUNNR'
    *     PVALKEY                = ' '
         DYNPPROG               = sy-repid
         DYNPNR                 = sy-dynnr
         DYNPROFIELD            = 'S_KUNNR-LOW'
    *     STEPL                  = 0
    *     WINDOW_TITLE           =
    *     VALUE                  = ' '
         VALUE_ORG              = 'S'
    *     MULTIPLE_CHOICE        = ' '
    *     DISPLAY                = ' '
    *     CALLBACK_PROGRAM       = ' '
    *     CALLBACK_FORM          = ' '
    *     MARK_TAB               =
    *   IMPORTING
    *     USER_RESET             =
        TABLES
          VALUE_TAB              = itab[]
    *     FIELD_TAB              =
    *     RETURN_TAB             =
    *     DYNPFLD_MAPPING        =
    *   EXCEPTIONS
    *     PARAMETER_ERROR        = 1
    *     NO_VALUES_FOUND        = 2
    *     OTHERS                 = 3
      IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    rgds,
    bharat.

  • Label with two icons

    Hi.
    I need to add two icons to a label.
    Any suggestion?
    Thanks in advance.
    Pedro

    You mean like this?
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.net.URL;
    public class CombinedIconTest extends JFrame
        public static class CombinedIcon implements Icon
            enum Orientation
            {HORIZONTAL, VERTICAL};
            public CombinedIcon(Icon first, Icon second)
                this(first, second, Orientation.HORIZONTAL);
            public CombinedIcon(Icon first, Icon second, Orientation orientation)
                assert first != null : "The 'first' Icon cannot be null";
                assert second != null : "The 'second' Icon cannot be null";
                first_ = first;
                second_ = second;
                orientation_ = orientation == null ? Orientation.HORIZONTAL : orientation;
            public int getIconHeight()
                if (orientation_ == Orientation.VERTICAL)
                    return first_.getIconHeight() + second_.getIconHeight();
                else
                    return Math.max(first_.getIconHeight(), second_.getIconHeight());
            public int getIconWidth()
                if (orientation_ == Orientation.VERTICAL)
                    return Math.max(first_.getIconWidth(), second_.getIconWidth());
                else
                    return first_.getIconWidth() + second_.getIconWidth();
            public void paintIcon(Component c, Graphics g, int x, int y)
                if (orientation_ == Orientation.VERTICAL)
                    int heightOfFirst = first_.getIconHeight();
                    int maxWidth = getIconWidth();
                    first_.paintIcon(c, g, x + (maxWidth - first_.getIconWidth())/2, y);
                    second_.paintIcon(c, g, x + (maxWidth - second_.getIconWidth())/2, y + heightOfFirst);
                else
                    int widthOfFirst = first_.getIconWidth();
                    int maxHeight = getIconHeight();
                    first_.paintIcon(c, g, x, y + (maxHeight - first_.getIconHeight())/2);
                    second_.paintIcon(c, g, x + widthOfFirst, y + (maxHeight - second_.getIconHeight())/2);
            private Icon first_;
            private Icon second_;
            private Orientation orientation_;
        private double angle = 0.0;
        public CombinedIconTest() throws Exception
            super("Combined Icon Test");
            setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            getContentPane().setLayout(new GridLayout());
            final String imageRoot = "http://www.stat.uga.edu/images/new_images/fracons/";
            URL url1 = new URL(imageRoot + "EYEFLOW0.GIF");
            URL url2 = new URL(imageRoot + "BAY0.GIF");
            URL url3 = new URL(imageRoot + "CAVE0.GIF");
            URL url4 = new URL(imageRoot + "FAN030.GIF");
            final Icon icon = new CombinedIcon(new CombinedIcon(new ImageIcon(url3), new CombinedIcon(new ImageIcon(url1), new ImageIcon(url2), CombinedIcon.Orientation.VERTICAL)), new ImageIcon(url4));
            final JPanel panel = new JPanel()
                    setOpaque(true);
                    setBackground(Color.CYAN);
                public void paintComponent(Graphics g0)
                    super.paintComponent(g0);
                    Graphics2D g = (Graphics2D)g0;
                    double x0 = getWidth()/2;
                    double y0 = getHeight()/2;
                    g.rotate(angle, x0, y0);
                    icon.paintIcon(this, g, (getWidth() - icon.getIconWidth())/2, (getHeight() - icon.getIconHeight())/2);
                public Dimension getPreferredSize()
                    return new Dimension(200, 200);
            getContentPane().add(panel);
            final JLabel labelWithCombinedIcon = new JLabel("Combined Icon", icon, JLabel.RIGHT);
            getContentPane().add(labelWithCombinedIcon);
            pack();
            new javax.swing.Timer(1000/8, new ActionListener()
                public void actionPerformed(ActionEvent event)
                    angle += Math.PI/32.0;
                    panel.repaint();
            }).start();
        public static void main(String[] args) throws Exception
            new CombinedIconTest().setVisible(true);
    }

  • Template "No Label" does display the label

    I do not want a label for an item, so I set the label template to "No Label" but when the page is run the label is present. This is obviously an error. I also do not want a blank label occupying a table cell but the item to occupy the next available table cell. Example want to to prompt the user to enter a measurement and measurement unit e.g. Temperature and Temperature Unit
    The first item is a Text Field item has Label "Temperature:" and template "Optional Label with Help"
    The second item is a Select List which I want displayed to the right of the Temperature field item and the label "Temperature Unit" is not to be used and I want the item in the next available HTML table cell to the right of the Temperature item.
    The "No Label" template does not appear to work as it does display the "Temperature Unit" label in the cell to the right of the Temperature field item. I know I can blank out the "Temperature Unit" label but then I have a blank cell between the temperature value and the temperature unit.
    Thanks

    I agree... I think that the class t16NoLabel (in my case) is missing display:none or something like that.
    In any case, the label will still occupy a table cell, even if not displayed. To do what you want I usually put the label above the fields, so each field is displayed next to each other.
    Or you can set the property Begin On New Field = NO for the measurement unit field.

  • Make a button with an icon

    Hi all.
    I have a new problem. I want to make a button as an icon e.g. when I push a button to open a file I want to display the button with the icon.
    I'm on devsuite 10g.
    Can someone tell me which are the steps to follow to do this???
    Thank,
    Fabrizio

    I have restarted the form builder and the http
    listener but I don't see the icon on my button.
    Here is the value of my
    UI_ICON_EXTENSION
    .gif;.jpg;.ico;.GIF;.JPG;.ICO
    And this is the value of my
    UI_ICON
    c:\oracle\devsuite10g\reports\plugins\resource;
    C:\ORACLE\devsuite10g\cgenf61\ADMIN\ICONS\PC;
    c:\oracle\devsuite10g\forms\java\icone.jar
    Fabrizioyou cause a Vertigo for your Forms Builder :-)
    Try to specify only one extension, .ico in Forms Builder are more accurate in size. Try it.
    Tony

  • Help Link -Dynamic display

    Hi All,
           I have a few dynamic requirement regarding the portal help link.
            I wanted to display the help content dynamically.
    My scenario is like this.
    If I am in page Google in the portal content area when i click Help I should be able to sdispaly about Google in a seperate window.
    If I am in page yahoo in the portal content area when i click Help I should be able to sdispaly about yahoo in a seperate window.
    By editing the default framwork page and giving the help url to my requirement I can give only one url under navigation.But my requirement is dynamic which will be depending on my page which I browse.
    I also opened Headeriview.jsp from PCD folder and found the javascript method for displaying help.Is there any way where in i can pass the context of my page iview dynamically to the help function in headeriview.jsp.
    Does Portal support this?
    Helpful answers will be rewarded.
    Regards,
    B.Narayanan

    Hi Narayanan
    Y dont u try with URL iviews..by passing links to that iview. i would strongly feel that..that is not the feasible solution ur going for...
    Its just my suggestion
    rgds
    pradeep

  • Dynamic Labels with Datepicker..

    Hiya folks,
    I need to have a dynamic label for a page item, and am coming up lacking....
    Here is the situation:
    APEX 4.0, running on Oracle 10g..
    I have a datepicker control (item is a due date). I am using a hidden item to store the label and I setup the value of this item when it is displayed via a simple sql select.
    If the due date is PAST the system date, then I set the label to Item Is Past Due.
    If the item due date is within 7 days of the system date I change the label to Item Due within 7 Days.
    If none of these are true then I set the label to Due Date.
    However, if the user changes the date via the datepicker, I need to have the label updated (and the the hidden item) to show the change (or not).
    I tried a dynamic action on the datepicker, but it did not seem to fire on a change event always, and would NOT refresh the label with the new value.
    Do I need to submit the page to get the label to update?
    Thank you,
    Tony Miller
    LuvMuffin Software

    Hello Tony,
    >> I am using a hidden item to store the label and I setup the value of this item when it is displayed via a simple sql select.
    If you need to refresh a page item, without submitting the page, based on a result of a SQL query, it seems that your only option is to use AJAX (as the SQL can only run on the server side, and you don’t want to submit the page).
    The old, but still good, fashion way is to define an onchange event on the Datepicker item. This event is fired every time a changed value is passed from the Datepicker into the input field of the item. Simple and effective.
    I’m no expert in Dynamic Actions but I can tell you that if you set the When Event to Change it is fired when the Datepicker changes the current date. With the Action option of Execute JavaScript Code you can probably also trigger an AJAX process.
    >> Do I need to submit the page to get the label to update?
    No. You can use AJAX, either directly or through DA.
    Regards,
    Arie.
    &diams; Please remember to mark appropriate posts as correct/helpful. For the long run, it will benefit us all.
    &diams; Author of Oracle Application Express 3.2 – The Essentials and More

  • Using Search Help with ALV and Dynamic context node

    The topic subject already describes my situation.
    I have to create, populate and remove context nodes at runtime, and bind them to an ALV, to let user display the data or modify the data. The nodes I create are always typed with a table name, but the table name is of course, dynamic.
    This is all working: what's not working is help for entries inside the ALV; since the table has foreign keys and domains with check tables or fixed values, I expected that search helps were detected and managed by the framework.
    Instead, no help search is displayed except the input help based on data-type of the one "Date" input fields.
    I think I have to work on the dynamic node creation, and not on the ALV itself, since the latter only takes the node/attributes information, but i could be wrong. I tried with both the two following codings:
      CALL METHOD lo_nd_info_root->add_new_child_node
        EXPORTING
          static_element_type          = vs_tabname
          name                         = 'SAMPLE_NODE_NAME'
    *    is_mandatory                 = abap_false
    *    is_mandatory_selection       = abap_false
         is_multiple                  = abap_true
         is_multiple_selection        = abap_false
    *    is_singleton                 = abap_false
          is_initialize_lead_selection = abap_false
          is_static                    = abap_false
        RECEIVING
          child_node_info              = lo_nd_info_data .
    cl_wd_dynamic_tool=>create_nodeinfo_from_struct(
          parent_info = lo_nd_info_root
          node_name = 'SAMPLE_NODE_NAME'
          structure_name = vs_tabname
          is_multiple = abap_true ).
    The result is the same...is there any way to let the ALV know what search helps it has to use, and doesn't force me to manually build a VALUE_SET to be bound on the single attributes? There are many tables, with many fields, and maintaining this solution would be very costly.

    I have checked with method GET_ATTRIBUTE_VALUEHELP_TYPE of interface IF_WD_CONTEXT_NODE_INFO, on an attribute which i know to have a search help (Foreign key of a check table).
    The method returns 'N', that is the constant IF_WD_VALUE_HELP_HANDLER~CO_VH_TYPE_NO_HELP. So, the framework was not able to find a suitable search help.
    Using method GET_ATTRIBUTE_VALUE_HELP of the same interface, on the same attribute, returns me '111', which is constant C_VALUE_HELP_MODE-AUTOMATIC.
    Therefore, the WD framework knows it has to automatically detect a value help, but fails to find one.
    Also, this means in my opinion that the ALV and the dynamic external mapping are not the culprits: since node creation, no help is detected for any attribute but the date. Honestly, I don't have a clue on what's happening.

  • F4 Help icon is being displayed left hand side

    Hi Everyone,
             I'm using explicit search help for the field WBS Element in one of the Ztable. In maintenance screen of this table the F4 help icon is being displayed on left hand side instead of right side of the field. Please help me with your suggestions and what might be the problem.

    Hi Ardelt,
           Thanks once again.
    I used that WBS field as one of the field in ztable. When i want to maintain data or display the contents of this ztable, F4 help of WBS element column is shown left side.
          I try showing that in figure format.
                                 l----
    l
                                 i  [F4 Icon] WBS Element         l
                                 l----
    l
    Hope this clarifies you. Please suggest me in this regard.
    Thanks & Regards,
    Jalendhar

  • While updating my ipad to new software through itunes it got stuck and does not work anymore - it just displays the screen with symbols of itunes and the cable to connect to it - help - what should i do?

    while updating my ipad to new software through itunes it got stuck and does not work anymore - it just displays the screen with symbols of itunes and the cable to connect to it - help - what should i do?

    Disconnect the iPad, do a Reset [Hold the Home and Sleep/Wake buttons down together for 10 seconds or so (until the Apple logo appears) and then release. The screen will go blank and then power ON again in the normal way.] It is 'appsolutely' safe!, reconnect and follow the prompts.
    If that does not work then see here http://support.apple.com/kb/HT1808

  • F4 Help icon is displaying left hand side in ALV Grid

    Hi,
    For only one field, F4 Help icon is displaying left hand side in editable ALV of custom report which is using custom table. other fields f4 on same report is showing right hand side. The difference i see for the field F4 showing left side has domain values maintained and f4 showing right hand side has value table maintained. Please help me to display the F4 on right side.
    Thanks,
    Kumar

    use f4if_int_table_value_request for particular field in the alv.
    Regards,
    Mohammed Rasul.S

  • TS1538 I was attempting to update iphone 4s today, laptop went flat during the last stages. The iphone now only displays USB cord, with an arrow pointing towards iTunes emblem. iTunes will not accept/read the iphone. HELP??

    I was attempting to update iphone 4s today, laptop went flat during the last stages. The iphone now only displays USB cord, with an arrow pointing towards iTunes emblem. iTunes will not accept/read the iphone. HELP??                   

    If you have the latest version of iTunes you should not have to download the ipsw file separately as jalp suggests. iTunes will download it automatically.
    This error (9) most often means that your antivirus or firewall (or router) is blocking access to Apple's servers. In rare instances it can also mean that the phone was hacked (or "jailbroken") to unlock it. If this is the case you must do a DFU restore, not Recovery Mode, as follows:
    Reboot your computer
    Disable your antivirus and firewall. If you has Kaspersky you may actually have to uninstall it, as it can never be turned completely off.
    Connect the USB cable to a USB port directly on your computer, not to a hub. DO NOT connect the other end to the phone
    Disconnect all USB devices except for mouse, keyboard and iPhone cable.
    Launch iTunes
    On the phone hold the HOME and SLEEP buttons at the same time for EXACTLY 10 seconds, then release the SLEEP button but continue holding the HOME button. The screen should be black. If it has an Apple logo this means you held both buttons too long. Release the HOME button and do it again.
    While holding the HOME button connect the free end of the cable to the phone.
    After a short while iTunes should recognize a phone in "recovery mode" (iTunes doesn't know the difference between DFU and Recovery modes, but the phone does)
    Release the HOME button and don't touch the phone or the computer until the process completes or you get an error message. Ignore any displays on the phone.
    If the error recurs the phone was probably messed up when it was hacked. This is not a hardware problem, or if it is, it isn't one you can fix.
    You can try repeating these steps with a different computer and a different cable. If that fails also the phone is probably not repairable.

Maybe you are looking for