From lincolnbaxter at gmail.com Sun Aug 16 04:45:24 2020 Content-Type: multipart/mixed; boundary="===============5486585982282198744==" MIME-Version: 1.0 From: lincolnbaxter at gmail.com To: jsr-314-open-mirror at lists.jboss.org Subject: Re: [jsr-314-open] binding vs. ui:repeat Date: Tue, 08 Sep 2009 17:18:29 +0000 Message-ID: <956029407-1252430287-cardhu_decombobulator_blackberry.rim.net-663268378-@bda160.bisx.prod.on.blackberry> In-Reply-To: 4AA68D5F.60809@sun.com --===============5486585982282198744== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Ok. Ill try that. I just wanted to make sure that I didn't miss something, = before I check in this code to mojarra. = More when I get home, thanks! Lincoln Sent from my Verizon Wireless BlackBerry -----Original Message----- From: Ryan Lubke Date: Tue, 08 Sep 2009 09:59:11 = To: Subject: Re: [jsr-314-open] binding vs. ui:repeat On 9/7/09 6:06 PM, Andy Schwartz wrote: > Thanks Lincoln. I haven't had time to debug this, but I have a theory = > about what might be happening. In your sample: > >> > rendered=3D"#{!cc.attrs.disabled}"> >> *> action=3D"#{taskController.saveTaskAjax(cc.attrs.story, = >> cc.attrs.task)}" /> * >> > > We expect "cc" to resolve to the containing composite component (ie. = > to the component). I wouldn't be surprised if = > what is actually happening is that "cc" is being resolved to the = > composite component instead. Yep, that's what is happening. > One reason why I suspect this might be happening is that I know that = > Ryan has investigated/resolved similar problems not too long ago. The problem we resolved was the passing of #{cc.attrs} attributes = between nested composite components. For this case, the spec recommends using cc.parent.attrs.story and = cc.parent.attrs.task, where parent resolves to the nearest composite component parent of the current composite = component. > Another reason why I am suspicious about this is because we have faced = > similar issues in our own (ADF Faces) declarative component solution. = > This stuff can get tricky. :-) > > Hey Ryan - > > Does this problem look familiar? Any thoughts on this? > > Andy > > Lincoln Baxter, III wrote: >> Hey Andy, here you go: >> >> In the mean time I'm going to sign up for the dev lists. >> >> ---------------------------------------------------------------------- >> Using: >> > action=3D"*#{taskController.saveTaskAjax(cc.attrs.story, = >> cc.attrs.task)}*" /> >> >> *#{taskController.saveTaskAjax(cc.attrs.story, cc.attrs.task)}* =3D >> null values passed to method >> *#{taskController.saveTaskAjax(currentStoryBean.story, task)}* =3D >> correct values resolved, assuming currentStoryBean.story and task >> are both in the EL/page scope somewhere. >> >> >> ---------------------------------------------------------------------- >> *CC Impl:* >> >> >> > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> >> > xmlns:h=3D"http://java.sun.com/jsf/html" >> xmlns:f=3D"http://java.sun.com/jsf/core" >> xmlns:a=3D"http://java.sun.com/jsf/composite/ajax" >> xmlns:cc=3D"http://java.sun.com/jsf/composite"> >> >> >> >> > default=3D"false" /> >> >> >> >> >> >> > #{cc.attrs.styleClass} taskBlock_#{cc.attrs.task.status}" = >> style=3D"#{cc.attrs.style}"> >> >>
>> > rendered=3D"#{cc.attrs.disabled}"/> >> > rendered=3D"#{!cc.attrs.disabled}"> >> *> action=3D"#{taskController.saveTaskAjax(cc.attrs.story, = >> cc.attrs.task)}" /> * >> >>
>>
>> >> >> >> ---------------------------------------------------------------------- >> *consuming page code:* <-- this is where task is defined in the = >> UI:Repeat, so it is in scope >> >> > PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" >> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> >> > xmlns:c=3D"http://java.sun.com/jsp/jstl/core" >> xmlns:f=3D"http://java.sun.com/jsf/core" >> xmlns:h=3D"http://java.sun.com/jsf/html" >> xmlns:socialpm=3D"http://java.sun.com/jsf/composite/socialpm" >> xmlns:pretty=3D"http://ocpsoft.com/prettyfaces" >> xmlns:ui=3D"http://java.sun.com/jsf/facelets" xml:lang=3D"en" lang=3D"en= "> >> >> >> >> >>
This story has no tasks. That could be a problem = >> later...
>>
>> >> >> > members=3D"#{currentProjectBean.project.activeMembers}" >> disabled=3D"#{!authorizationBean.isMember or = >> !currentStoryBean.story.open}" >> deletable=3D"true" styleClass=3D"m5t" refreshOnSave=3D"false" /> >> >>
>>
>> >> >> >> >> >> On Sat, 2009-09-05 at 15:23 -0400, Andy Schwartz wrote: >>> Hey Lincoln - >>> >>> Lincoln Baxter, III wrote: >>> > First, please let me know if there is a better place to ask JSF = >>> Dev > related questions. >>> > >>> >>> I suppose the Mojarra dev list might be the right place for = >>> implementation questions: >>> >>> https://javaserverfaces.dev.java.net/mailinglists.html >>> >>> Though personally I am fine with you asking here. :-) >>> >>> Could you send along your composite component implementation (and = >>> perhaps a snippet from the consuming page)? Just want to make sure = >>> I understand the use case. >>> >>> Andy >>> >>> >> -- = >> *Lincoln Baxter, III* >> Co-Founder of OcpSoft >> Author of PrettyFaces URL Rewriting = >> for JSF >> >> > --===============5486585982282198744==--