CVS: Tapestry/framework/src/net/sf/tapestry/pageload PageLoader.java,1.15.2.7,1.15.2.8
Howard Lewis Ship <[email protected]>
| Newsgroups | gmane.comp.java.tapestry.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/tapestry/Tapestry/framework/src/net/sf/tapestry/pageload
In directory sc8-pr-cvs1:/tmp/cvs-serv1120/framework/src/net/sf/tapestry/pageload
Modified Files:
Tag: hship-2-3
PageLoader.java
Log Message:
Minor improvements to exception reporting, to assist end-users in diagnosing problems.
Index: PageLoader.java
===================================================================
RCS file: /cvsroot/tapestry/Tapestry/framework/src/net/sf/tapestry/pageload/PageLoader.java,v
retrieving revision 1.15.2.7
retrieving revision 1.15.2.8
diff -C2 -d -r1.15.2.7 -r1.15.2.8
*** PageLoader.java 15 Dec 2002 16:26:13 -0000 1.15.2.7
--- PageLoader.java 17 Dec 2002 20:50:21 -0000 1.15.2.8
***************
*** 348,395 ****
Map propertyBindings = new HashMap();
! for (int i = 0; i < count; i++)
{
! String id = (String) ids.get(i);
! // Get the sub-component specification from the
! // container's specification.
! ContainedComponent contained = containerSpec.getComponent(id);
! String type = contained.getType();
! _componentResolver.resolve(namespace, type);
! ComponentSpecification componentSpecification = _componentResolver.getSpecification();
! INamespace componentNamespace = _componentResolver.getNamespace();
! // Instantiate the contained component.
! IComponent component =
! instantiateComponent(page, container, id, componentSpecification, componentNamespace);
! // Add it, by name, to the container.
! container.addComponent(component);
! // Set up any bindings in the ContainedComponent specification
! bind(container, component, contained, propertyBindings);
! // Now construct the component recusively; it gets its chance
! // to create its subcomponents and set their bindings.
! constructComponent(cycle, page, component, componentSpecification, componentNamespace);
! }
! addAssets(container, containerSpec);
! // Finish the load of the component; most components (which
! // subclass BaseComponent) load their templates here.
! // That may cause yet more components to be created, and more
! // bindings to be set, so we defer some checking until
! // later.
! container.finishLoad(cycle, this, containerSpec);
_depth--;
--- 348,408 ----
Map propertyBindings = new HashMap();
! try
{
! for (int i = 0; i < count; i++)
! {
! String id = (String) ids.get(i);
! // Get the sub-component specification from the
! // container's specification.
! ContainedComponent contained = containerSpec.getComponent(id);
! String type = contained.getType();
! _componentResolver.resolve(namespace, type);
! ComponentSpecification componentSpecification = _componentResolver.getSpecification();
! INamespace componentNamespace = _componentResolver.getNamespace();
! // Instantiate the contained component.
! IComponent component =
! instantiateComponent(page, container, id, componentSpecification, componentNamespace);
! // Add it, by name, to the container.
! container.addComponent(component);
! // Set up any bindings in the ContainedComponent specification
! bind(container, component, contained, propertyBindings);
! // Now construct the component recusively; it gets its chance
! // to create its subcomponents and set their bindings.
! constructComponent(cycle, page, component, componentSpecification, componentNamespace);
! }
! addAssets(container, containerSpec);
! // Finish the load of the component; most components (which
! // subclass BaseComponent) load their templates here.
! // That may cause yet more components to be created, and more
! // bindings to be set, so we defer some checking until
! // later.
! container.finishLoad(cycle, this, containerSpec);
! }
! catch (RuntimeException ex)
! {
! throw new PageLoaderException(
! Tapestry.getString(
! "PageLoader.unable-to-instantiate-component",
! container.getExtendedId(),
! ex.getMessage()),
! container,
! ex);
! }
_depth--;
-------------------------------------------------------
This sf.net email is sponsored by:
With Great Power, Comes Great Responsibility
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/