You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Peter Beshai <pe...@gmail.com> on 2007/03/18 23:59:57 UTC

T5 Assets from property

I was wondering how you can inject an asset with the path being a property
of an object.

For instance, if you have an object obj with a path property, something
like:
private MyObject obj;

@Inject("context:${obj.path}")
private Asset path;

Of course this won't work since the ${} will look for contributed symbols.
Is there any way of doing this?

--
Peter Beshai

Pure Mathematics/Computer Science Student
University of Waterloo

Re: T4.1 focus=true for Forms, Change Request

Posted by Jesse Kuhnert <jk...@gmail.com>.
Oops...Shame on me. I was going to point out that this functionality
currently existed already using the EventListener annotation and just
needed to be carried over to the other async areas...but then I
noticed that I hadn't even documented this feature for
EventListener..oops

If someone creates a jira issue I'll make sure this extra parameter
goes everywhere.

This is a tricky prospect to actually set as a global behavior. I'm
not sure at all if this would fit the majority usage or minority
though. Adding the parameter to disable focus period (unless
validaiton error happens) is a no brainer, but I'd probably want to
hear more from everyone else about the global defaults change. (for
ajax requests)

On 3/18/07, Manri Offermann <ta...@eastbeam.co.jp> wrote:
> Hi,
>
> I think it is a great idea to have focus on a form element, when the
> page loads. But in some cases (or in our case), where the request is
> dynamic (AJAX request) and I am updating an area, my form gets focused,
> where I would rather not have focus on my form. At the moment I added:
>
> <binding name="focus"
> value="!getPage().getRequestCycle().getResponseBuilder().isDynamic()"/>
>
> I have updated all my forms, because in general, when I have an area
> updated with Ajax, I don't want the focus to be changed.
>
> Can this be made default?
>
> Best regards,
>
> Manri Offermann
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Jesse Kuhnert
Tapestry/Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

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


T4.1 focus=true for Forms, Change Request

Posted by Manri Offermann <ta...@eastbeam.co.jp>.
Hi,

I think it is a great idea to have focus on a form element, when the 
page loads. But in some cases (or in our case), where the request is 
dynamic (AJAX request) and I am updating an area, my form gets focused, 
where I would rather not have focus on my form. At the moment I added:

<binding name="focus" 
value="!getPage().getRequestCycle().getResponseBuilder().isDynamic()"/>

I have updated all my forms, because in general, when I have an area 
updated with Ajax, I don't want the focus to be changed.

Can this be made default?

Best regards,

Manri Offermann

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


Re: T5 Assets from property

Posted by Howard Lewis Ship <hl...@gmail.com>.
You'll need to inject the AssetSource service and work from there.

On 3/18/07, Peter Beshai <pe...@gmail.com> wrote:
> I was wondering how you can inject an asset with the path being a property
> of an object.
>
> For instance, if you have an object obj with a path property, something
> like:
> private MyObject obj;
>
> @Inject("context:${obj.path}")
> private Asset path;
>
> Of course this won't work since the ${} will look for contributed symbols.
> Is there any way of doing this?
>
> --
> Peter Beshai
>
> Pure Mathematics/Computer Science Student
> University of Waterloo
>


-- 
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