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

Google Chrome shortcut keys

If you are a Google Chromey guy, please find below the list of shortcut keys for some of the most used features  :-) Find more shortcut keys @  http://www.google.com/support/chrome/bin/static.py?page=guide.cs&guide=25799&topic=28650

ATG - more about Forms and Form Handlers

An ATG form is defined by the dsp:form tag, which typically encloses DSP tags that specify form elements, such as dsp:input that provide direct access to Nucleus component properties. Find below a sample dsp:form tag.    <dsp:form action="/testPages/showPersonProperties.jsp" method="post" target="_top">      <p>Name: <dsp:input bean="/samples/Person.name" type="text"/>      <p>Age: <dsp:input bean="/samples/Person.age" type="text" value="30"/>      <p><dsp:input type="submit" bean="/samples/Person.submit"/> value="Click to submit"/>    </dsp:form>   When the user submits the form, the /samples/Person.name property is set to the value entered in the input field.Unlike standard HTML, which requires the name attribute for most input tags; the name attribute is optional for DSP form element tags. If an input tag omits the n

ATG features and ATG OOB modules

Features supported by ATG: Product Catalogue --> Custom Catalogue Creation, Localized Catalogs Order Management --> Customize Order Management Process, Integrate with 3rd Party Order Management Tool (Yantra), Partial Order Fulfillment Promotions --> Custom Promotion Creation, Integration with Ad Server (NetGravity) Campaigns --> Custom Campaign Development, Marketing Campaigns, Targeted Campaigns Personalization --> Profile Extensions, Explicit Rule Based Personalization, Implicit Dynamic  Personalization Commerce --> Shopping Cart Customization, Shopping List Creation, Customize Checkout process  Payments --> Integration with Payment Gateway (Cybercash,ClearCommerce), Bulk Payment Collaboration --> Chat, Discussion Forum, Message Board, Net Meetings  Reporting --> Click Stream Analysis, Site Analytics, Integration with 3rd Party Tools (HitBox, Netstat)  Search --> Integration with Search Engine (Verity, Autonomy), Database/Document Search, Cata

Eclipse plug-in to create Class and Sequence diagrams

ModelGoon is an Eclipse plug-in avaiable for UML diagram generation from Java code. It can be used to generate Package Dependencies Diagram, Class Diagram, Interaction Diagram and Sequence Diagram. You coud get it from http://marketplace.eclipse.org/content/modelgoon-uml4java Read more about it and see some vedios about how to create the class and sequence diagram @ http://www.modelgoon.org/?tag=eclipse-plugin Find some snapshots below which gives an idea about the diagram generation.

Check your PF balance

You can check your PF balance from the site :   http://www.epfkerala.in/ Go to the menu :  “ My Epf Balance ” .  This will lead to the url :  http://www.epfindia.com/MembBal.html Select the EPFO office where your account is maintained and furnish your PF Account number.You will be asked to enter your name and mobile number. The given mobile number will be recorded along with the PF Account Number. On successful submission of above information, the details will be sent through SMS to the given mobile number. Please find below some screen shots: