Return-Path: Delivered-To: apmail-shale-issues-archive@locus.apache.org Received: (qmail 78393 invoked from network); 29 Jul 2006 01:31:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 29 Jul 2006 01:31:47 -0000 Received: (qmail 67707 invoked by uid 500); 29 Jul 2006 01:31:47 -0000 Delivered-To: apmail-shale-issues-archive@shale.apache.org Received: (qmail 67681 invoked by uid 500); 29 Jul 2006 01:31:47 -0000 Mailing-List: contact issues-help@shale.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@shale.apache.org Delivered-To: mailing list issues@shale.apache.org Received: (qmail 67672 invoked by uid 99); 29 Jul 2006 01:31:47 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Jul 2006 18:31:47 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Jul 2006 18:31:46 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 440AD410009 for ; Sat, 29 Jul 2006 01:29:21 +0000 (GMT) Message-ID: <21147758.1154136561260.JavaMail.jira@brutus> Date: Fri, 28 Jul 2006 18:29:21 -0700 (PDT) From: "Gary VanMatre (JIRA)" To: issues@shale.apache.org Subject: [jira] Resolved: (SHALE-217) Not possible to pass dynamically information from a beans as a shale method parameter. In-Reply-To: <21066953.1152823696153.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/struts/browse/SHALE-217?page=all ] Gary VanMatre resolved SHALE-217. --------------------------------- Fix Version/s: 1.0.3 Resolution: Fixed I'm going to close this one out. It's been a couple of weeks. > Not possible to pass dynamically information from a beans as a shale method parameter. > -------------------------------------------------------------------------------------- > > Key: SHALE-217 > URL: http://issues.apache.org/struts/browse/SHALE-217 > Project: Shale > Issue Type: Bug > Components: Core > Affects Versions: 1.0.3 > Environment: Software platform. > Reporter: Alex Yakushev > Assigned To: Gary VanMatre > Fix For: 1.0.3 > > > Some notes. I forget to tell. > It is perfectly working with constans ... > > ,not with beans ... > value="#{mtJobOperation.operationID}"/> > Second line pass to a custom validator method just a null. > Alex. > > -----Original Message----- > From: Iakouchev Alexander-EAL027C > Sent: Thursday, July 13, 2006 10:29 AM > To: user@shale.apache.org > Subject: RE: Is this possible to pass dynamically information from a beans as a shale method parameter? > Hello Craig! > Thank you for feedback. > I want to be more specific. I need validate all rows in "dataTable" > component. JSP page show list of "Foo" objects. For example, the inputText component with id="---" has shale custom validate. I need analyze dependency component id="---" row i from component id="---" row 0...n. > In other words I need pass some current row id to get by id real object. > type="validateQuoteHoursValue" > arg="quoteHours" > server="true" > client="false" > > > value="#{mtJobOperation.operationID}"/> > > This valuator does not works. It receive operationID equal null. But outputText shown some not null information. > > The Shale validator example show some solution with dynamic shale method parameter, but it is with standard validator example not a custom validator. > Alex. > > -----Original Message----- > From: craigmcc@gmail.com [mailto:craigmcc@gmail.com] On Behalf Of Craig McClanahan > Sent: Wednesday, July 12, 2006 7:45 PM > To: user@shale.apache.org > Subject: Re: Is this possible to pass dynamically information from a beans as a shale method parameter? > On 7/12/06, Iakouchev Alexander-EAL027C wrote: > > > > Is this possible to pass dynamically information from a beans as a > > shale method parameter? > > Alex. > > > > > In JSF 1.1, you cannot do this (it's not a Shale issue, it's the basic functionality of JSF method binding expression). In JSF 1.2, you can ... > but only for calls to static methods. > A better general strategy is to invoke a method that takes no parameters, but ensure that the called method can extract whatever it needs. For example, consider the standard JSF call to your action method (which takes no parameters). There are at least two ways for the called method to access request parameters on the incoming request: > * Via JSF programmatic APIs: > // Retrieve the value of the "foo" parameter > FacesContext context = FacesContext.getCurrentInstance(); > String foo = (String) > > context.getExternalContext().getRequestParameterMap().get("foo"0; > * By managed beans expression evaluation. This example requires > a bit more setup to configure, but is much easier to use because > the values are injected for you. Consider again that you want to > extract the value of the "foo" parameter and use it in your myAction() > action method. Define your managed bean entry like this: > > mybean > com.mypackage.MyBean > request > > foo > #{param.foo} > > > and set up your bean class like this: > package com.mypackage; > public class MyBean { > ... > private String foo = null; > public String getFoo() { return this.foo; } > public void setFoo(String foo) { this.foo = foo; } > ... > public String myAction() { > // Get the value of the "foo" request parameter > String foo = getFoo(); > ... > } > ... > } > The formula #{param.foo} is evaluated when the managed bean is created, and extracts the value of the request parameter named "foo" and calls > setFoo() on your bean. By the time the action method is called, the value will be there already. > Craig -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/struts/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira