BTW: I can’t resolve the Component.dtd that is used in the xml file:

 

<!DOCTYPE component PUBLIC

  "-//MyFaces//DTD MyFaces component def 1.0//EN"

  "http://myfaces.apache.org/dtd/Component.dtd">

 

FileNotFoundException-http://myfaces.apache.org/dtd/Component.dtd     CustomMessage.xml            ClearyWeb/src/com/recommind/faces/messages

File not found: "http://myfaces.apache.org/dtd/Component.dtd".   CustomMessage.xml            ClearyWeb/src/com/recommind/faces/messages

 

Could this cause trouble?


From: Michael Heinen [mailto:[EMAIL PROTECTED]
Sent: Dienstag, 13. Juni 2006 14:39
To: MyFaces Discussion
Subject: RE: Renderer for CustomMessageTag - help needed

 

I forgot to append the CustomMessage.xml:

 

  <component >

      <component-class>com.recommind.faces.messages.CustomMessage</component-class>

      <base-class>org.apache.myfaces.component.html.ext.HtmlMessage</base-class>

      <component-type>com.recommind.faces.messages.CustomMessage</component-type>

      <renderer-type>com.recommind.faces.messages.CustomMessageRenderer</renderer-type>

      <field>

          <name>customMessage</name>

          <type>java.lang.String</type>

      </field>

       …

  </component>

 


From: Michael Heinen [mailto:[EMAIL PROTECTED]
Sent: Dienstag, 13. Juni 2006 14:37
To: MyFaces Discussion
Subject: Renderer for CustomMessageTag - help needed

 

I am going mad with a custom Renderer !

I created a custom tag that extends HtmlMessageTag.

My CustomMessageRenderer shpuld be sued for this tag.

The normal HtmlMessageTag should be rendered as before.

 

Problem: I don't get the CustomMessageRenderer mapped to my tag.

Could anybody have a look and give me a hint?

 

facesConfig.xml:

<component>

    <component-type>com.recommind.faces.messages.CustomMessage</component-type>

    <component-class>com.recommind.faces.messages.CustomMessage</component-class>

</component>

 

<render-kit>

<render-kit-id>HTML_BASIC</render-kit-id>

            <renderer>

                        <component-family>recommind.faces.Message</component-family>

                        <renderer-type>com.recommind.faces.messages.CustomMessage</renderer-type>

                        <renderer-class>com.recommind.faces.messages.CustomMessageRenderer</renderer-class>

            </renderer>                  

</render-kit>

 

Following classes are in package com.recommind.faces.messages:

public class CustomMessage extends HtmlMessage{

            public static final String COMPONENT_TYPE = "com.recommind.faces.messages.CustomMessage";

            private String customMessage;

            (... getters and setters, saveState and restoreState ... )

}

 

public class CustomMessageTag extends HtmlMessageTag{

  private String customMessage;

  public String getRendererType() {

     return "com.recommind.faces.messages.CustomMessage";

  }

           

  public String getComponentType(){

       return CustomMessage.COMPONENT_TYPE;

  }

  (... getters and setters ... )

}

 

public class CustomMessageRenderer extends HtmlMessageRenderer{

  protected void renderSingleFacesMessage ( ...) {

   … 

   }

}

 

Thanks,

Michael

--- Begin Message ---

I forgot to append the CustomMessage.xml:

 

  <component >

      <component-class>com.recommind.faces.messages.CustomMessage</component-class>

      <base-class>org.apache.myfaces.component.html.ext.HtmlMessage</base-class>

      <component-type>com.recommind.faces.messages.CustomMessage</component-type>

      <renderer-type>com.recommind.faces.messages.CustomMessageRenderer</renderer-type>

      <field>

          <name>customMessage</name>

          <type>java.lang.String</type>

      </field>

       …

  </component>

 


From: Michael Heinen [mailto:[EMAIL PROTECTED]
Sent: Dienstag, 13. Juni 2006 14:37
To: MyFaces Discussion
Subject: Renderer for CustomMessageTag - help needed

 

I am going mad with a custom Renderer !

I created a custom tag that extends HtmlMessageTag.

My CustomMessageRenderer shpuld be sued for this tag.

The normal HtmlMessageTag should be rendered as before.

 

Problem: I don't get the CustomMessageRenderer mapped to my tag.

Could anybody have a look and give me a hint?

 

facesConfig.xml:

<component>

    <component-type>com.recommind.faces.messages.CustomMessage</component-type>

    <component-class>com.recommind.faces.messages.CustomMessage</component-class>

</component>

 

<render-kit>

<render-kit-id>HTML_BASIC</render-kit-id>

            <renderer>

                        <component-family>recommind.faces.Message</component-family>

                        <renderer-type>com.recommind.faces.messages.CustomMessage</renderer-type>

                        <renderer-class>com.recommind.faces.messages.CustomMessageRenderer</renderer-class>

            </renderer>                  

</render-kit>

 

Following classes are in package com.recommind.faces.messages:

public class CustomMessage extends HtmlMessage{

            public static final String COMPONENT_TYPE = "com.recommind.faces.messages.CustomMessage";

            private String customMessage;

            (... getters and setters, saveState and restoreState ... )

}

 

public class CustomMessageTag extends HtmlMessageTag{

  private String customMessage;

  public String getRendererType() {

     return "com.recommind.faces.messages.CustomMessage";

  }

           

  public String getComponentType(){

       return CustomMessage.COMPONENT_TYPE;

  }

  (... getters and setters ... )

}

 

public class CustomMessageRenderer extends HtmlMessageRenderer{

  protected void renderSingleFacesMessage ( ...) {

   … 

   }

}

 

Thanks,

Michael


--- End Message ---

Reply via email to