Return-Path: Delivered-To: apmail-myfaces-users-archive@www.apache.org Received: (qmail 23508 invoked from network); 20 Feb 2008 22:40:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 20 Feb 2008 22:40:35 -0000 Received: (qmail 77492 invoked by uid 500); 20 Feb 2008 22:40:25 -0000 Delivered-To: apmail-myfaces-users-archive@myfaces.apache.org Received: (qmail 77450 invoked by uid 500); 20 Feb 2008 22:40:25 -0000 Mailing-List: contact users-help@myfaces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "MyFaces Discussion" Delivered-To: mailing list users@myfaces.apache.org Received: (qmail 77439 invoked by uid 99); 20 Feb 2008 22:40:25 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Feb 2008 14:40:25 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of andrew.rw.robinson@gmail.com designates 72.14.214.238 as permitted sender) Received: from [72.14.214.238] (HELO hu-out-0506.google.com) (72.14.214.238) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Feb 2008 22:39:50 +0000 Received: by hu-out-0506.google.com with SMTP id 23so1835389huc.1 for ; Wed, 20 Feb 2008 14:39:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=EEkFq92QjNDaMmTYC9TBPT4QCA50R0eyciaOkag8d+Y=; b=YrYbKzdozjyf5mpe0Cu/9jUv1J2eGkSkmA8prjhvaVc5oX67+K7BD72X82PMAqAJL/uoHzL5z0GyymwomAdK/l1/nK5dnbfICR0p42EqowL0EO9nFWVmgWHUmQVDdnpbf9OakbQNKBojYL/YfnUGPHAIUxm1MwelariW6LRbUKs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=TeqHlvF26nnsk8PZqcV5qyQ2K7KC7Azc0ARsqKse3yeRdzJjiFNjEEYna5bE9ZzZGPSNZyBbzdH6CQK6GX0DLzGX+NhP5zrjrSKo1H/pSnP9T3TbFJwRqZMNLw54igiuf7ChnJL1MCWyjKsYFkJQDxzBf6aXJiuHGQ9DrLxyO8A= Received: by 10.142.115.10 with SMTP id n10mr7010440wfc.95.1203547195491; Wed, 20 Feb 2008 14:39:55 -0800 (PST) Received: by 10.142.127.9 with HTTP; Wed, 20 Feb 2008 14:39:55 -0800 (PST) Message-ID: Date: Wed, 20 Feb 2008 15:39:55 -0700 From: "Andrew Robinson" To: "MyFaces Discussion" Subject: Re: Custom Renderer fororg.apache.myfaces.trinidad.component.core.output.CoreMessage doesn'twork?... In-Reply-To: <64e0914d0802201427n6e85ff88ge5abf6208c1415f4@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1203462279.9291.35.camel@sudeban-desarrollo.SBSERP02> <71235db40802200202x6fe54e53s63e69d97db1188e8@mail.gmail.com> <64e0914d0802200855seab9bd3n15545c4d3b527fd9@mail.gmail.com> <64e0914d0802201415oebbff42g8889d0e9860f1790@mail.gmail.com> <64e0914d0802201427n6e85ff88ge5abf6208c1415f4@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org If you use the maven-faces-plugin for you project, you can create a new component, tag and tie it to a new renderer type. Just have it extend the messages ones. You can do it without the plugin, but you would have to do all of that manually. For the setup, see the wiki and use the tr:messages files as an example -Andrew On Wed, Feb 20, 2008 at 3:27 PM, Henry Eduardo Iguaro wrote: > Now that i realize, i can not add the attribute to the tr:message tag... I > don't know what was thinking, but, i still have the problem i posted before > > > > 2008/2/21, Henry Eduardo Iguaro : > > Hi Matthias, > > > > The solution you provide for my problem worked, but... i have to mix > tr:message tags rendered with the core Trinidad renderer and the custom > ones, thats why i create my custom tag, so i could separate the use of one > renderer from another > > > > Here, this is the code of the BalloonMessageTag custom tag class > > > > public class BalloonMessageTag extends UIXMessageTag > > { > > > > /** > > * Construct an instance of the CoreMessageTag. > > */ > > public BalloonMessageTag() > > { > > } > > > > public String getComponentType() > > { > > return "org.apache.myfaces.trinidad.CoreMessage"; > > } > > > > public String getRendererType() > > { > > return "gob.sudeban.util.jsf.custom.renderers.MessageBalloonRenderer"; > > } > > > > // The rest is a copy of the CoreMessageTag class > > } > > > > But it still get the error output i posted before... > > > > For now, i'm going to add an atribute to change the renderer dinamically > > > > What can i do to implement the custom tag without the error? > > > > > > > > 2008/2/21, Henry Eduardo Iguaro : > > > > > Thanks a lot! > > > > > > > > > 2008/2/21, Matthias Wessendorf : > > > > > > > Hi, > > > > > > > > I answered your *old* post already. > > > > > > > > Here is a little bit more on that: > > > > > > > > > http://matthiaswessendorf.wordpress.com/2008/02/20/extending-trinidads-default-renderers/ > > > > > > > > -Matthias > > > > > > > > On Feb 20, 2008 12:04 AM, HENRY IGUARO > wrote: > > > > > > > > > > > > > > > > > > > > hi, i'm creating a custom renderer for a > > > > > org.apache.myfaces.trinidad.component.core.output.CoreMessage > component > > > > > (aka, a component), the custom renderer uses > javascript > > > > > to simulate a small balloon message box. After searching in the > source > > > > > code, i've found that the default renderer for the CoreMessage is > the > > > > > > org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.MessageRenderer, > > > > > so i created a copy of it and renamed to my renderer class name, > this way i > > > > > could test the tag handling before plugin mine own renderer > > > > > > > > > > This is the code that registers the renderer in my faces-config.xml > > > > > file. > > > > > > > > > > > > > > > > > > > > org.apache.myfaces.trinidadinternal.renderkit.core.CoreRenderKit > > > > > > > > > > > > > > > > > > > > org.apache.myfaces.trinidad.Message > > > > > > > > > > > > > > > org.apache.myfaces.trinidad.CoreMessage > > > > > > > > > > > > > > > gob.sudeban.util.jsf.custom.renderers.MessageBalloonRenderer > > > > > > > > > > > > > > > > > > > > > > > > > This is the component tag from my tld file: > > > > > > > > > > balloon-message > > > > > > gob.sudeban.util.jsf.custom.tags.BalloonMessageTag > > > > > ... > > > > > > > > > > The same atributes for the message tag from the tr.tld file in > > > > > trinidad-impl-1.0.6.jar > > > > > ... > > > > > > > > > > > > > > > > > > > > The class gob.sudeban.util.jsf.custom.tags.BalloonMessageTag is > also a > > > > > renamed copy of > > > > > > org.apache.myfaces.trinidadinternal.taglib.core.output.CoreMessageTag > > > > > > > > > > This is the jsp file i use to test the component: > > > > > > > > > > > > > > > <%@ page language="java" contentType="text/html; charset=UTF-8" > > > > > pageEncoding="UTF-8"%> > > > > > <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%> > > > > > <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%> > > > > > <%@ taglib uri="http://myfaces.apache.org/trinidad" prefix="tr" %> > > > > > <%@ taglib uri="http://myfaces.apache.org/trinidad/html" > prefix="trh" %> > > > > > <%@ taglib uri="http://sudeban.gob.ve/jsf/component/tags" > > > > > prefix="sudeban" %> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > When i test the component i get the following: > > > > > > > > > > (HtmlRenderKitImpl.java:79) Unsupported > component-family/renderer-type: > > > > > > > > > > > org.apache.myfaces.trinidad.Message/gob.sudeban.util.jsf.custom.renderers.MessageBalloonRenderer > > > > > 19-feb-2008 16:30:22 > > > > > org.apache.myfaces.trinidadinternal.renderkit.RenderKitBase > getRenderer > > > > > WARNING: Renderer > > > > > 'gob.sudeban.util.jsf.custom.renderers.MessageBalloonRenderer' not > found > > > > > for component family 'org.apache.myfaces.trinidad.Message' > > > > > 19-feb-2008 16:30:22 > > > > > org.apache.myfaces.trinidad.component.UIXComponentBase > _getRendererImpl > > > > > WARNING: Could not find renderer for CoreMessage[UIXFacesBeanImpl, > > > > > id=_idJsp4] rendererType = > > > > > gob.sudeban.util.jsf.custom.renderers.MessageBalloonRenderer > > > > > (UIComponentTag.java:500) Exited encodeEnd for client-Id: _idJsp1 > > > > > 19-feb-2008 16:30:22 > > > > > org.apache.myfaces.trinidadinternal.renderkit.core.CoreRenderKit > > > > > encodeFinally > > > > > WARNING: No RenderingContext available > > > > > 19-feb-2008 16:30:22 > > > > > org.apache.myfaces.trinidadinternal.renderkit.core.CoreRenderKit > > > > > encodeFinally > > > > > WARNING: No RenderingContext available > > > > > > > > > > And anything get rendered... > > > > > > > > > > What am i doing wrong? It's possible to register another render for > a > > > > > core component like this? > > > > > > > > > > Any help would be appreciated > > > > > > > > > > (PS: Please excuse my english) > > > > > > > > > > > > > > > > > > > > > -- > > > > Matthias Wessendorf > > > > > > > > further stuff: > > > > blog: http://matthiaswessendorf.wordpress.com/ > > > > sessions: http://www.slideshare.net/mwessendorf > > > > mail: matzew-at-apache-dot-org > > > > > > > > > > > > > > > > -- > > > -----BEGIN GEEK CODE BLOCK----- > > > Version: 3.1 > > > GCS/O G++@ s-:+>:+ a25 tv+ d++> t+ C+++>+ U++>+++ P+ L++>+++ W+++ E---- > w++$ 5 X R-@ b+>++ D+ e>++ o? O? h--@ r+ y++ K? M PS+ > > > ------END GEEK CODE BLOCK------ > > > > > > > > > > -- > > -----BEGIN GEEK CODE BLOCK----- > > Version: 3.1 > > GCS/O G++@ s-:+>:+ a25 tv+ d++> t+ C+++>+ U++>+++ P+ L++>+++ W+++ E---- > w++$ 5 X R-@ b+>++ D+ e>++ o? O? h--@ r+ y++ K? M PS+ > > ------END GEEK CODE BLOCK------ > > > > -- > -----BEGIN GEEK CODE BLOCK----- > Version: 3.1 > GCS/O G++@ s-:+>:+ a25 tv+ d++> t+ C+++>+ U++>+++ P+ L++>+++ W+++ E---- w++$ > 5 X R-@ b+>++ D+ e>++ o? O? h--@ r+ y++ K? M PS+ > ------END GEEK CODE BLOCK------