<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>betweenGo &#187; Form Handlers</title>
	<atom:link href="http://betweengo.com/category/atg/form-handlers/feed/" rel="self" type="application/rss+xml" />
	<link>http://betweengo.com</link>
	<description>We make Ruby on Rails easy.  We make ATG easy.</description>
	<lastBuildDate>Tue, 06 Dec 2011 14:03:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>ATG Parameter Names</title>
		<link>http://betweengo.com/2008/06/09/atg-parameter-names/</link>
		<comments>http://betweengo.com/2008/06/09/atg-parameter-names/#comments</comments>
		<pubDate>Mon, 09 Jun 2008 14:12:27 +0000</pubDate>
		<dc:creator>Frank Kim</dc:creator>
				<category><![CDATA[Form Handlers]]></category>
		<category><![CDATA[ATG]]></category>

		<guid isPermaLink="false">http://betweengo.com/?p=190</guid>
		<description><![CDATA[Often in ATG form handler or droplet code one finds code like this: public static final String OUTPUT = "output"; You can take advantage of ATG&#8217;s ParameterName class to represent any parameter name. From the ATG 2006.3 API Reference: A ParameterName object can represent any parameter name used in Dynamo. Use this class when building [...]
Related posts:<ol>
<li><a href='http://betweengo.com/2009/07/28/how-to-debug-no-output-for-atg-foreach/' rel='bookmark' title='How to Debug No Output for ATG ForEach'>How to Debug No Output for ATG ForEach</a></li>
<li><a href='http://betweengo.com/2008/05/09/accessing-repositoryitems-with-jstl/' rel='bookmark' title='Accessing RepositoryItems with JSTL'>Accessing RepositoryItems with JSTL</a></li>
<li><a href='http://betweengo.com/2006/12/15/forwarding-instead-of-redirecting-in-form-handlers/' rel='bookmark' title='Forwarding instead of Redirecting in Form Handlers'>Forwarding instead of Redirecting in Form Handlers</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Often in ATG form handler or droplet code one finds code like this:</p>
<pre>public static final String OUTPUT = "output";</pre>
<p>You can take advantage of ATG&#8217;s <a title="ParameterName" href="http://www.atg.com/repositories/ContentCatalogRepository_en/manuals/ATG2006.3/apidoc/atg/nucleus/naming/ParameterName.html">ParameterName</a> class to represent any parameter name.  From the <a title="ATG 2006.3 API Reference" href="http://www.atg.com/repositories/ContentCatalogRepository_en/manuals/ATG2006.3/apidoc/index.html">ATG 2006.3 API Reference</a>:</p>
<blockquote><p>A ParameterName object can represent any parameter name used in  Dynamo.  Use this class when building your own droplets to create   unique parameter names.  The parameter names will then be stored in  a global hashtable keyed by strings.  Using this class allows the   parameters of a droplet to be publicly available as well as enforcing good coding standards whereby the parameter name string only appears once in the java code.</p></blockquote>
<p>Throughout ATG&#8217;s public source you can see that many parameter names have already been defined.  For brevity sake I have omitted the &#8220;public final static&#8221; prefix.</p>
<pre>ParameterName ARRAY = ParameterName.getParameterName("array");
ParameterName DEBUG = ParameterName.getParameterName("debug");
ParameterName DEFAULT = ParameterName.getParameterName("default");
ParameterName ELEMENT_NAME = ParameterName.getParameterName("elementName");
ParameterName EMPTY = ParameterName.getParameterName("empty");
ParameterName EQUAL = ParameterName.getParameterName("equal");
ParameterName GREATERTHAN = ParameterName.getParameterName("greaterthan");
ParameterName INDEX_NAME = ParameterName.getParameterName("indexName");
ParameterName IN_URL = ParameterName.getParameterName("inUrl");
ParameterName LESSTHAN = ParameterName.getParameterName("lessthan");
ParameterName NONCOMPARABLE = ParameterName.getParameterName("noncomparable");
ParameterName NON_SECURE_URL = ParameterName.getParameterName("nonSecureUrl");
ParameterName OBJ1 = ParameterName.getParameterName("obj1");
ParameterName OBJ2 = ParameterName.getParameterName("obj2");
ParameterName OUTPUT = ParameterName.getParameterName("output");
ParameterName OUTPUT_END = ParameterName.getParameterName("outputEnd");
ParameterName OUTPUT_START = ParameterName.getParameterName("outputStart");
ParameterName PATH = ParameterName.getParameterName("path");
ParameterName REVERSE_ORDER = ParameterName.getParameterName("reverseOrder");
ParameterName SECURE_URL = ParameterName.getParameterName("secureUrl");
ParameterName SORT_PROPERTIES = ParameterName.getParameterName("sortProperties");
ParameterName TRUE  = ParameterName.getParameterName("true");
ParameterName UNSET = ParameterName.getParameterName("unset");
ParameterName VALUE = ParameterName.getParameterName("value");
ParameterName CURRENCY_PARAM = ParameterName.getParameterName("currency");
ParameterName EURO_SYMBOL_PARAM = ParameterName.getParameterName("euroSymbol");
ParameterName LOCALE_PARAM = ParameterName.getParameterName("locale");
ParameterName TARGET_LOCALE_PARAM = ParameterName.getParameterName("targetLocale");
ParameterName YEN_SYMBOL_PARAM = ParameterName.getParameterName("yenSymbol");</pre>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fbetweengo.com%2F2008%2F06%2F09%2Fatg-parameter-names%2F&amp;title=ATG%20Parameter%20Names" id="wpa2a_2"><img src="http://betweengo.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p><p>Related posts:<ol>
<li><a href='http://betweengo.com/2009/07/28/how-to-debug-no-output-for-atg-foreach/' rel='bookmark' title='How to Debug No Output for ATG ForEach'>How to Debug No Output for ATG ForEach</a></li>
<li><a href='http://betweengo.com/2008/05/09/accessing-repositoryitems-with-jstl/' rel='bookmark' title='Accessing RepositoryItems with JSTL'>Accessing RepositoryItems with JSTL</a></li>
<li><a href='http://betweengo.com/2006/12/15/forwarding-instead-of-redirecting-in-form-handlers/' rel='bookmark' title='Forwarding instead of Redirecting in Form Handlers'>Forwarding instead of Redirecting in Form Handlers</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://betweengo.com/2008/06/09/atg-parameter-names/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ATG Consulting Interview</title>
		<link>http://betweengo.com/2008/03/10/atg-consulting-interview/</link>
		<comments>http://betweengo.com/2008/03/10/atg-consulting-interview/#comments</comments>
		<pubDate>Tue, 11 Mar 2008 05:55:49 +0000</pubDate>
		<dc:creator>Frank Kim</dc:creator>
				<category><![CDATA[Commerce]]></category>
		<category><![CDATA[Form Handlers]]></category>
		<category><![CDATA[Java SE]]></category>
		<category><![CDATA[Nucleus]]></category>
		<category><![CDATA[Repository]]></category>
		<category><![CDATA[ATG]]></category>
		<category><![CDATA[interview]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://betweengo.com/atg/2008/03/10/atg-consulting-interview/</guid>
		<description><![CDATA[Today I had the most detailed but at same time most interesting ATG consulting interview yet. Here are the questions I was asked with answers when appropriate in italics. Which versions of ATG have you worked with? What parts of ATG&#8217;s stack have you worked with? How do you compare ATG with Ruby on Rails? [...]
Related posts:<ol>
<li><a href='http://betweengo.com/2008/03/12/data-structures-interview-questions/' rel='bookmark' title='Data Structures Interview Questions'>Data Structures Interview Questions</a></li>
<li><a href='http://betweengo.com/2008/03/12/computing-basics-interview-questions/' rel='bookmark' title='Computing Basics Interview Questions'>Computing Basics Interview Questions</a></li>
<li><a href='http://betweengo.com/2005/08/08/atg-forms-do-not-work-if-action-is-an-html-page/' rel='bookmark' title='ATG forms do not work if action is an HTML page'>ATG forms do not work if action is an HTML page</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Today I had the most detailed but at same time most interesting ATG consulting interview yet.  Here are the questions I was asked with answers when appropriate in italics.</p>
<ol>
<li>Which versions of ATG have you worked with?</li>
<li>What parts of ATG&#8217;s stack have you worked with?</li>
<li>How do you compare ATG with Ruby on Rails?</li>
<li>What is Nucleus?</li>
<li>What is the ATG Repository?</li>
<li>When creating form handlers typically what ATG base class do you extend?  <em>GenericFormHandler.java</em></li>
<li>When creating droplets what ATG base class do you extend?  <em>DynamoServlet.java</em></li>
<li>What form handlers and methods do you use during checkout?  <em>ShoppingCartFormHandler, numerous handlers like handleMoveToConfirm, etc.</em></li>
<li>What does a user typically see during checkout?  <em>Add to shopping cart, login, billing and shipping address, payment, confirm, confirmation, email confirmation, shipped email.</em></li>
<li>How do you compare strings in Java?  If String a = &#8220;hello&#8221; and String b= &#8220;hello&#8221; what is a == b?  <em>True, a and b both reference the same constant string.</em></li>
</ol>
<p>In another interview I was asked these questions.</p>
<ol>
<li>What is HTTP?  How does it work?</li>
<li>If HTTP is stateless then how does a web application maintain state.</li>
</ol>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fbetweengo.com%2F2008%2F03%2F10%2Fatg-consulting-interview%2F&amp;title=ATG%20Consulting%20Interview" id="wpa2a_4"><img src="http://betweengo.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p><p>Related posts:<ol>
<li><a href='http://betweengo.com/2008/03/12/data-structures-interview-questions/' rel='bookmark' title='Data Structures Interview Questions'>Data Structures Interview Questions</a></li>
<li><a href='http://betweengo.com/2008/03/12/computing-basics-interview-questions/' rel='bookmark' title='Computing Basics Interview Questions'>Computing Basics Interview Questions</a></li>
<li><a href='http://betweengo.com/2005/08/08/atg-forms-do-not-work-if-action-is-an-html-page/' rel='bookmark' title='ATG forms do not work if action is an HTML page'>ATG forms do not work if action is an HTML page</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://betweengo.com/2008/03/10/atg-consulting-interview/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Submitting an ATG Form Using a Text Link</title>
		<link>http://betweengo.com/2007/07/20/submitting-an-atg-form-using-a-text-link/</link>
		<comments>http://betweengo.com/2007/07/20/submitting-an-atg-form-using-a-text-link/#comments</comments>
		<pubDate>Fri, 20 Jul 2007 11:37:55 +0000</pubDate>
		<dc:creator>Frank Kim</dc:creator>
				<category><![CDATA[Form Handlers]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Page Development]]></category>
		<category><![CDATA[ATG]]></category>

		<guid isPermaLink="false">http://betweengo.com/uncategorized/2007/07/20/submitting-an-atg-form-using-a-text-link/</guid>
		<description><![CDATA[It has always bedeviled me how to submit an ATG form using a text link. I have asked many people about this but no one seems to know. Finally with the help of ATG support I figured it out. Below is a simple example of how to do it. The trick is the hidden submit [...]
Related posts:<ol>
<li><a href='http://betweengo.com/2005/08/08/internet-explorer-form-does-not-invoke-atg-handler/' rel='bookmark' title='Internet Explorer form does not invoke ATG handler'>Internet Explorer form does not invoke ATG handler</a></li>
<li><a href='http://betweengo.com/2005/08/08/atg-forms-do-not-work-if-action-is-an-html-page/' rel='bookmark' title='ATG forms do not work if action is an HTML page'>ATG forms do not work if action is an HTML page</a></li>
<li><a href='http://betweengo.com/2007/04/28/submitting-form-with-radio-button/' rel='bookmark' title='Submitting a form with a radio button'>Submitting a form with a radio button</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>It has always bedeviled me how to submit an ATG form using a text link. I have asked many people about this but no one seems to know. Finally with the help of ATG support I figured it out.</p>
<p>Below is a simple example of how to do it. The trick is the hidden submit input which triggers ATG to call the <tt>handleSubmit</tt> method of the form handler.</p>
<pre>&lt;%@ taglib uri="/dspTaglib" prefix="dsp"%&gt;

&lt;dsp:page&gt;

&lt;script&gt;
  function submit(form) {
    form.submit();
  }
&lt;/script&gt;

&lt;dsp:form action="&lt;%=request.getRequestURI()%&gt;" method="post" name="testForm"&gt;

  Foo: &lt;dsp:input type="text" bean="TestFormHandler.foo"/&gt;

  &lt;p&gt;&lt;a href="javascript:submit(document.testForm)"&gt;Submit&lt;/a&gt;

  &lt;dsp:input type="hidden" bean="TestFormHandler.submit" value="Submit"/&gt;

&lt;/dsp:form&gt;

&lt;/dsp:page&gt;</pre>
<p>You can also invoke the JavaScript like this:</p>
<pre>  &lt;p&gt;&lt;a href="#" onclick="submit(document.testForm); return false;"&gt;Submit&lt;/a&gt;</pre>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fbetweengo.com%2F2007%2F07%2F20%2Fsubmitting-an-atg-form-using-a-text-link%2F&amp;title=Submitting%20an%20ATG%20Form%20Using%20a%20Text%20Link" id="wpa2a_6"><img src="http://betweengo.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p><p>Related posts:<ol>
<li><a href='http://betweengo.com/2005/08/08/internet-explorer-form-does-not-invoke-atg-handler/' rel='bookmark' title='Internet Explorer form does not invoke ATG handler'>Internet Explorer form does not invoke ATG handler</a></li>
<li><a href='http://betweengo.com/2005/08/08/atg-forms-do-not-work-if-action-is-an-html-page/' rel='bookmark' title='ATG forms do not work if action is an HTML page'>ATG forms do not work if action is an HTML page</a></li>
<li><a href='http://betweengo.com/2007/04/28/submitting-form-with-radio-button/' rel='bookmark' title='Submitting a form with a radio button'>Submitting a form with a radio button</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://betweengo.com/2007/07/20/submitting-an-atg-form-using-a-text-link/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Forwarding instead of Redirecting in Form Handlers</title>
		<link>http://betweengo.com/2006/12/15/forwarding-instead-of-redirecting-in-form-handlers/</link>
		<comments>http://betweengo.com/2006/12/15/forwarding-instead-of-redirecting-in-form-handlers/#comments</comments>
		<pubDate>Fri, 15 Dec 2006 16:10:40 +0000</pubDate>
		<dc:creator>Frank Kim</dc:creator>
				<category><![CDATA[Form Handlers]]></category>
		<category><![CDATA[ATG]]></category>

		<guid isPermaLink="false">http://betweengo.com/atg/2006/12/15/forwarding-instead-of-redirecting-in-form-handlers/</guid>
		<description><![CDATA[Typically how an ATG form handler handles form submissions is that if the form submission has any errors it redirects to an error or failure URL, otherwise it redirects to the success URL. It does this when you call the form handler&#8217;s method checkFormRedirect. However by redirecting you are creating a new request and you [...]
Related posts:<ol>
<li><a href='http://betweengo.com/2005/08/08/internet-explorer-form-does-not-invoke-atg-handler/' rel='bookmark' title='Internet Explorer form does not invoke ATG handler'>Internet Explorer form does not invoke ATG handler</a></li>
<li><a href='http://betweengo.com/2007/07/20/submitting-an-atg-form-using-a-text-link/' rel='bookmark' title='Submitting an ATG Form Using a Text Link'>Submitting an ATG Form Using a Text Link</a></li>
<li><a href='http://betweengo.com/2005/08/08/atg-forms-do-not-work-if-action-is-an-html-page/' rel='bookmark' title='ATG forms do not work if action is an HTML page'>ATG forms do not work if action is an HTML page</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Typically how an ATG form handler handles form submissions is that if the form submission has any errors it redirects to an error or failure URL, otherwise it redirects to the success URL.  It does this when you call the form handler&#8217;s method <code>checkFormRedirect</code>.</p>
<p>However by redirecting you are creating a new request and you will lose all the information in the current request.  If you want to keep them you can do this by forward instead of redirecting.</p>
<p>To specify that a form handler use forward instead of redirect you can either</p>
<ol>
<li>set the request parameter &#8220;atg.formHandlerUseForwards&#8221; to &#8220;true&#8221; (case insensitive) OR</li>
<li>set the boolean property useForwards to true, either in the properties file of the form handler or using a hidden input in the JSP/JHTML form</li>
</ol>
<p>None of this as far as I can tell is documented, probably because instead of using forwards ATG would probably prefer developers make a form handler session scoped if information needs to be preserved over multiple requests.  Regardless this is all documented in the source code for <em>atg.droplet.GenericFormHandler</em> which is available in the ATG install location under DAS/src/Java/.</p>
<p>Note that if you call the response&#8217;s method <code>sendLocalRedirect</code> you bypass the flexibility of possibly using forwards.  Instead it is preferable to call the form handler&#8217;s method <code>redirectOrForward</code>.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fbetweengo.com%2F2006%2F12%2F15%2Fforwarding-instead-of-redirecting-in-form-handlers%2F&amp;title=Forwarding%20instead%20of%20Redirecting%20in%20Form%20Handlers" id="wpa2a_8"><img src="http://betweengo.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p><p>Related posts:<ol>
<li><a href='http://betweengo.com/2005/08/08/internet-explorer-form-does-not-invoke-atg-handler/' rel='bookmark' title='Internet Explorer form does not invoke ATG handler'>Internet Explorer form does not invoke ATG handler</a></li>
<li><a href='http://betweengo.com/2007/07/20/submitting-an-atg-form-using-a-text-link/' rel='bookmark' title='Submitting an ATG Form Using a Text Link'>Submitting an ATG Form Using a Text Link</a></li>
<li><a href='http://betweengo.com/2005/08/08/atg-forms-do-not-work-if-action-is-an-html-page/' rel='bookmark' title='ATG forms do not work if action is an HTML page'>ATG forms do not work if action is an HTML page</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://betweengo.com/2006/12/15/forwarding-instead-of-redirecting-in-form-handlers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ATG forms do not work if action is an HTML page</title>
		<link>http://betweengo.com/2005/08/08/atg-forms-do-not-work-if-action-is-an-html-page/</link>
		<comments>http://betweengo.com/2005/08/08/atg-forms-do-not-work-if-action-is-an-html-page/#comments</comments>
		<pubDate>Mon, 08 Aug 2005 14:15:42 +0000</pubDate>
		<dc:creator>Frank Kim</dc:creator>
				<category><![CDATA[Form Handlers]]></category>
		<category><![CDATA[Page Development]]></category>
		<category><![CDATA[ATG]]></category>

		<guid isPermaLink="false">http://www.betweengo.com/?p=15</guid>
		<description><![CDATA[When creating forms that are to interact with ATG form handlers, one cannot use an HTML page as the action. If one does then the ATG form handler will not be invoked. For example, this form will not invoke the ATG form handler. &#60;form name="test" action="test.html" method="get"&#62; Name: &#60;input type="text" bean="/TestFormHandler.name"&#62; &#60;p&#62;&#60;input type="submit" bean="/TestFormHandler.submit"&#62; &#60;/form&#62; [...]
Related posts:<ol>
<li><a href='http://betweengo.com/2005/08/08/internet-explorer-form-does-not-invoke-atg-handler/' rel='bookmark' title='Internet Explorer form does not invoke ATG handler'>Internet Explorer form does not invoke ATG handler</a></li>
<li><a href='http://betweengo.com/2007/07/20/submitting-an-atg-form-using-a-text-link/' rel='bookmark' title='Submitting an ATG Form Using a Text Link'>Submitting an ATG Form Using a Text Link</a></li>
<li><a href='http://betweengo.com/2007/04/28/submitting-form-with-radio-button/' rel='bookmark' title='Submitting a form with a radio button'>Submitting a form with a radio button</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>When creating forms that are to interact with ATG form handlers, one cannot use an HTML page as the action.  If one does then the ATG form handler will not be invoked.</p>
<p>For example, this form will not invoke the ATG form handler.</p>
<pre>
&lt;form name="test" action="test.html" method="get"&gt;
  Name: &lt;input type="text" bean="/TestFormHandler.name"&gt;
  &lt;p&gt;&lt;input type="submit" bean="/TestFormHandler.submit"&gt;
&lt;/form&gt;
</pre>
<p>However this form will.</p>
<pre>
&lt;form name="test" action="test.jhtml" method="get"&gt;
  Name: &lt;input type="text" bean="/TestFormHandler.name"&gt;
  &lt;p&gt;&lt;input type="submit" bean="/TestFormHandler.submit"&gt;
&lt;/form&gt;
</pre>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fbetweengo.com%2F2005%2F08%2F08%2Fatg-forms-do-not-work-if-action-is-an-html-page%2F&amp;title=ATG%20forms%20do%20not%20work%20if%20action%20is%20an%20HTML%20page" id="wpa2a_10"><img src="http://betweengo.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p><p>Related posts:<ol>
<li><a href='http://betweengo.com/2005/08/08/internet-explorer-form-does-not-invoke-atg-handler/' rel='bookmark' title='Internet Explorer form does not invoke ATG handler'>Internet Explorer form does not invoke ATG handler</a></li>
<li><a href='http://betweengo.com/2007/07/20/submitting-an-atg-form-using-a-text-link/' rel='bookmark' title='Submitting an ATG Form Using a Text Link'>Submitting an ATG Form Using a Text Link</a></li>
<li><a href='http://betweengo.com/2007/04/28/submitting-form-with-radio-button/' rel='bookmark' title='Submitting a form with a radio button'>Submitting a form with a radio button</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://betweengo.com/2005/08/08/atg-forms-do-not-work-if-action-is-an-html-page/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Internet Explorer form does not invoke ATG handler</title>
		<link>http://betweengo.com/2005/08/08/internet-explorer-form-does-not-invoke-atg-handler/</link>
		<comments>http://betweengo.com/2005/08/08/internet-explorer-form-does-not-invoke-atg-handler/#comments</comments>
		<pubDate>Mon, 08 Aug 2005 13:56:44 +0000</pubDate>
		<dc:creator>Frank Kim</dc:creator>
				<category><![CDATA[Form Handlers]]></category>
		<category><![CDATA[Page Development]]></category>
		<category><![CDATA[ATG]]></category>

		<guid isPermaLink="false">http://www.betweengo.com/?p=14</guid>
		<description><![CDATA[In Internet Explorer if you have a form that has only a single line text input and if you press Enter to submit the form instead of pressing the submit button then the ATG handler for this form will not be invoked. Instead the form will act like a regular HTML form. To get around [...]
Related posts:<ol>
<li><a href='http://betweengo.com/2005/08/08/atg-forms-do-not-work-if-action-is-an-html-page/' rel='bookmark' title='ATG forms do not work if action is an HTML page'>ATG forms do not work if action is an HTML page</a></li>
<li><a href='http://betweengo.com/2007/07/20/submitting-an-atg-form-using-a-text-link/' rel='bookmark' title='Submitting an ATG Form Using a Text Link'>Submitting an ATG Form Using a Text Link</a></li>
<li><a href='http://betweengo.com/2006/12/15/forwarding-instead-of-redirecting-in-form-handlers/' rel='bookmark' title='Forwarding instead of Redirecting in Form Handlers'>Forwarding instead of Redirecting in Form Handlers</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>In Internet Explorer if you have a form that has only a single line text input and if you press Enter to submit the form instead of pressing the submit button then the ATG handler for this form will not be invoked.  Instead the form will act like a regular HTML form.</p>
<p>To get around this problem on Internet Explorer one must explicitly call the handler using a hidden input tag.</p>
<p>Here is an example of a simple form that illustrates this problem.  The action of this form is to go to <tt>wrong.jhtml</tt> but if the ATG handler is invoked then the request is redirected to <tt>right.jhtml</tt>.</p>
<pre>
&lt;form name="test" action="wrong.jhtml" method="get"&gt;
  Name: &lt;input type="text" bean="/TestFormHandler.name"&gt;
  &lt;p&gt;&lt;input type="submit" bean="/TestFormHandler.submit"&gt;
&lt;/form&gt;
</pre>
<p>Here is a screenshot of this form.</p>
<p><img src='/wp-content/test_form.png' alt='test form with only one input field' /></p>
<p>When I press Enter I go to the wrong page, i.e. <tt>wrong.jhtml</tt>, because the handler is not invoked.</p>
<p><img src='/wp-content/wrong_page.png' alt='example of a form working incorrectly' /></p>
<p>When I press the Submit button I go to the right page, i.e. <tt>right.jhtml</tt>, because the handler is invoked.</p>
<p><img src='/wp-content/right_page.png' alt='example of a form working correctly' /></p>
<p>To fix this I add this line within the form of <tt>testForm.jhtml</tt>.</p>
<pre>&nbsp;&nbsp;&lt;input&nbsp;type=&quot;hidden&quot;&nbsp;bean=&quot;/TestFormHandler.submit&quot;&gt;</pre>
<p>I also add this getter, which does nothing and may not be necessary for later versions of ATG, in the form handler.</p>
<pre>&nbsp;&nbsp;public String getSubmit() { return null; }</pre>
<p>After doing this when I press Enter I go to the right page.</p>
<p>Note that with a form that has more than one input field this is not a problem.</p>
<p><img src='/wp-content/test_form2.png' alt='test form with two input fields' /></p>
<p>The source for this example can be downloaded <a href="http://betweengo.com/wp-content/ieforms.zip">here</a>.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fbetweengo.com%2F2005%2F08%2F08%2Finternet-explorer-form-does-not-invoke-atg-handler%2F&amp;title=Internet%20Explorer%20form%20does%20not%20invoke%20ATG%20handler" id="wpa2a_12"><img src="http://betweengo.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p><p>Related posts:<ol>
<li><a href='http://betweengo.com/2005/08/08/atg-forms-do-not-work-if-action-is-an-html-page/' rel='bookmark' title='ATG forms do not work if action is an HTML page'>ATG forms do not work if action is an HTML page</a></li>
<li><a href='http://betweengo.com/2007/07/20/submitting-an-atg-form-using-a-text-link/' rel='bookmark' title='Submitting an ATG Form Using a Text Link'>Submitting an ATG Form Using a Text Link</a></li>
<li><a href='http://betweengo.com/2006/12/15/forwarding-instead-of-redirecting-in-form-handlers/' rel='bookmark' title='Forwarding instead of Redirecting in Form Handlers'>Forwarding instead of Redirecting in Form Handlers</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://betweengo.com/2005/08/08/internet-explorer-form-does-not-invoke-atg-handler/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
