Return-Path: Delivered-To: apmail-myfaces-users-archive@www.apache.org Received: (qmail 83102 invoked from network); 18 Jun 2008 15:42:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Jun 2008 15:42:29 -0000 Received: (qmail 1160 invoked by uid 500); 18 Jun 2008 15:42:14 -0000 Delivered-To: apmail-myfaces-users-archive@myfaces.apache.org Received: (qmail 1126 invoked by uid 500); 18 Jun 2008 15:42:14 -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 1094 invoked by uid 99); 18 Jun 2008 15:42:14 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Jun 2008 08:42:14 -0700 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Jun 2008 15:41:23 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1K8zn2-0003bb-Sz for users@myfaces.apache.org; Wed, 18 Jun 2008 08:41:40 -0700 Message-ID: <17985590.post@talk.nabble.com> Date: Wed, 18 Jun 2008 08:41:40 -0700 (PDT) From: Joris Kimpe To: users@myfaces.apache.org Subject: Re: [TRINIDAD] include jsp using param In-Reply-To: <17985352.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: joris.kimpe@get.be References: <17912565.post@talk.nabble.com> <17961427.post@talk.nabble.com> <17985352.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org Maybe my example isn't clear. What I mean is: - my first.jsp contains a table with a var named row - my second.jsp contains an inputText with the value of an element "text" of the var "row" (from the table of first.jsp) Joris Kimpe wrote: > > To be honest, I want to stick to JSF (especially Trinidad, so no Tomahawk) > if this is possible. So, could you give me a small example of how I can > use a var from fist.jsp in second.jsp? > > So something like this: > > first.jsp > > ... call second.jsp or something like that (like it was a > component) > > > > second.jsp > > > > > > > Andrew Robinson-5 wrote: >> >> 1) use facelets >> 2) honestly, use facelets, JSPs stink >> 3) well if you must... >> 4) are you really sure you want to stick with JSP, a failed technology? >> 5) okay, don't use params. JSP includes do not change the JSF scopes. >> Therefore, as long as you are not using JSTL tags in your include, you >> don't need to use JSP tags at all except for the include. If you need >> to change the name of a EL so that there is one standard for your >> include to use, have a look at the tomahawk alias bean: >> http://myfaces.apache.org/tomahawk/tlddoc/t/aliasBean.html >> >> Basically, if you are using JSF, try to stay 100% in JSF and not use >> JSP as much as possible as it only creates confusion. Even if you >> understand it, someone maintaining the code may not. As a result it is >> always best to stick with 100% JSF tags and components. >> >> As for #2-4 I couldn't resist sharing my opinion ;) >> >> -Andrew >> >> On Wed, Jun 18, 2008 at 1:44 AM, Joris Kimpe wrote: >>> >>> Great article! >>> >>> How do you suggest how I should do this? I have 3 pages using the same >>> panelPopup (which is in second.jsp). For maintenance and redundancy >>> reasons >>> I want to write this panelPopup only once (and include it somehow in my >>> 3 >>> pages). I thought jsp:include should do the trick, but this didn't >>> work... >>> >>> Joris >>> >>> >>> >>> Andrew Robinson-5 wrote: >>>> >>>> Read this: >>>> >>>> http://andrewfacelets.blogspot.com/2008/03/build-time-vs-render-time.html >>>> >>>> On Tue, Jun 17, 2008 at 8:54 AM, Joris Kimpe >>>> wrote: >>>>> >>>>> Hello group, >>>>> >>>>> I have a jsp (containing Trinidad components), and I want to include a >>>>> second jsp page (using jsp:include). I'd like to pass a backing bean >>>>> parameter to the included page (so I can use this value in a >>>>> javascript >>>>> function), but how can I do this? >>>>> >>>>> It appears to be impossible to use "#{row.shiftId}" inside the onclick >>>>> attribute (which is in the included jsp). Or am I wrong? Also using >>>>> ${param.shiftId} results in an error: >>>>> According to TLD or attribute directive in tag file, attribute onclick >>>>> does >>>>> not accept any expressions >>>>> >>>>> >>>>> >>>>> These are my jsp files: >>>>> >>>>> first.jsp >>>>> ------------------------------------------------------------------------------- >>>>> ... >>>>> >>>>> >>>> var="row"> >>>>> ... >>>>> >>>>> >>>> var="result"> >>>>> >>>>> >>>> value="#{result.shift}"/> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>> value="#{row.shiftId}"/> >>>>> >>>>> >>>>> ... >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> second.jsp >>>>> ------------------------------------------------------------------------------- >>>>> >>>>> >>>> text="create" >>>>> modal="true" position="relative"> >>>>> >>>> value="#{backingBean.type}" >>>>> required="yes" immediate="true"> >>>>> >>>> value="#{personalShiftPlanOverviewActions.absenceTypes}" >>>>> /> >>>>> >>>>> ... >>>>> >>>>> >>>>> >>>>> >>>>> Thanks for your help! >>>>> >>>>> Joris >>>>> -- >>>>> View this message in context: >>>>> http://www.nabble.com/-TRINIDAD--include-jsp-using-param-tp17912565p17912565.html >>>>> Sent from the MyFaces - Users mailing list archive at Nabble.com. >>>>> >>>>> >>>> >>>> >>> >>> -- >>> View this message in context: >>> http://www.nabble.com/-TRINIDAD--include-jsp-using-param-tp17912565p17961427.html >>> Sent from the MyFaces - Users mailing list archive at Nabble.com. >>> >>> >> >> > > -- View this message in context: http://www.nabble.com/-TRINIDAD--include-jsp-using-param-tp17912565p17985590.html Sent from the MyFaces - Users mailing list archive at Nabble.com.