Doucmentation/Guide on Writing a custom component (a DSC)

Hello,
I'd like to learn more about writing a custom component (a DSC), does any one know if there is documentation/guide/tutorial on how to start on it? Please share your comments.
Thanks in advance,
Han Dao

Hello,
Thank you for all replies, they are very helpful for starting to learn more about DSC.
I do have another question, is it possible to re-write an already built-in service to customize it in a different way. e.g. The Service Operation "Read Document" in Foundation > FileUtilsService to accept a different type of its Input?
Thanks,
Han Dao

Similar Messages

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

  • A Custom Component and the JSP source that get's generated

    I'm writing a Custom Component library and I'm at a point where I need to understand how the JSP source that gets generate when my component is dragged from the palete is created and how it relates to the properties I define in the Metadata files.
    In particular I have a component that is an extension of the DataTable component and I'd like to control what get's dropped onto the page when the user drags over my component.
    Don

    See the "Building and Customizing JavaServer Faces Technology Components" technology theme page at http://developers.sun.com/prodtech/javatools/jscreator/reference/themes/buildingjsf/index.html. The Hands-On Examples and "Design-Time API User Guide (pdf)" linked from that page should help.

  • How to construct the component tree in my custom component?Help!

    Hi, i am writing a custom component like this:
    public class HtmlCategory extends HtmlPanelGrid
         public void processRestoreState(javax.faces.context.FacesContext context,
                java.lang.Object state)
              setColumns(1);
              HtmlCommandLink link=new HtmlCommandLink();
              link.setValue("Let's Bingo");
              MyUtil.setActionListener(context,link,"#{temp.mytest}");
              UIParameter param=new UIParameter();
              param.setName("name");
              param.setValue("Robin!");
              link.getChildren().add(param);
              param.setParent(link);
              getChildren().add(link);
              link.setParent(this);
              super.processRestoreState(context,state);
    }         you see, i want to construct the compont tree at Restore View phase this way,because the structure of the component tree will always be the same, so i don't the user to write extra code.
    But the children of the component are not rendered,the renderer of the HtmlCategory component just extends the HtmlGridRenderer(myfaces) directly,and always calls the "super" methods in the encode methods of the renderer.
    I got a message from the console:
    Wrong columns attribute for PanelGrid id0:id4: -2147483648
    but i have set the columns attribute in the code above, so what's happening? or please give some advice about how to render the component tree by myself in Restore View with the tree constructing code in the custom component class code,just lke the code above.
    Best Regards:)
    Robin

    Well, i don't know if i have got my question clear.
    usually, according to the tags you use in the jsf page, a component tree will be created at the Restore View phase,for example:
    <f:form>
      <h:panelGrid ...........>                         
              <h:dataTable ................>
              </h:dataTable>
       </h:panelGrid>
    </f:form>but because i am writing a component for my web app, all the child components and their attributes are not likely to change. so i want to reduce the tags into one custom tag, and construct the component tree internally by myself.But it is not the case of backing bean.So i wrote the the code in the method:
    public void processRestoreState(javax.faces.context.FacesContext context,java.lang.Object state)as it is shown in my orginal message.But it seems that it is not right way to construct my component tree.So where should i put the code that construct the component tree?Overriding the method :
    public void processRestoreState(javax.faces.context.FacesContext context,java.lang.Object state)is not the right way?
    Best Regards:)
    Robin

  • Painting Custom Component

    I am writing a custom Component inheriting from JComponent class. I am doing custom painting of this component as the component I want has to have a gradient background. I am able to draw the graphics properly. But I am having a problem with the positioning of the control. I read in the tutorial for the custom painting of JComponent that we should paint the component taking the base as 0. If I place my component any where on the panel other than (0,0) the component either gets displayed at 0,0 or is not getting displayed properly.Kindly provide me with a solution.

    Painting of the component and positioning of the component are two different things.
    Yes painting is done relative to the top left of the component which is (0, 0);
    Positioning of the component in a container is done by the Layout Manager. So you need to provide a getPreferredSize(...) implementation so the LayoutManager knows how much space to reserve for the component.
    Maybe the Swing tutorial on [url http://java.sun.com/docs/books/tutorial/uiswing/14painting/index.html]Custom Painting will help you out. There is also a section on "Using Layout Manager".
    If you need further help then you need to create a [url http://homepage1.nifty.com/algafield/sscce.html]Short, Self Contained, Compilable and Executable, Example Program that demonstrates the incorrect behaviour, because I can't guess exactly what you are doing based on the information provided.
    And don't forget to use the [url http://forum.java.sun.com/help.jspa?sec=formatting]Code Formatting Tags so the code retains its original formatting.

  • Error when calling a custom component in Web UI.

    Hello Experts ,
    We have  created a custom component for guided procedure in Web UI . When we link the custome component with the standard component for the home page ( WCC_SSV_HOME ) we found that custom controller for guided procedure works . We are navigating the guided procedure for search functioanlity and it works fine and shows the search result .
    But when we click on any of the searched objects say a Case , then links on that  Case is not working .
    For example , we are getting the below  error :
    Exception Class  CX_BSP_WD_INCORRECT_IMPLEMENT - Define NavigationalLink BP for source view ZSOA.MainWindow
    Any inputs on this is higly apreciated.
    Regards
    Vinayak

    Hi Vinayak,
    I am assuming that the implementation of the navigation from the search result to the object details is not working.
    The error you mentioned pointed me that you do not have the navigation link. I don't know what is missing so I am giving you the full details please cross check what you missed.
    1> create and eventhandler e.g. EH_ONSINGLESELECTION
    2> create an outbound plug in your view - this plug is used for the navigation to the target of the hyperlink.
    3> create an outbound plug in the window.
    Define the navigation link whth the name according to the string you have put in the event handler in the search component e.g. SINGLESELECTION
    as source define the component usage for the search. as target define the component usage of header    -> this will handle the connection from search to the header.
    Hope this will help.
    Thanks,
    Vikash.

  • Best strategy for variable aggregate custom component in dataTable

    Hey group, I've got a question.
    I'd like to write a custom component to display a series of editable Things in a datatable, but the structure of each Thing will vary depending on what type of Thing it is. So, some Things will display radio button groups (with each radio button selecting a small set of additional input elements, so we have a vertical array radio buttons and beside each radio button, a small number of additional input elements), some will display text-entry fields, and so on.
    I'm wondering what the best strategy for tackling this sort of thing is. I'm sort of thinking I'll need to do something like dynamically add to the component tree in my custom component's encodeBegin(), and purge the extra (sub-) components in encodeEnd().
    Decoding will be a bit of a challenge, maybe.
    Or do I simply instantiate (via constructor calls, not createComponent()) the components I want and explicitly call their encode*() and decode() methods, without adding them to the view tree?
    To add to the fun of all this, I'm only just learning Faces (having gone through the Dudney book, Mastering JSF, and writing some simpler custom components) and I don't have experience with anything other than plain vanilla JSP. (No EJB, no Struts, no Tapestry, no spiffy VisualDevStudioWysiwyg++ [bah humbug, I'm an emacs user]). I'm using JSP 2.0, JSF 1.1_01, JBoss 4.0.1 and JDK 1.4.2. No, I won't upgrade to 1.5 (yet).
    Any hints, pointers to good sample code? I've looked at some of the sample code that came with the RI and I've tried to navigate the JSF Blueprints stuff, but I haven't really found anything on aggregating components into a custom component. Did I miss something obvious?
    If this isn't a good question, please let me know how I can sharpen it up a bit.
    Thanks.
    John.

    Hi,
    We're doing something very similar. I had a look at the Tomahawk Date component, and it seems to dynamically created InputText components in the encodeEnd(). However, it doesn't decode this directly (it only expects a single textual value). I expect you may have to check the request yourself in decode().
    Other ideas would be appreciated, though - I'm still new to JSF.

  • How a custom component is called when we install a custom component in UCM.

    How a custom component is called when we install a custom component in UCM.
    On what event the component services will be activated and called.
    Suppose i create a Custom service name MULTIPLECHECKIN then this service will be called on what event and where it will be defined to call.

    Saurabh,
    the code is packed in the component (see component\Security Filter\java\Security Filter\ModifyAttributesFilter.java - the first Security Filter is the component name, the other Security Filter is the Java package name).
    What is important:
    - your class must implement the FilterImplementor interface (you will need UCM standard classes - server.zip in your classpath) and its doFilter method
    How the filter is executed?
    - actually, in this case you don't need any new service - you can use the standard 'hook', which is provided by standard checkin services
    - in Component Wizard create a new component, add your compiled class to it (make sure you follow the rules not to end up in classpath issues)
    - in Component Wizard click the 'Java Code' tab. Here you can add a Custom filter called validateCheckinData, which is executed by standard checkin services. If you parametrize the filter to call your class created above, you are done.
    'Working with Content Components' manual (e.g. here: http://download.oracle.com/docs/cd/E10316_01/cs/cs_doc_10/documentation/developer/using_components_10en.pdf) can give you a basic picture. A better resource is Bex Huff's book - I would recommend you to get it, because it has a step-by-step HelloWorld example which can guide you through Component Wizard. I could also send you my own component (send me an email at [email protected]) which implements a filter for user quotas, so you just need to "replace classes".
    As for the other half of your task, searching for the file in the database server will work only if you use database as your storage (ie. install and configure File Store Provider component accordingly). Of course, you could do a search for file in this case - just consider that you will be comparing two BLOBs rather than two relatively short check-sums (most likely strings or arrays of bytes). Besides, it will not work if you use filesystem as your storage.
    Jiri

  • Custom component Search and Result view using value node :pls help

    Hi Experts,
    I am creating a Custom component with Search and Result view using value nodes.
    This is the code I wrote in the Search button event handler method.
    The data which gets in lv_search I need to put in lv_col .
    Can somebody guide me for this.
    Points will be awarded .
    METHOD eh_onsearch.
      DATA : lv_current TYPE REF TO if_bol_bo_property_access,
             lv_search  TYPE zcrm_orgstruct_search,     "Search value node structure
             lv_result  TYPE zcrm_orgstruct_result,         "Result value node structure
             lv_col     TYPE REF TO if_bol_bo_col.
      lv_current ?= me->typed_context->search->collection_wrapper->get_current( ).
      CALL METHOD lv_current->get_properties
        IMPORTING
          es_attributes = lv_search.
      me->typed_context->searchresult->collection_wrapper->set_collection( lv_col ).
      op_toresultview( ).
    ENDMETHOD.
    Regards,
    Lakshmi

    Hi Lakshmi,
    Could you please share with us how it was solved.
    "CALL METHOD lv_current->get_properties
    IMPORTING
    es_attributes = lv_search."
    Did you get any values in lv_search ?
    Because while using value nodes for search view (which inherits from advance search controller  class), the above method does not return any search values entered in the fields.
    Please let me know how did you solve it.
    Thanks & Regards
    Vidhya

  • Using nullLayout for custom component

    I am writing an AccordianPanel as a custom component that can be dropped into a JPanel and behave as expected. I am using a null layout in the outer container (JPanel) as the accordian dividers need to move as told and not be managed by a layout manager. When I resize a window or another container that the custom component sits in, it doesn't resize anything - I understand this is the behavior I would expect as that is how I coded it.
    Now, I want to have the custom component resize its internal stuff when the container it resides in (i.e. JFrame or most likely another JPanel) gets moved, but I don't know how to do this. The outer most component in my custom components hierarchy is a JPanel whose layout is set to null and I stuff everything else inside there.
    I believe I need to add a componentListener to my JPanel whose layout is set to null, but I am not sure. Could someone send me in the right direction.
    thanks

    the best approach might be to implement your own LayoutManager (which is simple enough) and use it rather than absolute positioning....
    If you read postings in the forum you will find most people recommend using LayoutManagers and not a null layout so you don't have problems like this.Hello sarcommand , camickr, and anyone interested,
    I've tried to bring this discussion up again just a few days ago, and was disappointed I got no feedback - must be a dull read :o(
    Here is the [link to the thread|http://forums.sun.com/thread.jspa?messageID=10723670&#10723670], would you mind having an eye on it?
    I'm sorry to hijack this thread (seems slightly less rude than bumping my own former thread up), but I've read several discussions on this subject too, and still I can't decide whether I should follow the CustomLayoutmanager track.
    Although most of the writing there is specific to my current problem, it highlights 3 points I think are general enough:
    - A custom layout (whatever the way it is implemented, I discuss 4 approaches in the thread) is generally used to display custom components, or at least, components that represent custom application-specific entities or input points. -> Is is worth the trouble to abstract the positioning logic when this "custom layout" has only one, at best two, use cases (a couple of specific screens in your specific app that represents your specific entities)?
    - A custom (app-specific) layout manager is likely to require more knowledge about the things being layed out than the default min/max/pref sizes. In particular it may require to know data of the underlying model objects represented by the children components. How is that best designed? I tentatively think it's by way of custom Constraint classes which have to be abstract enough yet should be easily mapped from the app-specific data.
    - The CustomLayoutManager integrates natively with regular graphical events (hiding, resizing,...), but how to integrate app-specific events (such as, when the underlying data change in such a way that should be reflected by a change in the layout, how/when to force the re-layout)?
    Thank you for your help.

  • Callling a Custom Component as Pop Up

    Hi Experts,
    I want to call a Custom Component as a Pop up screen in another component.
    I have followed the below steps (got it from forum) ... but I got stuck at point 7)
    7) While Creating the Component Usage, mention Component Name as your Z Component name and in the Interface View, choose MainWindow from the F4 help.
    I am not getting any value in interface view  (F4) ... pls let me know... how to proceed from here ..
    Thanks & Regards,
    Raghu
    ..................................................................................I followed these steps ..
    You need to follow following steps:
    1. Create an event handler for your click event on which you want to call this pop up.
    2. Create a Z component with a table view and in the table view, define the context nodes and attributes you want to use in the pop up view.
    3. In the .htm coding of this view, define the layout and buttons you want on this pop up view.
    4. Go to Runtime Repositry, create a ViewSet, ViewArea and in this View Area add the table view you created just now.
    5. Create a MainWindow in the Runtime repositry and add the same table view you created.
    6. Now come back to the main Component and add Component Usage (e.g CUXYZ) .......
    7. While Creating the Component Usage, mention Component Name as your Z Component name and in the Interface View, choose MainWindow from the F4 help.
    8. Go to event handler method of your main Component/View and create separate methods for creating your pop up and handling the close event of the pop up as well.
    For seeing the coding, you cna refer to any standard pop up handling and do the coding in similar format.
    I hope this will helps you.

    Hi Arun,
    Created a interface view in my component B and added that in component usage in my component B.
    And created a event handler and added the below code...
    IF lv_popup IS NOT BOUND.
        lv_popup = me->comp_controller->window_manager->create_popup(
                              iv_interface_view_name = 'Z_POPUP/MainWindow'
                              iv_usage_name          = 'CUPopup'
                              iv_title               = 'Popup' ).
        lv_popup->set_window_width( iv_width = 600 ).
    ENDIF.
    But the component view is not displaying as popup ??
    Can you pls guide me.. where I could hav gone wrong ??
    Regards,
    Raghu

  • Custom component library

    where can i find a tutorial about writing custom component library?

    See the "Writing Your Own Components" section at http://developers.sun.com/prodtech/javatools/jscreator/reference/topics/components.jsp

  • Writing a Custom Property Renderer

    Hello all,
    I am new to KMC development.  I want to know how to go about writing a custom property renderer.  Detail step by step instructions as to where to start and what are the configurations, etc. would be a great help for me.
    Thanks in advance.
    Vicky R.

    Hello Vicky,
    Step by Step guide to creating Property renderer is:
    1. Program an implementation of AbstractPropertyRenderer.
    2. Implement a RFServerWrapper service to register your property renderer with CrtClassLoaderRegistry.
    CrtClassLoaderRegistry.addClassLoader(this.getClass().getClassLoader());
    3. Technical mapping to your coding in the Property Metadata service.
    4.Restart your server for the changes to take effect.
    Check this link for more infos:
    https://forums.sdn.sap.com/thread.jspa?threadID=41619
    Also check the implementations of RFServerWrapper service in examples at this link:
    http://sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/c739e546-0701-0010-53a9-a370e39a5a20
    Greetings,
    Praveen Gudapati

  • Stuck in custom component

    Hello,
    I'm just to stupid, but I can't get my custom component to work.
    I want a special link around wrapped content, something like <i:popupLayer value="#{bundle.hint}" ... > <%-- stuff --%> </i:popupLayer> I also need EL expressions at least for the value. My problem is, there are two ways to render this: I can do HTML with ResponseWriter or I can include JSF components. But when including JSF how to wrap the encodeChildren(), how to add end tags to encodeEnd()? (I also tried to add the tags content as children to the commandLink, but could not get that to work also.)
    When writing HTML instead another problem comes around, I always retrieve EL string, not the evaluated value. I cannot create binding that way it will get evaluated for resulting link (HTML-A).
    I prefer having the EL evaluated because then it's simpler to include this message into my needed JavaScript code.
    Can anyone give me some hints, lead me to a bit more sophisticated tutorials or stuff?
    Regards,
    Thorsten
    null

    Hi,
    tell me please, why can't you create a binding?
    I think i lost your idea...
    IL

  • Custom Component in WebUI as aWork center

    Hello All ,
    I am Working on 7.0 WebUI (in Marketing module )I have requirment to Create a Work Center  When I click on this Work Center I Need to Display the Views Search ,create  and report views to a component. Which looking similar to Market Work Centre where we can find all the Reports links under Report View  . Here iam able to create these View i.e Search Create and Report but iam not able to display the logical links on it.I have assigned the Logical link to the WC followed the Standard procedure for adding a Logical link to the WC .Can anyone guide me in this regards.
    Thanks in Advance.
    Regards,
    Kiran Posanapalli

    Hi,
    Create the Inbound Plugs for the Windows/Views of the custom component, and create the Target Ids for your components in
    CRMC_UI_CMP_IP_T table. Now in SPRO, maintain the entries in the Work Area component repository. Create new logical link with new Target ID for your component and use the logical in the work center.
    Regards,
    S Reddy

Maybe you are looking for

  • HT201335 I can't get my airplay to work on my iPhone 5

    I swipe up words to get the tab to appear, On the tab there is no airplay link, just airdrop. I was hoping to mirror it on are new 32" Samsung Smart tv,  I am also now at this. Thanks

  • Standalone Gateway in MSCS not working correctly

    Dear Experts, I have installed a standalone gateway according to note 657999 in a BW cluster system. I already installed 2 standalone gateways in 2 other systems and they are working fine. I am checking this using sm49 and running a zdir external pro

  • Graph Incrementing Need help

    HELP!!!! I have a graph that I am using, and I am running into problems getting it to increment correctly. I want each major increment to be in steps of 5 no matter how large the scale is. I used property nodes to do this but when the scale gets so l

  • Problem Inbound Queue SMQR after execute BUPA_DEL

    Good Day Now, we developing a interface for a customer to import Business Partner (BP) from a non-SAP System in our SAP CRM 2007 System. To validate the functionality of the interface we would like to make any test imports. Well, if we finished an im

  • Trouble installing plugins for CS3 and CS4 onto a 32 bit/64 bit PC.

    I have two new PCs. They are supposed to run both 32 Bit and 64 Bit programs. I have CS3 and CS4 32 Bit programs installed on both. Many of my old faithful plugins have gone on strike or at least a work stoppage! I can get some of them to install cor