Creating a custom JSF Component

Hi,
I am trying to create a custom JSF Component. My ultimate goal is to pass a bean to my custom component and have the component render some HTML output based on the info contained in the bean. Before I attempt that I am trying to get a simple custom component to just work. This component is based on the tutorial found here: http://www.jsftutorials.net/components/index.html
This tutorial just creates a component that outputs a <div> tag around the body contents of the custom component.
To keep this short I have done the following items from the tutorial link above:
1) I have created the tld file defining the tag class, name, uri and shortname
2) I have also created the tag class called TickerTag.java along with the component class UITicker.java. These classes are straight copy-and-paste jobs from the tutorial link and compile fine.
3)My faces-config.xml file has the proper component definition of
<component>
<component-type>ticker</component-type>
<component-class>ticker.UITicker</component-class>
</component>
This was the easy part. The example then goes on to use the custom component in a JSP page. I managed to get the custom component to work in a JSP page BUT my problem is getting the custom component to work in an XHTML file.
I thought all I had to do was define an xml namespace using the uri from my tld file like so:
Note: My uri is www.fubar.com/tags and is defined in the tld file.
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:t="http://myfaces.apache.org/tomahawk"
xmlns:u="http://www.fubar.com/tags">
I then try to use the tag like so <u:ticker> <f:verbatim>Hello JSF Component</f:verbatim></u:ticker>
I am expecting the following output: <div>Hello JSF Component
</div>
but instead I get
<u:ticker>Hello JSF Component</u:ticker>
It seems the tag is not even processed. This is my first jump into custom components. I have done custom JSP tags in the past but I never tried to display them on an XHTML page.
If you are wondering why I am using XHTML pages, this was setup a while back by a previous developer. Changing everything to a JSP would take a long time and probably break some stuff I am not aware of yet. As such the web.xml file of this JSF web app has the following:
<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.xhtml</param-value>
</context-param>
So all *.jsf files are processed and sent to the corresponding .xhtml file.
I have looked up creating custom components on google and every last example uses their newly created components in a jsp file. No XHTML uses so far.
Below are my tld files and xhtml file if that helps:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
<taglib>
<tlib-version>1.0</tlib-version>
<jsp-version>1.2</jsp-version>
<short-name>u</short-name>
<uri>http://www.fubar.com/tags</uri>
<tag>
<name>ticker</name>
<tag-class>ticker.TickerTag</tag-class>
<body-content>JSP</body-content>
</tag>
</taglib>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:t="http://myfaces.apache.org/tomahawk"
xmlns:u="http://www.fubar.com/tags">
<html>
<head>
<title>Show Custom Component</title>
</head>
<body>
<f:view>
<u:ticker> <f:verbatim>Hello JSF Component</f:verbatim></u:ticker>
</f:view>
</body>
</html>
Any suggestions/help are much appreciated,
Nick
</div>

Thanks Ray. I'll take a look at that site.
I managed to figure out my problem. I never created a .taglib.xml file that reference the component I defined in the faces-config.xml file. Once I did that everything work perfectly.
I managed to use this forum post as a guide.
http://osdir.com/ml/java.facelets.user/2006-12/msg00042.html
I hope this helps anyone else.
Nick

Similar Messages

  • Create a custom JSF component

    Hi,
    I want to create a custom JSF component. I've setup a new application containing 2 projects:
    - a 'components' project, containing all the custom components
    - a 'view' project, to test the created custom components.
    There is dependency between the components project and the view project. In the view project, I added the
    the Tld, in order to use my components in the project.
    From the component palette, I can drop a component onto a .jspx page but after running the page, no output
    is printed onto the screen. The HTML source code only contains my 'tag-name' (eg: <ctb:mytag/>)
    Am I doing something wrong?
    UIComponent:
    import java.io.IOException;
    import javax.faces.component.UIComponentBase;
    import javax.faces.context.FacesContext;
    import javax.faces.context.ResponseWriter;
    public class BasicComponent extends UIComponentBase {
        public String getFamily() {
            return "BasicComponent";
        public void encodeBegin(FacesContext context) throws IOException {
            ResponseWriter out = context.getResponseWriter();
            out.write("Hello World");
    }Tag
    import javax.faces.component.UIComponent;
    import javax.faces.webapp.UIComponentTag;
    public class BasicComponentTag extends UIComponentTag {
        public String getComponentType() {
            return "BasicComponent";
        public String getRendererType() {
            return null;
    }Tld entry:
      <tag>
        <name>BasicComponent</name>
        <tag-class>BasicComponentTag</tag-class>
        <body-content>JSP</body-content>
      </tag>Thanks in advance,
    Koen Verhulst

    The body tag should be as follows
    <bodycontent>JSP</bodycontent>
    but the JSP will not work. Here is the file:
    <?xml version='1.0' encoding='windows-1252'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:af="http://xmlns.oracle.com/adf/faces"
    xmlns:afh="http://xmlns.oracle.com/adf/faces/html"
    xmlns:cust="http://xmlns.oracle.com/adf/faces/customizable"
    xmlns:cf="/WEB_INF/helloWorldLib.tld">
    <jsp:output omit-xml-declaration="true" doctype-root-element="HTML"
    doctype-system="http://www.w3.org/TR/html4/loose.dtd"
    doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"/>
    <jsp:directive.page contentType="text/html;charset=windows-1252"/>
    <f:view>
    <html>
    <head>
    <meta http-equiv="Content-Type"
    content="text/html; charset=windows-1252"/>
    <title>List of Values</title>
    </head>
    <body><h:form>
    <cf:jsfhello hellomsg="This is it" />
    </h:form></body>
    </html>
    </f:view>
    </jsp:root>
    Edited by: bongo2 on Oct 28, 2008 2:58 PM

  • How to add properties to a custom JSF component?

    Hello, everybody!
    I've just developed my first custom JSF component. It's a data pager and it is working pretty well. But now I want to be able to use some of it attributes in my backing beans at runtime. I mean, I want to bind it to component in the JSF page. It already has a binding attribute in the tld file, but I want to be able to accesss two values that the renderer of my custom component calculate inside it, which would relieve me from calculating these values manually in the backing beans. So, I would like to know how to make these values external to the component.
    By now this is my custom pager class:
    import javax.faces.component.UICommand;
    public class UIPaginadorDados extends UICommand
    }You can see that it has no logic because all the logic is in the renderer class:
    import javax.faces.render.Renderer;
    public class PaginadorDadosRenderer extends Renderer
        // logic here
    }As I said I want to be able to do the following in my backing beans:
    private UIPaginadorDados pager = new UIPaginadorDados();
    // and later...
    pager.getCurrentPage();
    pager.getPageCount();In the JSF page:
    // I already can do this, because I have a binding attribute
    <urca:paginadorDados binding="#{backingBean.pager}" />I suppose that I'll have to create the properties getCurrentPage() and getPageCount() in the component class, UIPaginadorDados, but I don't know how to get the values to the properties from the renderer class. I don't even know if this is how I should do it.
    So I would appreciate a lot your help about this subject.
    Thank you.
    Marcos

    Marcos_AntonioPS wrote:
    RaymondDeCampo wrote:
    I neglected to mention: do not forget to implement the methods in StateHolder to preserve the properties you added to your component.Hello, Raymond. Could you elaborate a little more on that? If you could give a short example, it would be helpful.
    MarcosNo problem. I have already found out how.
    Thank you very much, Raymond.
    Marcos

  • Custom JSF Component tags ignored after converting to Facelets layout

    I am currently using JDeveloper 10.1.3.3.
    I have a project consisting of .jspx pages. These pages mainly use components from ADF faces core. I also created my own custom JSF component that I use in several of these pages.
    Then, I needed to use Facelets so that I could apply a standard layout to all my .jspx pages. I looked at all the tutorials, and I created a layout.xhtml for my .jspx pages to use. This worked great for my .jspx pages that don't have my custom JSF component.
    Now, when I run my page with my custom component <img:newimage ...etc >
    the tag is ignored and it appears in the page's source as is when it should render as <img.src=...etc>. Attributes of newimage are changed on the page appropriately like width and height, but my component's tag, component, and servlet java files are never accessed.
    How can I fix this? Please help!
    Thanks.

    Hi,
    did you post this issue to the Facelets open source site ? Sounds like an issue with using Facelets
    Frank

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

  • Steps to create a custom Window component?

    What steps do I need to take to create a custom Window component? My approach now results in the component being uneditable in design view. What I do is simply select "New > MXML component", base it on spark.components.Window and supply a filename. I tried with a Panel component and that works fine.

    Hi,
    Step by Step creation of SAP Payroll Funcitons:
    1) Follow the menu path
       Human Resources>>Time Management>>Administration>>Tools>>Funtions/Operations
       or transaction PE04. Enter a four digit name for e.g ZIABC, and press the create
       button, enter the description. On creation the system proposes the name of
       the routine use it, or enter a name of your choice by selecting the option 'Self-defined'.
    2) During the execution of payroll some tables are filled with wage types and there amounts
       to make these tables available to your routine enter the name of the table for e.g (RT or
       CRT) in the input parameters, and to make the changes done to the data in the tables
       avaiable to the payroll enter the name of the table in the Output parameters as well.
       Input Parameters
       Ctry                                         Num     Object Name
       99                                           1       RT
       99                                           2       CRT
      and same shall be done in the Output Paramters if required.
    3) Create an include in the program PCBURZ990 (using Transaction:
    SE38), in which create a subroutine with the name supplied by SAP or the
    name selected by you during Funtion creation,
    in our case, it is FUZIABC.
    Note: The program PCBURZ990 is in SAP Namespace, so an Access Key
    will be required before you can proceed. But it will not be overwritten during any upgrade.
    *Example of the subroutine
       FORM FUZIABC.
    *enter the code
       ENDFORM.
    4) After this activate the program the Funtion and add it in the schema used for payroll processing.
    Reward points if helpful.
    Regards,
    Manoj.

  • Customer JSF Component Value Expression not work

    why my customer tag not work,
    in my jsp
    <q:my formatString="yyyy/mm/dd" current="#{LoginBean.date}"></q:my>the isLiteralText() always return true, and I can't get the correct value, #{LoginBean.date} is returned.
    bellow is my tag source.
    can anyone help me.
    package jsf;
    import javax.el.ValueExpression;
    import javax.faces.component.UIComponent;
    import javax.faces.webapp.UIComponentELTag;
    public class MyCustomerTag extends UIComponentELTag {
        private String formatString;
        @Override
        public String getComponentType() {
            return "COMPONENT_TYPE";
        @Override
        public String getRendererType() {
            return "COMPONENT_TYPE";
        @Override
        public void release() {
            super.release();
            setFormatString(null);
        @Override
        protected void setProperties(UIComponent component)  {
            if (!(component instanceof UIDatePicker))
                throw new IllegalArgumentException("Component "+
                    component.getClass().getName() +" is no UIDatePicker");
            component.setValueExpression("current", current);
            System.out.println(current.getExpressionString());
            System.out.println(current.isLiteralText());
            System.out.println((String) component.getAttributes().get("current"));
         * @return the formatString
        public String getFormatString() {
            return formatString;
         * @param formatString the formatString to set
        public void setFormatString(String formatString) {
            this.formatString = formatString;
        private ValueExpression current;
         * @return the value
        public ValueExpression getCurrent() {
            return current;
         * @param value the value to set
        public void setCurrent(ValueExpression current) {
            this.current = current;
    }

    I do not know what your native is, but there's quite a huge difference between "custom" and "customer". Look it up in your dictionary.

  • Create complex custom component

    Hi everyone!
    I'm trying to create my own custom component in JSF. However I have several questions :
    - It is not mandatory to create a renderer class, right ? the component can draw itself ?
    - How can I create a custom component which would have several "values" inside ? for example let us supppose I want to create a custom JSF component to enter a IBAN. The IBAN is divided into several parts : BBAN, country code, key, Bank adresse,... but any tutorial I've found explain how to create a input component with only one simple value (for example the classical "CreditCardInputComponent").
    Josselin

    Hi,
    did you find a solution for your "composite" component problem?
    I am also trying to create a custom component that contains several standard jsf components such as HtmlCommandLink and HtmlInputText.
    I build all the standard components within my component programmatically using things like:
    HtmlCommandLink link = (HtmlCommandLink) application.createComponent(HtmlCommandLink.COMPONENT_TYPE);
    Also at the beginning of the encodeBegin I clear all children from my custom component using getChildren().clear()
    and rerender the component based on my new internal model which I updated during the previous decoding of my component.
    As a simple jsf custom tag it works ok, however, I am facing deep problems with action events as soon as I use the component within a jsf HtmlDataTable tag.
    Am I missing something here?
    Any ideas? Help is really really appreciated. This different behavior in different contexts is slowly but constantly driving me nuts.
    cheers
    hans

  • Create custom declarative component like container

    Hi all,
    I'm using Jdev 12c.
    I wanna create a custom declarative component like this:
    container.jsf :
    <af:panelGroupLayout id="#{attrs.Name}_VIEWPORT" layout="scroll" binding="#{attrs.Binding}"
                             inlineStyle="position:absolute;width:#{attrs.ViewportWidth}px;height:#{attrs.ViewportHeight}px;top:#{attrs.ViewportY}px;left:#{attrs.ViewportX}px;border:1px solid;background:#c6c6ff;z-index:#{attrs.ZIndex};">
            <af:panelGroupLayout id="#{attrs.Name}" layout="scroll"
                                 inlineStyle="position:absolute;width:#{attrs.Width}px;height:#{attrs.Height}px;">
            </af:panelGroupLayout>
        </af:panelGroupLayout>
    <af:xmlContent>
            <afc:component>
                <afc:description/>
    </af:xmlContent>
    I use this custom component to group some child components like this:
    <abc:container ...>
         <af:inputText ... />
         <af:inputText ... />
    </abc:container>
    But the things is in Java code, I cannot get RichInputText components :
    this is my function:
        private void getFacetAndChild(UIComponent parent) {
            Iterator childrens = parent.getFacetsAndChildren();
            while (childrens.hasNext()) {
                UIComponent child = (UIComponent)childrens.next();
                System.out.println("Log child >> " + child);
                getFacetAndChild(child);
    this function only print the second RichPanelGroupLayout.
    Any ideas to help me to get all RichInputText ?
    Thanks and Best Regards!

    Hi All,
    I found the solution. Just add one facet to Custom Container
    <af:panelGroupLayout id="#{attrs.Name}_VIEWPORT" layout="scroll" binding="#{attrs.Binding}" 
                             inlineStyle="position:absolute;width:#{attrs.ViewportWidth}px;height:#{attrs.ViewportHeight}px;top:#{attrs.ViewportY}px;left:#{attrs.ViewportX}px;border:1px solid;background:#c6c6ff;z-index:#{attrs.ZIndex};"> 
            <af:panelGroupLayout id="#{attrs.Name}" layout="scroll" 
                                 inlineStyle="position:absolute;width:#{attrs.Width}px;height:#{attrs.Height}px;"> 
                           <af:facetRef facetName="child"/>
            </af:panelGroupLayout> 
        </af:panelGroupLayout> 
    <af:xmlContent> 
            <afc:component> 
                <afc:description/> 
    </af:xmlContent> 
    And the used page:
    <abc:container ...>
         <f:facet name="child">
              <af:inputText ... />
              <af:inputText ... />
         </f:facet>
    </abc:container>
    Maybe this solution will help others to create a custom container
    Thanks and Best Regards!

  • Custom List component in Flash builder 4.5

    Hi,
    Am new to Flash builder 4.5. I want to create a custom list component. In that i have some queries.
    They are,
    1. What are the basic procedures/steps to be followed for Component development in Flash builder 4.5
    2. What are the approaches to the component development in Fladh builder 4.5?
    3. Is there any reference sutes available?
    Thanks,
    Manikandan

    http://www.adobe.com/devnet/flex/videotraining/exercises/ex1_06.html
    you could also search blogs for custom component creation. There might be many implementations for your learning/usage.

  • Custom ActionScript Component icon in Design View

    Hi,
    I have created a custom ActionScript component in Flex. I have added the Icon metadata tag before the class definition:
        [IconFile("expandable-panel.png")]   
        public class ExpandablePanel extends TitleWindow
    However, though the path to the image is correct, the icon for the custom component does not show up in Design View.
    Any idea ?
    Thanks.
    Best regards,
    Karl Sigiscar.

    Not very helpful. My question is more where should the icon be placed or what kind of extra configuration is required so that Flex Builder / Flash Builder can find it in Design view.
    Yeah, yeah, I'm in the wrong forum. Doh.

  • Custom Pipeline Component error

    I have created a custom pipeline component which references a template file on the local drive e.g. c:\test\template.xlsx.  however when I run the application the Send pipeline fails Reason: 'c:\test\template.xlsx' could not be found. 
    It does exist, everything is spelt correctly and the host account has access to the folder.  Why can't the component see it?
    ----------------<0>----------------
    http://redeyedmonster.co.uk
    ----------------<0>----------------

    I tried a code as highlighted by Rachit, but I don’t see issue as the referred blog suggest.
    Coming to questioners code, I created a quick pipeline component which uses a dll for
    Microsoft.Office.Interop.Excel
    accessing the excel files and does something with Excel file.
    Few things I want to highlight here.
    If the questioner (RedEyeMonster) is using the same dll (Microsoft.Office.Interop.Excel)
    in the pipeline component as I used, then I am afraid Workbooks.Open’s component doesn’t just take one parameter as shown.
    Open method doesn’t have any overloaded methods. It takes few parameter and its worth checking each one on them.Some of the parameter are very important and could cause issues (like
    ReadOnly , IgnoreReadOnlyRecommended, Editable etc). As said, the
    Workbooks .Open method doesn’t just have template file location parameter. It’s worth reviewing the code again.
    Microsoft.Office.Interop.Excel.Application excelApplication = new Microsoft.Office.Interop.Excel.Application();
    //When I tried without the following couple of lines, my program waited for long time and crashed
    excelApplication.DisplayAlerts = false;
    excelApplication.Visible = true;
    Microsoft.Office.Interop.Excel.Workbook excelWorkboook = excelApplication.Workbooks.Open(@"C:\MRAshwinPrabhu\TestExcel.xsl", 2, false,
    5, "", "", true, Microsoft.Office.Interop.Excel.XlPlatform.xlWindows, "",
    false, false, 0, false, true, 0);
    While trying the code, I create a excel file as extension *.xls (older version of Excel 97-2003 workbook) and in the code I tried to open the file as “C:\foldername\FileName.xlsx”.
    *.xls and *.xlsx are different, though in the folder the excel icon may look similar they are different file extensions. I for the same error as the questioner.
    Also issue I faced while trying this is “DisplayAlerts”
    property. When I tried without setting this property to false, my program just waited for long time and crached evently. So when you use in a program like pipeline where you don’t have UI, ensure this property is set to false.
    Hope the above suggest would help the questioner.
    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

  • Help with html radio in JSF component

    I am creating a Custom JSF componet., which has text fields and radio buttons
    I am able to create Text field say ...
    HtmlInputText field = new HtmlInputText();
    field.setId(pId);
    return field;
    Whn I am trying to use HtmlSelectOneRadio for creating radio buttons, I am unable to see that in browser.. Y is that so??
    HtmlSelectOneRadio selectOne = new HtmlSelectOneRadio();
    selectOne.setId(pId);
    selectOne.setRendererType("javax.faces.Radio");

    i tried with HTml SelectBooleanCheckbox.. its working .. but not with radio box.

  • Create a custom widget

    I would like to create a "component" -- basically a drop-down menu.  Except that my drop-down menu will not select an item when a user clicks on it.  The user must click on it for 2 seconds and then it will be selected.  How can I create this custom widget/component?

    Thanks for your reply.  I was looking at AS 3 classes and in particular the Spark class DropDownList.  I am thinking of creating a class that extends from DropDownList.  Then overriding some method that will allow me to implement exactly when something should be selected (not just a click of the mouse but when the mouse is held down for 2 seconds).  I am just having trouble finding which method this would be, maybe a public or private method or an event.  I'm such a noob at this I'm sure this is obvious and either someone already knows it or it will catch their eye very quickly.  This is the link to the DropDownList in case someone wants to take a glance at it: class http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/spark/components/DropDo wnList.html   I appreciate all your help.

  • Unable to add the Custom Pipeline component in to the Visual Studio Tool Box

    I have tried to create the custom Pipeline component to transfer the large message in Receive side,
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Xml;
    using System.IO;
    using Microsoft.BizTalk.Message.Interop;
    using Microsoft.BizTalk.Component.Interop;
    namespace Sample.LargeFilesDecoder
    [ComponentCategory(CategoryTypes.CATID_PipelineComponent)]
    [ComponentCategory(CategoryTypes.CATID_Encoder)]
    [System.Runtime.InteropServices.Guid("25984614-BCFD-4c47-82FC-4A2300B76411")]
    public class LargeFilesDecoder : IBaseComponent,
    IComponentUI,
    IComponent,
    IPersistPropertyBag
    #region IBaseComponent Members
    public string Description
    get
    return "Pipeline component used to receive Larger Files through SFTP Ports";
    public string Name
    get
    return "LargeFilesDecoder";
    public string Version
    get
    return "1.0.0.0";
    #endregion
    #region IComponentUI Members
    public IntPtr Icon
    get
    return new System.IntPtr();
    public System.Collections.IEnumerator Validate(object projectSystem)
    return null;
    #endregion
    #region IPersistPropertyBag Members
    private string _largeFileLocation;
    private int _thresholdSize;
    public string LargeFileLocation
    get { return _largeFileLocation; }
    set { _largeFileLocation = value; }
    public int ThresholdSize
    get { return _thresholdSize; }
    set { _thresholdSize = value; }
    public void GetClassID(out Guid classID)
    classID = new Guid("DBA77DFA-5D3E-4B85-8F78-1D6330B6BCA0");
    public void InitNew()
    public void Load(IPropertyBag propertyBag, int errorLog)
    object val1 = null;
    object val2 = null;
    try
    propertyBag.Read("LargeFileLocation", out val1, 0);
    propertyBag.Read("ThresholdSize", out val2, 0);
    catch (ArgumentException)
    catch (Exception ex)
    throw new ApplicationException("Error reading PropertyBag: " + ex.Message);
    if (val1 != null)
    _largeFileLocation = (string)val1;
    if (val2 != null)
    _thresholdSize = (int)val2;
    public void Save(IPropertyBag propertyBag, bool clearDirty, bool saveAllProperties)
    object val1 = (object)_largeFileLocation;
    propertyBag.Write("LargeFileLocation", ref val1);
    object val2 = (object)_thresholdSize;
    propertyBag.Write("ThresholdSize", ref val2);
    #endregion
    #region IComponent Member
    public IBaseMessage Execute(IPipelineContext pContext, IBaseMessage pInMsg)
    if (_largeFileLocation == null || _largeFileLocation.Length == 0)
    _largeFileLocation = Path.GetTempPath();
    if (_thresholdSize == null || _thresholdSize == 0)
    _thresholdSize = 4096;
    if (pInMsg.BodyPart.GetOriginalDataStream().Length > _thresholdSize)
    Stream originalStream = pInMsg.BodyPart.GetOriginalDataStream();
    string largeFilePath = _largeFileLocation + pInMsg.MessageID.ToString() + ".msg";
    FileStream fs = new FileStream(largeFilePath, FileMode.Create);
    // Write message to disk
    byte[] buffer = new byte[1];
    int bytesRead = originalStream.Read(buffer, 0, buffer.Length);
    while (bytesRead != 0)
    fs.Flush();
    fs.Write(buffer, 0, buffer.Length);
    bytesRead = originalStream.Read(buffer, 0, buffer.Length);
    fs.Flush();
    fs.Close();
    // Create a small xml file
    string xmlInfo = "<MsgInfo xmlns='http://Sample.LargeFilesDecoder'><LargeFilePath>" + largeFilePath + "</LargeFilePath></MsgInfo>";
    byte[] byteArray = System.Text.Encoding.UTF8.GetBytes(xmlInfo);
    MemoryStream ms = new MemoryStream(byteArray);
    pInMsg.BodyPart.Data = ms;
    return pInMsg;
    #endregion
    I have
    Added .dll file in to the Global Assembly Cache (use gacutil)
    Copied it the Pipeline Components folder (E:\Program Files (x86)\Microsoft BizTalk Server 2013\Pipeline Components)
    Everything was successful, when I try to add the component to the Toolbox I get the message like below and cannot find the component in Toolbox.
    Tried several times but still getting stuck in the same place. I am using Visual Studio 2013. Any help is greatly appreciated.

    Do not put the Assembly in the %\Pipeline Components folder.  Pipeline Component Assemblies should be in the GAC only.
    To correctly deploy a custom Pipeline Component, you can follow the steps in this Wiki Article:
    http://social.technet.microsoft.com/wiki/contents/articles/26404.biztalk-deploying-custom-pipeline-components-in-biztalk-server-2006-and-higher.aspx
    I have never seen that specific error before.  Are you sure you're browsing from the Pipeline Components tab?

Maybe you are looking for

  • How do I get the app to install with Configurator?

    Trying to set up a few iPads with all the same apps etc.  Have a VPP account (just started in Canada, whoot!), have purchased the apps, have the spreadsheets. Instructions for Configurator say to import the app, and then later when installing the app

  • Wrt160nl Management via HTTPS

    Hi , I have an issue with new Win8 & IE10. When I try to access web management interface of my wrt160nl (Firmware Version: 1.00.01 B15) via HTTPS I'm receiving the foolowing message: "Continue to this website (not recommended)." If I click on it anot

  • Newer models support??

    My white MB video out to DVI then DVI to HDMI only gets video out without audio. Do newer models get both video and audio out?? Thanks.

  • FB60 Enhancement - BADI / User Exit / Substitution

    I have the following requirement: <b>When an invoice is posted using transaction FB60, based on GL Account entered, the line item text should be populated with the vendor name/number.</b> I searched the forum and found that some of you have recommend

  • SSO ticket expired !!

    Hi ,   we are running EP 7.0 (NW04s) and we are getting following error in ESS while opening it, <b>com.sap.mw.jco.JCO$Exception: (103) RFC_ERROR_LOGON_FAILURE: System received an expired SSO ticket</b>      at com.sap.mw.jco.MiddlewareJRfc.generateJ