Decision Pop Up: buttons with custom message

Hi Experts,
I have a requirement to display buttons with custom message on it for a decision pop up instead of 'Yes' or 'No'. Please guide me how do I do it?
Thanks for your help.
Regards,
Surekha.

Hi,
if you want to do this, you first have to Create a new Context Node e.g. u2018DATASTORAGEu2019 in your Viewwith only a Dummy value attribute to store the custom buttons and catch which button was clicked.
Then you have to call the popup in the Event Handler. Here is some sample code from a project I used to display a popup with buttons Yes and Cancel, but instead of these Yes and Cancel, you can put any custom name of the button (in lv_s1 and lv_s2).
Put combination of Buttons (Yes - Cancel) in global table *****
          ls_btn_comb-name  = '99'.
          lv_s1 = cl_bsp_runtime=>if_bsp_runtime~get_otr_text( 'CRM_BSP_WD_TOOLS/BTN_YES' ).
            CONDENSE lv_s1 NO-GAPS.
          lv_s2 = cl_bsp_runtime=>if_bsp_runtime~get_otr_text( 'CRM_BSP_WD_TOOLS/BTN_CANCEL' ).
            CONDENSE lv_s2 NO-GAPS.
            CONCATENATE lv_s1 ',' lv_s2 INTO ls_btn_comb-value.
            APPEND ls_btn_comb TO GT_BTN_COMB.
Put actual buttons in global table on level of Context Node 'DATASTORAGE' *****
            ls_buttons-id = 'btnYes'.
            ls_buttons-text = 'Yes'.
            ls_buttons-on_click = 'YES'.
            APPEND ls_buttons TO ztyped_context->datastorage->gt_buttons_custom.
            ls_buttons-id = 'btnCancel'.
            ls_buttons-text = 'Cancel'.
            ls_buttons-on_click = 'CANCEL'.
            ls_buttons-icon_src = '/SAP/BC/BSP/SAP/thtmlb_styles/sap_skins/default/images/cancel.gif'.
            APPEND ls_buttons TO ztyped_context->datastorage->gt_buttons_custom.
Call Confirmation Popup *****
              IF confirm_popup IS NOT BOUND.
                lv_title = ls_item_dated_entry-ITEM_NO.
                lv_text =  'Exam date has already passed. Do you want to override?' .
                  CALL METHOD comp_controller->window_manager->create_popup_2_confirm
                    EXPORTING
                      iv_title = lv_title
                      iv_text = lv_text
                      iv_btncombination = '99'
                      iv_custombuttons = ztyped_context->datastorage->gt_buttons_custom
                    RECEIVING
                      rv_result = confirm_popup.
                  CONFIRM_POPUP->SET_ON_CLOSE_EVENT( iv_event_name = 'CONFIRM_POPUP_CLOSED'
                                                     iv_view = me ).
                  CONFIRM_POPUP->OPEN( ).
              ENDIF.
Then the ON_CLOSE event, you can use the "standard" coding in case of decision popup.
Hope this helps.
Kind regards,
Carl

Similar Messages

  • Can we modify the standard AOL Message with custom Message in Seeded Page?

    Hi,
    I have a requirement to change AOL Message with custom Message in Seeded Page.
    In a seeded OAF page when a user clicks on a submit button a standard AOL Processing Message is populated.
    I Need to change the Standard Message and call Custom Message.
    Did controller extension and found that both the messages are populating.
    called the code after super and tried to call before super also.
    Did any one face this issue and resolved it. Kindly provide the solution.
    Regards
    Chaitanya

    Hi Gyan,
    I have tried by extending a sample custom controller.
    Below is the code of TestCO calling create message
      public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
        super.processFormRequest(pageContext, webBean);
          OAApplicationModule am = pageContext.getApplicationModule(webBean);
          if (pageContext.getParameter("Test") != null)
              OAException confirmMessage = new OAException("AK", "FWK_TBX_T_EMP_CREATE_CONFIRM",    null,
              OAException.CONFIRMATION, null);
              pageContext.putDialogMessage(confirmMessage);
      }Then I extending the TestCO to XXTestCO and it is calling Update Message
        public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
          super.processFormRequest(pageContext, webBean);
            OAApplicationModule am = pageContext.getApplicationModule(webBean);
            if (pageContext.getParameter("Test") != null)
                OAException confirmMessage = new OAException("AK", "FWK_TBX_T_EMP_UPDATE_CONFIRM",    null,
                OAException.CONFIRMATION, null);
                pageContext.putDialogMessage(confirmMessage);
        }got below Confirmation
    Confirmation
    Employee &EMP_NAME with the number &EMP_NUMBER has been created.
    Employee (&EMP_NAME) has been updated.
    Tried below approach also calling the message before super class
        public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
            OAApplicationModule am = pageContext.getApplicationModule(webBean);
            if (pageContext.getParameter("Test") != null)
                OAException confirmMessage = new OAException("AK", "FWK_TBX_T_EMP_UPDATE_CONFIRM",    null,
                OAException.CONFIRMATION, null);
                pageContext.putDialogMessage(confirmMessage);
          super.processFormRequest(pageContext, webBean);
        }got below Confirmation
    Confirmation
    Employee (&EMP_NAME) has been updated.
    Employee &EMP_NAME with the number &EMP_NUMBER has been created.
    My requirement is to print only the message which I have kept in Extended controller i.e. Update message
    Regards,
    chaitanya

  • I am using a PC and when I try to download an ebook, I get a pop up prompt with the message `Error! Check Activation` - how to resolve this so I can download and view the ebook, thank you

    I am using a PC and when I try to download an ebook, I get a pop up prompt with the message `Error! Check Activation` - how to resolve this so I can download and view the ebook, thank you

    Hi Ablondel24,
    I understand that you are getting a 404 message when you access a website from a Mac, not a PC.
    First check the cache for the site:
    Reload the webpage while bypassing the cache using '''one''' of the following steps:
    *Hold down the ''Shift'' key and click the ''Reload'' button with a left click.
    OR
    *Press ''Command'' + ''Shift'' + ''R'' (Mac)
    Second try to [[Delete cookies to remove the information websites have stored on your computer]]
    Let us know if this solves the issues you are having.

  • UTILIT99 Variant with custom messages

    Hi dear experts,
    how can we insert custom messages to the variant UTILIT99?
    Do I have to copy the function module ISU_UTILIT99  to a custom FM ZISU_UTILIT99 and in there insert the new custom message error numbers?
    If so which table holds these messages? (eg. AJ 282)
    Also where do you set the relationship between the variant UTILIT99 and the FM ISU_UTILIT? (to change it for the new custom FM)
    Thanks for your help
    Regards,
    Sergio

    Sergio:
    Please read the Research Resources and Rules of Engagement .  You should endeavor to search prior to posting your request.  This information can be found in the help for SAP Utilities, within the billing chapter, and includes an example of what/how to proceed. 
    Regards,
    bill.

  • Customise the email submit button with custom email, cc, bcc, subject and body - almost working!!

    Hi
    I have been working on trying to customise the email submit button to custom entry email address, cc, bcc, subject etc etc
    You can use the pre-submit function on the email button
    I am using the following code:
    this.event__click.resolveNode("#submit").format = formatlist.rawValue;
    this.event__click.resolveNode("#submit").target = "mailto:"+customemail.rawValue+"?subject="+subject.rawValue+"&cc="+cc.rawValue+"&bcc="+bcc.rawValue+"&body="+body.rawValue;
    THis is picking up values from a dropdown and a series of text boxes the values of each area.
    This works beautifully except for the subject area. For some reason teh subject area copies the entire srting from the subject onwards, all other areas (cc & bcc & body) all only copy the value assigned to its function.
    Any thoughts
    Feels like a bug in the coding but it may also be intentional.
    Thanks

    I believe that there was a bug logged for this issue, here is a workaround.
    Add a regular button to the form used to execute the EmailSubmit button  (you can make the EmailSubmit button invisible)
    On the click event of the "newly added" regular button add your script
    NameOfEmailSubmitButton.event__click.resolveNode("#submit").target = "mailto:"+customemail.rawValue+"?subject="+subject.rawValue+"&cc="+cc.rawValue+"&bcc="+bcc.rawValue+"&body="+body.rawValue;
    NameOfEmailSubmitButton.execEvent("click");

  • Moving mail users to IMAP from POP. Issues with sent messages disappearing

    Our mail server has been working well for several years, running currently on Mac OX 10.4.10 (Xserve G5). All user accounts have always been setup for pop and imap in WGM but we have just recently started to move client settings to IMAP. No changes to the mail settings in server admin except opening the firewall to include port 993 for imap ssl.
    The issue is that all users appear to loose the sent mail records when using the apple mail apps. After a message has been sent, the message record stays in the Apple generated sent box for that account and then disappears (presumably after syncing with the server).
    The mail app "account" settings shows that sent messages are to be stored on the server and never to be deleted (in mailbox behavior).
    If you do a "get info" on the mailbox,sent messages don't show on the server either under "Sent". I also created an additional mailbox "Sent Messages" to be used as sent mailbox location. mailbox shows up on the server, but no mail is added when sent from the apple mail app.
    Now, I would have assumed this to be an issue of the client app, but the behavior is consistent across several machines and also on new mail app configurations.
    When using Entourage with the same account however, the server works as anticipated and all sent messages are stored on the server (in the "Sent Messages" box). Any Entourage sent messages also show up in the "Sent Messages"mail box of the apple mail apps.
    When using iphones, the behavior is somewhat unclear. The iphone mail settings (under advanced) show the "server" selected ("Sent Messages") for sent mail, yet the actual iphone mail app lists that folder as just "Sent". When sending messages, that mailbox shows the Entourage sent messages and iphone sent messages, but the iphone messages never appear on the server.
    This only happens on sent messages; inbox, drafts, deleted and junk mail boxes work perfect. This also happen on any imap client account I setup, not just a specific one.
    Any suggestions? Any setting I am overlooking? Using Entourage for all users is not an option...
    Thanks for any help...

    Please see my post and how it was resolved:
    http://discussions.apple.com/thread.jspa?threadID=1181356&tstart=0
    When I had that issue, I tried using Apple Mail app and noticed that Sent Mails are getting lost. Try sending an email using WebMail. You might see similar "Permission Denied" error. Try restarting the server and see if the issue still exists.

  • Upgraded to FF4, Have windows 7, everytime I click on FF4 to go online, I get pop-up box with error message [Javascript: application] Typeerror: Components.classes[cid] is undefined...when I click OK it lets me online but this is a pain

    I get an error message... [Javascript: application] upper left corner in the pop-up box, then in the body of the pop-up box it says, Typeerror: Components.classes[cid] is undefined...when I click OK it lets me online but this is a pain, also, I get the same message when I try to open another window while using FF4...Thanks and hope you can help...

    Start Firefox in [[Safe Mode]] to check if one of the add-ons is causing the problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    * Don't make any changes on the Safe mode start window.
    See:
    * [[Troubleshooting extensions and themes]]

  • Idoc ORDERS05 with Custom Message Type

    We want to use a Z message type for idoc type ORDERS05 to be able to separate a particular group of partners from other partners using ORDERS/ORDERS05.
    The goal with our Z message type is to use the standard function IDOC_OUTPUT_ORDERS. The only problem I see is that this function checks the message type in form READ_SERVICE_PACKAGE. It would ignore this code since my message type is a Z and it's checking for message type ORDERS. 
    I was thinking of using a Z wrap-around function to perform the same code in form READ_SERVICE_PACKAGE if the message type is my Z message type.
    I want to avoid creating a Z copy of IDOC_OUTPUT_ORDERS and all if the includes!!!
    Any suggestions?

    Hello Bruce,
    The function module is associated with the process code.
    Why do you need a new message type?
    Regards,
    Samir.

  • How to use same actions for differ pop-up buttons

    Hi gurus,
    I am using 2 popup in a view.same popup's having same buttons 'Yes', 'No'.when i use 1st one i have to create an action for that Yes button where i put my code for that particular Action.
    But when i used 2nd one the action define for that is not acceptable with differ name.it takes only standard one.
    Now my Query is : How to use same actions for differ pop-up buttons with in a similar view?Where i put my code.
    Plz sugges me.
    <b>Points will be sured.</b>
    Sanket sethi

    Hi ,
    u can use the method SUBSCRIBE_TO_BUTTON_EVENT of the IF_WD_WINDOW interface ... to handle the event fired by the popup .....used this method after creating the popup window ...
    regards
    Yash

  • Is there a way to show Custom message in Outlook Mail read Inspector Window same as When a File is opened in Protected View.

    Is there a way to show Custom message in Outlook Mail read Inspector Window same as When a File is opened in Protected View.
    If we open a Document from Untrusted location,the file is opened in Protected mode and a Red Message bar is shown below the ribbon for Excel,Word apps.
    Can we show this type of similar message bar with custom Message in Outlook or any other Office App.

    Are you displaying an MSG file? Keep in mind that Outlook creates a temporary copy in one of Outlook folders, so strictly speaking your are not looking at a file.
    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

  • Pop up window with yes & no push buttons

    hi
    i want to display a pop up window with yes & no push buttons
    can anyone help for this

    Hi,
    call function POPUP_TO_CONFIRM
    exporting
    TITLEBAR = pop_up' (for pop-up header)
    TEXT_QUESTION = 'do you want to save data'
    TEXT_BUTTON_1 = 'Yes'
    ICON_BUTTON_1 = ' '
    TEXT_BUTTON_2 = 'No'
    ICON_BUTTON_2 = ' '
    DEFAULT_BUTTON = '1'
    DISPLAY_CANCEL_BUTTON = ' '
    USERDEFINED_F1_HELP = ' '
    START_COLUMN = 25
    START_ROW = 6
    POPUP_TYPE = ' '
    IV_QUICKINFO_BUTTON_1 = ' '
    IV_QUICKINFO_BUTTON_2 = ' '
    importing
    ANSWER = ANS
    OR.
    Use POPUP_TO_DECIDE.
    call function 'POPUP_TO_DECIDE'
           exporting
                defaultoption  = '1'
                textline1      = text1
                textline2      = ' '
                textline3      = text-202
                text_option1   = 'YES'
                text_option2   = 'NO'
                titel          = text-114
                start_column   = 15
                start_row      = 6
                cancel_display = ' '
           importing
                answer         = zanswer.
    hope this helps.
    plz take a look on this function modules also:
    POPUP_TO_CONFIRM_LOSS_OF_DATA Create a dialog box in which you make a question whether the user wishes to perform a processing step with loss of data.
    POPUP_TO_CONFIRM_STEP Create a dialog box in which you make a question whether the user wishes to perform the step.
    POPUP_TO_CONFIRM_WITH_MESSAGE Create a dialog box in which you inform the user about a specific decision point during an action.
    POPUP_TO_CONFIRM_WITH_VALUE Create a dialog box in which you make a question whether the user wishes to perform a processing step with a particular object.
    POPUP_TO_DECIDE Provide user with several choices as radio buttons
    POPUP_TO_DECIDE_WITH_MESSAGE Create a dialog box in which you inform the user about a specific decision point via a diagnosis text.
    POPUP_TO_DISPLAY_TEXT Create a dialog box in which you display a two line message
    thanx,
    dhanashri.
    Edited by: Dhanashri Pawar on Aug 19, 2008 2:20 PM
    Edited by: Dhanashri Pawar on Aug 19, 2008 2:25 PM
    Edited by: Dhanashri Pawar on Aug 19, 2008 2:26 PM

  • I want to push message pop up button use keyboard

    Hi; 
    I have a problem. I want to controlled message pop up button use keyboard. Is it possible? 

    Thanks, that explanation helps. It does sound like you want to be able to press buttons on the message popup with your keyboard.
    The Message Popup step was created to provide simple, quick display and response functionality for use in test sequences, and has a limited feature set compared to writing a custom code module. The only built-in way to do this is with the feature I mentioned previously, which would make your buttons something like "Alt+A" "Alt+B" and so on. It sounds like this is probably not exactly what you want.
    I believe your best option for achieving this is to create a simple code module in a language of your choice (LabVIEW, .NET, etc) to display the dialog and listen for keyboard input. Once the user presses a key, the code module can return the desired value to TestStand. 
    Daniel E.
    TestStand Product Support Engineer
    National Instruments

  • Custom button with action listener - will not invoke action listener

    Hi
    For whatever reason, I cannot find a concise example of a simple custom component that can invoke an action listener. The tutorials I've read so far either ignore this fundamental topic or only make the slightest make reference to it.
    The best I have come up with - in terms of a simple prototype is below... but, the action listener is never invoked.... Can someone tell me what I am missing (full code below). Hopefully, what is missing or incorrect will be obvious to you JSF experts out there.
    Thanks for any help!!
    -f
    tld
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
    <taglib>
      <tlib-version>0.01</tlib-version>
      <jsp-version>1.2</jsp-version>
      <short-name>jsfcustomcomponent</short-name>
      <uri>http://jsfcustomcomponent/</uri>
      <description><![CDATA[jsf custom component tags]]>  </description>
      <tag>
        <name>specialBtnTag</name>
        <tag-class>jsfcustomcomponent.SpecialBtnTag</tag-class>
        <attribute>
          <name>value</name>
          <required>true</required>
          <rtexprvalue>true</rtexprvalue>
          <description><![CDATA[button value]]></description>
        </attribute>
        <attribute>
          <name>actionListener</name>
          <required>true</required>
          <rtexprvalue>true</rtexprvalue>
          <description><![CDATA[action listener]]> </description>
        </attribute>
      </tag>
    </taglib>
    SpecialBtnComponent
    package jsfcustomcomponent;
    import javax.faces.component.*;
    import javax.faces.context.*;
    import javax.faces.el.*;
    import javax.faces.event.*;
    public class SpecialBtnComponent
        extends UIComponentBase implements ActionSource
        public static final String COMPONENT_TYPE = "SpecialBtnComponent";
        public static final String RENDERER_TYPE = "SpecialBtnRenderer";
        public String getFamily()
            return COMPONENT_TYPE;
        public SpecialBtnComponent()
            super();
            setRendererType(SpecialBtnComponent.RENDERER_TYPE);
        private String value;
        public void setValue(String value, FacesContext facesContext)
            this.value = value;
        public String getValue()
            if (null != value)
                return value;
            ValueBinding _vb = getValueBinding("value");
            if (_vb != null)
                return (String) _vb.getValue(getFacesContext());
            else
                return null;
        private MethodBinding action = null;
        public MethodBinding getAction()
            return action;
        public void setAction(MethodBinding methodBinding)
            this.action = action;
        private MethodBinding actionListener = null;
        public MethodBinding getActionListener()
            return (this.actionListener);
        public void setActionListener(MethodBinding methodBinding)
            this.actionListener = actionListener;
        public boolean isImmediate()
            return false;
        public void setImmediate(boolean _boolean)
            //this.immediate = immediate;
        public void addActionListener(ActionListener actionListener)
            addFacesListener(actionListener);
        public ActionListener[] getActionListeners()
            return (ActionListener[]) getFacesListeners(ActionListener.class);
        public void removeActionListener(ActionListener actionListener)
            removeFacesListener(actionListener);
        public Object saveState(FacesContext context)
            Object values[] = new Object[5];
            values[0] = super.saveState(context);
            values[1] = value;
            values[2] = saveAttachedState(context, action);
            values[3] = saveAttachedState(context, actionListener);
            return ( (Object) (values));
        public void restoreState(FacesContext context, Object state)
            Object values[] = (Object[]) state;
            super.restoreState(context, values[0]);
            value = (String) values[1];
            action = (MethodBinding) restoreAttachedState(context, values[2]);
            actionListener = (MethodBinding) restoreAttachedState(context, values[3]);
        public void broadcast(FacesEvent event) throws AbortProcessingException
            super.broadcast(event);
            if (event instanceof ActionEvent)
                FacesContext context = getFacesContext();
                MethodBinding mb = getActionListener();
                if (mb != null)
                    mb.invoke(context, new Object[]
                              {event});
                ActionListener listener = context.getApplication().getActionListener();
                if (listener != null)
                    listener.processAction( (ActionEvent) event);
        public void queueEvent(FacesEvent e)
            if (e instanceof ActionEvent)
                if (isImmediate())
                    e.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
                else
                    e.setPhaseId(PhaseId.INVOKE_APPLICATION);
            super.queueEvent(e);
    SpecialBtnRenderer
    package jsfcustomcomponent;
    import java.util.*;
    import javax.faces.component.*;
    import javax.faces.context.*;
    import javax.faces.event.*;
    import javax.faces.render.*;
    public class SpecialBtnRenderer
        extends Renderer
        String value;
        public SpecialBtnRenderer()
        public void decode(FacesContext context, UIComponent component)
            Map requestMap = context.getExternalContext().getRequestParameterMap();
            String clientId = component.getClientId(context);
            SpecialBtnComponent specialBtnComponent = (SpecialBtnComponent) component;
            String value = (String) requestMap.get(clientId);
            if (null != value)
                specialBtnComponent.setValue(value, context);
            ActionEvent actionEvent = new ActionEvent(specialBtnComponent);
            specialBtnComponent.queueEvent(actionEvent);
        public void encodeEnd(FacesContext context, UIComponent component) throws java.io.IOException
            SpecialBtnComponent specialBtnComponent = (SpecialBtnComponent) component;
            ResponseWriter writer = context.getResponseWriter();
            String clientId = component.getClientId(context);
            value = (String) component.getAttributes().get("value");
            if (value == null)
                value = "defaultValue";
            buildSpecialBtn(writer, value, clientId, specialBtnComponent);
        private void buildSpecialBtn(ResponseWriter writer, String value, String clientId, SpecialBtnComponent component) throws java.io.IOException
            writer.startElement("table", component);
            writer.startElement("tbody", component);
            writer.startElement("tr", component);
            writer.startElement("td", component);
            value = String.valueOf(value);
            writer.startElement("input", component);
            writer.writeAttribute("type", "submit", null);
            writer.writeAttribute("name", clientId, "clientId");
            writer.writeAttribute("value", value, null);
            writer.endElement("input");
            writer.endElement("td");
            writer.endElement("tr");
            writer.endElement("tbody");
            writer.endElement("table");
    SpecialBtnTag
    package jsfcustomcomponent;
    import javax.faces.component.*;
    import javax.faces.el.*;
    import javax.faces.webapp.*;
    import com.sun.faces.util.*;
    public class SpecialBtnTag
        extends UIComponentTag
        public String value = null;
        public String actionListener = null;
        public String getComponentType()
            return SpecialBtnComponent.COMPONENT_TYPE;
        public String getRendererType()
            return SpecialBtnComponent.RENDERER_TYPE;
        protected void setProperties(UIComponent component)
            super.setProperties(component);
            if (! (component instanceof SpecialBtnComponent))
                throw new IllegalStateException("Component " + component.toString() +
                                                " not expected type.  Expected: jsfcustomcomponent.SpecialBtnComponent.  Perhaps you�re missing a tag?");
            SpecialBtnComponent specialBtnComponent = (SpecialBtnComponent) component;
            if (value != null)
                if (isValueReference(value))
                    ValueBinding vb = Util.getValueBinding(value);
                    specialBtnComponent.setValueBinding("value", vb);
                else
                    throw new IllegalStateException("The value for �value� must be a ValueBinding.");
            if (actionListener != null)
                if (isValueReference(actionListener))
                    ValueBinding vb = Util.getValueBinding(actionListener);
                    specialBtnComponent.setValueBinding("actionListener", vb);
                else
                    throw new IllegalStateException("The value for �actionListener� must be a ValueBinding.");
        public void release()
            super.release();
            value = null;
            actionListener = null;
        public void setValue(String value)
            this.value = value;
        public String getValue()
            return this.value;
        public void setActionListener(String actionListener)
            this.actionListener = actionListener;
        public String getActionListener()
            return this.actionListener;
    jsp1.jsp
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@taglib uri="http://jsfcustomcomponent/" prefix="j"%>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>JSP Page</title>
    <link rel="stylesheet" type="text/css" href="./stylesheet.css" title="Style">
    </head>
    <body>
    <f:view>
      <h:form id="form01">
        <h:outputText value="test special button with action listener"/>
        <j:specialBtnTag value="#{specialBtnBacking.specialBtnValue}" actionListener="#{specialBtnBacking.specialBtnActionListener}"/>
        <h:messages/>
        <h:outputText value="#{specialBtnBacking.outcome}"/>
      </h:form>
    </f:view>
    </body>
    </html>
    SpecialBtnBacking
    package specialbtn;
    import javax.faces.context.*;
    import javax.faces.event.*;
    public class SpecialBtnBacking
        private FacesContext context;
        public SpecialBtnBacking()
            this.setSpecialBtnValue("Special Button with action listener");
        private String specialBtnValue;
        public String getSpecialBtnValue()
            return this.specialBtnValue;
        public void setSpecialBtnValue(String specialBtnValue)
            this.specialBtnValue = specialBtnValue;
        private String outcome="actionlistener NOT invoked: click specialBtn above to test";
        public String getOutcome()
            return outcome;
        public void setOutcome(String outcome)
            this.outcome = outcome;
        public void specialBtnActionListener(ActionEvent evt)
            System.out.println("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!Jsp1Backing/specialBtnActionListener()!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
            this.outcome="***action listener invoked!!!***";
    faces-config.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN" "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
    <faces-config>
      <managed-bean>
        <managed-bean-name>specialBtnBacking</managed-bean-name>
        <managed-bean-class>specialbtn.SpecialBtnBacking</managed-bean-class>
        <managed-bean-scope>request</managed-bean-scope>
      </managed-bean>
      <component>
        <component-type>SpecialBtnComponent</component-type>
        <component-class>jsfcustomcomponent.SpecialBtnComponent</component-class>
        <component-extension>
          <renderer-type>SpecialBtnRenderer</renderer-type>
        </component-extension>
      </component>
      <render-kit>
        <renderer>
          <component-family>SpecialBtnComponent</component-family>
          <renderer-type>SpecialBtnRenderer</renderer-type>
          <renderer-class>jsfcustomcomponent.SpecialBtnRenderer</renderer-class>
        </renderer>
      </render-kit>
    </faces-config>
    web.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4">
      <display-name>pagerWEB</display-name>
      <servlet>
        <servlet-name>Faces Servlet</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
      </servlet>
      <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>*.faces</url-pattern>
      </servlet-mapping>
      <jsp-config>
        <taglib>
          <taglib-uri>http://jsfcustomcomponent/</taglib-uri>
          <taglib-location>/WEB-INF/jsfcustomcomponent.tld</taglib-location>
        </taglib>
      </jsp-config>
      <servlet>
        <description>Added by JBuilder to compile JSPs with debug info</description>
        <servlet-name>debugjsp</servlet-name>
        <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
        <init-param>
          <param-name>classdebuginfo</param-name>
          <param-value>true</param-value>
        </init-param>
        <load-on-startup>3</load-on-startup>
      </servlet>
      <servlet-mapping>
        <servlet-name>debugjsp</servlet-name>
        <url-pattern>*.jsp</url-pattern>
      </servlet-mapping>
    </web-app>

    got it working....
    The changes were:
    in "SpecialBtnRenderer"...
    --new--
                        mb.invoke(context, new Object[1]);
    --old--
                        mb.invoke(context, new Object[0]);
    in "SpecialBtnTag"...
    --new--
    import javax.faces.event.ActionEvent;
    --new--
                    MethodBinding mb = FacesContext.getCurrentInstance().getApplication().createMethodBinding(specialBtnListener, new Class[]{ActionEvent.class});
    --old--
                    MethodBinding mb = FacesContext.getCurrentInstance().getApplication().createMethodBinding(specialBtnListener, null);
    -Below is the entire application, again -- for those (like myself) who need concrete examples...
    I hope this helps someone else! --f
    jsp1.jsp
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@taglib uri="http://jsfcustomcomponent/" prefix="j"%>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>JSP Page</title>
    <link rel="stylesheet" type="text/css" href="./stylesheet.css" title="Style">
    </head>
    <body>
    <f:view>
        <h:messages/>
      <h:form id="form01">
        <h:outputText value="test special button with action listener"/>
        <j:specialBtnTag value="#{specialBtnBacking.specialBtnValue}" specialBtnListener="#{specialBtnBacking.specialBtnActionListener}"/>
        <h:outputText value="#{specialBtnBacking.outcome}"/>
      </h:form>
    </f:view>
    </body>
    </html>
    SpecialBtnBacking
    package specialbtn;
    import javax.faces.context.*;
    import javax.faces.event.*;
    public class SpecialBtnBacking
        private FacesContext context;
        public SpecialBtnBacking()
            this.setSpecialBtnValue("Special Button with action listener");
        private String specialBtnValue;
        public String getSpecialBtnValue()
            return this.specialBtnValue;
        public void setSpecialBtnValue(String specialBtnValue)
            this.specialBtnValue = specialBtnValue;
        private String outcome = "actionlistener NOT invoked: click specialBtn above to test";
        public String getOutcome()
            return outcome;
        public void setOutcome(String outcome)
            this.outcome = outcome;
        public void specialBtnActionListener(ActionEvent evt)
            System.out.println("\n\n");
            System.out.println("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!Jsp1Backing/specialBtnActionListener()!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
            System.out.println("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!Jsp1Backing/specialBtnActionListener()!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
            System.out.println("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!Jsp1Backing/specialBtnActionListener()!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
            System.out.println("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!Jsp1Backing/specialBtnActionListener()!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
            System.out.println("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!Jsp1Backing/specialBtnActionListener()!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\n");
            this.outcome = "***action listener invoked!!!***";
    jsfcustomcomponent.tld
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
    <taglib>
      <tlib-version>0.01</tlib-version>
      <jsp-version>1.2</jsp-version>
      <short-name>jsfcustomcomponent</short-name>
      <uri>http://jsfcustomcomponent/</uri>
      <description><![CDATA[jsf custom component tags]]>  </description>
      <tag>
        <name>specialBtnTag</name>
        <tag-class>jsfcustomcomponent.SpecialBtnTag</tag-class>
        <attribute>
          <name>value</name>
          <required>true</required>
          <rtexprvalue>true</rtexprvalue>
          <description><![CDATA[button value]]></description>
        </attribute>
        <attribute>
          <name>specialBtnListener</name>
          <required>true</required>
          <rtexprvalue>true</rtexprvalue>
          <description><![CDATA[action listener]]> </description>
        </attribute>
      </tag>
    </taglib>
    faces-config.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN" "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
    <faces-config>
      <managed-bean>
        <managed-bean-name>specialBtnBacking</managed-bean-name>
        <managed-bean-class>specialbtn.SpecialBtnBacking</managed-bean-class>
        <managed-bean-scope>request</managed-bean-scope>
      </managed-bean>
      <component>
        <component-type>SpecialBtnComponent</component-type>
        <component-class>jsfcustomcomponent.SpecialBtnComponent</component-class>
        <component-extension>
          <renderer-type>SpecialBtnRenderer</renderer-type>
        </component-extension>
      </component>
      <render-kit>
        <renderer>
          <component-family>SpecialBtnComponent</component-family>
          <renderer-type>SpecialBtnRenderer</renderer-type>
          <renderer-class>jsfcustomcomponent.SpecialBtnRenderer</renderer-class>
        </renderer>
      </render-kit>
    </faces-config>
    SpecialBtnComponent.java
    package jsfcustomcomponent;
    import javax.faces.component.*;
    import javax.faces.context.*;
    import javax.faces.el.*;
    import javax.faces.event.*;
    public class SpecialBtnComponent
        extends UIComponentBase implements ActionSource
        public static final String COMPONENT_TYPE = "SpecialBtnComponent";
        public static final String RENDERER_TYPE = "SpecialBtnRenderer";
        public String getFamily()
            return COMPONENT_TYPE;
        public SpecialBtnComponent()
            super();
            setRendererType(SpecialBtnComponent.RENDERER_TYPE);
        private String value;
        public void setValue(String value, FacesContext facesContext)
            this.value = value;
        public String getValue()
            if (null != this.value)
                return this.value;
            ValueBinding _vb = getValueBinding("value");
            if (_vb != null)
                return (String) _vb.getValue(getFacesContext());
            else
                return null;
        private MethodBinding specialBtnListener = null;
        public MethodBinding getActionListener()
            return (this.specialBtnListener);
        public void setActionListener(MethodBinding actionListener)
            this.specialBtnListener = actionListener;
        public Object saveState(FacesContext context)
            Object values[] = new Object[3];
            values[0] = super.saveState(context);
            values[1] = saveAttachedState(context, this.specialBtnListener);
            values[2] = this.value;
            return (values);
        public void restoreState(FacesContext context, Object state)
            Object values[] = (Object[]) state;
            super.restoreState(context, values[0]);
            this.specialBtnListener = (MethodBinding) restoreAttachedState(context, values[1]);
            this.value = (String) restoreAttachedState(context, values[2]);
        public void broadcast(FacesEvent event) throws AbortProcessingException
            super.broadcast(event);
            if (event instanceof ActionEvent)
                FacesContext context = getFacesContext();
                MethodBinding mb = this.getActionListener();
                if (mb != null)
                    try
                        mb.invoke(context, new Object[]
                                  {event});
                    catch (EvaluationException ex)
                        System.out.println("SpecialBtnComponent/broadcast(FacesEvent event)...EvaluationException encountered - ex.getMessage()=" + ex.getMessage());
                        ex.printStackTrace();
                ActionListener actionListener = context.getApplication().getActionListener();
                if (actionListener != null)
                    actionListener.processAction( (ActionEvent) event);
        public void queueEvent(FacesEvent e)
            if (e instanceof ActionEvent)
                e.setPhaseId(PhaseId.INVOKE_APPLICATION);
            super.queueEvent(e);
        public MethodBinding getAction()
            return null;
        public void setAction(MethodBinding methodBinding)
        public boolean isImmediate()
            return false;
        public void setImmediate(boolean _boolean)
        public void addActionListener(ActionListener actionListener)
            addFacesListener(actionListener);
        public ActionListener[] getActionListeners()
            return (ActionListener[]) getFacesListeners(ActionListener.class);
        public void removeActionListener(ActionListener actionListener)
            removeFacesListener(actionListener);
    SpecialBtnTag.java
    package jsfcustomcomponent;
    import javax.faces.component.*;
    import javax.faces.el.*;
    import javax.faces.webapp.*;
    import com.sun.faces.util.*;
    import javax.faces.context.FacesContext;
    import javax.faces.event.ActionEvent;
    public class SpecialBtnTag
        extends UIComponentTag
        public String value = null;
        public String specialBtnListener = null;
        private SpecialBtnComponent specialBtnComponent;
        public SpecialBtnTag()
            super();
        public String getComponentType()
            return SpecialBtnComponent.COMPONENT_TYPE;
        public String getRendererType()
            return SpecialBtnComponent.RENDERER_TYPE;
        protected void setProperties(UIComponent component)
            super.setProperties(component);
            if (! (component instanceof SpecialBtnComponent))
                throw new IllegalStateException("Component " + component.toString() +
                                                " not expected type.  Expected: jsfcustomcomponent.SpecialBtnComponent.  Perhaps you�re missing a tag?");
            specialBtnComponent = (SpecialBtnComponent) component;
            if (value != null)
                if (isValueReference(value))
                    ValueBinding vb = Util.getValueBinding(value);
                    specialBtnComponent.setValueBinding("value", vb);
                else
                    throw new IllegalStateException("The value for �value� must be a ValueBinding.");
            if (specialBtnListener != null)
                if (isValueReference(specialBtnListener))
                    MethodBinding mb = FacesContext.getCurrentInstance().getApplication().createMethodBinding(specialBtnListener, new Class[]{ActionEvent.class});
                    ( (SpecialBtnComponent) component).setActionListener(mb);
                else
                    MethodBinding mb = Util.createConstantMethodBinding(specialBtnListener);
                    ( (SpecialBtnComponent) component).setActionListener(mb);
        public void release()
            super.release();
            value = null;
            specialBtnListener = null;
        public void setValue(String value)
            this.value = value;
        public String getValue()
            return this.value;
        public void setSpecialBtnListener(String specialBtnListener)
            this.specialBtnListener = specialBtnListener;
        public String getSpecialBtnListener()
            return this.specialBtnListener;
    SpecialBtnRenderer
    package jsfcustomcomponent;
    import java.util.*;
    import javax.faces.component.*;
    import javax.faces.context.*;
    import javax.faces.event.*;
    import javax.faces.render.*;
    import javax.faces.el.MethodBinding;
    import javax.faces.el.*;
    public class SpecialBtnRenderer
        extends Renderer
        String value;
        public SpecialBtnRenderer()
            super();
        public void decode(FacesContext context, UIComponent component)
            try
                Map requestMap = context.getExternalContext().getRequestParameterMap();
                String clientId = component.getClientId(context);
                SpecialBtnComponent specialBtnComponent = (SpecialBtnComponent) component;
                String value = (String) requestMap.get(clientId);
                if (null != value)
                    specialBtnComponent.setValue(value, context);
                    MethodBinding mb = specialBtnComponent.getActionListener();
                    if (mb != null)
                        System.out.println("SpecialBtnRenderer/decode...mb.getExpressionString()=" + mb.getExpressionString());
                        //mb.invoke(context, new Object[0]);
                        mb.invoke(context, new Object[1]);
                    ActionEvent actionEvent = new ActionEvent(specialBtnComponent);
                    specialBtnComponent.queueEvent(actionEvent);
            catch (EvaluationException ex)
                ex.printStackTrace();
        public void encodeEnd(FacesContext context, UIComponent component) throws java.io.IOException
            SpecialBtnComponent specialBtnComponent = (SpecialBtnComponent) component;
            ResponseWriter writer = context.getResponseWriter();
            String clientId = component.getClientId(context);
            value = (String) component.getAttributes().get("value");
            if (value == null)
                value = "defaultValue";
            buildSpecialBtn(writer, value, clientId, specialBtnComponent);
        private void buildSpecialBtn(ResponseWriter writer, String value, String clientId, SpecialBtnComponent component) throws java.io.IOException
            writer.startElement("table", component);
            writer.startElement("tbody", component);
            writer.startElement("tr", component);
            writer.startElement("td", component);
            value = String.valueOf(value);
            writer.startElement("input", component);
            writer.writeAttribute("type", "submit", null);
            writer.writeAttribute("name", clientId, "clientId");
            writer.writeAttribute("value", value, null);
            writer.endElement("input");
            writer.endElement("td");
            writer.endElement("tr");
            writer.endElement("tbody");
            writer.endElement("table");
    web.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4">
      <display-name>pagerWEB</display-name>
      <servlet>
        <servlet-name>Faces Servlet</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
      </servlet>
      <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>*.faces</url-pattern>
      </servlet-mapping>
      <jsp-config>
        <taglib>
          <taglib-uri>http://jsfcustomcomponent/</taglib-uri>
          <taglib-location>/WEB-INF/jsfcustomcomponent.tld</taglib-location>
        </taglib>
      </jsp-config>
    </web-app>

  • How to create a navigation bar with custom made buttons?

    I'm used to work with a similar program as Muse. In there we can create a single button and link them together into a navigation bar. I have tried all sorts of tutorials but none of them is discussing this possibility.
    To summorize. The idea is to create a button in photoshop and to use this as a theme to build a navigation bar. Possible or not and how? Thanks for assistance. Rgds Rufin

    Hi Brad,
    Thanks for your reply.
    No, not really. I used to work with XARA up till now. And being an Adobe Cloud user I think it a bit silly using two different systems. In XARA I can create a custom button and turn them into a navbar. For your information I include a few links to sites I created with Xara and I would like to know if I can create the same type of navbars with Abobe Muse. I already found out that all the other functions are available and some work a lot better in Muse, but I’m stuck on the navbar issue. I know I can create a button in Adobe PS and use it in Muse. But I didn’t manage to figure out how to create a navbar in Muse on basis of a button created in PS.
    www.restaurant-cedric.be or www.discoamigo.com or www.radioparadijs.be
    Grtz,
    Rufin
    LOGO-RUFIN'S-REISBUREAU-outlook
    Koningslaan 36 – b31
    8300 Knokke – Heist
    Tel: 050621052
    Fax: 050621072
    e-mail:  <mailto:[email protected]> [email protected]
    <http://www.rufins.be/> http://www.rufins.be
    <http://www.travelcoop.be/> travelcoop_logo_2013[1]  <http://ferventreisagent.be/rufins-reisbureau> klein logo
    Van: Brad Lawryk
    Verzonden: zondag 12 oktober 2014 19:40
    Aan: RUFIN DUWEL
    Onderwerp:  How to create a navigation bar with custom made buttons?
    How to create a navigation bar with custom made buttons?
    created by Brad Lawryk <https://forums.adobe.com/people/Brad+Lawryk>  in Help with using Adobe Muse CC - View the full discussion <https://forums.adobe.com/message/6817739#6817739>

  • HT1541 When i'm trying to send an application as gift using "send gift via email" option, it is not allowing me to buy the app. A pop up appears with message "Please contact itunes support to complete this purchase"

    When i'm trying to send an application as gift using "send gift via email" option, it is not allowing me to buy the app. A pop up appears with message "Please contact itunes support to complete this purchase"

    Okay, so do as it says, contact iTunes customer support.

Maybe you are looking for

  • Migrate from Exchange 2007 to Exchange 2013.

    Hi All, Need some advised here,  I am about to migrate Exchange 2007 with Windows Server 2003 to Exchange 2013 with Windows Server 2012 R2. Which one should I migrate first? Windows Server or Exchange? I tried to search it, i am a bit confuse with so

  • How to get a specific page's field values in pdf ?

    I am using acrobat javascript to read a pdf file. Is there any way to read textfield values which are present in a specific page?

  • Download of acrobat x does not work, how do i fix it??

    ...ok here is the short story.  Nove 2011 i purchased Acrobat x, installed it om my computer.  I just purchased two additional computers.  I contacted customer service they directed me to license.adobe.com to down load procedures.  i downloaded and r

  • It must be in the CSS

    I have a page http://ebogott.com/index08more.php that is the prototype new home page for my site. The "last updated..." line appers to the right of the XML table ONLY in OPERA.  Everywhere else, it aligns correctly.  I can find no code problems.  The

  • How can I delete a created airport network?

    I created a network device and I don't need it. It would really be appreciated if I could know how to delete it. Thanks