The Artima Developer Community
Sponsored Link

Java Buzz Forum
Using namespaces to declutter JSF/Spring files

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
dion

Posts: 5028
Nickname: dion
Registered: Feb, 2003

Dion Almaer is the Editor-in-Chief for TheServerSide.com, and is an enterprise Java evangelist
Using namespaces to declutter JSF/Spring files Posted: Jul 20, 2005 2:46 PM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by dion.
Original Post: Using namespaces to declutter JSF/Spring files
Feed Title: techno.blog(Dion)
Feed URL: http://feeds.feedburner.com/dion
Feed Description: blogging about life the universe and everything tech
Latest Java Buzz Posts
Latest Java Buzz Posts by dion
Latest Posts From techno.blog(Dion)

Advertisement

When you plug together a web framework, and Spring, you end up making choices on how to do this (unless you use Spring MVC).

Considering DRY, you really don't want to have to:

a) Setup the model as a bean in Spring
b) Also setup the same bean (with the same name maybe for convention) in the web framework

Seeing all of this configuration can be irksome, so we thought that this would be a perfect use of namespaces which could allow us to go from:

<managed-bean> <managed-bean-name>newWidget</managed-bean-name> <managed-bean-class>de.mindmatters.faces.spring.SpringBeanScope</managed-bean-class> <managed-bean-scope>request</managed-bean-scope> </managed-bean>

<bean id="newWidget" class="model.Widget" singleton="false"/>

To:

<bean id="newWidget" class="model.Widget" singleton="false" jsf:scope="request"/>

Read: Using namespaces to declutter JSF/Spring files

Topic: EclipseInside Previous Topic   Next Topic Topic: Links for 2005-07-13 [del.icio.us]

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use