Anyone have any suggestions on how I can get this working? On a side note... I think it would be a nice enhancement to add renderer listeners to the base component to allow events to be fired before/after a component renders. I think there would be a lot less developers attempting to extend components for trivial application specific tweaks. Any thoughts?
-----Original Message----- From: William Hoover [mailto:[EMAIL PROTECTED] Sent: Friday, July 13, 2007 4:08 PM To: MyFaces Discussion Subject: RE: [Trinidad] Renderer Listeners As you guessed it, there are links within each table row that contain a f:param that holds data for that row. When the user clicks on that row I need to update a separate input field (outside the table- inside the same form) with the value from the f:param. I need this to happen on the client side before the page submits. I know that I can make this happen using EL in the link's onclick attribute based upon the current row data and the separate input field id (i.e. onclick="javascript: setInputValue('separateInputFieldId',#{row.someValue}';"), but I have a table view that gets reused quite a bit that may or may not need this feature based upon individual needs. Also, I'm not sure that it's a good idea to capture the client id for the separate input field in this manner due to the client id dependency on naming containers. That's why I'm looking for a programmatic solution that will add the needed javascript call on an as needed basis before the link/param are rendered outside the jsf page. -----Original Message----- From: Adam Winer [mailto:[EMAIL PROTECTED] Sent: Friday, July 13, 2007 3:24 PM To: MyFaces Discussion Subject: Re: [Trinidad] Renderer Listeners Well, that's what you're doing, but doesn't quite explain (A) why the value is null until the link is rendered (though I'm guessing that's because its value comes from the table data) (B) why you need to get the param value for this specific command link within this table (or a specific row of the table?) -- Adam On 7/13/07, William Hoover <[EMAIL PROTECTED]> wrote: > I am trying to get a f:param value from a CoreCommandLink, but the value is > null until the link has been rendered. > > The link is inside a tr:column- if that helps. > > -----Original Message----- > From: Adam Winer [mailto:[EMAIL PROTECTED] > Sent: Friday, July 13, 2007 2:42 PM > To: MyFaces Discussion > Subject: Re: [Trinidad] Renderer Listeners > > > There's no event listener, but there is that ResponseWriter > API, which will get passed components on startElement(). > 99% works (necessarily, because PPR relies on that!). > What functionality are you trying to get here? > > -- Adam > > > On 7/13/07, William Hoover <[EMAIL PROTECTED]> wrote: > > I don't suppose there are any event listeners that can detect when > > components are being rendered? It would be nice if there was a way to be > > able to... > > > > component.addRendererListener(new RendererListener() { > > public void processRenderBegin(RenderEvent event) { > > ... > > } > > public void processRenderEnd(RenderEvent event) { > > ... > > } > > }); > > > > > >

