Re: MyFaces equivalent of using JSTL 'if' and choose/when within JSF compoents?

2005-09-06 Thread Mike Kienenberger
As Martin said, each component has a rendered attribute.
If you want to conditionally render several elements, you'd set it on
an enclosing PanelGroup or PanelGrid component.

Iteration is a separate issue.
You could do this with a DataTable or DataList, I suppose.

On 9/6/05, Rick Reumann [EMAIL PROTECTED] wrote:
 But is there a standard if tag for JSF? In other words what if I
 just want to iterate over a collection and do my own display of html
 (divs/spans/etc) based on certain conditions that I need to check for.
 I'm a bit confused on how this is handled with MyFaces.
 
 On 9/6/05, Martin Marinschek [EMAIL PROTECTED] wrote:
  usually you use the rendered=#{backingBean.someMethodReturnsBoolean}
  to determine if a certain area of the UI should be shown or not.
 
  regards,
 
  Martin
 
  On 9/6/05, Rick Reumann [EMAIL PROTECTED] wrote:
   If I'm using a DataTable or any of the other JSF/MyFaces components
   that iterate over a collection, how do I do custom logic based on info
   in some other backing bean (for example a backinBean in session
   scope)?  I'm looking for what gives me the nice c:if c:choose/when
   logic from within JSF components?
  
   Thanks,
  
   --
   Rick
  
 
 
  --
 
  http://www.irian.at
  Your JSF powerhouse -
  JSF Trainings in English and German
 
 
 
 --
 Rick



Re: MyFaces equivalent of using JSTL 'if' and choose/when within JSF compoents?

2005-09-06 Thread Matthias Wessendorf
yes, use the MyFaces dataList:

http://myfaces.apache.org/tlddoc/tomahawk/t/dataList.html

On 9/6/05, Mike Kienenberger [EMAIL PROTECTED] wrote:
 As Martin said, each component has a rendered attribute.
 If you want to conditionally render several elements, you'd set it on
 an enclosing PanelGroup or PanelGrid component.
 
 Iteration is a separate issue.
 You could do this with a DataTable or DataList, I suppose.
 
 On 9/6/05, Rick Reumann [EMAIL PROTECTED] wrote:
  But is there a standard if tag for JSF? In other words what if I
  just want to iterate over a collection and do my own display of html
  (divs/spans/etc) based on certain conditions that I need to check for.
  I'm a bit confused on how this is handled with MyFaces.
 
  On 9/6/05, Martin Marinschek [EMAIL PROTECTED] wrote:
   usually you use the rendered=#{backingBean.someMethodReturnsBoolean}
   to determine if a certain area of the UI should be shown or not.
  
   regards,
  
   Martin
  
   On 9/6/05, Rick Reumann [EMAIL PROTECTED] wrote:
If I'm using a DataTable or any of the other JSF/MyFaces components
that iterate over a collection, how do I do custom logic based on info
in some other backing bean (for example a backinBean in session
scope)?  I'm looking for what gives me the nice c:if c:choose/when
logic from within JSF components?
   
Thanks,
   
--
Rick
   
  
  
   --
  
   http://www.irian.at
   Your JSF powerhouse -
   JSF Trainings in English and German
  
 
 
  --
  Rick
 
 


-- 
Matthias Wessendorf
Zülpicher Wall 12, 239
50674 Köln


RE: MyFaces equivalent of using JSTL 'if' and choose/when within JSF compoents?

2005-09-06 Thread CONNER, BRENDAN \(SBCSI\)
Yes, generally, you want the JSF component itself to do the implicit
iteration; one doesn't explicitly iterate in the JSF page.

- Brendan

-Original Message-
From: Mike Kienenberger [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 06, 2005 2:00 PM
To: MyFaces Discussion
Subject: Re: MyFaces equivalent of using JSTL 'if' and choose/when
within JSF compoents?


As Martin said, each component has a rendered attribute.
If you want to conditionally render several elements, you'd set it on
an enclosing PanelGroup or PanelGrid component.

Iteration is a separate issue.
You could do this with a DataTable or DataList, I suppose.

On 9/6/05, Rick Reumann [EMAIL PROTECTED] wrote:
 But is there a standard if tag for JSF? In other words what if I
 just want to iterate over a collection and do my own display of html
 (divs/spans/etc) based on certain conditions that I need to check for.
 I'm a bit confused on how this is handled with MyFaces.
 
 On 9/6/05, Martin Marinschek [EMAIL PROTECTED] wrote:
  usually you use the
rendered=#{backingBean.someMethodReturnsBoolean}
  to determine if a certain area of the UI should be shown or not.
 
  regards,
 
  Martin
 
  On 9/6/05, Rick Reumann [EMAIL PROTECTED] wrote:
   If I'm using a DataTable or any of the other JSF/MyFaces
components
   that iterate over a collection, how do I do custom logic based on
info
   in some other backing bean (for example a backinBean in session
   scope)?  I'm looking for what gives me the nice c:if c:choose/when
   logic from within JSF components?
  
   Thanks,
  
   --
   Rick
  
 
 
  --
 
  http://www.irian.at
  Your JSF powerhouse -
  JSF Trainings in English and German
 
 
 
 --
 Rick



MyFaces equivalent of using JSTL 'if' and choose/when within JSF compoents?

2005-09-05 Thread Rick Reumann
If I'm using a DataTable or any of the other JSF/MyFaces components
that iterate over a collection, how do I do custom logic based on info
in some other backing bean (for example a backinBean in session
scope)?  I'm looking for what gives me the nice c:if c:choose/when
logic from within JSF components?

Thanks,

-- 
Rick


Re: MyFaces equivalent of using JSTL 'if' and choose/when within JSF compoents?

2005-09-05 Thread Martin Marinschek
usually you use the rendered=#{backingBean.someMethodReturnsBoolean}
to determine if a certain area of the UI should be shown or not.

regards,

Martin

On 9/6/05, Rick Reumann [EMAIL PROTECTED] wrote:
 If I'm using a DataTable or any of the other JSF/MyFaces components
 that iterate over a collection, how do I do custom logic based on info
 in some other backing bean (for example a backinBean in session
 scope)?  I'm looking for what gives me the nice c:if c:choose/when
 logic from within JSF components?
 
 Thanks,
 
 --
 Rick
 


-- 

http://www.irian.at
Your JSF powerhouse - 
JSF Trainings in English and German