[5.4-beta-6] Passing a loop's index as a context to an enclosed submit button

2014-08-02 Thread Muhammad Gelbana
In a page, I loop over a list of objects. In the page's template I specify an index parameter to track the loop like this: In the page there is a property with the name "*elementIndex*". @Property > private int *elementIndex*; The event handler for the submit button click is @OnEvent(comp

Re: [5.4-beta-6] Passing a loop's index as a context to an enclosed submit button

2014-08-02 Thread Lance Java
Form supports a "context" parameter which will be passed to the form events eg: onSubmit(Foo context)

Re: [5.4-beta-6] Passing a loop's index as a context to an enclosed submit button

2014-08-02 Thread Muhammad Gelbana
​Yea ! I read it but I still implemented it wrong. I'm now using it correctly. Thanks.​ *-* *Muhammad Gelbana* http://www.linkedin.com/in/mgelbana On Sat, Aug 2, 2014 at 9:40 PM, Lance Java wrote: > Form supports a "context" parameter which will be passed to the form events

Simpler Hello World

2014-08-02 Thread Net Dawg
Here is the simplest Hello World, according to jump start: http://jumpstart.doublenegative.com.au/jumpstart/helloworld I would like to do something simpler.  No html, body tags etc, just pure streaming content.  Comlpletely do away with templates and components, just use the page class to stre

Re: Simpler Hello World

2014-08-02 Thread Eugen
Hi, if You don't like to use the template (.tml) files the entire job is to be done in page class using the MarkupWriter, a simple example: public class Home{ void beginRender(MarkupWriter writer) { writer.element("html"); writer.write("test"); writer.end(); } } thi

Re: Simpler Hello World

2014-08-02 Thread Net Dawg
Thanks, Eugen, for taking the time for below.  However, that does not meet requirement.  Specifically, I am *NOT* wanting to write any HTML or tags, just stream simple text content to the browser.  In this case, just two words exactly as "Hello World".   No begin, end html tags (template would b

Re: Simpler Hello World

2014-08-02 Thread Net Dawg
Believe the answer can be derived from following wiki: http://wiki.apache.org/tapestry/Tapestry5HowToStreamAnExistingBinaryFile use the contentType = "text/plain".  I already had the "Hello World" streaming working in another page (in response to a button click/form submit as per above wiki)