Create a Custom Component With Custom Shape

Hi all,
         I want to create a Component that should have a CustomShape.
         I will explain this in detail ,Suppose now we have a Button, Button will be having some Rectangular Shape, But in my Case i dont want this    Rectangula Shape, I will be giving x and y positons Depending on that positon It has to form a Component.
         Any Help is Greatly Appreciated.

Even if you use transparent images, you will still end up with a rectangular bounding box.
You can use programmatic drawing and get a shape that does not involve a rectangle:
http://livedocs.adobe.com/flex/3/html/help.html?content=skinning_6.html
http://livedocs.adobe.com/flex/3/html/Drawing_Vector_Graphics_5.html
http://livedocs.adobe.com/flex/3/html/help.html?content=Drawing_Vector_Graphics_4.html
If this post answers your question or helps, please mark it as such.

Similar Messages

  • Is  Creating a Custom Component and Custom UIComponent are same in Flex ??

    Hi ,
    I am getting confusion in the terminology of words  with respect to Custom  Components .
    Please let me know whether  Creating a Custom Component and Custom UIComponent are same in Flex ??
    Because i have created some  Custom Components based on Form Container based on my business screens .
    Does they both Custom Component and Custom UIComponent mean the same ??
    Please tell me .
    Thanks in advance

    There seems to be a little confusion here. Think of it this way:
    A basic UIComponent by itself is not visible; you can add something you can see to it to make a visual custom component. For example, a ComboBox component is a UIComponent with a ComboBox added to it.
    The UIComponent is the lightest weight component available from which you can create other components. I use it as the base for custom components that the user cannot see, like a data manager.
    HTH,
    Carlos

  • Custom component with additional tags

    Hi. I need to write complicated custom JSF component.
    I know how to write simple custom components, and receive String variables from tag attributes e.g.
    https://github.com/devalentino/temp/blob/master/src/main/java/net/monopolyclub/components/component/UserData.java
    But now I need to write custom component with additional tags (for example like dataTable and column tags).
    How can I write such component? How can I receive collections in my component? How can I work with additional tags in my component.
    for example I need something like:
    <m:chat>
         <m:tab value="#{UserList}" />
         <m:message value="#{MesageMap}" />
    </m:chat>
    where UserList - Collection with current users and MessageMap is Map with User as key and message as value.

    Iam using pt:ptdata.joincurrcommunitydata
    here is some code
    <pt:ptdata.joincurrcommunitydata pt:id="menutabsjoin" />
    <pt:logic.foreach pt:var="temp2" pt:data="menutabsjoin">
    <span class="CommunityPage">
    <pt:core.html href="$temp2.url" pt:tag="a">
    <pt:core.html pt:tag="img" src="$temp2.img" alt="$temp2.title" border="0" align="absmiddle" height="$temp2.imgheight"      width="$temp2.imgwidth" />
                        <pt:logic.value pt:value="$temp2.title" />
                             </pt:core.html>
                             </span>
                             </pt:logic.foreach>
    But the URL that is generated is not having the CommunityID, hence it errors out saying object not found.
    Any help would be appreciated?
    Thanks
    kartik

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

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

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

  • No customer found with customer number

    hello experts,
    In R/3 e-commerece when we try to create a order, we are not able to create the order, we get a message as
    No customer found with customer number
    Even the images are displayed.
    Please Help...................
    Thanks & Regards
    namitha

    hello Deborah Corsi,
    Thanks for immediate reply, Our backend system version is in kernel 700, we have not upgraded 701.
    could you let us know what is  Ehp4.
    Warm Regards
    Namitha

  • How to create a text Component With Certain Properties

    I need to create a text component with the following properties:
    Has Capability to be italic, right/left aligned, have different background / foreground colors, and most importantly, the ability to have a fixed width and a height that is set by the amount of text in it (ie line wrapping expands the field vertically).
    It should be a simple exercise, but I cannot seem to figure out how to do it.

    Here is the correct syntax :
    private static JEditorPane constructPane(String text, int normWidth, int normHeight, boolean rightAlign, boolean italic,boolean isWhite) {
              JEditorPane pane = new JEditorPane();
              pane.setEditable(false);
              pane.setContentType("text/html");
              pane.setText(
                   "<html><head></head><body>"
                   + (italic?"<i>":"")
                   + "<table><COLGROUP><COL width=\""+normWidth+"\"><THREAD><tr><td valign=\"top\" align="+(rightAlign?"\"right\"":"\"left\"")+">"
                   + text+"</td></tr></table>"
                   + (italic?"</i>":"")
                   + "</body></html>");
              pane.setSize(normWidth,normHeight);
              if(isWhite)
                   pane.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createMatteBorder(1,0,1,0,Color.WHITE),BorderFactory.createEmptyBorder(0,1,0,1)));
                   pane.setForeground(Color.WHITE);
              else {
                   pane.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createMatteBorder(1,0,1,0,Color.BLACK),BorderFactory.createEmptyBorder(0,1,0,1)));
                   pane.setForeground(Color.BLACK);
              return pane;
         }

  • SAP ECO 5.0 B2B: No customer found with customer number

    Hello all,
    we´re using SAP E-Commerce for ERP 5.0 (SP9) with backend SAP ECC 6.0 EHP4.
    We have changed from SU05 to SU01 user concept. All existing SU05 users have been migrated to SU01. In SU01 (under references) for each SAP E-Commerce user the mapping (user <=> sold-to-party) has been set up as described in the online documentation.
    For example: SU01-User u2018500070u2019: Tx SU01 under 'references':   Obj.type u2018KNA1u2019 with key u2018500070u2019. A corresponding customer master record u2018500070u2019 can be found in the ERP system using transaction VD03.
    In the shopping basket maintenance the following error message occurs: u2018No customer found with customer numberu2019.
    In our testing system (SAP E-Commerce for ERP 5.0 (SP12) with SAP ECC 6.0 EHP0) everything is working fine. The problem only occurs in the customer ERP system (SAP ECC 6.0 EHP4).
    Thanks for your help in advance.
    Regards,
    AEV

    At the code there are some checks for the backend system. A normal ECC 6.0 gives there a version "700" back. If you have an ECC 6.0 with EHP4, that will give an other number back from backend system. I think "701".
    At the Source-Code of ecommerce, there is no check for 701... Add that to the sourcecodes and it will work.
    Example:
    if (r3Release.equals(RFCConstants.REL46C) ||
                        r3Release.equals(RFCConstants.REL620) ||
                            r3Release.equals(RFCConstants.REL640) ||
                                 r3Release.equals("701"))
    Im not 100% sure about this because i had the same problem in ISA 4.0, not ecommerce 5.0.

  • Creating an IBase Component WITH Connection Object (ISU_CONNOBJ)

    Hello
    I want to create an IBase Component with relation to a Connection Object. I am able to create the first one (IBase Component) but I do not know how to create a Connection Object for the newly created IBase Component.
    I am doing everything using the BOL framework and was unable to find a proper relation from IBase Component or Product to Connection Object.
    Can you help me out?
    regards
    Mateusz

    Solved!
    Apparently after creating new IBase Component and new Product (assigned to the newly created IBase Component) it is required to execute transaction save and commit for the object of newly created Product. After that system sees newly created objects.
    Required code (after creation of a new Product):
    DATA:
      lo_core TYPE REF TO cl_crm_bol_core,
      lo_new_product TYPE REF TO cl_crm_bol_entity,
      lo_factory TYPE REF TO cl_crm_bol_entity_factory,
      lo_transaction TYPE REF TO if_bol_transaction_context.
      lo_core = cl_crm_bol_core=>get_instance( ).
      lo_factory = lo_core->get_entity_factory( 'Product' ).
      lo_new_product = lo_factory->create( )
      lo_transaction = lo_core->get_transaction( iv_entity = lo_new_product ).
      lo_transaction->save( iv_force_save = abap_true ).
      lo_transaction->commit( ).

  • Writing a custom component with multiple fields.

    Does anyone have some pointers on writing a custom component that properly handles multiple input fields?
    An example usage might be as follows:
    Assume the following java classes:
    public interface Address {
        //... getters/setters for Address.
    public class Company{
        Address getAddress(){...};
    }The tag usage might be something like the following:
    <custom:address value="#{myCompanyBean.address}" />
    Extending UIComponentBase I can easily render the output and create all the needed input elements. I'm also able to properly retrieve the submitted values in the decode method. But I'm unsure how to handle the "UpdateModelValues" step. Do I simply over-ride processUpdates, or is there more housekeeping to be done?
    Thanks.

    I'm guessing that doing addChild inside createChildren causes an infinite loop.
    Why aren't you just doing this with MXML?  it would be a lot simpler.

  • How to code spark custom component with variable number of (skin)parts?

    Hello. I'm trying to code a complex Spark custom component that may have a variable number of parts. To help you understand the requirements, the component can be visualized as an HSlider with a unlimited number of thumbs (as opposed to one).
    How do I, in general, represent these thumbs in the host component as well as the skin? If I had a fixed number of thumbs, say 5, I could easily represent them as 5 button SkinParts declaratively. However, it's not immediately clear to me how to deal with a variable number of them.
    I've studied the HSlider implementation as well as other components and can't find an example that fits this pattern. The closest thing that I can think of is to represent the thumbs as a DataGroup and provide a custom item renderer to render them. Couple that with the general HSlider behaviors that I need to preserve, such as the fairly involved local/global coordinate translations, I don't know whether the approach will work.
    Any better ideas? Thanks.

    #2 sounds utterly strange to me. How would I utilize the phase id?The code below shows my idea whereas I never validate it in any real projects:
    public class MyPhaseListener implements PhaseListener {
         private static final String IDKEY = "PHASEID";
         public static PhaseId getCurrentPhaseId() {
              return (PhaseId) FacesContext.getCurrentInstance().getExternalContext().getRequestMap().get(IDKEY);
         public void beforePhase(PhaseEvent event) {
    event.getFacesContext().getExternalContext().getRequestMap().put(IDKEY,event.getPhaseId());
         public PhaseId getPhaseId() {
              return PhaseId.ANY_PHASE;
    }You can write your constructor like as:
    if (MyPhaseListener.getCurrentPhaseId().equals(PhaseId.RENDER_RESPONSE ) {
         /* create children because this is the first time to create the component */
    }

  • Custom JSF component with custom value datatype

    I've created a simple custom JSF component with a decode, encodeBegin as follows:
    public void decode(FacesContext context) {
        Map<String, String> requestParameters = context.getExternalContext().getRequestParameterMap();
        String clientId = getClientId(context);
        String value = requestParameters.get(clientId);
        setSubmittedValue(value);
        super.decode(context);
    public void encodeBegin(FacesContext context) throws IOException {
        ResponseWriter response = context.getResponseWriter();
        String clientId = getClientId(context);
        response.startElement("input", this);
        response.writeAttribute("name", clientId, "id");
        response.writeAttribute("type", "text", null);
        String value = (String) getValue();
        if (null != value) {
             response.writeAttribute("value", value, "value");
        response.endElement("input");
    }With also:
    setRendererType(null);as part of the constructor.
    This component works just fine both inside and outside of a dataTable component, as expected.
    What I would like to do now is to replace the String value datatype with a custom class, for example MyDataType. For this I do:
    public void decode(FacesContext context) {
        Map<String, String> requestParameters = context.getExternalContext().getRequestParameterMap();
        String clientId = getClientId(context);
        String value = requestParameters.get(clientId);
        MyDataType myData = (MyDataType) getValue();
        MyDataType newData = (MyDataType) myData.clone();
        newData.setValue(value);
        // copy old object and only update the changed field of this object
        setSubmittedValue(newData);
        super.decode(context);
    public void encodeBegin(FacesContext context) throws IOException {
        ResponseWriter response = context.getResponseWriter();
        String clientId = getClientId(context);
        response.startElement("input", this);
        response.writeAttribute("name", clientId, "id");
        response.writeAttribute("type", "text", null);
        MyDataType value = (MyDataType) getValue();
        if (null != value) {
             response.writeAttribute("value", value.getValue(), "value");
        response.endElement("input");
    }Now this works perfect outside of a dataTable component, but inside it fails to update the property on the BB.
    Are there somewhere examples on how to properly use custom datatypes as values for UIInput components? Also how to only partially update the value (like I do, I only want to update the value field of the MyDataType object)

    Even if I encode the entire MyDataType via hidden input elements and decode it again (i.e. not using a cloned getValue) it's still not working side a dataTable.
    Could it have to do something with me using Facelets?

  • Problem custom component with children in RestoreView phase

    Hi there!
    I've got a problem with a custom component that I am writing. It consists of several UISelectOne and UIInputText components. Depending on the value selected in the UISelectOne components, the UISelectOne and UIInputText components may change. Therefore I attached a ValueChangeListener to the UISelectOne components. So far, so good.
    The problem is, when the event is triggered, I get an ArrayIndexOutOfBoundsException. It took me a while to track it down. The problem seems to be, that during the Restore View phase, the StateManager's restoreComponentTreeStructure method first creates the component again and later restores its tree structure.
    During creation of the component, its constructor is called in which I add the children to the component. While restoring the tree structure, the StateManager again adds the children to the component. So the list of my component's children contains each child twice.
    The exception is due to the fact that in the saved state array only the original component's states are saved (which is perfectly right). So while restoring state and iterating through the component's children, the exception is thrown for the first child which is twice in the list (which is also perfectly right).
    I hope this description is not too confusing. My question is, if anyone can give me a hint what I am doing wrong here? How can I avoid the component being initialized again? Or where should I add the children to the component?
    Thanks for any advices!

    Hi again,
    I've perpared a minimal example (which in fact is quite big, but considering it's a custom tag it's probably not possible to make it smaller):
    The UITest class (as you can see I add the child component in the constructor):
    package test;
    import java.io.IOException;
    import java.util.*;
    import java.util.ArrayList;
    import java.util.List;
    import javax.faces.application.Application;
    import javax.faces.component.*;
    import javax.faces.context.FacesContext;
    import javax.faces.context.ResponseWriter;
    import javax.faces.event.ValueChangeEvent;
    import javax.faces.model.SelectItem;
    public class UITest extends UIInput {
      public static final String COMPONENT_TYPE = "Test";
      public static final String COMPONENT_FAMILY = "Test";
      private UISelectOne selectOne;
      private UISelectItems selectItems;
      public UITest(){
        Application application = FacesContext.getCurrentInstance().getApplication();
        selectItems = (UISelectItems)application.createComponent(UISelectItems.COMPONENT_TYPE);
        List items = new ArrayList();
        items.add(new SelectItem("One", "one"));
        items.add(new SelectItem("Two", "two"));
        selectItems.setValue(items);
        selectOne = (UISelectOne)application.createComponent(UISelectOne.COMPONENT_TYPE);
        selectOne.getAttributes().put("onchange", "submit()");
        Class[] params = {ValueChangeEvent.class};
        selectOne.setValueChangeListener(application.createMethodBinding("#{TestBean.valueChange}", params));
        selectOne.getChildren().add(selectItems);
        this.getChildren().add(selectOne);
      public void encodeChildren(FacesContext context) throws IOException {
        ResponseWriter writer = context.getResponseWriter();
        Iterator children = getChildren().iterator();
        while(children.hasNext()){
          UIComponent child = (UIComponent)children.next();
          if(child.isRendered()){
            child.encodeBegin(context);
            if(child.getRendersChildren()){
              child.encodeChildren(context);
            child.encodeEnd(context);
      public boolean getRendersChildren(){
        return true;
    }The component tag class:
    package test;
    import javax.faces.webapp.UIComponentTag;
    public class TestTag extends UIComponentTag {
      public String getComponentType() {    return "Test";  }
      public String getRendererType() {    return null;  }
    }Tag registration:
      <tag>
        <name>test</name>
        <tag-class>test.TestTag</tag-class>
      </tag>The backing bean:
    package test;
    import javax.faces.event.ValueChangeEvent;
    public class TestBean {
      private String currentValue;
      public void valueChange(ValueChangeEvent event) {
        System.err.println(event.getNewValue());
      public String getCurrentValue() {
        return currentValue;
      public void setCurrentValue(String currentValue) {
        this.currentValue = currentValue;
    }And finally the definition in the faces-config:
       <component>
          <component-type>Test</component-type>
          <component-class>test.UITest</component-class>
       </component>
       <managed-bean>
        <managed-bean-name>TestBean</managed-bean-name>
        <managed-bean-class>test.TestBean</managed-bean-class>
        <managed-bean-scope>session</managed-bean-scope>
       </managed-bean>When included in the JSP and then clicked on the combobox, I get an ArrayIndexOutOfBoundsException.
    Can anyone give me a hint what the problem might be?
    Thanks in advance!

  • Custom Component with xfaForm input

    Hi. I'm trying to create a custom component that takes as one of its inputs either an xfaForm, a Document containing XML, or an xml variable. So my service method has a variable called data which is just an Object. When I pass in the xfaForm I get a class cast exception when casting the object to the XFARepositoryFormInstance class. I even print out the object and it shows me that its an XFARepositoryFormInstance. Do I have to do something special to work with an xfaForm inside the component? It seems like some sort of class loading issue or something.
    I'm stuck. Anybody have thoughts?
    Thanks,
    Bryan

    I'm unstuck :)  The key to getting this to work is to import the packages you are going to use in your component.xml.
    So, for me..I had to add the following:
            com.adobe.idp.workflow.dsc.type
            com.adobe.idp.taskmanager.form
            com.adobe.idp.taskmanager.form.impl
            com.adobe.idp.taskmanager.form.impl.xfa

  • How to create new SW component for custome development?

    We are looking to develop custom webdynpros and need to create our own SW components. 
    I've tried to define them in the SLD that the NWDI is connected to and when creating the tracks for the custom development, I do not see our new defined SW when trying to add the SW component to the track.
    Any ideas?  Are we going about this the wrong direction?
    Thanks!!

    Once you add component in SLD if you want to add that component to your track ,there will be a button Update CMS in domain data or track data .click that and it will refresh and fetch your newly created component.then go ahead and add component to your track
    reward points if helpful

  • URGENT: How to build composite custom component with a valuechangelistener?

    Hi there!
    I already posted regarding this issue before but unfortunately there wasn't any answer. But I don't think what I am trying to achieve is something unusual.
    I am trying to build a composite custom component, that consists of some UISelectOne components and some UIInputText fields. Now I need to fill the combo boxes depending on the selected values of the other boxes. Therefore I added a value change listener. But when it fires I get an index out of bounds exception on the page.
    The problem seems to be that the child components are being added twice to the component: Once in the constructor (which I am doing and which is called everytime the component is built) and once as part of the Restore View Phase (which JSF is doing).
    So my question is: How and where do I correctly initialize my component's children?
    A full code example can be found under http://forum.java.sun.com/thread.jspa?threadID=586301&tstart=150
    Thanks a lot in advance!

    #2 sounds utterly strange to me. How would I utilize the phase id?The code below shows my idea whereas I never validate it in any real projects:
    public class MyPhaseListener implements PhaseListener {
         private static final String IDKEY = "PHASEID";
         public static PhaseId getCurrentPhaseId() {
              return (PhaseId) FacesContext.getCurrentInstance().getExternalContext().getRequestMap().get(IDKEY);
         public void beforePhase(PhaseEvent event) {
    event.getFacesContext().getExternalContext().getRequestMap().put(IDKEY,event.getPhaseId());
         public PhaseId getPhaseId() {
              return PhaseId.ANY_PHASE;
    }You can write your constructor like as:
    if (MyPhaseListener.getCurrentPhaseId().equals(PhaseId.RENDER_RESPONSE ) {
         /* create children because this is the first time to create the component */
    }

Maybe you are looking for

  • How do I get a refund for Mobile Me that was never hooked up?

    I received an ipad and mobile me for a Christmas gift.  It was put in a moving box and stored until a few weeks ago.  I have recently tried to hook it up but was not successful due to the fact they are taking no more members.  What are my options?  C

  • FAQ: What is Auto-Analysis, or Why does Organizer freeze?

    What is the Auto-Analyzer? The Elements Organizer has the ability to scan your videos and look for certain characteristics that may help you choose what will work best for you projects in Premiere Elements. This Auto-Analysis runs in the background o

  • CMC Authentication AD page hanging

    I have searched here and not able to find a solution. I have 3 envronments all setup the same, so I dont beleive it is a setting. On my Development environment CMC I am not able to load the Authenication>AD page. I get a blank page with Loading messa

  • 'SUBSTRING_INDEX' is not a recognized built-in function name.

    actually iam modifing the servlet code to connect with MSSQL.previously it was MYSQL.now compiling is ok. while running it shows error at the top of the linked page as... error [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]'SUBSTRING_INDEX' i

  • Ref. Personnel no. infotype addition

    Hi All, We are using ref. Personnel no. field while hiring. We are able to update infotype 0002 and 0009. Our requirement is to add infotype 0006, 0022, 0023. Please suggest me how can I add these infotype  in ref. personnel no. field to autopopulate