Re: T5: mixing select component onchange="this.form.submit()" and zone component
Ok. Now I found solurtion. for onSelect we can use tapestry5 components. Now my trouble with zone and block component Test5:tml: http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";> Ajax test fun dynamic block! ${color} : Content before update function onSelectCompleteFunction(response) { $('zoneToUpdate').update(response); } Test5.java: package org.stml.stmljms.pages.operators; import java.util.Date; import org.apache.tapestry.Block; import org.apache.tapestry.StreamResponse; import org.apache.tapestry.annotations.OnEvent; import org.apache.tapestry.annotations.Property; import org.apache.tapestry.corelib.components.Zone; import org.apache.tapestry.ioc.annotations.Inject; import org.apache.tapestry.util.TextStreamResponse; import org.stml.stmljms.forms.ORegisterEquipmentForm; import org.stml.stmljms.services.OrderService; public class Test5 { @Inject private OrderService orderService; @Property private String color; private ORegisterEquipmentForm oRegisterEquipmentForm; @Inject private Block dynamicBlock; public String getColor() { return color; } public void setColor(String color) { System.out.println("xxx asd"); this.color = color; } public ORegisterEquipmentForm getORegisterEquipmentForm() { return oRegisterEquipmentForm; } public void setORegisterEquipmentForm( ORegisterEquipmentForm registerEquipmentForm) { oRegisterEquipmentForm = registerEquipmentForm; } @OnEvent(component = "color", value = "change") public Block onChange() { System.out.println("it works"); return dynamicBlock; //return new TextStreamResponse("text/html", new Date().toString()); } /* @OnEvent(component = "playerForm", value = "success") private Block successFromTheForm() { System.out.println("sitas irgi veikia"); return dynamicBlock; } */ /* * @OnEvent(value = "submit") public Object save() { // * (oRegisterEquipmentForm.getDateTo()-oRegisterEquipmentForm.getDateFrom()) * orderService.setOrder(oRegisterEquipmentForm); return "operators/Start"; } */ } I got view with java script debug. Anyone could help me? Btw. Data component in block doesn't work.:( http://www.nabble.com/file/p16522871/Screenshot.png Screenshot.png -- View this message in context: http://www.nabble.com/T5%3A-mixing-select-component-onchange%3D%22this.form.submit%28%29%22-and-zone-component-tp16516982p16522871.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: mixing select component onchange="this.form.submit()" and zone component
Thanks, I removed Now submit works but I'm getting error: org.apache.tapestry.runtime.ComponentEventException A component event handler method returned the value [EMAIL PROTECTED] Return type org.apache.tapestry.internal.structure.BlockImpl can not be handled. Configured return types are java.lang.Class, java.lang.String, java.net.URL, org.apache.tapestry.Link, org.apache.tapestry.StreamResponse, org.apache.tapestry.runtime.Component. -- View this message in context: http://www.nabble.com/T5%3A-mixing-select-component-onchange%3D%22this.form.submit%28%29%22-and-zone-component-tp16516982p16521656.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: mixing select component onchange="this.form.submit()" and zone component
The cause of 'this.form.submit is not a function' is explained at the following link. http://www.webprodevelopment.com/BrightLight/2006/05/04/thisformsubmit-is-not-a-function-really-its-an-object/ (Just google the error message, you will find lots of related links.) Shing --- ice96 <[EMAIL PROTECTED]> wrote: > > Hello, > I have problem. I want to do same action as on click > submit button. > source: > > Test3.tml > > xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";> > > Ajax test > > > > > > fun dynamic block! > ${color} > > > > > t:zone="zoneToUpdate"> > : > model="literal:Red,Green,Blue" > onchange="this.form.submit()" /> > > > > > Content before update > > > > > > > Test3.java: > package org.stml.stmljms.pages.operators; > > import java.util.Date; > > import org.apache.tapestry.Block; > import org.apache.tapestry.annotations.OnEvent; > import org.apache.tapestry.annotations.Property; > import org.apache.tapestry.ioc.annotations.Inject; > > public class Test3 { > private String color; > @Inject > private Block dynamicBlock; > > public String getColor() { > return color; > } > > > > public void setColor(String color) { > System.out.println("xxx asd"); > this.color = color; > } > > @OnEvent(component = "playerForm", value = > "success") > private Block successFromTheForm() { > System.out.println("xxx bsd"); > return dynamicBlock; > } > > } > > > FireBug says for me "this.form.submit is not a > function" > > Could anyone help me? > -- > View this message in context: > http://www.nabble.com/T5%3A-mixing-select-component-onchange%3D%22this.form.submit%28%29%22-and-zone-component-tp16516982p16516982.html > Sent from the Tapestry - User mailing list archive > at Nabble.com. > > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > Home page : http://www.lombok.demon.co.uk/ ___ Yahoo! For Good helps you make a difference http://uk.promotions.yahoo.com/forgood/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
T5: mixing select component onchange="this.form.submit()" and zone component
Hello, I have problem. I want to do same action as on click submit button. source: Test3.tml http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";> Ajax test fun dynamic block! ${color} : Content before update Test3.java: package org.stml.stmljms.pages.operators; import java.util.Date; import org.apache.tapestry.Block; import org.apache.tapestry.annotations.OnEvent; import org.apache.tapestry.annotations.Property; import org.apache.tapestry.ioc.annotations.Inject; public class Test3 { private String color; @Inject private Block dynamicBlock; public String getColor() { return color; } public void setColor(String color) { System.out.println("xxx asd"); this.color = color; } @OnEvent(component = "playerForm", value = "success") private Block successFromTheForm() { System.out.println("xxx bsd"); return dynamicBlock; } } FireBug says for me "this.form.submit is not a function" Could anyone help me? -- View this message in context: http://www.nabble.com/T5%3A-mixing-select-component-onchange%3D%22this.form.submit%28%29%22-and-zone-component-tp16516982p16516982.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]