You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by dushyant agarwal <ag...@yahoo.co.in> on 2008/04/24 13:05:40 UTC

tr:form + tr:commandButton not working

Hi 


I installed FireBug with Mozilla FireFox.
In my JSP page I had got a tr:from and a tr:commandButton. On clicking on the commandButton the following process took place. 

In one Page1.jsp I have got the following code:
<f:view>
<tr:document>
<tr:form id ="form1" binding="#{backing_Page1.form1}">
<tr:commandButton id="submit" binding="#{backing_Page1.submit}"/>

</tr:form>
</tr:document>
</f:view>

Not much of a code ??

Now on using FireBug's debugger I got one error at line 4948 in the js file.
It said:
a0.submit is not a function.

Now this line is inside a java script function submitForm(form#form1,1,source:'submit').At line 4948 in the Fire Bug console I found a0.submit(); and on putting a break point at line 4948 I got the value of a0 to be = form#form1Page1.jsp. On moving further from the break point I got the error "a0.submit" is not a function; 

Now this was in a test application but the same scenario is arising inside the production application(which is bit more complex)where I tried to change h:form to tr:form to use the defaultCommand functionality. 
There as well the same error came up : line 4948, a0.submit is not a function.

Now I want to know the solution. Hope to have provided you with useful information.

Dushyant
       
---------------------------------
 Share files, take polls, and make new friends - all under one roof.  Click here.

Re: tr:form + tr:commandButton not working

Posted by Richard Yee <ri...@gmail.com>.
Don't use 'submit' as an id. It is already used as a variable name in the
.js code.



-Richard


On Thu, Apr 24, 2008 at 4:05 AM, dushyant agarwal <
agarwal_dushyant@yahoo.co.in> wrote:

> Hi
>
>
> I installed FireBug with Mozilla FireFox.
> In my JSP page I had got a tr:from and a tr:commandButton. On clicking on
> the commandButton the following process took place.
>
> In one Page1.jsp I have got the following code:
> <f:view>
> <tr:document>
> <tr:form id ="form1" binding="#{backing_Page1.form1}">
> <tr:commandButton id="submit" binding="#{backing_Page1.submit}"/>
>
> </tr:form>
> </tr:document>
> </f:view>
>
> Not much of a code ??
>
> Now on using FireBug's debugger I got one error at line 4948 in the js
> file.
> It said:
> a0.submit is not a function.
>
> Now this line is inside a java script function
> submitForm(form#form1,1,source:'submit').At line 4948 in the Fire Bug
> console I found a0.submit(); and on putting a break point at line 4948 I got
> the value of a0 to be = form#form1Page1.jsp. On moving further from the
> break point I got the error "a0.submit" is not a function;
>
> Now this was in a test application but the same scenario is arising inside
> the production application(which is bit more complex)where I tried to change
> h:form to tr:form to use the defaultCommand functionality.
> There as well the same error came up : line 4948, a0.submit is not a
> function.
>
> Now I want to know the solution. Hope to have provided you with useful
> information.
>
> Dushyant
>
> ------------------------------
> Share files, take polls, and make new friends - all under one roof. Click
> here.<http://in.rd.yahoo.com/tagline_groups_8/*http://in.promos.yahoo.com/groups/>