From adffaces-user-return-1367-apmail-incubator-adffaces-user-archive=incubator.apache.org@incubator.apache.org Wed Nov 08 21:40:58 2006 Return-Path: Delivered-To: apmail-incubator-adffaces-user-archive@locus.apache.org Received: (qmail 73511 invoked from network); 8 Nov 2006 21:40:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Nov 2006 21:40:58 -0000 Received: (qmail 56340 invoked by uid 500); 8 Nov 2006 21:41:09 -0000 Delivered-To: apmail-incubator-adffaces-user-archive@incubator.apache.org Received: (qmail 56138 invoked by uid 500); 8 Nov 2006 21:41:08 -0000 Mailing-List: contact adffaces-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: adffaces-user@incubator.apache.org Delivered-To: mailing list adffaces-user@incubator.apache.org Received: (qmail 56129 invoked by uid 99); 8 Nov 2006 21:41:08 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Nov 2006 13:41:08 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of spodxx@gmail.com designates 64.233.184.226 as permitted sender) Received: from [64.233.184.226] (HELO wr-out-0506.google.com) (64.233.184.226) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Nov 2006 13:40:55 -0800 Received: by wr-out-0506.google.com with SMTP id 58so22767wri for ; Wed, 08 Nov 2006 13:40:35 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=fPCDTqDGtmjbIY9D3h8CtzNWCIANn8t49zM4Rqm4fU26TbgczawZtGCh4n5O+c422kqmmzg9OAFQT2xchVcD7yJjwwsZIvdEpLmavJiYemUORHioYDcrqbFEqAkHitjOUQywKMYxnCpuGsrPyVWlAlnb+mI94xi7vY1UEsgGUKU= Received: by 10.78.166.7 with SMTP id o7mr131265hue.1163022033935; Wed, 08 Nov 2006 13:40:33 -0800 (PST) Received: by 10.78.146.1 with HTTP; Wed, 8 Nov 2006 13:40:31 -0800 (PST) Message-ID: Date: Wed, 8 Nov 2006 22:40:33 +0100 From: "Stefan Podkowinski" To: adffaces-user@incubator.apache.org Subject: Re: Define Trinidad navigation in faces-config.xml using action methods instead of outcomes In-Reply-To: <885AADC3D2318E45807C702ABC2637DD133455@MOES0037.tcc.local> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <885AADC3D2318E45807C702ABC2637DD133455@MOES0037.tcc.local> X-Virus-Checked: Checked by ClamAV on apache.org I'm not sure if I got you right. But I guess it would be a good idea creating the getAction() method in your MenuTreeNode class instead of the keyAccountProfileEditorController. The MenuTreeNode would just delegate to the appropriate controller (which has been injected before) based on its configuration through its properties. As for the required icon, you can hide it easily by adding the following stylesheet: .AFRequiredIconStyle {display:none;} On 11/8/06, B=F6hringer Jochen wrote: > Hello, > > > > I have adapted the example from the Trinidad documentation (http://incuba= tor.apache.org/adffaces/devguide/navigation.html) about Navigation to fit m= y needs, but I have one major problem. I want to use the approach to have t= he navigation hierarchy configured in the facelets-config.xml as a tree of = managed beans describing the label and action of the menu items. This way I= can easily use components like to render the way the user= walked down the navigation path. > > > > This works pretty good if I specifiy an outcome in this configuration for= every item like this snippets shows: > > > > > > mtn_kape_editKeyAccount > > de.tccproducts.kn.jsf.model.MenuTreeNode > > none > > > > action > > java.lang.String > > showSearchKeyAccount > > > > > > description > > java.lang.String > > > > > > > > icon > > java.lang.String > > > > > > > > label > > java.lang.String > > Edit Key Account > > > > > > viewId > > java.lang.String > > /kape_editKeyAccount.xhtml > > > > > > > > But I want to be able to use action methods instead of outcomes in the co= nfiguration, because I have to do initialization work before showing some o= f my screens. > > > > > > action > > java.lang.String > > #{keyAccountProfileEditorController.showSearchKeyAccount} > > > > > > But if I try to define a method binding in the action property of the man= aged bean I get this exception: > > > > Caused by: javax.faces.FacesException: Property action references object = in a scope with shorter lifetime than the target scope none > > at org.apache.myfaces.config.ManagedBeanBuilder.initializePropertie= s(ManagedBeanBuilder.java:164) > > > > The reason is clear. The managed bean keyAccountProfileEditorController i= s on session scope an the navigation is defined in scope none. But even if = I switch all navigation items to the session scope I get exceptions because= the engine tries to evaluate the expression as a bean property and not as = a method binding. So the engine tries to find a method getShowSearchKeyAcco= unt in my controller bean. Is there a workaround to realize what I want to = do or do I have to rethink about my design. > > > > Btw. how can I disable the star in front of an inputText field which is m= arked as required. I have tried to set the content in my skin, but this doe= s not help. Only setting the color to the same as the background is not suf= ficient for me, because the layout is broken. > > > > /** Style class that styles the .AFRequiredIcon icon. */ > > .AFRequiredIconStyle { content:""; } > > > > > > Regards > > Jochen > > >