Skip to main content

ATG - quick reference to commonly used DSP Tags

In this blog, I would like to give a quick reference to the most commonly used DSP Tags.Note that in this DSP tag details :
  • bean refers to a Nucleus path, component name, and property name
  • param refers to a Page parameter
  • value refers to a Static-value
  • var refers to a EL variable
  • id refers to a scripting variable
==============================================================
1.dsp:importbean


   example: <dsp:importbean bean="/atg/dynamo/droplet/Switch"/>

==============================================================

2.dsp:page

   usage: It encloses a JSP. The dsp:page invokes the JSP handler, which calls the servlet pipeline and generates HTTPServletRequest.

  example:   <dsp:page> ..... </dsp:page>

==============================================================

3.dsp:include


   usage: Embeds a page fragment in a JSP.

   example:  <dsp:include src="/myPage/ResultPage.jsp" flush="true">  
                    <dsp:include page="../common/i18nInclude.jsp">

 ==============================================================

4.dsp:setvalue

   usage: Lets you set a bean property or page parameter with a value copied from another bean property, page parameter, or constant

   syntax: <dsp:setvalue target-spec [source-spec] />
            target-spec  --> bean  or  param
            source-spec  --> beanvalue="property-spec"  or   paramvalue="param-name"   or   value="static-value"

   example: <dsp:setvalue param="currLocale" beanvalue="/atg/userprofiling/Profile.locale" />
                   <dsp:setvalue bean="Student.name" paramvalue="currentName"/>

==============================================================

5.dsp:getvalueof


   usage: Creates an EL variable or a scripting variable

   syntax: <dsp:getvalueof  source-value  var-spec [data-type] />
             source-value  --> bean  or  param  or value
             var-spec --> var="EL variable"   or  id="scripting variable"
             data-type  --> vartype="java.lang..."  or  idtype="java.lang..."

   example: <dsp:getvalueof id="locale" bean="/atg/userprofiling/Profile.locale">
                          .....<%=locale%>...
                  </dsp:getvalueof>
  <dsp:getvalueof var="backgroundcolor" bean="Profile.preferredColor" vartype="java.lang.String">
                             <body bgcolor="${backgroundcolor}" >
  </dsp:getvalueof>

==============================================================

6.dsp:droplet


   usage: Lets you invoke a servlet bean from a JSP page

   syntax: <dsp:droplet [var-spec] name="servlet-bean" >
  ...
</dsp:droplet>
var-spec  --> var="EL variable"   or  id="scripting variable"
var --> Names an EL-accessible Map variable, which holds a servlet bean’s parameters and parameter values.

   example: <dsp:droplet var="fe" name="/atg/dynamo/droplet/ForEach">

==============================================================

7.dsp:param


   usage: Stores a value in a parameter to a servlet bean (mainly droplets) or as a page parameter

   syntax: <dsp:param name="param-name" param-value />
                  param-value -->  bean   or    param  or    value

  example: <dsp:droplet name="/atg/dynamo/droplet/IsNull">
                    <dsp:param name="value" param="locale"/>
<dsp:include src="/myPage/ResultPage.jsp" flush="true">
                      <dsp:param name="results" bean="ProductCatalogQueryFormHandler.results"/>

==============================================================
8.dsp:oparam


   usage: Specifies content to be rendered by an enclosing dsp:droplet tag. dsp:oparam (open parameter) takes the value supplied to it in a JSP and passes it to the current dsp:droplet tag. Each servlet bean maintains a set of open parameters which the servlet bean can set, service, and deliver as output to a JSP.

   syntax: <dsp:oparam name="param-name">
                    ...
</dsp:oparam>

   example: <dsp:droplet name="Switch">
                     <dsp:param name="value" param="person.hasCar"/>
    <dsp:oparam name="false">
 No vehicle
           </dsp:oparam>

==============================================================
9.dsp:form


   usage: Lets you set up a form that accepts user inputs, which are saved as component properties.

   syntax:  <dsp:form  method="{get|post}" [action="jsp-page"]  [synchronized="component-spec"]
                        [formid="id"]  [requiresSessionConfirmation="{true|false}"]/>

    synchronized --> Specifies the Nucleus path and name of a component that is blocked from accepting other form submissions until this form is submitted.
    formid --> Assigns a unique identifier to the form. Forms require unique identifiers when a page specifies multiple forms and conditionally displays only one of them.
    requiresSessionConfirmation  --> If set to true, prevents cross-site attacks

   example: <dsp:form method="post" action="servbeantest.jsp" synchronized="/samples/Student"/>

==============================================================
10.dsp:input


   usage: All dsp:input tags must be embedded between <dsp:form>..</dsp:form> tags, which are either in the same JSP or a parent JSP.

   syntax:  <dsp:input [type="input-control"] [name="input-name"]   bean="property-spec" ["source-spec"]
                       [checked="{true|false}"]  [default="value"]  [priority=integer-value]/>

    type --> text  or checkbox  or  radio  or hidden  or submit or  image(defines a submit control that uses the image)
    name --> For all input types other than radio and checkbox, the assigned name must be unique.
   bean --> The bean attribute for a submit control can also specify a form handler operation such as cancel or update
   source-spec --> Specifies to prepopulate the input field from  beanvalue  or paramvalue  or value . If source-value is omitted, the input field contains the target property’s current value.
   checked  --> If set to true, displays a checkbox or radio button as selected.
   default --> Specifies a default value to save to the component property if the user neglects to supply a value
   priority --> Specifies the priority of this input field during form processing

   example:
    <dsp:input bean="StudentFormHandler.updateSuccessURL" type="hidden" value="index.jsp"/>
    <dsp:input tabindex="2" type="text" id="searchinput" name="searchinput" bean="SearchValidateFormHandler.searchString"  maxlength="1000" priority="10"  value="<%=defaultKeyword%>"  onfocus="clearTextArea(searchbutton,searchinput)" />
    <dsp:input bean="SearchValidateFormHandler.validate" name="validate" id="validate" type="hidden" value="DAS" style="display:none" priority="-10"/>
    <dsp:input type="submit" bean="StudentFormHandler.create" value="Register"/>
    <dsp:input type="radio" name="sex" id="male" bean="SearchValidateFormHandler.gender" />
    <dsp:input type="radio" name="sex" id="female" bean="SearchValidateFormHandler.gender" />

==============================================================
   
11.dsp:valueof


   usage: renders a value in a bean property or page parameter

   syntax: <dsp:valueof value-source>
 [default-value]
</dsp:valueof>
                 value-source  --> bean  or  param  or value

   example:  <dsp:valueof param="currentName">Happy User</dsp:valueof>
         <h4><dsp:valueof bean="SearchDisplayDroplet.departmentLabel"/></h4>
 <input type="hidden" name="firstFacetLabel" value="<dsp:valueof param="firstFacetLabel"/>" id="firstFacetLabel"/>

==============================================================

12.dsp:textarea


   usage: lets you create an extended text box that for multi-line input

   example: <dsp:textarea bean="Student.disciplinaryAction" default="None"/>

==============================================================

13.dsp:a


   usage: It can also update a servlet bean property value and pass a page parameter to the destination page.

  syntax:  <dsp:a link-destination> link-text [param-list]   [property-settings]  </dsp:a>
 
link-destination  --> href ( resolves absolute paths using the Web server doc root as a starting point) or  page ( resolves absolute paths using the Web application root as a starting point)
        param-list  --> One or more embedded dsp:param
        property-settings  --> specifies settings for one or more bean properties.

   example: <dsp:a href="homepage.jsp">Go to your home page
  <dsp:param name="city" beanvalue="Profile.homeAddress.city"/>
  </dsp:a>

==============================================================

14.dsp:select and  dsp:option


   example: <dsp:select bean="Student.Summerhobbies" multiple="true" nodefault="true" priority="10">
                     <dsp:option value="hiking">hiking</dsp:option>
                    <dsp:option value="biking">biking</dsp:option>
     <dsp:option value="swimming">swimming</dsp:option>
 </dsp:select>

==============================================================


Comments

  1. Hi ,
    You are doing a great job by posting such beautiful information. Being a newbie in ATG, these topics help me very much. You are doing a wonderful job. keep posting. God Bless you.

    ReplyDelete
  2. Really nice article. very helpful.
    Droplets, DSP tags, frorm handlers & ATG... :D

    ReplyDelete
  3. Really good Ariticle...
    Super up Admin.....

    ReplyDelete
  4. Thank you all.... cheers.... :-)

    ReplyDelete
  5. admin we need more notes about ATG with real time example can you...?

    ReplyDelete
  6. we need more information with real time example program admin...

    ReplyDelete
  7. Hi,
    Anyone knows how can I disable a dsp:input?

    ReplyDelete

Post a Comment

Popular posts from this blog

How to convert your Blogger Blog to PDF ?

You can use a website called "blogbooker" @  http://www.blogbooker.com/blogger.php   to convert your Blogger Blog to a PDF . Please find the steps below : 1. Save your blog as an xml using Blogger Settings - Other - Export Blog option 2. Go to the website " http://www.blogbooker.com/blogger.php " and select this XML , give your blog address and select the options like date range, page size, font, ... 3. Click the  "Create Your BlogBook" button to view and save your blog as PDF

GC Log Analyzer from IBM

This blog is about the GC( garbage collection) log analyzer from IBM. If you have a GC log and you want to analyze the file,  this IBM tool will help you with some graphical analyzer and some recommendations. You can download it from the following URL : https://www.ibm.com/support/pages/ibm-pattern-modeling-and-analysis-tool-java-garbage-collector-pmat Please find below some screenshots and details that might help you. 1. Screenshot 1: 2. Screenshot 2 : 3. Screenshot 3 : 4. Screenshot 4:

Eclipse plug-in : single java file compiler

At any point of time, you think about an Eclipse plug-in to compile a single java file in your Eclipse (as the Eclipse provide only the option for Build-All ) ? Here , I am giving the links to a plug-in, helping you to compile a single java file. Find the plug-in @ http://timealias.bplaced.net/eclipse2ant . Please find below some screen shots:

ATG Product Catalog schema ER diagram

Check out the O rder schema ER-Diagram @   http://tips4ufromsony.blogspot.in/2012/02/atg-order-schema-er-diagram.html Check out the User Profile  schema ER-Diagram @ http://tips4ufromsony.blogspot.in/2012/03/atg-user-profile-schema-er-diagram.html If you would like to know the relationship between different Product Catalog tables, please find below screen shots of  Product Catalog schema ER Diagrams.

SOAP UI faster start up

If you feel like your SOAP UI is starting up very slowly, check whether this is due to any start up web page call. You can check this @ Preferences - UI Settings - Show Startup Page ==> Here you can deselect this option to improve the start-up time.