New Button : Custom Action

Hi Experts,
    i have a VC application which display Sales Order Information based on the Customer, Material & Sales Organization. There are two buttons submit & reset everything works fine. Now i wish to add new button validate with custom event like checking if entry has been made for all the 3 fields.
so i create a btnValidate & custom Action actValidate, where should i enter the logic of what should happen on actValidate ??
i am on NW CE EPH1    visual composer 7.1
Regards
Prashant

Hi Prashant 
In order to validate the 3 fields (check they are not blank) using your new button follow the next steps:
1. For each of the 3 fields you wish to validate do the following:
Right click the field and from the context menu select Configure. In the Validation area of the Configure  task   panel u2013 where you set the validation rules and the validation behavior check the Required box (or set a specific rule in the Rules field) and change the Behavior to Severe (instead of Normal).
2. Right click your new button and from the context menu select Action...
After assigning your custom action to the button, in the Validation area of the Define Action Dialog Box (The right tab) of your new button  - where you set the validation scope (none, Control, Element, Window) make sure this scope is set to Element (this is the default) and change the validation behavior to Permissive (instead of Normal).
I Hope this helps, for any further information feel free to continue the thread or contact me.
Also, a more detailed information about using the validation rules can be found [here|http://help.sap.com/saphelp_nwce10/helpdata/en/ed/5f05491f814bb08865213d29f36af5/frameset.htm]
Regards
Yogev

Similar Messages

  • Replacing iSupport seeded buttons with new buttons(customer specific)

    our customer wants to keep their own and look & feel for iSupport. we succeded in that. But the problem is replacing customer specific buttons, in iSupport pages.
    is there any option so that we can completely replace iSupport buttons location to a new location, so that iSupport can pick up buttons from new location and it should not also effect other self service applications.
    Any idea
    Thanks
    Chetan

    In 11.5.10 and prior to that the buttons are generated dynamically and stored in a cache folder in OA_HTML. It will be a lot of effort for you to replace all the buttons in that location. Moreover the buttons are named based on a specific logic by UIX and will/might change from release to release if we make any changes on the specific parameters around that logic.
    You use the CLAF feature to redefine the look and feel for buttons, the only problem is the changes will be applicable globally.
    Alternately you can define your stylesheet and attach that using personalization to specific buttons, you need to do this for each button in iSupport.

  • Service Desk Unable to set status to Customer Action and Proposed Solution

    Hi Everyone,
    We are unable to set a service desk issue to the status Customer Action or Proposed solution.
    I have someone create a new issue in the bakend system and when I receive the issue I assign it to myself as the processor. When I try to set teh status to Customer action it is grayed out.
    I have checked the following:
    1. As a test I assigned My user with sap_all profile so does not appear to be authroisation related
    2. The status profile has all six standard values (New, customer action, In Process, Sent to SAP, Proposed Solution, Confirmed).
    3. The transaction types have been defined using the standard profiles for Text Det. Procedure, Partnet Determination Procedure, Status Profile. The Partner Function ORG is set to Sold-To-Party , The date profile is a SRV_SLA_ITEM and the Action profile is set to SLFN0001_ADVANCED. The Org Data Prof is set to a customer defined one: ZSSC000000001.
    4. I have checked transaction ppoma_crm and the org structure and my user is assigned to a team lead position.
    Your assistance is greatly appreciated.
    Michael

    Hi Michael,
    please check your status profile for the "lowest status no." and "highest status no." values of the status values as Alex mentioned!
    You can find this in SPRO under "SAP Solution Manager> Scenario-Specific Settings>Service Desk>Service Desk>Status Profile".
    If the "high" value of the status "New" is lower than the status number of status "Customer Action" than you can not set the message from "New" to "Customer Action"!
    Hope this helps,
    Christoph

  • Any way to change back button title without creating new button?

    Hi,
    Is there any way to change the back button title on a navigation controller without having to create a whole new button and action to go with it?
    Thanks
    Ray

    Yes, you don't need to create a new a new action mechanism etc.
    One way to change the back button text on a the navbar of a view is to create a new UIBarButtonItem (with nil tagget and nil action )
    Then set self.navigationItem.backBarButtonItem of the parent view controller to the new button
    Note that you're setting the backbarButtonItem of the parent view controller (and not the view controller on which this bar button will be displayed). This automatically plugs in the default target, action etc. So you don't need to implement it

  • Custom Actions in WD4VC not working

    Hi,
    I created a composite iview, in that created a form, start point and endpoint.
    The form has 2 buttons submit (standard action) and publish (custom action).
    In endpoint i have 2 boolean variables for ResultState.
    Similarly i have another composite iview.
    Using this WD4VC applications i created callable objects in GP.
    But all the custom actions defined in composite iviews are not working only the stadard submit action is working.
    Kindly guide me or if you have any tutorial would be really helpful.

    Hi
    Have u defined the mapping with this custom event?
    Take help from these threads
    1.[VC button|Custom actions - can we send email with VC button?;
    2.[How to define a Custom Action in VC 6.0 ?;
    Best Regards
    Satish Kumar

  • New Button : New action

    Hi ,
    I have a form with 2 buttons (Ok and Cancel). I've added a new button (Update) with a custom action (Update)  . When i click on this button, it should execute e aservice (RFC FM). I link the output of the form to the Service Function with event name (update). But the FM is not called at all ? I use Breakpoints but the RFC FM is not called ? ANy idea ?

    Hi Prashant 
    In order to validate the 3 fields (check they are not blank) using your new button follow the next steps:
    1. For each of the 3 fields you wish to validate do the following:
    Right click the field and from the context menu select Configure. In the Validation area of the Configure  task   panel u2013 where you set the validation rules and the validation behavior check the Required box (or set a specific rule in the Rules field) and change the Behavior to Severe (instead of Normal).
    2. Right click your new button and from the context menu select Action...
    After assigning your custom action to the button, in the Validation area of the Define Action Dialog Box (The right tab) of your new button  - where you set the validation scope (none, Control, Element, Window) make sure this scope is set to Element (this is the default) and change the validation behavior to Permissive (instead of Normal).
    I Hope this helps, for any further information feel free to continue the thread or contact me.
    Also, a more detailed information about using the validation rules can be found [here|http://help.sap.com/saphelp_nwce10/helpdata/en/ed/5f05491f814bb08865213d29f36af5/frameset.htm]
    Regards
    Yogev

  • 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>

  • Urgent help needed -in customizing an OAF page --adding new button?

    Hi,
    We are currently implementing an OAF based oracle application.One of the requirements that the customer has is to display an additional button on the page button bar available out of box in an OAF page. This button needs to be enabled/disabled based on certain conditions. Also when the button is pressed a pl/sql api needs to be invoked. I know through personalization a new button can be created in the page button bar. But how do we handle the logic behind the button? Can we extend the page level controller?Will this survive future upgrades? If not then what is the alternative?
    Please help!
    Thanks!

    You can follow the thread Calling PL/SQL Procedure for pl/sql call from controller example.
    --Shiv                                                                                                                                                                                                                                                                                   

  • Button to execute custom action(s)

    I have created 3 custom actions which print, e-mail, and fax Opportunities when executed.   These actions work perfect from the SAP GUI, but I am unable to execute them from PCUI CRM as there is no button which is linked to these actions.   Please note that there is a button which prints the opprotunity, and a button which sends an e-mail, but these buttons do not execute the custom Actions which I have created!
    I would like to add a button (custom or standard) to PCUI CRM which would execute my custom Actions.
    I understand how to add buttons to PCUI CRM, but I do not know how to link that button to my custom actions.   Is this even necessary?   I see an "Actions" button, but am not sure if this will automatically link to the custom actions.
    Thanks in advance for any and all responses to my post.

    Thanks for your your help but it was the same thing Timo said before and it didn´t work for me. But I found out what was wrong :) and you were both right.
    I used a template that had a form and when I inserted a form on the page this form was inside the form in the template and that did so that it didn´t work.
    Atlantic Viking

  • Urgent: custom action buttons

    i tried to program a midlet for the siemens s55 using custom action buttons (i.e. start, back, actions) but the siemens s55 doesn't show the action buttons like in the emulator instead it shows for example its own action buttons (i.e. options) and within that action button i find my own action buttons - or it simple adds an action button where i don't want to have one - how can i avoid that?
    or to put it that way: what i can implement in a midlet that shows action buttons just like in the emulator and that on any mobile phone?
    or if there isn't a solution for the above mentioned problem then how can i rename standard action buttons?

    buurdb is correct. The mapping between the Commands added and the device's soft-buttons is at the implementation's discretion. If you are targetting a specific device only, then you can try to play around with the Command types and priorities to get the placement you want (the success you'll have depends on the device). In general it is advisable (specially if you want the application to be as portable as possible) to just just Command types and priorities that acurately reflect the actual Commands and let the implementation do their best job to map them successfully.
    shmoove

  • Custom actions - can we send email with VC button?

    Hi all,
    I wonder if there is a way to create custom actions for button in VC so that we can use to send an email with predefined content and some fields from a table? Will appreciate any idea reply real quick.
    Thanks very much,
    Tien.

    Hi,
    Currently you cannot trigger a background mail sending from VC. However, you can use the "hyperlink" system action on the button, and create a mailto: link.
    This way the default mail editor will open up when clicking this button.
    You can use dynamic expressions to build dynamic Recipient/Subject/Body to this mail message that will automatically be created for the user when clicking this button, and then the user can edit the mail message and send it.
    Some more info about mailto - http://www.ianr.unl.edu/internet/mailto.html

  • How to add new button in Customized page....

    Dear All,
    I need to add new button to the page button bar in the UI page.I tried like this in the controller but still i can not get output:
    OAPageButtonBarBean oapbb = (OAPageButtonBarBean)oawebbean.findIndexedChildRecursive("OrderPageButtons");
    OAButtonBean cancelButton = (OAButtonBean)createWebBean(oapagecontext, OAWebBeanConstants.BUTTON_BEAN,
    null, "cancelButton");
    cancelButton.setText("Cancel");
    oapbb.addIndexedChild(cancelButton);
    Is there anything i missedout?
    TIA

    what you are doing incorrectly is
    trying to get the handle to the OAPageButtonBarBean.
    This is a named child of the parent bean(OAPageLayoutBean), and what you are trying to do is find it as a indexed child, this should give you a nullpointer excp in this line oapbb.addIndexedChild(cancelButton);
    since the handle should be null.
    to get the handle to OAPageButtonBarBean, use some like this
    pageContext.getPageLayoutBean().getPageButtons();
    and then add buttons to it.
    Thanks
    Tapash.

  • SharePoint 2013 App Custom Action in Wiki Page

    Hi
    I am trying to create a SharePoint 2013 App that also has a  Custom Action that has to be visible in Pages tab. Code below
    <?xml version="1.0" encoding="utf-8"?>
    <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
    <CustomAction
    Id="COB.SharePoint.Ribbon.NewGroupInExistingTab"
    Location="CommandUI.Ribbon" >
    <CommandUIExtension>
    <CommandUIDefinitions>
    <CommandUIDefinition Location="Ribbon.Templates._children">
    <GroupTemplate Id="Ribbon.Templates.NewGroupInExistingTab.OneLargeExample">
    <Layout Title="NewGroupInExistingTabOneLarge" LayoutTitle="NewGroupInExistingTabOneLarge">
    <Section Alignment="Top" Type="OneRow">
    <Row>
    <ControlRef DisplayMode="Large" TemplateAlias="Button1" />
    </Row>
    </Section>
    </Layout>
    </GroupTemplate>
    </CommandUIDefinition>
    <CommandUIDefinition Location="Ribbon.WikiPageTab.Scaling._children">
    <MaxSize
    Id="COB.SharePoint.Ribbon.NewGroupInExistingTab.NotificationGroup.MaxSize"
    Sequence="15"
    GroupId="COB.SharePoint.Ribbon.NewGroupInExistingTab.NotificationGroup"
    Size="NewGroupInExistingTabOneLarge" />
    </CommandUIDefinition>
    <CommandUIDefinition Location="Ribbon.WikiPageTab.Groups._children">
    <Group
    Id="COB.SharePoint.Ribbon.NewGroupInExistingTab.NotificationGroup"
    Sequence="15"
    Description="Custome Actions"
    Title="Oltiva DW"
    Template="Ribbon.Templates.NewGroupInExistingTab.OneLargeExample">
    <Controls Id="COB.SharePoint.Ribbon.NewGroupInExistingTab.NotificationGroup.Controls">
    <Button
    Id="COB.SharePoint.Ribbon.NewGroupInExistingTab.NotificationGroup.ContentSources"
    Command="COB.NewGroupInExistingTab.Command.Notify"
    Sequence="10"
    Image16by16="/_layouts/images/NoteBoard_16x16.png"
    Image32by32="/_layouts/images/NoteBoard_32x32.png"
    Description="Uses the notification area to display a message."
    LabelText="Content Sources"
    TemplateAlias="Button1"/>
    </Controls>
    </Group>
    </CommandUIDefinition>
    </CommandUIDefinitions>
    <CommandUIHandlers>
    <CommandUIHandler Command="COB.NewGroupInExistingTab.Command.Notify"
    CommandAction="~remoteAppUrl/Pages/Default.aspx?{StandardTokens}"
    />
    </CommandUIHandlers>
    </CustomAction>
    </Elements>
    The above code works fine, but I want the Custom Action to Open in a new Pop up box, like 
    javascript:SP.UI.ModalDialog.showModalDialog({ url: 'www.google.com', title: 'Default' });
    The movement I change the CommandAction to JavaScript, the app breaks, if I remove the ~remoteAppUrl/Pages/.... the app does not work, it does not apper in the site content.  and in appcatalog it shows wrong version number and says Valid App package
    as no.  what am I doing wrong.
    Regards, Vikram

    Hi Carl,
    As a security policy, a new customer cannot upload images and links. You can try to add links as text and upload your images to Onedrive and share it temporarily.
    Thanks,
    Eric
    Forum Support
    Please remember to mark the replies as answers
    if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected]
    Eric Tao
    TechNet Community Support

  • PLM_AUDITMONITOR New Button

    Hi There,
    I'd like to put a new button on the PLM_AUDITMONITOR detail screen, I've checked a number or BADis from the below list but none of them seem suitable, does anyone know if it is possible to add a new custom tab or button to an existing tab?
    /PLMPCV/QRM_LICENSE_AUDIT      BAdI: License Audit
    ARC_PLM_AUD_CHECK              Archiving Object PLM_AUD: Checks for Add-On-Sp
    ARC_PLM_AUD_WRITE              Archiving Object PLM_AUD: Archiving of Add-On-
    BADI_PLM_AUD_AUDIT_ROLES       Extensions to Roles in Investigations
    BADI_PLM_AUDIT_ACTION_TYPE     Definition of Action Types
    BADI_PLM_AUDIT_ALV             Changes to ALV Table in Audit Management
    BADI_PLM_AUDIT_DS              BAdI for Digital Signature
    BADI_PLM_AUDIT_LIITEM_SERVICE  Enhancements to List Items Services
    BADI_PLM_AUDIT_LIST_ITEM_TYPES Definition of List Item Types in Investigation
    BADI_PLM_AUDIT_OPTIONS
    BADI_PLM_AUDIT_STRUCTURE       Structural View for Investigations (Audit, FME
    BADI_PLM_AUDIT_TYPE            Context Menu Extension
    PLM_AUDIT_ACT_LINK             Audit: Linkage of Objects with the Corrective
    PLM_AUDIT_ALV_GRID             ALV Functions
    PLM_AUDIT_APPEARANCE           PLM Audit Management: Determine Display of Aud
    PLM_AUDIT_ATTRIBUTES           PLM Audit Management: Process Attributes of Au
    PLM_AUDIT_AUO_UPDATE           PLM Audit Management: Create, Change, and Dele
    PLM_AUDIT_AUP_UPDATE           PLM Audit Management: Create, Change, and Dele
    PLM_AUDIT_AUTH_CHECK           Activities in Audit Processing
    PLM_AUDIT_BATCH_JOBS           Scheduling of Background Jobs
    PLM_AUDIT_CALCULATE            Calculation/Valuation of an Audit
    PLM_AUDIT_COR_UPDATE           PLM Audit Management: Create, Change, and Dele
    PLM_AUDIT_GOS                  PLM Audit Management:Generic Object Services -
    PLM_AUDIT_HELP_LINKS           PLM Audit Management: Enhancement for Maint. o
    PLM_AUDIT_IDENTIFIER           Identification of Objects in Audit Management,
    PLM_AUDIT_LAST_GET             Flexibilization of "Display Last Associated Au
    PLM_AUDIT_OBJECT               PLM Audit Management: Audit Object Enhancement
    PLM_AUDIT_QUEST_CONT           Controlling Procedure for Audit Questions
    PLM_AUDIT_QUEST_COPY           Assignment of Question Lists to Audit
    PLM_AUDIT_QUN_UPDATE           PLM Audit Management:Create, Change, and Delet
    PLM_AUDIT_SAP_TXT              PLM_AUDIT_SAP_TXT   Detach Long Text Managemen
    PLM_AUDIT_SEARCHHELP           Enhancement for Search Helps
    PLM_AUDIT_SIGNATURE            Provide Signature for Audit
    PLM_AUDIT_STATUS               PLM Audit Management: Audit Component Status M
    PLM_AUDIT_TEXT_ID              PLM_AUDIT_TEXT_ID   Definition of Text Types P
    PLM_AUDIT_XML                  XML Generation

    Have you looked at how SnippetRunner in the SDK implements the control strip for it's panel? It appears to me all the widgets are just regular widgets put in a ErasablePrimaryResourcePanelWidget, where its binding is set to kBindBottom | kBindLeft | kBindRight,. And of course, you want to specify the ErasablePrimaryResourcePanelWidget is in the bottom of your panel.
    thanks!
    lee

  • How & where to use Java script to create new button in object detail page

    Hi All,
    I want to create "New/Add button" in object detail page. If i am not wrong i need to use java script for that but could you please let me know how & where to use Java script to create new button in object detail page in CRMOD.
    Thanks in advance.
    Regards,
    Manish

    Any related object on the detail page should have an "Add" or "New" or both buttons by default - This is vanilla functionality and will do the required action.
    If you want to modify this behaviour and do something tricky you will potentially have to go for javascript. You should add the javascript on a custom web tab on that Object.
    Admin --> Application Customization --> Contact -->Contact Web Applet
    Now, add your javascript in the code area, after you select the type = HTML for this web applet, expose this web applet on the Contact detail layout and your javascript will be invoked whenever this page is loaded.
    Check this online document to see how javascript can be embedded in CRM on Demand http://helponmyproject.com/TTOCOD/
    Cheers!
    Royston

Maybe you are looking for

  • How can I perform a bulk assignment to one Task

    Hi All, I would like to allow all resources to assign some of their time to a cProjects Task (XXXX Implementation plan). How can I perform a bulk assignment to this task, instead of performing individual assignments? Please help. Thanks, Srini

  • Ipod touch won't charge, reboot, or be recognized by computer or itunes.

    Holding the start and back buttons simultaneously for up to one minute does nothing.  It seems to not be accepting a charge from the computer or the wall charger.  It has not gotten wet.  Do these eventually just die?

  • Need help connecting to a database with an applet

    I am making a Java game that runs in an applet and needs to connect to a Java DB database. I created the database and table in NetBeans and now I have no idea how to connect this applet to the database. I tried using a DataSource and an InitialContex

  • Classes not loaded from cached JAR ???

    I am running an applet package in jar files using the 1.4.1 plug-in. The plug-in is set to cache the JAR file(s) downloaded from the web site, and output in the plug-in console indicates that these JARs are downloaded an cached successfully. I notice

  • Extended desktop option with win xp

    When using bootcamp and winxp (have to because of the software) I am unable to get the 2nd monitor to run (works fine when i boot under mac os) I'm using a macbook pro with the ati 1600x card. does anyone have any ideas about how to enable the extend