Thursday, May 15, 2014

How to install ATG Plugin in Eclipse

Open the Eclipse















Then go to Help -> Install New Software














Then click button called Add














Then give a name to the plugin ATG Plugin














Then browse Archive and go to /common/ATG10.2/Eclipse.
Then you can find jar file.
Select that jar file.



























Then click OK. Now we have pointed the ATG Plugin Jar file and now going install it in Eclipse.

Expand the installation components and select the root element.
Then click next to start the installation process. 





























Then select next

 













Select the acceptance of agreement














Then select OK














Click YES to restart the Eclipse after plugin installation















Now it is the time to see the results. :D

Go to Window -> Open Perspective -> Other -> ATG














Now it will open all components related to ATG development

1. ATG Component Browser 

Located left upper corner along with package explorer
This represents ATG default components and components which are created by the developer.


2. ATG DSP Tag Libraries ( /common/ATG10.2/DAS/taglib/ )


These libraries are coming with default ATG framework.
As a best practice, Developers should try to use default ATG framework for their developments.
We have to use these tag libraries in our JSP pages.
Every JSP should begin with and End with
Then only that JSP will be enabled with ATG DSP ( Dynamo Servlet Pages ) features.


We can use these tag libraries in the following way.
For an example we will use ATG feature to print hello world.
Here we use ATG tag
This will print the content we passed.

Check all Tag libraries listed in Eclipse. 
Definitions of these tag libraries can be found under /common/ATG10.2/DAS/taglib/.

We can use these tag libraries along with HTML, JSTL Core Libraries, Expression Languages.
 
Ex : index.jsp




 
  




Output : Hello World

















3. ATG Servlet Beans

These are pure Java Servlets enabled with ATG features.
Developers can extend and customized these default ATG servlet beans

Lets see how to use ForEach bean in ATG to iterate collection of bean called Person.

Each Person object has properties called id, name and address

Sample Data :
Person 1 ( 1212, saminda, matara )
Person 2 ( 3423, chathura, colombo )


Ex : index.jsp

Output: 

Listing all persons begin

Saminda
Chathura

Listing all persons done.


There are two usages of

1. When we pass parameter then we have to use attribute param. 
   This can reads a bean value.


2. When we pass static value then we have to use attribute value



I am working on next tutorial, That is how to create and deploy ATG Project.

Happy Tux time...