myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Frank Felix Debatin" <>
Subject RE: param, updateActionListener, pageFlowScope, getCurrentRowData.. which design for CRUD with JSF?
Date Tue, 30 May 2006 13:27:16 GMT
We're using <af:setActionListener> consistently, doing
things like:

<af:table var="item">
		<af:commandLink ...>
			<af:setActionListener from="#{item}"

All in all nice. 

If I would need to start from scratch, I'd probably use a
facelets custom EL function like this: 

	<af:commandLink action="my:invoke('page', item)"/>

where my:invoke stores the parameter in some kind of hash
map for later retrieval. Or the backing bean base class has
an overridable invoke(Object obj) method, or similar. 

Frank Felix


> -----Original Message-----
> From: Cosma Colanicchia [] 
> Sent: Tuesday, May 30, 2006 3:16 PM
> To: MyFaces Discussion
> Subject: f:param, updateActionListener, pageFlowScope, 
> getCurrentRowData.. which design for CRUD with JSF?
> Hi,
> I've been experimenting JSF for my company for some weeks
> now. I'd like to discuss with you about the different ways

> the framework allows for passing parameters between views,

> which is a primary requirements for CRUD operations. I've 
> tried many, each one with advantages and
> drawbacks:
> 1) Nesting an <f:param> inside the UICommand
> Problems: doesn't work with redirects, need to access an 
> "ExternalContext" to retrieve the value
> 2) Nesting an <t:updateActionListener> (or a 
> <af:setActionListener>) updating a backing bean property
> Problems: requires to create a property on a backing bean 
> only for passing the parameter
> 3) Using the PageFlowScope of ADF Faces
> Problems: the target action has to be part of dialog (or
to start one)
> 4) Getting the current row from a custom DataModel (or 
> CollectionModel for ADF Faces)
> Problems: it can be used only when the source of the
> is an UICommand inside a data table
> Am I missing something? What do you thing about those 
> methods? Which one do you prefer? I know that each one is 
> better for some situation, but I'd like to adopt a
> scheme across my application, to simplify maintenance and
> be able to recycle some view by defining a standard
> I'd like very much to hear your opinion.
> Cosma

View raw message