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

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.

Useful windows shortcut keys

Following are the most useful set of windows shortcut keys that I would like to share with you. run commands calc        -->  Calculator  mspaint   -->  To get Paint textpad   -->  To get Textpad if installed cmd        -->  Opens a new Command Window (cmd.exe)  control    -->  Displays Control Panel  msconfig   -->  Configuration to edit startup files  compmgmt.msc  -->  Computer management  fsmgmt.msc      -->  Folder Sharing Management  services.msc     -->   System Services  appwiz.cpl  --> Add/Remove Programs  ncpa.cpl     -->  Network Connections  %userprofile%  -->  Opens you User's Profile  %temp%  -->  Opens temporary file Folder  temp ...

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

Income Tax process and e-filing

http://financeminister.in/income_tax_calculator.php https://incometaxindiaefiling.gov.in Below I am listing the step-by-step activities of the Tax Process that a working professional need to do in a given Financial Year. Here FY refers to Financial Year  and  AY refers to Assesment Year. Each month we will pay the Tax (From APRIL 20xx to MARCH 20xx+1) through our Employer for the FY 20xx – 20xx+1. In the month April 20xx, we will give the investment details to the employer (in our employer specified portal) for the FY 20xx – 20xx+1. In the month January 20xx+1, we will give the investment proof details , Rent receipts… to the Employer Finance Department for the FY 20xx – 20xx+1. In the month MAY/JUNE 20xx+1, employer gives the Form 16 for the FY 20xx – 20xx+1 to us (The proof given by the employer to the employee for the tax paid by the employee). In the month July 20xx+1 (on or before July 31st of every year), we will fill the ITR forms (earlier it was NayaSaral f...

ATG Search - search engine tuning settings

In this blog, I am going to list the best tuning settings for ATG Search engine. The AESoapConfig.xml, AESoapWaspConfig.xml  and AEConfig.xml are the xmls referred below and you can find it @  <ATG_DIR>\<Searchx.x>\SearchEngine\<operating_system>\bin\ folder. (1)  Make sure that the AESoapConfig.xml's rwTimeout is less than or equal to routing's readTimeoutMs. You could find the routing's readTimeoutMs @ atg\search\routing\SearchEngineService component.               rwTimeout is the  length of time in seconds to wait before a read or write operation times out on an active connection. The number can be decreased to improve performance. However, a value that is too low could cause slow connections to be prematurely closed. (2)  Adjust the number of engine threads to match the number of CPUs available to the engine. Note that the minimal value for maxThreads and maxSpar...