Return-Path: Delivered-To: apmail-myfaces-users-archive@www.apache.org Received: (qmail 21195 invoked from network); 6 Apr 2010 20:35:03 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 6 Apr 2010 20:35:03 -0000 Received: (qmail 57116 invoked by uid 500); 6 Apr 2010 20:35:02 -0000 Delivered-To: apmail-myfaces-users-archive@myfaces.apache.org Received: (qmail 57088 invoked by uid 500); 6 Apr 2010 20:35:02 -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 57080 invoked by uid 99); 6 Apr 2010 20:35:02 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Apr 2010 20:35:02 +0000 X-ASF-Spam-Status: No, hits=2.3 required=10.0 tests=AWL,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lu4242@gmail.com designates 209.85.160.53 as permitted sender) Received: from [209.85.160.53] (HELO mail-pw0-f53.google.com) (209.85.160.53) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Apr 2010 20:34:57 +0000 Received: by pwj10 with SMTP id 10so365916pwj.12 for ; Tue, 06 Apr 2010 13:34:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:received:message-id:subject:from:to:content-type; bh=6hEv/aJG8m4Q0jHZeO9+4VMoaXBMXqB1tBekavGwN5U=; b=i2BMxlXi4xOrRR0+eYRRK/pq4oF+Sqgwq1Ad8eWjfCl157QvLNb/PUol7EbGHg+OHA owklCtkRfeP81+l8zCvz+wCc2EUkACzkV2JRPkegi+y7Ao7xOnJXicjwUfwZSa7FlN8Z 4TN3jJY2QOEmW2Ty0MIcexM0orrn9Nb2NB1i4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=B1psq65dPw40h/Q0M74KpMcZaLd8jTUrfTY7q2O4r1ZfLyhW/N3bW02D6adyQynvvc kQVJN/nI/6khAMyhx6/+OmGnzs+LSSbWiENvFjG/SjPAlQtclUmKs7fBHCcePLCWXxaU Q4mHUGee0YjKgj1fPoP8jyIzhNOQ5i1YComUU= MIME-Version: 1.0 Received: by 10.142.89.16 with HTTP; Tue, 6 Apr 2010 13:34:37 -0700 (PDT) In-Reply-To: References: <28150278.post@talk.nabble.com> Date: Tue, 6 Apr 2010 16:34:37 -0400 Received: by 10.142.196.21 with SMTP id t21mr652328wff.237.1270586077493; Tue, 06 Apr 2010 13:34:37 -0700 (PDT) Message-ID: Subject: Re: Missing/changed methods after migrating to MyFaces 1.2.8 From: Leonardo Uribe To: MyFaces Discussion Content-Type: multipart/alternative; boundary=000e0cd32f50ce3a5c0483975f08 --000e0cd32f50ce3a5c0483975f08 Content-Type: text/plain; charset=ISO-8859-1 Hi All tag class hierarchy was changed from 1.1 to 1.2, with the inclusion of jsp EL expressions. Right now, all tag hierarchy are generated by myfaces builder plugin. But anyway, in tomahawk we have cases like this one: http://svn.apache.org/repos/asf/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tree/taglib/AbstractTreeTag.java http://svn.apache.org/repos/asf/myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/custom/tree/taglib/AbstractTreeTag.java You can create a custom jsf tag class with all properties from your base component, and override/add the additional properties you need. regards, Leonardo Uribe 2010/4/6 Mike Kienenberger > Not sure about > > 1. setStringProperty. > > But for > > 2. create a ValueExpression containing "#{true}" or "#{false}" > > I haven't tested this, but.... > > You could either ask JSF to create it for you: > > import javax.el.ValueExpression; > > FacesContext context = FacesContext.getCurrentInstance(); > ValueExpression vex = context.getApplication(). > getExpressionFactory().createValueExpression(context.getELContext(), > "#{false}", Boolean.class); > > Or you could implement your own, something along the lines > of this: > > new ValueExpression() { > > @Override > public boolean isLiteralText() { > return false; > } > > @Override > public int hashCode() { > return 0; > } > > @Override > public String getExpressionString() { > return "#{false}"; > } > > @Override > public boolean equals(Object obj) { > return obj == this; > } > > @Override > public void setValue(ELContext context, Object > value) { > // TODO Auto-generated method stub > } > > @Override > public boolean isReadOnly(ELContext context) { > return true; > } > > @Override > public Object getValue(ELContext context) { > return Boolean.FALSE; > } > > @Override > public Class getType(ELContext context) { > return Boolean.class; > } > > @Override > public Class getExpectedType() { > return Boolean.class; > } > }; > > > On Tue, Apr 6, 2010 at 7:19 AM, Seema Mani > wrote: > > > > hi, > > > > I'm facing a few issues after migrating to MyFaces 1.2.8 from MyFaces > 1.1.7 > > > > 1. In my custom tag handler class, extending HtmlMessageTag, there were > > calls to setStringProperty method in the superclass. But these methods > are > > not existing now > > 2. In my custom tag handler class, extending HtmlCommandButtonTag, there > > were calls to the setDisabled method, which had String argument. This > method > > now takes ValueExpression as the argument. But the values to be passed > are > > static like "true" and "false" > > > > Please advise on how these can be resolved. > > > > Thanks, > > Seema > > -- > > View this message in context: > http://old.nabble.com/Missing-changed-methods-after-migrating-to-MyFaces-1.2.8-tp28150278p28150278.html > > Sent from the MyFaces - Users mailing list archive at Nabble.com. > > > --000e0cd32f50ce3a5c0483975f08--