Thursday, September 3, 2015
[Solution] Datasource not found - captured in Endeca Log
The error comes due to the datasource not available or wrong Oracle version mentioned
Check the bash_profile, (ORACLE_SID = XE) not XE2
Also check, tabelspace has been created for the user.
Check the bash_profile, (ORACLE_SID = XE) not XE2
Also check, tabelspace has been created for the user.
Monday, August 24, 2015
Add prefix to the order number
To add the Prefix in the order number like "<COMPANYCODE><Order Number>"
1. Goto
<ATG PROJECT LOCATION>/Common/config/atg/dynamo/service/idspaces.xml
2. Modify the XML
<?xml version="1.0" encoding="UTF-8"?>
<id-spaces xml-combine="append">
<id-space name="site1" seed="1" batch-size="10000" prefix="SITE-1-" />
<id-space name="site2" seed="1" batch-size="10000" prefix="SITE-2-" />
</id-spaces>
1. Goto
<ATG PROJECT LOCATION>/Common/config/atg/dynamo/service/idspaces.xml
2. Modify the XML
<?xml version="1.0" encoding="UTF-8"?>
<id-spaces xml-combine="append">
<id-space name="site1" seed="1" batch-size="10000" prefix="SITE-1-" />
<id-space name="site2" seed="1" batch-size="10000" prefix="SITE-2-" />
</id-spaces>
Friday, August 21, 2015
[Solved] Email not send while update order through CSC
Problem:
Confirmation email is not sending while update the order in CSC.Solution:
Check the CommitOrderFormHandler property filehttp://<CSC path>/dyn/admin/nucleus/atg/commerce/custsvc/order/CommitOrderFormHandler/
Then make the property autoSendUpdateOrderEmail as TRUE
http://localhost:8380/dyn/admin/nucleus/atg/commerce/custsvc/order/CommitOrderFormHandler/?propertyName=autoSendUpdateOrderEmail
Wednesday, August 5, 2015
Import SQL file in Oracle
To import .sql file in Oracle follow the following command line
(ex: file is in /opt/tmp/demo.sql)
Step:1
$ sqlplus
Step:2
Login to system user
Step:3
SQL> @ /opt/tmp/demo.sql
That's all, now the file will be executed.
Wednesday, July 15, 2015
How to replace the specific characters in a string in Java - ATG?
input1="Welcome"
String result1 = input1.replaceAll("[aeiouAEIOU]", "");
The result will be: "Wlcm"
How to check the given date is before or after of the current date?
The Calendar class of java.util is having the predefined methods after() and before().
For ex:
public class DateManager {
public String doCompareDate(java.util.Date date1, java.util.Date date2) {
For ex:
package com.ATGTraining.ctdc;
import java.util.Calendar;public class DateManager {
public String doCompareDate(java.util.Date date1, java.util.Date date2) {
String msg = "Some Error";
if (date1.after(date2)) {
System.out.println("Date1 is after Date2");
msg = "Date1 is after Date2";
}
if (date1.before(date2)) {
System.out.println("Date1 is before Date2");
msg = "Date1 is before Date2";
}
if (removeTime(date1).compareTo(removeTime(date2)) == 0) {
System.out.println("Date1 is equal Date2");
msg = "Date1 is equal Date2";
}
return msg;
}
public java.util.Date removeTime(java.util.Date date1) {
Calendar cal = Calendar.getInstance();
cal.setTime(date1);
cal.set(Calendar.HOUR_OF_DAY, 0);
cal.set(Calendar.MINUTE, 0);
cal.set(Calendar.SECOND, 0);
cal.set(Calendar.MILLISECOND, 0);
java.util.Date date4 = cal.getTime();
return date4;
}
How to set dsp value in dropdown option value in atg?
The values which are retrieved from the droplet can be set as the <option value> by <dsp:option paramvalue="element">
<dsp:select name="carName" bean="CarsFormHandler.car">
<dsp:droplet name="/atg/dynamo/droplet/ForEach">
<dsp:param name="array" bean="CarsComponent.cars" />
<dsp:oparam name="output">
<dsp:option paramvalue="element">
<dsp:valueof param="element" />
</dsp:option>
</dsp:oparam>
</dsp:droplet>
</dsp:select>
<dsp:select name="carName" bean="CarsFormHandler.car">
<dsp:droplet name="/atg/dynamo/droplet/ForEach">
<dsp:param name="array" bean="CarsComponent.cars" />
<dsp:oparam name="output">
<dsp:option paramvalue="element">
<dsp:valueof param="element" />
</dsp:option>
</dsp:oparam>
</dsp:droplet>
</dsp:select>
Monday, July 13, 2015
What are the usage of “pre” and “post” methods?
Form handlers conceptually follows methods pre/post/handle to invoke in an action.pre method will be invoked before handle method and post method will be invoked after the handle method.
What is profile form handler dictionary?
Input fields on a registration page are used to set the ProfileFormHandler’s value property. The value property is a Dictionary of property/value pairs that temporarily stores pending values for an operation on the current profile. This enables the ProfileFormHandler to set all profile properties on form submission as a single transaction, so profile properties are not left in an inconsistent state.
What are the purposes of Profile form handler?
ProfileFormHandler class to connect forms with user profiles stored in a profile repository.
Form handler that works with user profiles might have separate handler methods for creating the profile, modifying the profile, and logging the user in.
Form handler that works with user profiles might have separate handler methods for creating the profile, modifying the profile, and logging the user in.
What is Form handler?
ATG Formhandler is the intermediate class that comes in between a jsp form value and its bean class. They are there to evaluate the validity of form data before it is submitted, write data to and read data from a database or repository, and direct the user to different pages, depending on the results of the form submission
List the OOTB (Out of the Box) Droplets.
ForEach
Switch
RepositoryLookup
ItemLookupDroplet
CatalogItemLookupDroplet
PriceItemDroplet etc ...
Switch
RepositoryLookup
ItemLookupDroplet
CatalogItemLookupDroplet
PriceItemDroplet etc ...
What is Droplet?
Droplets are specialized nucleus components that can be embedded in JSPs.Droplets are J2EE servlets
A droplet is basically ATG's custom servlet which has some atg-specific customization. Just like we use HttpServlet in J2EE, we have have DynamoServlet class which implements javax.servlet.Servlet interface in ATG
List the modules of ATG.
DAS - Dynamo Application Server module
DPS - Dynamo Personalization Server module
DSS - Dynamo Scenario Server module
DCS - Dynamo Customization Server moduleWhat are the scopes of ATG components?
Global: Component is shared among all users.-Default Scope
Session: Separate instances of the component are provided to each user.
Request: Separate instances of the component are provided to each active request.
What is Nucleus?
A container that holds all these ATG components is nothing but ATG Nucleus. It is the core of the entire ATG system. By reading the .properties files associated with each component, Nucleus figures out which components are to be used in an application,initializes them to their default values,and decides how they connect to each other. Nucleus performs one basic operation: resolving component names. Given the name of a component, Nucleus does its best to find or create that component and return it.
Define ATG components
In ATG any Public Class/JavaBean Associated with a properties file is called as an ATG component
Subscribe to:
Comments
(
Atom
)
