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 - basic concepts of ATG

This blog is for the ATG beginners to get some basic overview about ATG. I just given the ATG concepts as a list of numbered points for the ease of understanding. 1. At the framework level, ATG is a               java based application platform for hosting web-based applications, as well as RMI accessible business components,               with an ORM layer,               a component container,               an MVC framework,               and a set of tag libraries for JSP. 2. Art Technology Group(ATG)'s Dynamo Application Server (DAS) is a Java EE compliant application server. DAS is no longer actively developed as ATG recommends using other Java EE applications servers for its products such as BEA WebLogic, JBoss or IBM WebSphere. 3. Prior to ATG 2007, JHTML was used instead of JSP for view purpose. J...

ATG Search - how to configure multiple language search

Here I am going to explain the steps involved in configuring the multi-language ATG Search if your site support multiple language. I have given the different steps in indexing and search flows. Indexing flow : You could configure different search projects for different locales to support parallel search indexing for each locale. You could setup search environment for the search projects so that the indexing host is different for the two projects. Configure the LocaleVariantProducer @ ProductCatalogOutputConfig to specify the locale for the new language. Include the language dictionaries you need in Search Admin on the Search Projects which can be used for indexing and searching in multiple languages. Specify the locales @ \atg\search\config\LanguageDimensionService so that you could configure the search configurations for each language. When you create the search configuration tree, specify the "Contents vary by" as Language, to configure the search configurations li...

Tax Credit Statement ( Form 26AS )

Read more about Tax filing @  http://tips4ufromsony.blogspot.com/2011/07/income-tax-process-and-e-filing.html  . Form 26AS is a consolidated tax statement issued under Rule 31 AB of Income Tax Rules to PAN holders. This statement, with respect to a financial year, will include details of: Tax deducted at source (TDS). Tax collected at source (TCS). Advance tax/self assessment tax/regular assessment tax etc., deposited in the bank by the taxpayers (PAN holders). Paid refund received during the financial year. Form 26AS will be prepared only with respect to Financial Year 05-06 onwards. To view the Form26AS , log-in to https://incometaxindiaefiling.gov.in and click on ‘View Tax Credit Statement (From 26AS)’  in ‘My Account’. Read more about Form 26AS  @ http://www.incometaxindia.gov.in/26ASTaxCreditStatement.asp http://www.tin-nsdl.com/form26as.asp

ATG Search and startRemoteLauncher

If the search engine application is running in a separate box than the ATG CA-BCC deployed server, the search engine is invoked through a remoteLauncher running in these boxes. Means, a remoteLauncher needs to run in the host where SearchEngine is installed remotely to start the search engine. You could find the startRemoteLauncher.sh @ ATG/ATG2007.1/Search2007.1/SearchAdmin/bin/startRemoteLauncher.sh Start remoteLauncher using the command   ./startremotelauncher.sh –p <RMI Launcher service Port > & The Launcher Service Port on the host machine can be found in BCC @ Search Administration>Projects > Search Project: gmri_search_en_CA > Environments > Host Machine: > Advanced Settings. If the startRemoteLanucher reports a BindingException , then you need to find the process that is using the launchServicePort. For that run the netstat command like :   netstat -an |grep 10880 Then inorder to identify the process t...

ATG search installation and search engine log files

Here I would like to explain how your ATG search folder structure looks like after you do the ATG search installation and also about the search engine log files. To get the ATG search, you need to install the ATGSearch<version>Windows.exe after you do the ATG installation. When you install ATG search, the generated folders include an OS dependant folder. In the below screen shot, you could see the "i686-win32-vc71" folder and this is generated since the ATG search ins installed in a windows machine. The ATG search engine is actually an exe file inside this "i686-win32-vc71" folder. Below screen shot give you an idea about the "atgsearch.exe", which is the search engine application. This search engine application (atgsearch.exe) is started by a remote launcher call from the BCC search administration UI.  The log files like "atgsearch_20120106112413_568.log" are the search engine log files where you could see the engine ...