Wednesday, September 12, 2012

HOW TO OPEN DOCX, XLSX, PPTX IN MS OFFICE 2003


For all those  who have MS Office 2003 or older versions: 


Please follow below mentioned steps to make your current version (e.g. MS Office 2003) to be able to open all Office 2007 as well as 2010 versions with minor formatting and visual inabilities, (follow the Figures in the end for better understanding):

1. Open your Browser (e.g. Internet Explorer, Mozilla)

2. In the Address Bar paste this link:

http://www.microsoft.com/download/en/details.aspx?id=3 , this link to directly go the page.

(All the instructions are given on that page, still for your convenience: )

3. You’ll find a Download button, click on it.

4. A file named “FileFormatConverters.exe” will be downloaded. But before downloading it will take you to another page for confirmation, and there also you will get a link Start download, clicking on it might not be necessary.

5. In the small Download confirmation window click on Save, and the download will start.

6. After completion Double Click the file FileFormatConverters.exe and follow the steps (mostly “I accept”, Next, Yes), and you are done.

7. Now you will see that all the .docx, .xlsx and .pptx files will have an office Icon and double click any of them to open, edit and save. You will have minor problems if the files contain some special formatting, graphics and designs. But that won’t make the file hard to open.

By installing the Compatibility Pack you will be able to open, edit, and save files using the file formats in newer versions of Word, Excel, and PowerPoint.

Tuesday, September 11, 2012

Some Useful Code Snippets 3

Code for Available Shipping methods droplet


<dsp:droplet name="AvailableShippingMethods">
<dsp:param bean="CartModifierFormHandler.shippingGroup" name="shippingGroup"/>

<dsp:oparam name="output">
<dsp:select bean=" CartModifierFormHandler.shippingGroup.shippingMethod">
<dsp:droplet name="ForEach">
 <dsp:param name="array" param="availableShippingMethods"/>
 <dsp:param name="elementName" value="method"/>

 <dsp:oparam name="output">
 <dsp:getvalueof id="option175" param="method"                 idtype="java.lang.String">
 
                        <dsp:option value="<%=option175%>"/>
                  </dsp:getvalueof>
                   

                  <dsp:valueof param="method"/>
 </dsp:oparam>
</dsp:droplet>
</dsp:select>
</dsp:oparam>
</dsp:droplet>



Code for Inventory Look Up Droplet 


<dsp:droplet 
       name="/atg/commerce/inventory/InventoryLookup">
  <dsp:param name="itemId" param="sku.repositoryId"/>
  <dsp:par-am name="useCache" value="true"/>
  <dsp:oparam name="output">
    <dsp:valueof
      param="inventoryInfo.availabilityStatusMsg"/>
    <br><dsp:valueof
      param="inventoryInfo.availabilityDate"/>
  </dsp:oparam>
</dsp:droplet>


Inventory Manager Methods 
1. queryAvailabilityStatus
2. queryAvailabilityDate
3. inventoryWasUpdated






Thursday, September 6, 2012

How to create a form using ATG Framework



A Form is collection of components i.e input controls such as text box, radio button.... Web Applications require forms to get input from the user. For e.g You might need user information to register to your website or credentials to log in to your website... In this article, Let us see how to create a form using ATG(ART TECHNOLOGY GROUP). A Form can be created in ATG as shown below.
<dsp:form action=”simple.jsp” method=”post”>
<dsp:input type=”text” name=”Emp_name” bean=”/com/src/Employee.empname”/>
<dsp:input type=”password” name=”Emp_name” bean=”/com/src/Employee.empname” value=””/>
<dsp:input type=”submit” value=”Submit”/>
</dsp:form>
The tag dsp:form requires a action attribute and method attribute. The action attribute specifies the next action to be carried out on form submission. The method holds the method name that is used to submit the form (Refer HTML FORM METHODS).
Form Elements can be created as shown in the above example dsp:input tag is used to create the form components to get input from the user. dsp:input can create two kinds of controls:
A form field that gets input from the user that is passed to a component.
A submit button or image for the submission of the form.
All dsp:input tags must be embedded between <dsp:form>..</dsp:form> tags.
The syntax of a dsp:input tag is as shown below
<dsp:input [type="input-control"] [name="input-name"] bean="property-spec" ["source-spec"][checked="{true|false}"] [default="value"][priority=integer-value]/>
The attributes of dsp:input are as follows

Type
The Type attribute specifies the HTML input type such as a checkbox, radio button, or text box, if type is specified, the default type “Text” is considered as the input type. The attribute type can hold the below values.
Text – used to create a text box.
Checkbox- used to create a check box.
Radio- used to create a radio button.
Submit- specifies to display a submit button.
Image - specifies a submit control that uses the image specified by the src or pageattribute.
Password - To create text box for pasword .
Based on the type of input the other attributes of a dsp:input tag varies, For Example a check box control has an attribute checked (to check or uncheck) which is not applicable for a input of type Text i.e. text box.

Name
The Name attribute assigns a name to the input field, which enables access to it during form processing. The name must be unique for all input types other than radio and checkbox.
Bean
The Bean attribute specifies the property that this input field updates on form submission.
For Example in the below code the control emp_name refers to bean Component Employee and property empname. On Submission of the form the value specified in the text box is set to the bean component’s property which can stored for future use.
<dsp:input type=”text” name=”Emp_name” bean=”/com/src/Employee.empname”/>
Checked
The checked attribute is applicable only if the type is set to a checkbox or radio. The checked attribute is used to check or uncheck a radio button or checkbox.
Default
The default attribute specifies the default value of the component. If no input is specified the default value is set to the component’s property.
Priority
The priority attribute specifies the priority of this input field during form processing, relative to other input fields.
Value
The attribute value id valid only if the type attribute is set to submit. Value is the value set for submit button’slabel.
Embedding custom attributes
A dsp:input tag can embed one or more custom attributes by using the dsp:tagAttributetag. The syntax of a dsp:attribute tag is as follows.
<dsp:input ...>
dsp:tagAttribute name="attr-name" value="value"/>
<dsp:input/>
The tag dsp:tagAttributetags is specifically used to add attributes to the generated HTML beyond the fixed set of attributes supported by the DSP tag library.

! make money !

ATG Useful Code Snippets

Code snippet to display items in ShoppingCart 


<dsp:droplet name="ForEach">
 <dsp:param name="array" 
      bean="CartModifierFormHandler.order.commerceItems"/>
 <dsp:oparam name="output">
 <dsp:param name="Ci" param="element"/>
 <input type="text" size="4"
        value='<dsp:valueof param="Ci.quantity"/>'>
 <dsp:valueof param="Ci.catalogRefId"/>
 <dsp:valueof converter="currency" 
      param="Ci.priceInfo.listPrice">no price</dsp:valueof>
 <dsp:valueof converter="currency" 
      param="Ci.priceInfo.amount">no price</dsp:valueof>
 </dsp:oparam>
</dsp:droplet> 


Code snippet to add item to order 


<dsp:form action="genericproduct.jsp" method="post">
 <input name="id" type="hidden" 
  value='<dsp:valueof param="product.repositoryId"/>'>
 <dsp:input type="hidden" value="shoppingcart.jsp"
  bean="CartModifierFormHandler.
                       addItemToOrderSuccessURL"/>
 <dsp:input type="hidden" value="session_expired.jsp"
  bean="CartModifierFormHandler.
                       sessionExpirationURL" />
 <dsp:input type="hidden" 
  paramvalue="product.repositoryId" 
      bean="CartModifierFormHandler.productId"/>

<dsp:select 
     bean="CartModifierFormHandler.catalogRefIds">
 <dsp:droplet name="/atg/dynamo/droplet/ForEach">
   <dsp:param name="array" param="product.childSKUs"/>
   <dsp:param name="indexName" value="skuIndex"/>
   <dsp:oparam name="output">
     <dsp:param name="sku" param="element"/>
     <option value='<dsp:valueof
          param="sku.repositoryId"/>'/>
     <dsp:valueof param="sku.displayName"/>
   </dsp:oparam>
 </dsp:droplet>
</dsp:select>

Quantity: <dsp:input type="text" value="1" size="4" 
     bean="CartModifierFormHandler.quantity"/> <BR>

<dsp:input type="submit" value="Add To Cart" 
     bean="CartModifierFormHandler.addItemToOrder" />

</dsp:form>

Code to display Shopping cart Summary on Top of the Page 


<dsp:setvalue param="NumItems" 
   beanvalue="/atg/commerce/ShoppingCart.current.
                                TotalCommerceItemCount"/>
 <dsp:droplet name="/atg/dynamo/droplet/Switch">
  <dsp:param name="value" param="NumItems"/>
  <dsp:oparam name="1">
    1 item (<dsp:valueof converter="currency"
    bean="/atg/commerce/ShoppingCart.
                            current.priceInfo.amount"/>)
  </dsp:oparam>
  <dsp:oparam name="default">
    <dsp:valueof param="NumItems"/> items (<dsp:valueof 
     converter="currency" bean="/atg/commerce/ShoppingCart.
                              current.priceInfo.amount"/>)


ATG Useful Code Snippets

  1)     Write a XML code for Property having Enumerated Data-Type 


    <property category-resource="categoryPioneerCycling" name="size" data-type="enumerated"
               column-name="clothing_size" display-name-resource="clothingSize">
      
        <attribute name="useCodeForValue" value="false"/>
        <option resource="clothingSizeUnknown" code="0"/>
        <option resource="clothingSizeExtraSmall" code="1"/>
        <option resource="clothingSizeSmall" code="2"/>
        <option resource="clothingSizeMedium" code="3"/>
        
      </property>  


Remember : 
1. Here mentoning the Data-type in important.
2. the attribute useCodeForValue tells whether the code given to options must be used or not.
3. If this attribute is true then options will be stored as integers in the database.


  2)     JSP Code  Error message for each droplet 



   <dsp:droplet name="/atg/dynamo/droplet/ErrorMessageForEach">
      <dsp:param bean="CouponFormHandler.formExceptions" name="exceptions"/>
      <dsp:oparam name="output">
        <dsp:valueof param="message"/>
      </dsp:oparam>
    </dsp:droplet>




3) Write a code to display breadcrumbs i.e nav history on the page.

Step 1 :
     Put the below code in the category or product page in order to get the item id , navAction and nav Count
   
       <dsp:droplet name="/atg/commerce/catalog/CatalogNavHistoryCollector">
         <dsp:param name="item" param="element"/>
         <dsp:param name="navAction" param="navAction"/>
         <dsp:param param="navCount" name="navCount"/>
       </dsp:droplet> 

    Step 2 : Create JSP to dsiplay the breadcrumbs and include it in all pages where you need to display it.
    
   <dsp:importbean bean="/atg/commerce/catalog/CatalogNavHistory"/>
     <dsp:droplet name="/atg/dynamo/droplet/ForEach">
   <dsp:param bean="CatalogNavHistory.navHistory" name="array"/>
   <dsp:param name="elementName" value="historyElement"/>
   <dsp:oparam name="outputStart">
      Navigation History: 
   </dsp:oparam>
   <dsp:oparam name="output">
      <dsp:getvalueof id="templateURL" param="historyElement.template.url" idtype="java.lang.String">
       <dsp:a href="genericcategory.jsp">
         <dsp:param name="id" param="historyElement.repositoryId"/>
         <dsp:param name="navAction" value="pop"/>
         <dsp:param bean="CatalogNavHistory.navCount" name="navCount"/>
       <b>  <dsp:valueof param="historyElement.displayName"/>
       </dsp:a> >></b>
      </dsp:getvalueof>
   </dsp:oparam>
   <dsp:oparam name="empty">
       No navigation history.
   </dsp:oparam>
</dsp:droplet>


  Remember : 1. CatalogNavHistory.navHistory is the component which stores the navigation history
    2. navAction specifies the action to be performed which is of 3 types 
     push --> inorder to push the item used in catgeory/product page
   pop --> used in the breadcrumbs page when used user clicks any of the                                                        item in the breadcrumb   
     jump --> used in search 

    



What is ATG ?




ATG is the worldwide leader in the E-commerce solutions. ATG product suite has enabled the vendors to enable their e-commerce commercial capabilities.

ATG provides the all necessary functionalities required to create a e-commerce web application.

ATG is currently owned by Oracle.

Websites like Walmart , Sams Club , jcpenney , sprint , mr.price , john lewis , urban outfitters , best buy , kohl's , verizon etc have been implemented using ATG framework.

Top Leaders of ATG web application development 

1) Professional Access 
2) Sapient 
3) Collabera 

In recent years Accenture , TCS , Infosys, CTS , Wipro , MahindraSatyam have also started using ATG.