You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Dan Adams <da...@ifactory.com> on 2007/06/27 23:07:07 UTC

[T5] does PageTester render mixins?

I'm using PageTester in 5.0.4 to test a page and none of the mixins seem
to be rendering. Are mixins supported under PageTester?

-- 
Dan Adams
Senior Software Engineer
Interactive Factory
617.235.5857


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: [T5] does PageTester render mixins?

Posted by Dan Adams <da...@ifactory.com>.
So, I guessed that this was due to classloader weirdness and I added an
interface with just the method I needed, implemented it, and then put
that in the environment instead and it worked fine. Should you be able
to put components in Environment? This seems like a bug.

On Wed, 2007-06-27 at 17:23 -0400, Dan Adams wrote:
> Well, it appears that it does support mixins but they have to be
> private.(?) Why can't they be package private so you don't have to use
> @SuppressWarnings?
> 
> Now that I've got that working I'm having another problem where it can't
> find my service that I put into Environment. The component being put in
> does this:
> 
> 	@Inject
> 	private Environment environment;
> 
> 	void setupRender() {
> 		environment.push(GridFilters.class, this);
> 	}
> 
> and then the component using it does this:
> 
> 	@Environmental
> 	private GridFilters gridFilters;
> 	
> 	@InjectComponent
> 	private GridFilter component;
> 	
> 	void beginRender(MarkupWriter writer) {
> 		gridFilters.registerFilter(component);
> 	}
> 
> but the exception I get is:
> 
> No object of type com.ifactory.cms.cms.components.GridFilters is
> available from the Environment.  Available types are
> com.ifactory.cms.cms.components.GridFilters,
> org.apache.tapestry.MarkupWriter, org.apache.tapestry.PageRenderSupport,
> org.apache.tapestry.ValidationDecorator,
> org.apache.tapestry.ValidationTracker, org.apache.tapestry.dom.Document,
> org.apache.tapestry.internal.services.DocumentScriptBuilder,
> org.apache.tapestry.services.FormSupport,
> org.apache.tapestry.services.Heartbeat.
> 
> Which is very strange because the type I'm looking for is in the list.
> 
> On Wed, 2007-06-27 at 14:16 -0700, Howard Lewis Ship wrote:
> > It absolutely should.  I'd be very surprised if it did not. PageTester
> > is a kind of simulator of the outer portions of T5, not inner stuff
> > like page construction and rendering.
> > 
> > On 6/27/07, Dan Adams <da...@ifactory.com> wrote:
> > > I'm using PageTester in 5.0.4 to test a page and none of the mixins seem
> > > to be rendering. Are mixins supported under PageTester?
> > >
> > > --
> > > Dan Adams
> > > Senior Software Engineer
> > > Interactive Factory
> > > 617.235.5857
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > For additional commands, e-mail: users-help@tapestry.apache.org
> > >
> > >
> > 
> > 
-- 
Dan Adams
Senior Software Engineer
Interactive Factory
617.235.5857


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: [T5] does PageTester render mixins?

Posted by Dan Adams <da...@ifactory.com>.
Well, it appears that it does support mixins but they have to be
private.(?) Why can't they be package private so you don't have to use
@SuppressWarnings?

Now that I've got that working I'm having another problem where it can't
find my service that I put into Environment. The component being put in
does this:

	@Inject
	private Environment environment;

	void setupRender() {
		environment.push(GridFilters.class, this);
	}

and then the component using it does this:

	@Environmental
	private GridFilters gridFilters;
	
	@InjectComponent
	private GridFilter component;
	
	void beginRender(MarkupWriter writer) {
		gridFilters.registerFilter(component);
	}

but the exception I get is:

No object of type com.ifactory.cms.cms.components.GridFilters is
available from the Environment.  Available types are
com.ifactory.cms.cms.components.GridFilters,
org.apache.tapestry.MarkupWriter, org.apache.tapestry.PageRenderSupport,
org.apache.tapestry.ValidationDecorator,
org.apache.tapestry.ValidationTracker, org.apache.tapestry.dom.Document,
org.apache.tapestry.internal.services.DocumentScriptBuilder,
org.apache.tapestry.services.FormSupport,
org.apache.tapestry.services.Heartbeat.

Which is very strange because the type I'm looking for is in the list.

On Wed, 2007-06-27 at 14:16 -0700, Howard Lewis Ship wrote:
> It absolutely should.  I'd be very surprised if it did not. PageTester
> is a kind of simulator of the outer portions of T5, not inner stuff
> like page construction and rendering.
> 
> On 6/27/07, Dan Adams <da...@ifactory.com> wrote:
> > I'm using PageTester in 5.0.4 to test a page and none of the mixins seem
> > to be rendering. Are mixins supported under PageTester?
> >
> > --
> > Dan Adams
> > Senior Software Engineer
> > Interactive Factory
> > 617.235.5857
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
> 
> 
-- 
Dan Adams
Senior Software Engineer
Interactive Factory
617.235.5857


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: [T5] does PageTester render mixins?

Posted by Howard Lewis Ship <hl...@gmail.com>.
It absolutely should.  I'd be very surprised if it did not. PageTester
is a kind of simulator of the outer portions of T5, not inner stuff
like page construction and rendering.

On 6/27/07, Dan Adams <da...@ifactory.com> wrote:
> I'm using PageTester in 5.0.4 to test a page and none of the mixins seem
> to be rendering. Are mixins supported under PageTester?
>
> --
> Dan Adams
> Senior Software Engineer
> Interactive Factory
> 617.235.5857
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org