You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Apache <ap...@ss78.shared.server-system.net> on 2006/02/14 19:10:56 UTC

injections without annotations

Hi, I am very new to Tapestry. 
I have followed tutorial for Tap4 but I have to use it in a 1.4.2 runtime. I am trying to understand how to use injection w/o annotations and... I am a little confused. 

To use the injection in form tutorial, I have to insert piece of XML like this:



"in place" of

@InjectPage("ShowProject")

The problem is: where have I to put that XML? 
Following documentation (http://jakarta.apache.org/tapestry/UsersGuide) I have inserted this XML:


   


in my AddProject.html template, at different levels, but at runtime I always receive the same exceptions. 

Any help?
Thanks in advance.


-------------------- m2f --------------------

Sent from www.TapestryForums.com

Read this topic online here: <<topic_link>>

http://www.tapestryforums.com/viewtopic.php?p=14417#14417

-------------------- m2f --------------------



RE: injections without annotations

Posted by Apache <ap...@ss78.shared.server-system.net>.
I'm also confused about Tapestry4 with jdk1.4/jdk1.3.

Instead of using jdk1.5 annotations i think you create an xml file under /WEB-INF/app.properties   , where "app" is the name of the servlet in this example  

I quoting from the example:

We'll create an application specification for our application, and store the configuration data there. An application specification is an XML file that provides extra information about the application to Tapestry. It is optional; we didn't have one in the previous example. 

The name of the servlet ("app", in this example) is appended with the extension ".application" to form the name of the specification. The specification itself is stored in the WEB-INF folder of the web application. In our project, it is stored as src/context/WEB-INF/app.application: 


Useful docs
jdk1.3/1.4 non annotations: 

Corresponding jdk1.5 annotations: http://jakarta.apache.org/tapestry/tapestry-annotations/index.html


-------------------- m2f --------------------

Sent from www.TapestryForums.com

Read this topic online here: <<topic_link>>

http://www.tapestryforums.com/viewtopic.php?p=14420#14420

-------------------- m2f --------------------



Re: injections without annotations

Posted by Chris Chiappone <ch...@gmail.com>.
If you not using annotations you can inject things in your page spec file.

For example if you want to have your ASO or Visit object inject do
something like this:

<inject type="state" property="visitObject" object="service:id">


On 2/14/06, Apache <ap...@ss78.shared.server-system.net> wrote:
> I'm also confused about Tapestry4 with jdk1.4/jdk1.3.
>
> Instead of using jdk1.5 annotations i think you create an xml file under /WEB-INF/app.properties   , where "app" is the name of the servlet in this example
>
> I quoting from the example:
>
> We'll create an application specification for our application, and store the configuration data there. An application specification is an XML file that provides extra information about the application to Tapestry. It is optional; we didn't have one in the previous example.
>
> The name of the servlet ("app", in this example) is appended with the extension ".application" to form the name of the specification. The specification itself is stored in the WEB-INF folder of the web application. In our project, it is stored as src/context/WEB-INF/app.application:
>
>
> Useful docs
> jdk1.3/1.4 non annotations:
>
> Corresponding jdk1.5 annotations: http://jakarta.apache.org/tapestry/tapestry-annotations/index.html
>
>
> -------------------- m2f --------------------
>
> Sent from www.TapestryForums.com
>
> Read this topic online here: <<topic_link>>
>
> http://www.tapestryforums.com/viewtopic.php?p=14420#14420
>
> -------------------- m2f --------------------
>
>
>
>


--
~chris

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


Re: injections without annotations

Posted by Ashok Madhavan <as...@gmail.com>.
you can do something like this :

Add an equivalent of this to your present  .page file.
    <inject property="ShowProject" type="page" object="ShowProject" />

Also make sure you have a abstract method to get the ShowProject page. some
thing like this :
abstract public ShowProject getShowProject();

Assumption is ShowProject is a Tapestry page class and there is also a
ShowProject.html/ShowProject.page defined.

regards
Ashok

On 2/14/06, Apache <ap...@ss78.shared.server-system.net> wrote:
>
> I'm also confused about Tapestry4 with jdk1.4/jdk1.3.
>
> Instead of using jdk1.5 annotations i think you create an xml file under
> /WEB-INF/app.properties   , where "app" is the name of the servlet in this
> example
>
> I quoting from the example:
>
> We'll create an application specification for our application, and store
> the configuration data there. An application specification is an XML file
> that provides extra information about the application to Tapestry. It is
> optional; we didn't have one in the previous example.
>
> The name of the servlet ("app", in this example) is appended with the
> extension ".application" to form the name of the specification. The
> specification itself is stored in the WEB-INF folder of the web application.
> In our project, it is stored as src/context/WEB-INF/app.application:
>
>
> Useful docs
> jdk1.3/1.4 non annotations:
>
> Corresponding jdk1.5 annotations:
> http://jakarta.apache.org/tapestry/tapestry-annotations/index.html
>
>
> -------------------- m2f --------------------
>
> Sent from www.TapestryForums.com
>
> Read this topic online here: <<topic_link>>
>
> http://www.tapestryforums.com/viewtopic.php?p=14420#14420
>
> -------------------- m2f --------------------
>
>
>
>

Re: injections without annotations

Posted by Alan Chandler <al...@chandlerfamily.org.uk>.
On Tuesday 14 February 2006 21:19, Apache wrote:
> I'm also confused about Tapestry4 with jdk1.4/jdk1.3.
>
> Instead of using jdk1.5 annotations i think you create an xml file under
> /WEB-INF/app.properties   , where "app" is the name of the servlet in this
> example
app.properties is a different thing from app.application

...
> The name of the servlet ("app", in this example) is appended with the
> extension ".application" to form the name of the specification. The
> specification itself is stored in the WEB-INF folder of the web
> application. In our project, it is stored as
> src/context/WEB-INF/app.application:

-- 
Alan Chandler
http://www.chandlerfamily.org.uk
Open Source. It's the difference between trust and antitrust.

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