SAPUI5 custom button control based on SAPUI5 button

I would like to build a custom button with. The reason for this is because I reuse this button a lot of time.
- It has two style classes.
- The button should extend the SAPUI5 button.
- Uses the jQuery append() function.
How I built my button up to now:
this.btnMyTeam = new sap.ui.commons.Button({
  text : "My Team" + "\n\n" + LanguageEntityAdapter.getInstance().getTextForLabelname("APP_NAME_MYTEAM")+"\n\n\n\n\n",
  press : function() {
  oController.onMyTeamButton();
  this.btnMyTeam.addStyleClass("StartScreenButton MyTeamImage");
//in the onAfterRendering function of the controller
this.btnMyTeam.$().append(
  "<span style=\"color: #8DA3D3 !important; font-size: 25px;\">" + this.getNumberOfDays() + "</span><span>\n\n"  + LanguageEntityAdapter.getInstance().getTextForLabelname("MY_TIME_CORRECTION_ISSUES") + "</span>");
This is not a nice way !!!
So I would like to extend the sap-ui.commons.button. And tried like this. but no success at all.
sap.ui.commons.Button.extend("StartScreenButton", {
  metadata : {
  properties : {
  upperText : {type : "string"},
  htmlAppend1 : {type : "string"},
  htmlAppend2 : {type : "string"},
  upperText : {type : "string"},
  backgroundImgStyleClass : {type : "string"},
  events : {
  onPress : {
  init : function() {
  this.innerButton = new sap.ui.commons.Button({
  text:this.upperText,
  this.innerButton.addStyleClass(this.backgroundImgStyleClass);
  this.innerButton.addStyleClass("StartScreenButton");
  onAfterRendering : function() {
  this.append("");
  renderer : {
  render : function(oRm, oControl){
  oRm.renderControl(oControl);
  oRm.renderControl(this.innerButton);

Hi Dominik,
maybe you can use the following example as an orientation.
Regards
Michael

Similar Messages

  • How to control custom button display or hide in toolbar

    I had been added four buttons in Acrobat Tool bar.
    Now I find a function AVToolButtonSetComputeEnabledProc in SDK that this function only control the button enable or disenable.
    Now I want to control the custom button display or hide, how can I to do?
    Does this SDK have a API to achieve my  need?

    As of Acrobat X, we no longer support dynamic hiding/showing – only enable/disable.

  • TOC Auto-Sync and Custom Buttons

    I have two CHM files.
    One contains English content, the other has French content.  We're okay with having to change Windows display language to French in order to see the localized interface.  It would be great to force it to French without having to do that, but it's better than nothing.
    I have a handy dandy little javascript in my master page to flip between topics in the two CHM files.  This is where my problems begin.
    My flipping back and forth works great but the TOC does not auto-sync despite me having that checkbox enabled on the windows in both projects.
    Then I added a Custom Button in each project (let's call it Cat in English and Chat in French) that points to a Redirect Topic (using the meta refresh method) to launch a Remote Topic.  The redirection works great but again, the TOC does not auto-sync.
    Getting back to my English/French setup... let's say I'm in the English project CHM, I change my display language to French, all of the interface buttons change to French except my Custom Button which is still "Cat".  From what I've read, I'm guessing there's no way around this?  I'd rather not have to put "Cat/Chat" for the Custom Button text or leave it as is where it will stick out like a sore thumb unless my display language always matches my language content.
    Any suggestions or am I stuck with what I have?

    You have two different CHM files, right? One in English and one in French.
    Correct... one English, one French.
    Yay! I understood!
    I'm assuming your JavaScript allows displaying the matching topic from the other language? If so, isn't the matching topic simply replacing the topic that was there before? Here's where it gets real fuzzy. The TOC should already be synced to the topic. Are you saying it loses focus or something?
    My javascript determines the matching topic from the other CHM and changes the window location to the other topic.  If I'm in the English help, on an English topic and click my French link, the link opens the corresponding French topic but my TOC never changes to the French TOC - it's still showing the English one.
    Okay, so that's not really a synchronization issue. In my view, synchronization means expanding and highlighting the page in the TOC so the user may see where they were.
    If there are two projects, one in English and one in French, each project would have its own Custom Button definition, right? So why not enter Chat in the French project?
    I would have Chat in the French project for the Custom Button... the confusion would be if I open the French CHM while my Windows display language is English or change my Windows display language to French and open the English CHM.  In those scenarios, the interface buttons will be correct but the Custom Button text will match the content language rather than the interface language - that's when it will look wrong.
    Gotcha.
    Personally, assuming I'm correctly understanding this setup, I would think you are somewhat asking for trouble if you allow a click within a topic to change the language. I would think it to be a better solution just to keep the user inside the same help file. Choose the language at the beginning if you like, but remain in that language until the file is closed.
    Ah, but the end users want on-the-fly translation by topic without having to open the other CHM and find the topic all over again.  This is CSH, so the user may very well have gotten directly to a topic and would like to see the other language immediately.  Essentially, it should be as though the user closed the current CHM, opened the other CHM and located the exact same topic - instantaneously
    I'm thinking that perhaps a possible answer would involve using an HTML Help Shortcut control to launch a new instance of the viewer. Open the CHM for the correct language and display the relevant topic. What I think you will have issues with here is that the CHM viewer adapts to the language of the operating system I believe. So I'm not sure the TOC will know how to dynamically interpret you want French or English. Maybe it will based on the language choice in RoboHelp. But I'd be surprised if it worked that way.
    Hopefully Pete Lees will see this thread and pop in to offer some other insight.
    Pffft Pffft tap tap tap... is this thing on? Earth to Pete. Calling Pete. Pete, are you there and monitoring this frequency?    ... - - -  .... ---.--
    Cheers... Rick
    Helpful and Handy Links
    RoboHelp Wish Form/Bug Reporting Form
    Begin learning RoboHelp HTML within the day - $24.95!
    Adobe Certified RoboHelp HTML Training
    SorcerStone Blog
    RoboHelp eBooks

  • How can I create a custom button for opening a form?

    I have a parent form having child forms. In my main form I want to create custom buttons for opening child forms. I want to use master-detail form but there are more than one child forms, and in master-detail form I can only create one detail form. So I will create a form based on a table and in that form I will call the child forms by custom buttons. Can I do that?
    Thanx,
    Gulsah.

    This can be easily done. First open up two instances of your Portal. In one window, you will need to go into your component you wish to link FROM. In the other window you will need to go into your component you wish to link TO. In the component you wish to link TO there will be a moduleid. Note this somewhere. Then, you will see an area that says: "Call Interface: Show". Click on this. (In the window you are linking to.). In this window, you will see a bunch of stuff. At the bottom you will see a URL call. This is the call you need to use. At the top, it explains each piece of the URL call. Just subsitute YOUR appropriate information into the URL call. In the form you wish to link FROM, create a button. Once you create this button, it will appear at the bottom, click on it and you will see an area to insert a Javascript. Click the onClick and insert:
    //this is the variable you want to pass from one form to the other
    get_field_name = getField(this.form,'COLUMN_NAME_IN_DATABASE');
    //this is so you can open the "child" form
    window.open('/pls/cc_prod/DAD_NAME.wwa_app_module.link?p_arg_names=_moduleid&p_arg_values=MOD_ID_HERE&p_arg_names=_sessionid&p_arg_values=&p_arg_names=COLUMN_NAME_IN_DATABASE&p_arg values='+GETFIELD_NAME+'&p_arg_names=_COLUMN_NAME_IN_DATABASE_cond&p_arg_values=%3D');
    In the fourth tab, where it says, "....before displaying form" insert the following: (This will tell the form how to handle the getField function.)
    htp.p('<script language="JavaScript1.3">
    < !--
    function getField(form,fieldName)
    var objName = "";
    var tmp = "";
    var dAction = "";
    var sel_idx = 0;
    var cnt = 0;
    var instance = 0;
    var slicedName;
    var fillData = new Array();
    for (var i = 0; i < form.length; i++)
    slicedName = form.elements.name.split(".");
    tmp = slicedName[2];
    instance = parseInt(slicedName[3],10);
    if (!tmp)
    continue;
    objName = tmp;
    if (objName == fieldName)
    return form.elements[i].value;
    //-->
    </script>');
    I hope this helps.
    null

  • Adding custom button to Ribbon for custom list definition

    I'm trying to add a custom button to the ribbon, specifically for a custom list definition.  I have two custom list definitions, one for a document library (Type="11008") and one for a list (Type="10002").  
    I can use the following CustomAction to successfully add a button to the document library ribbon:
    <CustomAction Id="MyCustomAction.DocLib"
    RegistrationId="11008"
    RegistrationType="List"
    Location="CommandUI.Ribbon">
    <CommandUIExtension>
    <CommandUIDefinitions>
    <CommandUIDefinition Location="Ribbon.Library.Share.Controls._children">
    <Button
    Id="MyCustomAction.DocLib.Button"
    Alt="Help"
    Sequence="5"
    Command="SayHi"
    Image32by32Left="-64" Image32by32Top="-320" Image32by32="/_layouts/$Resources:core,Language;/images/formatmap32x32.png"
    Image16by16Left="-64" Image16by16Top="-176" Image16by16="/_layouts/$Resources:core,Language;/images/formatmap16x16.png"
    LabelText="Say Hi!"
    TemplateAlias="o1"/>
    </CommandUIDefinition>
    </CommandUIDefinitions>
    <CommandUIHandlers>
    <CommandUIHandler Command="SayHi" CommandAction="javascript:alert('Hi!');"/>
    </CommandUIHandlers>
    </CommandUIExtension>
    </CustomAction>
    If I try to do the same thing for my list, the button does not show up:
    <CustomAction Id="MyCustomAction.List"
    RegistrationId="10002"
    RegistrationType="List"
    Location="CommandUI.Ribbon">
    <CommandUIExtension>
    <CommandUIDefinitions>
    <CommandUIDefinition Location="Ribbon.List.Share.Controls._children">
    <Button
    Id="MyCustomAction.List.Button"
    Alt="Help"
    Sequence="5"
    Command="SayHi"
    Image32by32Left="-64" Image32by32Top="-320" Image32by32="/_layouts/$Resources:core,Language;/images/formatmap32x32.png"
    Image16by16Left="-64" Image16by16Top="-176" Image16by16="/_layouts/$Resources:core,Language;/images/formatmap16x16.png"
    LabelText="Say Hi!"
    TemplateAlias="o1"/>
    </CommandUIDefinition>
    </CommandUIDefinitions>
    <CommandUIHandlers>
    <CommandUIHandler Command="SayHi" CommandAction="javascript:alert('Hi!');"/>
    </CommandUIHandlers>
    </CommandUIExtension>
    </CustomAction>
    What am I missing that is keeping me from getting this button to show up in my List ribbon?

    Well, I debated just deleting my question, but I'll leave it up in case someone else runs into this.  My custom list definition for my list had <Toolbar Type="Freeform" />.  I don't remember why I changed that, but once I changed
    that back to <Toolbar Type="Standard"/> my custom buttons started showing up as expected.
    The answer
    here pointed me in the right direction.

  • Opening a popup from custom button in a Form

    I have a requirement to open a popup from a custom button of a portal form and once the value is selected from the popup the control should return to the main form with the value selected and set it to some display only field in that same form. It can be done thru' popup of a field directly but how can I do this thru'a button ?.
    Help would be appreciated.
    Thanks
    -Krishnamurthy

    Works for me if I middle-click a bookmark on the Bookmarks Toolbar and browser.tabs.loadBookmarksInBackground is set to true.
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance/Themes).
    *Don't click the Reset button on the Safe mode start window or otherwise make changes.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • How to disable the custom button on alv?

    Hi All,
                       i created a ALV Report .I created a Custom Button on ALV.Based on the input value i need to enable/disable  that Button.
    How can i achieve?And what are the methods i need to code?
    Regards
    Ravi

    Hi Ravi,
       You create the button like this:
    Data: mr_functions type ref to IF_SALV_WD_FUNCTION_SETTINGS,
             mr_button_func type ref to CL_SALV_WD_FUNCTION
      mr_functions ?=  mr_alv_model.
      CALL METHOD mr_functions->create_function
        EXPORTING
          id    = '<<Button Id>>'
        RECEIVING
          value = mr_button_func.
      CREATE OBJECT mr_button.
      mr_button->set_text( 'some text' ).
      mr_button_func->set_editor( mr_button ).
    to sent enable/disable
    mr_button->set_enabled(abap_false).
    hope this will serve your purpose.
    Regards,
    Ritwik.

  • Add customer button to check status screen

    hi everyone
    i'm quite new in developing srm and need your help.
    my customer wants me to put a new customer button on the check status web screen at item level which is supposed to work like the print button.
    so if i want to integrate this customer button do i have to modify the screen and html template? as far as i know there is no customer exit for this?!
    thanks in advance!

    Hi
    <u>Which SRM version are you using ?</u>
    <b>The addition of a new button for a new process means modification to standard screens, HTML templates used in the relevant Internet (Web) Services and the releavnt source code.
    Addition of button can only be done through ITS Template change.Please look in the Internet services say - BBP_BID_INV (for Bid Invitations) Or for service - BBPSC01 (shopping cart) for the exact template in whcih you want to add the button</b>
    <b>You have to define a new button in the screen and in the template. Then assign to it an OK_CODE and manage it in the PBO of the screen.</b>
    There is no BADI which can do this as this is not a SAP funtionality. You need to do a little bit of research on this to get the job done.
    <b>As a start step, You can use the BADIs - BBP_CUF_BADI and  BBP_CUF_BADI_2 to change the display from customer-defined fields to the SAP standard screen. This BAdI enables you to control whether the fields can be edited, and how they are displayed.</b>
    MODIFY_SCREEN method will Show/hide field display and restrict edit options.
    <u>For more information on BADI please go to SPRO -> BADI.
    OR View the information on BADI's.</u>
    http://help.sap.com/saphelp_nw04/helpdata/en/e6/d54d3c596f0b26e10000000a11402f/content.htm
    <u>Implement -  BADI - BBP_CUF_BADI (in SRM 4.0) to display a customized screen.</u>
    <b>Related link -></b>
    a new button required on shoppingcart screen
    <u>Hope above proves helpful to you.</u>
    Regards
    - Atul

  • WCEM:clicking on custom button(Excel Downlaod) giving message "An error occurred; please try again. If the error persists, please contact technical support."

    Hi Expert,
    I need help.
    I created a custom button to download data to an excel sheet. after clicking the button I am getting message
    "An error occurred; please try again. If the error persists, please contact technical support.".
    I tried debugging WCEM, but it is not even reaching that point.
    Your help will be highly appreciated.
    here is the code.
    BitContentview.XHTML
    <wec:commandButton  id="bdtexcel" immediate="true" actionListener="#{cc.vch.DownloadBITData}" type="submit" value="#{i18n['invoices.ui.openitems.printSelected']}"/>
    UI-repository.xml
      <ViewComponent name="BITContentView"  componentHandlerClassName="com.cpr.cprwec.app.comm.module.ebpp.ui.handler.impl.BITDetailViewVCHandler"/>
    BITDetailViewVCHnadler.java
    package com.cpr.cprwec.app.comm.module.ebpp.ui.handler.impl;
    import com.cpr.cprwec.app.comm.module.ebpp.backendobject.interf.EbppBackend;
    import java.io.IOException;
    import java.text.ParseException;
    import java.text.SimpleDateFormat;
    import java.util.Date;
    import java.util.List;
    import javax.faces.context.FacesContext;
    import javax.faces.context.FacesContext;
    import javax.faces.event.ActionEvent;
    import javax.servlet.ServletOutputStream;
    import javax.servlet.http.HttpServletResponse;
    import com.cpr.cprwec.app.comm.module.ebpp.modulemgmt.impl.EbppModuleAccessImpl;
    import com.cpr.cprwec.app.comm.module.ebpp.modulemgmt.interf.EbppModuleAccess;
    import com.cpr.cprwec.app.comm.module.ebpp.ui.dto.impl.DisputeDataDTOImpl;
    import com.cpr.cprwec.app.comm.module.ebpp.ui.dto.impl.OpenItemDTOImpl;
    import com.cpr.cprwec.app.comm.module.ebpp.ui.dto.interf.DisputeDataDTO;
    import com.cpr.cprwec.app.comm.module.ebpp.ui.dto.interf.OpenItemDTO;
    import com.cpr.cprwec.app.comm.module.ebpp.ui.dto.impl.BITDataDTOImpl;
    import com.cpr.cprwec.app.comm.module.ebpp.ui.dto.interf.BITDataDTO;
    import com.cpr.cprwec.app.comm.module.ebpp.ui.dto.impl.BITDetailDTOImpl;
    import com.cpr.cprwec.app.comm.module.ebpp.ui.dto.interf.BITDetailDTO;
    import com.sap.wec.app.common.module.common.attachment.businessobject.interf.Attachment;
    import com.sap.wec.tc.core.backend.sp.jco.JCoConnection;
    import com.sap.wec.tc.core.businessobject.BusinessObjectException;
    import com.sap.wec.tc.core.common.exceptions.ApplicationBaseRuntimeException;
    import com.sap.wec.tc.core.common.logging.WCFLocation;
    import com.sap.wec.tc.core.common.searching.businessobject.impl.GenericSearch;
    import com.sap.wec.tc.core.common.searching.businessobject.interf.GenericSearchReturnResultData;
    import com.sap.wec.tc.core.common.util.GenericFactory;
    import com.sap.wec.tc.core.common.util.Message;
    import com.sap.wec.tc.core.common.util.MessageList;
    import com.sap.wec.tc.core.common.util.table.Table;
    import com.sap.wec.tc.core.common.util.table.TableRow;
    import com.sap.wec.tc.core.modulemgmt.ForeignModuleAccess;
    import com.sap.wec.tc.core.modulemgmt.ModuleAccess;
    import com.sap.wec.tc.core.modulemgmt.exceptions.ModuleInactiveException;
    import com.sap.wec.tc.core.modulemgmt.exceptions.ModuleLifecycleException;
    import com.sap.wec.tc.core.runtime.WecFrameworkRuntime;
    import com.sap.wec.tc.core.runtime.WecSession;
    import com.sap.wec.tc.core.runtime.jsf.WecFrameworkRuntimeJSF;
    import com.sap.wec.tc.core.runtime.jsf.composition.PageManagerBean;
    import com.sap.wec.tc.core.runtime.navigation.NavigationCondition;
    import com.sap.wec.tc.core.ui.composition.menu.MenuManager;
    import com.sap.wec.tc.core.ui.composition.menu.MenuMetadataException;
    import com.sap.wec.tc.core.ui.vc.BuildTime;
    import com.sap.wec.tc.core.ui.vc.NavigationParameterBinding;
    import com.sap.wec.tc.core.ui.vc.RequestParameterBinding;
    import com.sap.wec.tc.core.ui.vc.impl.ViewComponentHandlerBaseImpl;
    import com.cpr.cprwec.app.comm.module.ebpp.businessobject.interf.BIT;
    import com.cpr.cprwec.app.comm.module.ebpp.businessobject.impl.BITImpl;
    public class BITDetailViewVCHandler extends
            ViewComponentHandlerBaseImpl<EbppModuleAccess> {
        protected static final WCFLocation LOCATION = WCFLocation
                .getInstance(BITDetailViewVCHandler.class.getName());
        public BITDataDTO bitDataDTO;
        public BITDetailDTO bitDetailDTO;
        public List<BITDataDTO> BITDataDTOList;
        public List<BITDetailDTO> BITDetailDTOList;
        public boolean noBITData;
        public boolean noBITDetail;
        public boolean renderPanel = true;
        public boolean isDownloadBITData;
        public boolean isDownloadBITDetail;
        public boolean downloadStarted=false;
        public boolean BITFound =false;
        public boolean isBITFound() {
            return BITFound;
        public void setDownloadStarted( boolean downloadStarted ){
            this.downloadStarted = downloadStarted;
        public boolean getDownloadStarted(){
            return this.downloadStarted;
        public void setBITFound(boolean BITFound) {
            this.BITFound = BITFound;
        public String getObjectID() {
            return objectID;
        public void setObjectID(String objectID) {
            this.objectID = objectID;
        public List<BITDataDTO> getBITDataDTOList() {
            return BITDataDTOList;
        public List<BITDetailDTO> getBITDetailDTOList() {
            return BITDetailDTOList;
        public Boolean getNoBITData() {
            return noBITData;
        public Boolean getNoBITDetail() {
            return noBITDetail;
        public Boolean getRenderPanel() {
            return renderPanel;
        private static final int DEFAULT_BUFFER_SIZE = 1024000;
        public Attachment attachmentData;
        public Attachment getAttachmentData() {
            return attachmentData;
        @RequestParameterBinding(maxLength = 1024)
        protected String objectID;
        @BuildTime
        public String processBuildTime() throws BusinessObjectException {
            BIT BIT = null;
            noBITData = noBITDetail = false;
            renderPanel = true;
            if (isLoggedIn()) {
                if ( isDownloadBITData == true ){
                    this.downloadBITDataExcel();
                else {
                this.getModuleAccess().getBITBO().clearMessages();
                BIT = this.moduleAccess.getBITBO().getBITFromBackend(objectID);
                BITDataDTOList = BIT.getBITDataDTOList();
                BITDetailDTOList = BIT.getBITDetailDTOList();
                MessageList objectData = this.getModuleAccess().getBITBO()
                        .getMessageList();
                if (objectData.size() > 0) {
                    noBITData = noBITDetail = true;
                    renderPanel = false;
                    this.addMessageList(objectData);
            return checkLoginCondition();
        private boolean isLoggedIn() {
            return checkLoginCondition() == null;
        private String checkLoginCondition() {
            NavigationCondition navCondition = getNavigationCondition("login");
            if (!navCondition.isFullfiled()) {
                navCondition.addToNavigationStack();
                return navCondition.getOutcome();
            return null;
        public String downloadBITData(){
            downloadStarted = true;
            isDownloadBITData = true;
            downloadBITDataExcel();
            return checkLoginCondition();
        public void downloadBITDataExcel() {
        //    dummyDebug("downloadBITDataExcel", BITDataDTOList.size(), "", "" );
            if (BITDataDTOList.size() > 0) {
                try {
                    attachmentData = this.getModuleAccess().getDownloadBO()
                            .getBITDataExcel(BITDataDTOList);
                    if (attachmentData != null) {
                        FacesContext faces = FacesContext.getCurrentInstance();
                        HttpServletResponse response = (HttpServletResponse) faces
                                .getExternalContext().getResponse();
                        response.reset();
                        response.setContentType(attachmentData
                                .getAttachmentMimeType());
                        response.setContentLength(attachmentData
                                .getAttachmentContent().length);
                        response.setHeader("Content-disposition",
                                "attachment;filename="
                                        + attachmentData.getAttachmentName());
                        response.setBufferSize(DEFAULT_BUFFER_SIZE);
                        ServletOutputStream out;
                        try {
                            out = response.getOutputStream();
                            out.write(attachmentData.getAttachmentContent());
                            out.flush();
                            faces.responseComplete();
                        } catch (IOException e) {
                            throw new ApplicationBaseRuntimeException(
                                    "Problem opening file", e);
                        } finally {
                            attachmentData = null;
                } catch (BusinessObjectException e) {
                    e.printStackTrace();
            isDownloadBITData = false;

    Thanks Hamendra for checking the issue.
    I am setting up breakpoints in WCEM, tab JAVA EE then from menu RUN->Toggle brekpoints and then debug configuration.
    the breakpoints are in several places in  handler class BITDetailviewVCHandler class including method  downloadBITData.
    this method I am calling from BitContentview.XHTML
    <wec:commandButton  id="bdtexcel" immediate="true" actionListener="#{cc.vch.DownloadBITData}" type="submit" value="#{i18n['invoices.ui.openitems.printSelected']}"/>
    When the BIT page is loading the control stops at the breakpoint.
    but it is not stopping there  when i click the 'Excel Download' button.
    How do I get the log file. I am very new to WCEM, please guide me.
    I tried to debug the UI using Google chrome. it is giving me the following error.
    POST https://<>/<>/<>/<>HomePage.jsf?wec-appid=<>MAINAPP6&wec-locale=en_US 500 (Internal Server Error)
    when I expand the node
    c.event.trigger:<>/<>/javax.faces.resource/sap/comp.theme/templates/jquery/lib/jquery-1.4.2.min.js.jsf:54
    c.event.trigger:<>/<>/javax.faces.resource/sap/comp.theme/templates/jquery/lib/jquery-1.4.2.min.js.jsf:54
    c.event.trigger:<>/<>/javax.faces.resource/sap/comp.theme/templates/jquery/lib/jquery-1.4.2.min.js.jsf:66
    (anonymous function):<>/<>/javax.faces.resource/sap/comp.theme/templates/jquery/lib/jquery-1.4.2.min.js.jsf:30
    c.extend.each:<>/<>/javax.faces.resource/sap/comp.theme/templates/jquery/lib/jquery-1.4.2.min.js.jsf:24 c.fn.c.each:<>/<>/javax.faces.resource/sap/comp.theme/templates/jquery/lib/jquery-1.4.2.min.js.jsf:66 c.fn.extend.trigger:<>/<>/javax.faces.resource/<>dev/comp.theme/templates/jquery/js/commandButton.js.jsf:31
    com.sap.wec.commandButton.submitForm:<>/<>/main/<>HomePage.jsf?wec-appid=<>MAINAPP6&objectID=500000233&page=D61CFFF8E75D48A1B348F315D209EFF9&wec-locale=en_US:48 onclick
    Navigated to https://wsapdjd803.<>.ca:<>/<>/main/<>HomePage.jsf?wec-appid=<>MAINAPP6&wec-locale=en_US
    Seems to be it is failing somewhere commandButton-related JavaScript functions
    Thanks
    Subassish

  • Custom button and Custom fields in item data tab of SRM shopping cart

    Hello All,
    I am new to SRM 7.
    There is a requirement to add a custom button and on the click of a button I need to pop up some custom fields , and
    store it in SRM system.
    The webdynpro component is /SAPSRM/WDC_UI_SC_DOFC_D1.
    Can you pls tell me the process of adding, popup and transfer of the fields to SRM tables.
    Should we adding some fileds in SPRO->Extensions and field control.
    Kindly help.
    Regards
    Vinay

    Hi,
    I dont have access to SRM system but you can use enhancment concepts to enhance the standard component.
    Refer http://wiki.sdn.sap.com/wiki/display/SRM/HidingtabofShoppingcartinSAPSRM7.0 which is having something simmilar requirment.
    also refer http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/700317da-bd79-2c10-368e-8f18bf5d8b81?QuickLink=index&overridelayout=true
    I hope this will helpful for you to achive your requirments.
    Thanks,
    Chandra

  • Custom button to print

    Hello all,
    I created a custom button that I want to use to print the slide instead of the generic widget from Captivate. I thougt I would create a button that wouold have an advanced action that would execute a window.print() japavscript, but it wont print. I basically want what the Print widget does execpt on the cusomt button I made. Can someone please help. Thanks.
    UPDATE:
    I decided to use the Print widget that is already there, however, it prints really large. Is there a way to control the size of the print out or make it landscape?
    Thanks, again.

    Hello,
    Welcome to Adobe Forums.
    When you click on the button, does it bring up the Print Window ?
    Thanks,
    Vikram

  • Custom Buttons in ALV Grid

    Hi Experts,
    I have a ALV grid. I have added some custom buttons to it.
    I want to change dynamically enable of disable some of the buttons in the ALV.
    Please help me through.
    I tried free, clear refresh for the grid object, control object and the event handler objects also.
    still I get the old buttons when i execute the program.
    Thanks.

    Hi,
    class lcl_event_receiver implementation.
      method handle_toolbar.
    IF OK_CODE EQ 'XYZ'.
    * append an icon to show booking table
        clear ls_toolbar.
        move 'BOOKINGS' to ls_toolbar-function.
        move 'Show Bookings'(111) to ls_toolbar-quickinfo.
        move 'Detail'(112) to ls_toolbar-text.
        move ' ' to ls_toolbar-disabled.                         " Enable
        append ls_toolbar to e_object->mt_toolbar.
      clear ls_toolbar.
        move 'FILGHT' to ls_toolbar-function.
        move 'Show Flight'(113) to ls_toolbar-quickinfo.
        move 'FlightDetail'(114) to ls_toolbar-text.
        move 'X' to ls_toolbar-disabled.                            " Disable
        append ls_toolbar to e_object->mt_toolbar.
    ELSE.
    * append an icon to show booking table
        clear ls_toolbar.
        move 'BOOKINGS' to ls_toolbar-function.
        move 'Show Bookings'(111) to ls_toolbar-quickinfo.
        move 'Detail'(112) to ls_toolbar-text.
        move 'X' to ls_toolbar-disabled.
        append ls_toolbar to e_object->mt_toolbar.
    * append an icon to show booking table
        clear ls_toolbar.
        move 'FILGHT' to ls_toolbar-function.
        move 'Show Flight'(113) to ls_toolbar-quickinfo.
        move 'FlightDetail'(114) to ls_toolbar-text.
        move ' ' to ls_toolbar-disabled.
        append ls_toolbar to e_object->mt_toolbar.
    ENDIF.
      endmethod.
    Endclass.
    call method grid1->set_table_for_first_display
             exporting i_structure_name = 'SFLIGHT'
                       is_layout        = gs_layout
             changing  it_outtab        = gt_sflight.
        create object event_receiver.
        set handler event_receiver->handle_user_command for grid1.
        set handler event_receiver->handle_toolbar for grid1.
        call method grid1->set_toolbar_interactive.
    call method sender->refresh_table_display.
      set handler event_receiver->handle_toolbar for grid1.
        call method grid1->set_toolbar_interactive

  • Custom button in FPM component

    Hello experts,
    In a requirement i want to add custom button in FPM_OIF_COMPONENT. For this i followed following steps -
    1. In SE80 transaction open FPM_OIF_COMPONENT
    2. Select the requisite component configuration.
    3. Start Configurator.
    4. In configuration, enter component name & configuration ID then select option 'Continue in Display mode'.
    5. In display mode, in 'Additional Functions', select 'Create customization' or if configuration already exists, then select 'Edit Configuration'.
    6. In toolbar schema, I added one toolbar element as 'Other Function' and set the properties as enabled checked and visibility as 'Is Visible'.
    7. Save.
    8. After this to control the action of the new button, i added the action 'ZACT' in 'CNR_VIEW' by enhancing the view.
    9. In SPRO->SRM->Cross application basic settings->Extensions & fieldcontrol->Assign actions, i assigned the action to set type and business object.
    10. Then in SPRO->SRM->Cross application basic settings->Extensions & fieldcontrol->Control Actions->Configure control on header level, I added PDO action type, BO type, PDO action enabled, dynamic class & method to control the button visibility.
    After doing all the steps above, when i open the required window in SRM portal, I am unable to view the custom button added.
    Please let me know where i am going wrong.

    Hi Yayayi,
    You need to refer FPM event id of the corresponding button but not action id. As you said you have given FPM_EVENT_ID as ZACT, write the code in process event of component controller of  your WDP component in which IF_FPM_UI_BUILDING_BLOCK interface has been re-implemented.
    But dont forget to follow the below steps shown in snapshot.
    Hope this helps you.
    Thanks
    KH

  • ALV  issue - capturing user changes in editable fields using custom button?

    Hi,
    I created a custom button in ALV tool bar.   And also in my ALV grid I have couple of fields Editable option. User can change values for these 2 fields.
    My question is -
    After changing values for these editable fields(more than 1 record)  , user will click on custom button and then I have to update all the user changed values in to my internal table(lt_tab)  and then I have to process logic.
    Problem is when user click on Custom button in ALV tool bar it is not having the changed values in lt_tab table.
    Only when user clicks  some thing on ALV grid records or fields then it is getting all the changed values in to lt_tab.
    Can any one tell me how I can get changed values when user clicks on custom button?
    1. Can we place custom button in ALV Grid? instead of ALV tool bar? 
    or
    How I can capture user changes when they click on custom button?
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    TABLES
          T_OUTTAB                          = lt_tab
    Please check this logic-
    CASE r_ucomm.
        WHEN '&IC1'.
    - It_tab  having all changed field values
      WHEN 'custom button'.
          lt_tab  - not having any changed values - showing all initial lt_tab values.
    I highly appreciate your answers on this.
    Thanks.
    Rajesh.

    Hi,
    Use this code, its working:-
    *&      Form  ALV_DISPLAY
    *       SUB-ROUTINE ALV_DISPLAY IS USED TO SET THE PARAMETERS
    *       FOR THE FUNCTION MODULE REUSE_ALV_GRID_DISPLAY
    *       AND PASS THE INTERNAL TABLE EXISTING THE RECORDS TO BE
    *       DISPLAYED IN THE GRID FORMAT
    FORM alv_display .
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
    *     I_INTERFACE_CHECK                 = ' '
    *     I_BYPASSING_BUFFER                = ' '
    *     I_BUFFER_ACTIVE                   = ' '
         i_callback_program                = v_rep_id       " report id
         i_callback_pf_status_set          = 'PF'           " for PF-STATUS
         i_callback_user_command           = 'USER_COMMAND' " for User-Command
    *     I_CALLBACK_TOP_OF_PAGE            = ' '
    *     I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
    *     I_CALLBACK_HTML_END_OF_LIST       = ' '
    *     I_STRUCTURE_NAME                  =
    *     I_BACKGROUND_ID                   = ' '
    *     I_GRID_TITLE                      =
    *     I_GRID_SETTINGS                   =
         is_layout                         = wa_layout      " for layout
         it_fieldcat                       = it_field       " field catalog
    *     IT_EXCLUDING                      =
    *     IT_SPECIAL_GROUPS                 =
         it_sort                           = it_sort        " sort info
    *     IT_FILTER                         =
    *     IS_SEL_HIDE                       =
    *     I_DEFAULT                         = 'X'
         i_save                            = 'A'
         is_variant                        = wa_variant     " variant name
    *     IT_EVENTS                         =
    *     IT_EVENT_EXIT                     =
    *     IS_PRINT                          =
    *     IS_REPREP_ID                      =
    *     I_SCREEN_START_COLUMN             = 0
    *     I_SCREEN_START_LINE               = 0
    *     I_SCREEN_END_COLUMN               = 0
    *     I_SCREEN_END_LINE                 = 0
    *     I_HTML_HEIGHT_TOP                 = 0
    *     I_HTML_HEIGHT_END                 = 0
    *     IT_ALV_GRAPHICS                   =
    *     IT_HYPERLINK                      =
    *     IT_ADD_FIELDCAT                   =
    *     IT_EXCEPT_QINFO                   =
    *     IR_SALV_FULLSCREEN_ADAPTER        =
    *   IMPORTING
    *     E_EXIT_CAUSED_BY_CALLER           =
    *     ES_EXIT_CAUSED_BY_USER            =
        TABLES
          t_outtab                          = it_final      " internal table
       EXCEPTIONS
         program_error                     = 1
         OTHERS                            = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDFORM.                    " ALV_DISPLAY
    *&      Form  USER_COMMAND
    *       SUB-ROUTINE USER_COMMAND IS USED TO HANDLE THE USER ACTION
    *       AND EXECUTE THE APPROPIATE CODE
    *      -->LV_OKCODE   used to capture the function code
    *                     of the user-defined push-buttons
    *      -->L_SELFIELD   text
    FORM user_command USING lv_okcode LIKE sy-ucomm l_selfield TYPE slis_selfield.
    * assign the function code to variable v_okcode
      lv_okcode = sy-ucomm.
    * handle the code execution based on the function code encountered
      CASE lv_okcode.
    * when the function code is EXECUTE then process the selected records
        WHEN 'EXECUTE'. "user-defined button
    * to reflect the data changed into internal table
          DATA : ref_grid TYPE REF TO cl_gui_alv_grid. "new
          IF ref_grid IS INITIAL.
            CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
              IMPORTING
                e_grid = ref_grid.
          ENDIF.
          IF NOT ref_grid IS INITIAL.
            CALL METHOD ref_grid->check_changed_data.
          ENDIF.
    * refresh the ALV Grid output from internal table
          l_selfield-refresh = c_check.
      ENDCASE.
    ENDFORM.
    This will reflect all the changes in the internal table. Now you can include your logic as per your requirement.
    Hope this solves your problem.
    Thanks & Regards,
    Tarun Gambhir

  • Custom Button Nugget

    Custom Control Design: Boolean Buttons
    I was giving help to someone to help them make their buttons look better when I was asked to discuss how to make nice custom controls in a more formal way that everyone could benefit from (special request from Jeff Bohrer) in this thread.
    http://forums.ni.com/t5/LabVIEW/Decal-Custom-Contr​ol/m-p/1544212
    First let me show some of my controls and then we can talk about how they are made. We will also discuss the dos and don’ts of making nice buttons.
    To do something like this you will need to have an artistic flair or access to someone that does. It takes a long time to design and develop the icons that you see. There are many parts and like writing code there are many little pieces that are required to make these things look good. So I am going to have to assume that you have access to custom icons that you want to use for this process.
    First thing that you want to do is create a button on the front panel of the program that you are working on. Right click on the button and you will see and option for advanced and customize.
    This will open a new window which is a custom control window.
    From Here if you click on the wrench button in the menu bar it will allow you to edit the button.
    You will see tweezers after you click this button. This is where the magic happens. If you click on the Window option in the menu bar you will see an option for show parts window. This window will show all of the parts that make up this control. There are three parts for a Boolean button. We are only worried about the button part. You can also click on the button part to edit what you need. If you right click on the button you will see these options.
    We need to talk about some of these options and what they mean when you are importing your custom icons.
    Result of option:
    import from the clipboard - this will distort the picture and it will look fuzzy.
    import from the clipboard at same size - this will distort the picture and it will look fuzzy. It will be worse if the button is bigger than the picture that you are importing.
    Import from file – This is the best option as it will make nice pictures as long as the picture that you are importing is the same size as the button that you are importing to. The way to make your buttons look the best is to edit them in a picture editing program prior to importing them so that they are the same size.
    Import from File at Same Size – This can distort the picture if it is a different size than the button that you are importing to. This can make your pictures look fuzzy.
    So when I make a custom icon I make sure that it is the same size as the button that I am using so I get the best picture quality that I can. You need to also remember that if you resize the button on the front panel that it will distort the picture ion on your new custom button. If you need to make a different button size you need to make a different size icon to go with it. It can get very time consuming to do this correctly.
    Tim
    Johnson Controls
    Holland Michigan
    Attachments:
    Green Button Control.ctl ‏314 KB

    Thanks for the nugget. I was doing some new button designs today, so I add my newest findings right here.
    At first: resizing is a bit critical. Get your design as a vector graphic (svg using inkscape), then use it on a LV button of the same size. A good start for design is tango, because it's all public domain (be aware of licensing issues when using icons from the net, most stuff on wiki-commons is CC-SA='share alike' which might force you to open your code!) and svg.
    In this case, I use the IEC5010 On/Off Symbol (found here). Using inkscape, I did export a 16x16 png (attached). Now let's get it into LV:
    Place a 'Modern->Boolean->Round LED' on a FP and go to Advanced->Customize. Little trick from the micro-nuggets-thread: use the win explorer to drag-drop the png file on the control FP. Now Select and Cut/Ctrl+X. Right-Click the Round LED and select 'Import Picture' -> Decal. (Do NOT switch to edit mode for this). Wow, the frame is now around both the on and off led. Below my result for 64x64 px size.
    Get different sizes by: 1. export the png from Inkscape in the appropiate size and 1. Resize the round LED befor copying it from the clipcoard.
    As mentioned in the original post, the image does not scale with the button resizing as usual.
    I have some more tricks. Hope the weekend gives me the time to post them.
    Felix
    www.aescusoft.de
    My latest community nugget on producer/consumer design
    My current blog: A journey through uml
    Attachments:
    On_Off_16.png ‏1 KB

Maybe you are looking for

  • How do I fix:  "Adobe acrobat 9.5 has stopped working"

    Whenever I try to open a file using Adobe Acrobat 9.5, I get the message:  "Adobe acrobat 9.5 has stopped working"  "A problem caused the program to stop working correctly.  Please close the program".  Acrobat reader 9.5 appears to work fine.  I am a

  • Difference between Purchase Order and Scheduling Agreement

    Can any one explain the main differences between a Purchase Order and a Scheduling Agreement? Thanks in advance

  • Discoverer 4i Installation and patch 3201601

    Hi! I've installed Discoverer Administration Edition (Admin + Desktop) using the Oracle CD version 4.1.37 for Windows 95/98/NT/2000 Then, I applied the patch 3201601. I chekced the tnsnames.ora file in C:\ornt\NET80\ADMIN. I reate my required connect

  • CS 5.5 Windows maximizes behind taskbar bug.

    Are there any recommendations for the bug above?

  • My iPhone 3G fell in a drink

    I know, I know. When I upgraded to the 4, I gave my old 3G to my roommate. Well, he said it fell in his drink and "it could have been in there for up to an hour"! It's been in rice for 3 days and you can still see water in the screen. Anyone know how