You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Henry Chen <he...@gmail.com> on 2008/11/26 00:52:37 UTC

[T5] LinkSumit no event captured

Hi,

 

I tried the following without any luck.

 

In my .tml:

 

<t:linksubmit t:event="update" class="save">Update</t:linksubmit>

 

In java:

 

 

public void onUpdate() {

        actionType = SubmitAction.ADD;

}

 

Didn't work. Then I tried below:

 

@OnEvent(value="addField")

public void onUpdate() {

        actionType = SubmitAction.ADD;

}

 

No luck.

 

 

Can anybody show me how to use LinkSubmit? Thanks a lot!

 

Henry

 

 


Re: [T5] LinkSumit no event captured

Posted by serg-l <se...@tut.by>.
I'm found this problem since 5.1.0.1 or 5.1.0.2, in 5.0.0.18 LinkSubmit work
properly.
Now if you add 
	@Property
	@Validate("required")
	private String somefield;
in java and

<input t:type="TextField" t:id="somefield"/>

in tml

your LinkSubmit began event capture

I'm don`t know why developers set this limitation.
May be if you don't have required field there is nothing to submit.
IMHO it's unneeded limitation.



-- 
View this message in context: http://www.nabble.com/-T5--LinkSumit-no-event-captured-tp20692153p23229435.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


RE: [T5] LinkSumit no event captured

Posted by Henry Chen <he...@gmail.com>.
I found the problem is located inside linksubmit.js. The function
createHidden() was never called. I don't know if this is because I missed
something or just a bug?

--------------------------- 

createHidden : function()
 {
 var hidden = new Element("input", { "type":"hidden",
 "name": this.element.id + ":hidden",
 "value": this.element.id});

 this.element.insert({after:hidden});
 },

onClick : function(event)
 {
 // Tapestry.debug("LinkSubmit #{id} clicked.", this.element);

 Event.stop(event);

 var onsubmit = this.form.onsubmit;

 if (onsubmit == undefined || onsubmit.call(window.document, event))
 {
 this.createHidden();
 this.form.submit();
 }

 return false;
 }




-----Original Message-----
From: Howard Lewis Ship [mailto:hlship@gmail.com] 
Sent: Tuesday, November 25, 2008 7:01 PM
To: Tapestry users; henry.chen04@gmail.com
Subject: Re: [T5] LinkSumit no event captured

That should work; what release are you on?

On Tue, Nov 25, 2008 at 3:52 PM, Henry Chen <he...@gmail.com> wrote:
> Hi,
>
>
>
> I tried the following without any luck.
>
>
>
> In my .tml:
>
>
>
> <t:linksubmit t:event="update" class="save">Update</t:linksubmit>
>
>
>
> In java:
>
>
>
>
>
> public void onUpdate() {
>
>        actionType = SubmitAction.ADD;
>
> }
>
>
>
> Didn't work. Then I tried below:
>
>
>
> @OnEvent(value="addField")
>
> public void onUpdate() {
>
>        actionType = SubmitAction.ADD;
>
> }
>
>
>
> No luck.
>
>
>
>
>
> Can anybody show me how to use LinkSubmit? Thanks a lot!
>
>
>
> Henry
>
>
>
>
>
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


RE: [T5] LinkSumit no event captured

Posted by "anton.litvinenko" <an...@gmail.com>.
Hi!

Howard has marked the issue as closed, but i was able to reproduce it in
5.1.0.3.
I have attached some files that could be used for reproduction: 
https://issues.apache.org/jira/browse/TAP5-389
https://issues.apache.org/jira/browse/TAP5-389 

Anton


Henry Chen wrote:
> 
> I just created one.
> 
>  https://issues.apache.org/jira/browse/TAP5-389
> https://issues.apache.org/jira/browse/TAP5-389 
> 
> 
> 
> -----Original Message-----
> From: Martijn Brinkers [mailto:martijn.list@gmail.com] 
> Sent: Friday, November 28, 2008 8:30 AM
> To: henry.chen04@gmail.com
> Cc: 'Howard Lewis Ship'; 'Tapestry users'
> Subject: RE: [T5] LinkSumit no event captured
> 
> Did you file a JIRA entry for this? It seems I experience the same
> problem (form with Zone and no event from the LinkSubmit)
> 
> Martijn
> 
> On Wed, 2008-11-26 at 20:03 -0600, Henry Chen wrote:
>> I figured it out. If Form component specifies a 'zone' parameter, the
>> following part in linksubmit.js is not doing expected behavior. 
>> 
>> if (onsubmit == undefined || onsubmit.call(window.document, event))
>>  {
>>  this.createHidden();
>>  this.form.submit();
>>  }
>> 
>> createHidden() is not called so no hidden field is thus inserted.
>> Removing
>> 'zone' from Form component fixed this immediately. I think this is a bug.
>> 
>> -----Original Message-----
>> From: Howard Lewis Ship [mailto:hlship@gmail.com] 
>> Sent: Tuesday, November 25, 2008 7:01 PM
>> To: Tapestry users; henry.chen04@gmail.com
>> Subject: Re: [T5] LinkSumit no event captured
>> 
>> That should work; what release are you on?
>> 
>> On Tue, Nov 25, 2008 at 3:52 PM, Henry Chen <he...@gmail.com>
> wrote:
>> > Hi,
>> >
>> >
>> >
>> > I tried the following without any luck.
>> >
>> >
>> >
>> > In my .tml:
>> >
>> >
>> >
>> > <t:linksubmit t:event="update" class="save">Update</t:linksubmit>
>> >
>> >
>> >
>> > In java:
>> >
>> >
>> >
>> >
>> >
>> > public void onUpdate() {
>> >
>> >        actionType = SubmitAction.ADD;
>> >
>> > }
>> >
>> >
>> >
>> > Didn't work. Then I tried below:
>> >
>> >
>> >
>> > @OnEvent(value="addField")
>> >
>> > public void onUpdate() {
>> >
>> >        actionType = SubmitAction.ADD;
>> >
>> > }
>> >
>> >
>> >
>> > No luck.
>> >
>> >
>> >
>> >
>> >
>> > Can anybody show me how to use LinkSubmit? Thanks a lot!
>> >
>> >
>> >
>> > Henry
>> >
>> >
>> >
>> >
>> >
>> >
>> 
>> 
>> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/-T5--LinkSumit-no-event-captured-tp20692153p23220211.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


RE: [T5] LinkSumit no event captured

Posted by Henry Chen <he...@gmail.com>.
I just created one.

https://issues.apache.org/jira/browse/TAP5-389



-----Original Message-----
From: Martijn Brinkers [mailto:martijn.list@gmail.com] 
Sent: Friday, November 28, 2008 8:30 AM
To: henry.chen04@gmail.com
Cc: 'Howard Lewis Ship'; 'Tapestry users'
Subject: RE: [T5] LinkSumit no event captured

Did you file a JIRA entry for this? It seems I experience the same
problem (form with Zone and no event from the LinkSubmit)

Martijn

On Wed, 2008-11-26 at 20:03 -0600, Henry Chen wrote:
> I figured it out. If Form component specifies a 'zone' parameter, the
> following part in linksubmit.js is not doing expected behavior. 
> 
> if (onsubmit == undefined || onsubmit.call(window.document, event))
>  {
>  this.createHidden();
>  this.form.submit();
>  }
> 
> createHidden() is not called so no hidden field is thus inserted. Removing
> 'zone' from Form component fixed this immediately. I think this is a bug.
> 
> -----Original Message-----
> From: Howard Lewis Ship [mailto:hlship@gmail.com] 
> Sent: Tuesday, November 25, 2008 7:01 PM
> To: Tapestry users; henry.chen04@gmail.com
> Subject: Re: [T5] LinkSumit no event captured
> 
> That should work; what release are you on?
> 
> On Tue, Nov 25, 2008 at 3:52 PM, Henry Chen <he...@gmail.com>
wrote:
> > Hi,
> >
> >
> >
> > I tried the following without any luck.
> >
> >
> >
> > In my .tml:
> >
> >
> >
> > <t:linksubmit t:event="update" class="save">Update</t:linksubmit>
> >
> >
> >
> > In java:
> >
> >
> >
> >
> >
> > public void onUpdate() {
> >
> >        actionType = SubmitAction.ADD;
> >
> > }
> >
> >
> >
> > Didn't work. Then I tried below:
> >
> >
> >
> > @OnEvent(value="addField")
> >
> > public void onUpdate() {
> >
> >        actionType = SubmitAction.ADD;
> >
> > }
> >
> >
> >
> > No luck.
> >
> >
> >
> >
> >
> > Can anybody show me how to use LinkSubmit? Thanks a lot!
> >
> >
> >
> > Henry
> >
> >
> >
> >
> >
> >
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


RE: [T5] LinkSumit no event captured

Posted by Martijn Brinkers <ma...@gmail.com>.
Did you file a JIRA entry for this? It seems I experience the same
problem (form with Zone and no event from the LinkSubmit)

Martijn

On Wed, 2008-11-26 at 20:03 -0600, Henry Chen wrote:
> I figured it out. If Form component specifies a 'zone' parameter, the
> following part in linksubmit.js is not doing expected behavior. 
> 
> if (onsubmit == undefined || onsubmit.call(window.document, event))
>  {
>  this.createHidden();
>  this.form.submit();
>  }
> 
> createHidden() is not called so no hidden field is thus inserted. Removing
> 'zone' from Form component fixed this immediately. I think this is a bug.
> 
> -----Original Message-----
> From: Howard Lewis Ship [mailto:hlship@gmail.com] 
> Sent: Tuesday, November 25, 2008 7:01 PM
> To: Tapestry users; henry.chen04@gmail.com
> Subject: Re: [T5] LinkSumit no event captured
> 
> That should work; what release are you on?
> 
> On Tue, Nov 25, 2008 at 3:52 PM, Henry Chen <he...@gmail.com> wrote:
> > Hi,
> >
> >
> >
> > I tried the following without any luck.
> >
> >
> >
> > In my .tml:
> >
> >
> >
> > <t:linksubmit t:event="update" class="save">Update</t:linksubmit>
> >
> >
> >
> > In java:
> >
> >
> >
> >
> >
> > public void onUpdate() {
> >
> >        actionType = SubmitAction.ADD;
> >
> > }
> >
> >
> >
> > Didn't work. Then I tried below:
> >
> >
> >
> > @OnEvent(value="addField")
> >
> > public void onUpdate() {
> >
> >        actionType = SubmitAction.ADD;
> >
> > }
> >
> >
> >
> > No luck.
> >
> >
> >
> >
> >
> > Can anybody show me how to use LinkSubmit? Thanks a lot!
> >
> >
> >
> > Henry
> >
> >
> >
> >
> >
> >
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


RE: [T5] LinkSumit no event captured

Posted by Henry Chen <he...@gmail.com>.
I figured it out. If Form component specifies a 'zone' parameter, the
following part in linksubmit.js is not doing expected behavior. 

if (onsubmit == undefined || onsubmit.call(window.document, event))
 {
 this.createHidden();
 this.form.submit();
 }

createHidden() is not called so no hidden field is thus inserted. Removing
'zone' from Form component fixed this immediately. I think this is a bug.

-----Original Message-----
From: Howard Lewis Ship [mailto:hlship@gmail.com] 
Sent: Tuesday, November 25, 2008 7:01 PM
To: Tapestry users; henry.chen04@gmail.com
Subject: Re: [T5] LinkSumit no event captured

That should work; what release are you on?

On Tue, Nov 25, 2008 at 3:52 PM, Henry Chen <he...@gmail.com> wrote:
> Hi,
>
>
>
> I tried the following without any luck.
>
>
>
> In my .tml:
>
>
>
> <t:linksubmit t:event="update" class="save">Update</t:linksubmit>
>
>
>
> In java:
>
>
>
>
>
> public void onUpdate() {
>
>        actionType = SubmitAction.ADD;
>
> }
>
>
>
> Didn't work. Then I tried below:
>
>
>
> @OnEvent(value="addField")
>
> public void onUpdate() {
>
>        actionType = SubmitAction.ADD;
>
> }
>
>
>
> No luck.
>
>
>
>
>
> Can anybody show me how to use LinkSubmit? Thanks a lot!
>
>
>
> Henry
>
>
>
>
>
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: [T5] LinkSumit no event captured

Posted by Howard Lewis Ship <hl...@gmail.com>.
That should work; what release are you on?

On Tue, Nov 25, 2008 at 3:52 PM, Henry Chen <he...@gmail.com> wrote:
> Hi,
>
>
>
> I tried the following without any luck.
>
>
>
> In my .tml:
>
>
>
> <t:linksubmit t:event="update" class="save">Update</t:linksubmit>
>
>
>
> In java:
>
>
>
>
>
> public void onUpdate() {
>
>        actionType = SubmitAction.ADD;
>
> }
>
>
>
> Didn't work. Then I tried below:
>
>
>
> @OnEvent(value="addField")
>
> public void onUpdate() {
>
>        actionType = SubmitAction.ADD;
>
> }
>
>
>
> No luck.
>
>
>
>
>
> Can anybody show me how to use LinkSubmit? Thanks a lot!
>
>
>
> Henry
>
>
>
>
>
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org