Re: [Stripes-users] Stripes and Components

2010-02-05 Thread Nick Stuart
Ya sorry, that was just taken from memory without looking at! 

Glad you got it working!

-Nick

On Feb 4, 2010, at 6:23 PM, farouk alhassan wrote:

 Ok, Got it working. Thank you.
 Had to just change layout-component to layout-render when rendering
 
 Regards
 
 Farouk A
 
 --- On Thu, 4/2/10, farouk alhassan osbert252...@yahoo.com wrote:
 
 From: farouk alhassan osbert252...@yahoo.com
 Subject: Re: [Stripes-users] Stripes and Components
 To: Stripes Users List stripes-users@lists.sourceforge.net
 Date: Thursday, 4 February, 2010, 22:37
 
 Hi Nick,
 What Tag library do you use.  I get this error when I use those attributes.
 
 Attribute baseName invalid for tag layout-component according to TLD
 
 Thanks
 
 --- On Thu, 4/2/10, Nick Stuart nstu...@speranzasystems.com wrote:
 
 From: Nick Stuart nstu...@speranzasystems.com
 Subject: Re: [Stripes-users] Stripes and Components
 To: Stripes Users List stripes-users@lists.sourceforge.net
 Date: Thursday, 4 February, 2010, 20:41
 
 I use layouts to get around this problem as well. I simply have the name or 
 id (whichever you need) be driven from a jsp value. My fields end up looking 
 like this:
 
 s:layout-definition
 s:form partial='true' beanclass='${actionClass}'
s:text name=${baseName}.someproperty/
 /s:form
 /s:layout-definition
 
 For rendering them it's as simple as:
 s:form beanclass=someClass.here
 s:layout-component name=/WEB-INF/jsp/components/fields.jsp 
 baseName=mainPropertyName actionClass='${actionBean.class}'/
 /s:form
 
 Of course this is most useful for bunching a lot of fields together like you 
 said, but this is the general idea. It works because layouts pass any 'extra' 
 attributes you pass in on the tag gets set to a page scope parameter.
 
 Hope this helps!
 
 On Feb 4, 2010, at 3:25 PM, farouk alhassan wrote:
 
 Thanks All. 
 I understand that stripes is an action based framework and if I want a 
 component based one, I should look for JSF/Seam/or sth like that. 
 
 However, I am increasingly duplicating my form fields in a lot of places and 
 just changing the name and id attributes. 
 I therefore need to define my form feilds in some way that I can reuse them. 
 I was thinking there is a framework somehere that I can use. 
 
 The nested Layouts have helped me so far maintain consistency in the site 
 layout without a lot of trouble but duplicating the form feild is making me 
 worried as I know it will be a problem if I have to change the styles or 
 design of the site.
 
 Thank you
 
 Regards
 
 --- On Thu, 4/2/10, Oscar Westra van Holthe - Kind kin...@xs4all.nl wrote:
 
 From: Oscar Westra van Holthe - Kind kin...@xs4all.nl
 Subject: Re: [Stripes-users] Stripes and Components
 To: Stripes Users List stripes-users@lists.sourceforge.net
 Date: Thursday, 4 February, 2010, 20:07
 
 On 04-02-2010 at 11:47, farouk alhassan wrote:
  Is it possible to use a component rendering  framework with stripes so I 
  can reuse predefined components? 
 
 In short: yes.
 
 Longer answer: You're combining an action based framework (Stripes) with a
 component rendering framework. This means you should know what request
 attributes the component framework requires to render the components, and 
 what
 the resulting input form fields (and resulting request parameters) will be.
 Knowing this, you can let it play nice with Stripes.
 
 
 Oscar
 
 -- 
,-_  Oscar Westra van Holthe - Kind  http://www.xs4all.nl/~kindop/
   /() )
 (__ (  Inequality is the inevitable consequence of liberty.
 =/  ()  -- Salvador De Madariaga - Anarchy or Hierarchy (1937)
 
 -Inline Attachment Follows-
 
 --
 The Planet: dedicated and managed hosting, cloud storage, colocation
 Stay online with enterprise data centers and the best network in the business
 Choose flexible plans and management services without long-term contracts
 Personal 24x7 support from experience hosting pros just a phone call away.
 http://p.sf.net/sfu/theplanet-com
 
 -Inline Attachment Follows-
 
 ___
 Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users
 
 --
 The Planet: dedicated and managed hosting, cloud storage, colocation
 Stay online with enterprise data centers and the best network in the business
 Choose flexible plans and management services without long-term contracts
 Personal 24x7 support from experience hosting pros just a phone call away.
 http://p.sf.net/sfu/theplanet-com___
 Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users
 
 
 -Inline Attachment Follows-
 
 --
 The Planet: dedicated and managed

Re: [Stripes-users] Stripes and Components

2010-02-04 Thread Nick Stuart
Have you looked into the stripes:layout tag? I know it's named 'layout' but it 
can be used for smaller component based items. It's not the sexiest approach 
but it does work and is far better then using simple jsp:includes.

-Nick

On Feb 4, 2010, at 2:47 PM, farouk alhassan wrote:

 Hi All,
 Is it possible to use a component rendering framework with stripes so I 
 can reuse predefined components? 
 
 Regards
 
 --
 The Planet: dedicated and managed hosting, cloud storage, colocation
 Stay online with enterprise data centers and the best network in the business
 Choose flexible plans and management services without long-term contracts
 Personal 24x7 support from experience hosting pros just a phone call away.
 http://p.sf.net/sfu/theplanet-com___
 Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users



smime.p7s
Description: S/MIME cryptographic signature
--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users


Re: [Stripes-users] Stripes and Components

2010-02-04 Thread Oscar Westra van Holthe - Kind
On 04-02-2010 at 11:47, farouk alhassan wrote:
 Is it possible to use a component rendering  framework with stripes so I 
 can reuse predefined components? 

In short: yes.

Longer answer: You're combining an action based framework (Stripes) with a
component rendering framework. This means you should know what request
attributes the component framework requires to render the components, and what
the resulting input form fields (and resulting request parameters) will be.
Knowing this, you can let it play nice with Stripes.


Oscar

-- 
   ,-_  Oscar Westra van Holthe - Kind  http://www.xs4all.nl/~kindop/
  /() )
 (__ (  Inequality is the inevitable consequence of liberty.
=/  ()  -- Salvador De Madariaga - Anarchy or Hierarchy (1937)


signature.asc
Description: Digital signature
--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users


Re: [Stripes-users] Stripes and Components

2010-02-04 Thread farouk alhassan
Thanks All. 
I understand that stripes is an action based framework and if I want a 
component based one, I should look for JSF/Seam/or sth like that. 

However, I am increasingly duplicating my form fields in a lot of places and 
just changing the name and id attributes. 
I therefore need to define my form feilds in some way that I can reuse them. I 
was thinking there is a framework somehere that I can use. 

The nested Layouts have helped me so far maintain consistency in the site 
layout without a lot of trouble but duplicating the form feild is making me 
worried as I know it will be a problem if I have to change the styles or design 
of the site.

Thank you

Regards

--- On Thu, 4/2/10, Oscar Westra van Holthe - Kind kin...@xs4all.nl wrote:

From: Oscar Westra van Holthe - Kind kin...@xs4all.nl
Subject: Re: [Stripes-users] Stripes and Components
To: Stripes Users List stripes-users@lists.sourceforge.net
Date: Thursday, 4 February, 2010, 20:07

On 04-02-2010 at 11:47, farouk alhassan wrote:
 Is it possible to use a component rendering  framework with stripes so I 
 can reuse predefined components? 

In short: yes.

Longer answer: You're combining an action based framework (Stripes) with a
component rendering framework. This means you should know what request
attributes the component framework requires to render the components, and what
the resulting input form fields (and resulting request parameters) will be.
Knowing this, you can let it play nice with Stripes.


Oscar

-- 
   ,-_  Oscar Westra van Holthe - Kind      http://www.xs4all.nl/~kindop/
  /() )
 (__ (  Inequality is the inevitable consequence of liberty.
=/  ()  -- Salvador De Madariaga - Anarchy or Hierarchy (1937)

-Inline Attachment Follows-

--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
-Inline Attachment Follows-

___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users



  --
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users


Re: [Stripes-users] Stripes and Components

2010-02-04 Thread Oscar Westra van Holthe - Kind
On 04-02-2010 at 12:25, farouk alhassan wrote:
 However, I am increasingly duplicating my form fields in a lot of places
 and just changing the name and id attributes.
 I therefore need to define my form feilds in some way that I can reuse
 them. I was thinking there is a framework somehere that I can use.

For this problem I usually resort to JSP 2.0 tag files: I put snippets of a
JSP file (e.g. two table cells, one with a label and the other with an input
field) in a .tag file. This I can then reuse all over my app.

Maybe I misread your intent: when seeing a term like component rendering
framework, I think of something heavier.


Oscar

-- 
   ,-_  Oscar Westra van Holthe - Kind  http://www.xs4all.nl/~kindop/
  /() )
 (__ (  The haves and the have-nots can often be traced back to the
=/  ()  dids and the did-nots.


signature.asc
Description: Digital signature
--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users


Re: [Stripes-users] Stripes and Components

2010-02-04 Thread Nick Stuart
I use layouts to get around this problem as well. I simply have the name or id 
(whichever you need) be driven from a jsp value. My fields end up looking like 
this:

s:layout-definition
s:form partial='true' beanclass='${actionClass}'
   s:text name=${baseName}.someproperty/
/s:form
/s:layout-definition

For rendering them it's as simple as:
s:form beanclass=someClass.here
s:layout-component name=/WEB-INF/jsp/components/fields.jsp 
baseName=mainPropertyName actionClass='${actionBean.class}'/
/s:form

Of course this is most useful for bunching a lot of fields together like you 
said, but this is the general idea. It works because layouts pass any 'extra' 
attributes you pass in on the tag gets set to a page scope parameter.

Hope this helps!

On Feb 4, 2010, at 3:25 PM, farouk alhassan wrote:

 Thanks All. 
 I understand that stripes is an action based framework and if I want a 
 component based one, I should look for JSF/Seam/or sth like that. 
 
 However, I am increasingly duplicating my form fields in a lot of places and 
 just changing the name and id attributes. 
 I therefore need to define my form feilds in some way that I can reuse them. 
 I was thinking there is a framework somehere that I can use. 
 
 The nested Layouts have helped me so far maintain consistency in the site 
 layout without a lot of trouble but duplicating the form feild is making me 
 worried as I know it will be a problem if I have to change the styles or 
 design of the site.
 
 Thank you
 
 Regards
 
 --- On Thu, 4/2/10, Oscar Westra van Holthe - Kind kin...@xs4all.nl wrote:
 
 From: Oscar Westra van Holthe - Kind kin...@xs4all.nl
 Subject: Re: [Stripes-users] Stripes and Components
 To: Stripes Users List stripes-users@lists.sourceforge.net
 Date: Thursday, 4 February, 2010, 20:07
 
 On 04-02-2010 at 11:47, farouk alhassan wrote:
  Is it possible to use a component rendering  framework with stripes so I 
  can reuse predefined components? 
 
 In short: yes.
 
 Longer answer: You're combining an action based framework (Stripes) with a
 component rendering framework. This means you should know what request
 attributes the component framework requires to render the components, and what
 the resulting input form fields (and resulting request parameters) will be.
 Knowing this, you can let it play nice with Stripes.
 
 
 Oscar
 
 -- 
,-_  Oscar Westra van Holthe - Kind  http://www.xs4all.nl/~kindop/
   /() )
 (__ (  Inequality is the inevitable consequence of liberty.
 =/  ()  -- Salvador De Madariaga - Anarchy or Hierarchy (1937)
 
 -Inline Attachment Follows-
 
 --
 The Planet: dedicated and managed hosting, cloud storage, colocation
 Stay online with enterprise data centers and the best network in the business
 Choose flexible plans and management services without long-term contracts
 Personal 24x7 support from experience hosting pros just a phone call away.
 http://p.sf.net/sfu/theplanet-com
 
 -Inline Attachment Follows-
 
 ___
 Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users
 
 --
 The Planet: dedicated and managed hosting, cloud storage, colocation
 Stay online with enterprise data centers and the best network in the business
 Choose flexible plans and management services without long-term contracts
 Personal 24x7 support from experience hosting pros just a phone call away.
 http://p.sf.net/sfu/theplanet-com___
 Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users



smime.p7s
Description: S/MIME cryptographic signature
--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users


Re: [Stripes-users] Stripes and Components

2010-02-04 Thread farouk alhassan
Wow, Thanks you two.

That resolves my concern. Really appreciate your help!

Regards

Farouk A


--- On Thu, 4/2/10, Nick Stuart nstu...@speranzasystems.com wrote:

From: Nick Stuart nstu...@speranzasystems.com
Subject: Re: [Stripes-users] Stripes and Components
To: Stripes Users List stripes-users@lists.sourceforge.net
Date: Thursday, 4 February, 2010, 20:41

I use layouts to get around this problem as well. I simply have the name or id 
(whichever you need) be driven from a jsp value. My fields end up looking like 
this:
s:layout-definitions:form partial='true' beanclass='${actionClass}'   
s:text name=${baseName}.someproperty//s:form/s:layout-definition
For rendering them it's as simple as:s:form 
beanclass=someClass.heres:layout-component 
name=/WEB-INF/jsp/components/fields.jsp baseName=mainPropertyName 
actionClass='${actionBean.class}'//s:form
Of course this is most useful for bunching a lot of fields together like you 
said, but this is the general idea. It works because layouts pass any 'extra' 
attributes you pass in on the tag gets set to a page scope parameter.
Hope this helps!
On Feb 4, 2010, at 3:25 PM, farouk alhassan wrote:
Thanks All. 
I understand that stripes is an action based framework and if I want a 
component based one, I should look for JSF/Seam/or sth like that. 

However, I am increasingly duplicating my form fields in a lot of places and 
just changing the name and id attributes. 
I therefore need to define my form feilds in some way that I can reuse them. I 
was thinking there is a framework somehere that I can use. 

The nested Layouts have helped me so far maintain consistency in the site 
layout without a lot of trouble but duplicating the form feild is making me 
worried as I know it will be a problem if I have to change the styles or design 
of the site.

Thank you

Regards

--- On Thu, 4/2/10, Oscar Westra van Holthe - Kind kin...@xs4all.nl wrote:

From: Oscar Westra van Holthe - Kind kin...@xs4all.nl
Subject: Re: [Stripes-users] Stripes and Components
To: Stripes Users List stripes-users@lists.sourceforge.net
Date: Thursday, 4 February, 2010, 20:07

On 04-02-2010 at 11:47, farouk alhassan wrote:
 Is it possible to use a component rendering  framework with stripes so I 
 can reuse predefined components? 

In short: yes.

Longer answer: You're combining an action based framework (Stripes) with a
component rendering framework. This means you should know what request
attributes the component framework requires to render the components, and what
the resulting input form fields (and resulting request parameters) will be.
Knowing this, you can let it play nice with Stripes.


Oscar

-- 
   ,-_  Oscar Westra van Holthe -
 Kind      http://www.xs4all.nl/~kindop/
  /() )
 (__ (  Inequality is the inevitable consequence of liberty.
=/  ()  -- Salvador De Madariaga - Anarchy or Hierarchy (1937)

-Inline Attachment Follows-

--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
-Inline Attachment Follows-

___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users





  
--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users


-Inline Attachment Follows-

--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
-Inline Attachment Follows-

___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users



  --
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network

Re: [Stripes-users] Stripes and Components

2010-02-04 Thread farouk alhassan
Hi Nick,
What Tag library do you use.  I get this error when I use those attributes.

Attribute baseName invalid for tag layout-component according to TLD

Thanks

--- On Thu, 4/2/10, Nick Stuart nstu...@speranzasystems.com wrote:

From: Nick Stuart nstu...@speranzasystems.com
Subject: Re: [Stripes-users] Stripes and Components
To: Stripes Users List stripes-users@lists.sourceforge.net
Date: Thursday, 4 February, 2010, 20:41

I use layouts to get around this problem as well. I simply have the name or id 
(whichever you need) be driven from a jsp value. My fields end up looking like 
this:
s:layout-definitions:form partial='true' beanclass='${actionClass}'   
s:text name=${baseName}.someproperty//s:form/s:layout-definition
For rendering them it's as simple as:s:form 
beanclass=someClass.heres:layout-component 
name=/WEB-INF/jsp/components/fields.jsp baseName=mainPropertyName 
actionClass='${actionBean.class}'//s:form
Of course this is most useful for bunching a lot of fields together like you 
said, but this is the general idea. It works because layouts pass any 'extra' 
attributes you pass in on the tag gets set to a page scope parameter.
Hope this helps!
On Feb 4, 2010, at 3:25 PM, farouk alhassan wrote:
Thanks All. 
I understand that stripes is an action based framework and if I want a 
component based one, I should look for JSF/Seam/or sth like that. 

However, I am increasingly duplicating my form fields in a lot of places and 
just changing the name and id attributes. 
I therefore need to define my form feilds in some way that I can reuse them. I 
was thinking there is a framework somehere that I can use. 

The nested Layouts have helped me so far maintain consistency in the site 
layout without a lot of trouble but duplicating the form feild is making me 
worried as I know it will be a problem if I have to change the styles or design 
of the site.

Thank you

Regards

--- On Thu, 4/2/10, Oscar Westra van Holthe - Kind kin...@xs4all.nl wrote:

From: Oscar Westra van Holthe - Kind kin...@xs4all.nl
Subject: Re: [Stripes-users] Stripes and Components
To: Stripes Users List stripes-users@lists.sourceforge.net
Date: Thursday, 4 February, 2010, 20:07

On 04-02-2010 at 11:47, farouk alhassan wrote:
 Is it possible to use a component rendering  framework with stripes so I 
 can reuse predefined components? 

In short: yes.

Longer answer: You're combining an action based framework (Stripes) with a
component rendering framework. This means you should know what request
attributes the component framework requires to render the components, and what
the resulting input form fields (and resulting request parameters) will be.
Knowing this, you can let it play nice with Stripes.


Oscar

-- 
   ,-_  Oscar Westra van Holthe -
 Kind      http://www.xs4all.nl/~kindop/
  /() )
 (__ (  Inequality is the inevitable consequence of liberty.
=/  ()  -- Salvador De Madariaga - Anarchy or Hierarchy (1937)

-Inline Attachment Follows-

--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
-Inline Attachment Follows-

___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users





  
--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users


-Inline Attachment Follows-

--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
-Inline Attachment Follows-

___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users



  --
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay

Re: [Stripes-users] Stripes and Components

2010-02-04 Thread farouk alhassan
Ok, Got it working. Thank you.
Had to just change layout-component to layout-render when rendering

Regards

Farouk A

--- On Thu, 4/2/10, farouk alhassan osbert252...@yahoo.com wrote:

From: farouk alhassan osbert252...@yahoo.com
Subject: Re: [Stripes-users] Stripes and Components
To: Stripes Users List stripes-users@lists.sourceforge.net
Date: Thursday, 4 February, 2010, 22:37

Hi Nick,
What Tag library do you use.  I get this error when I use those attributes.

Attribute baseName invalid for tag layout-component according to TLD

Thanks

--- On Thu, 4/2/10, Nick Stuart nstu...@speranzasystems.com wrote:

From: Nick Stuart nstu...@speranzasystems.com
Subject: Re: [Stripes-users] Stripes and Components
To: Stripes Users List stripes-users@lists.sourceforge.net
Date: Thursday, 4 February, 2010, 20:41

I use layouts to get around this problem as well. I simply have the name or id 
(whichever you need) be driven from a jsp value. My fields end up looking like 
this:
s:layout-definitions:form
 partial='true' beanclass='${actionClass}'   s:text 
name=${baseName}.someproperty//s:form/s:layout-definition
For rendering them it's as simple as:s:form 
beanclass=someClass.heres:layout-component 
name=/WEB-INF/jsp/components/fields.jsp baseName=mainPropertyName 
actionClass='${actionBean.class}'//s:form
Of course this is most useful for bunching a lot of fields together like you 
said, but this is the general idea. It works because layouts pass any 'extra' 
attributes you pass in on the tag gets set to a page scope parameter.
Hope this helps!
On Feb 4, 2010, at 3:25 PM, farouk alhassan wrote:
Thanks All. 
I understand that stripes is an action based framework and if I want a 
component based one, I should look for JSF/Seam/or sth like that. 

However, I am increasingly duplicating my form fields in a lot of places and 
just changing the name and id attributes. 
I therefore need to define my form feilds in some way that I can reuse them. I 
was thinking there is a framework somehere that I can use. 

The nested Layouts have helped me so far maintain consistency in the site 
layout without a lot of trouble but duplicating the form feild is making me 
worried as I know it will be a problem if I have to change the styles or design 
of the site.

Thank you

Regards

--- On Thu, 4/2/10, Oscar
 Westra van Holthe - Kind kin...@xs4all.nl wrote:

From: Oscar Westra van Holthe - Kind kin...@xs4all.nl
Subject: Re: [Stripes-users] Stripes and Components
To: Stripes Users List stripes-users@lists.sourceforge.net
Date: Thursday, 4 February, 2010, 20:07

On 04-02-2010 at 11:47, farouk alhassan wrote:
 Is it possible to use a component rendering  framework with stripes so I 
 can reuse
 predefined components? 

In short: yes.

Longer answer: You're combining an action based framework (Stripes) with a
component rendering framework. This means you should know what request
attributes the component framework requires to render the components, and what
the resulting input form fields (and resulting request parameters) will be.
Knowing this, you can let it play nice with Stripes.


Oscar

-- 
   ,-_  Oscar Westra van Holthe -
 Kind      http://www.xs4all.nl/~kindop/
  /() )
 (__ (  Inequality is the inevitable consequence of liberty.
=/  ()  -- Salvador De Madariaga - Anarchy or Hierarchy (1937)

-Inline Attachment Follows-

--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
-Inline Attachment Follows-

___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users





  
--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users


-Inline Attachment Follows-

--
The Planet: dedicated and managed hosting,
 cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net