RE: New to tapestry- please help

2012-12-06 Thread Athneria, Mahendra
http://jumpstart.doublenegative.com.au/jumpstart/

Enjoy :-)

-Original Message-
From: Emmanuel Sowah [mailto:eso...@gmail.com] 
Sent: Thursday, December 06, 2012 7:34 PM
To: users@tapestry.apache.org
Subject: New to tapestry- please help

Hi guys,

I'm new to tapestry. Could someone please point me to some simple to follow
tutorials to get me up and running quickly?

Thanks,
Emmanuel

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



Re: New to tapestry- please help

2012-12-06 Thread Joachim Van der Auwera

Or get the book
http://www.tapestry5book.com/


On 06-12-12 15:04, Emmanuel Sowah wrote:

Hi guys,

I'm new to tapestry. Could someone please point me to some simple to follow
tutorials to get me up and running quickly?

Thanks,
Emmanuel




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



Re: New to tapestry- please help

2012-12-06 Thread Michael Prescott
http://tapestry.apache.org/getting-started.html


On 6 December 2012 09:04, Emmanuel Sowah  wrote:

> Hi guys,
>
> I'm new to tapestry. Could someone please point me to some simple to follow
> tutorials to get me up and running quickly?
>
> Thanks,
> Emmanuel
>


Re: New to Tapestry, problem with EditBlock.

2011-08-24 Thread Edwin
Added @Persist works.

Thanks Steve!

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/New-to-Tapestry-problem-with-EditBlock-tp4727269p4730354.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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



Re: New to Tapestry, problem with EditBlock.

2011-08-24 Thread Steve Eynon
Hi,

I'm thinking you need to either

a) have an onPassivate() page method

String onPassivate() { return job.getName(); }

or

b) persist your job

@Persist
@Property
private ScheduledJob job;

For I'm guessing your Job doesn't exist  in the action / event phase
when you submit.

Steve.
--
Steve Eynon
mobie: 0750 424 5743



On 24 August 2011 18:51, Edwin  wrote:
> I posted most of the related code in the first post, if you could take a
> look; would be most helpful.
>
>
>
> On 23 August 2011 18:11, Thiago H. de Paula Figueiredo [via Tapestry] <
> ml-node+4727697-2096551977-244...@n5.nabble.com> wrote:
>
>> On Tue, 23 Aug 2011 13:50:39 -0300, Vignir Jónsson <[hidden 
>> email]>
>>
>> wrote:
>>
>> > Hello,
>>
>> Hello!
>>
>> > Thanks for lending a hand.
>>
>> :)
>>
>> > Why would the Authentication property be null? It is not null on the
>> > actual Edit page.
>>
>> Without code it's almost impossible to say. I'd guess you're only setting
>>
>> the property during page render, not in the form submission request, and
>> they're different requests, as Tapestry uses redirect-after-post by
>> default.
>>
>> --
>> Thiago H. de Paula Figueiredo
>> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
>> and instructor
>> Owner, Ars Machina Tecnologia da Informação Ltda.
>> http://www.arsmachina.com.br
>>
>> -
>> To unsubscribe, e-mail: [hidden 
>> email]
>> For additional commands, e-mail: [hidden 
>> email]
>>
>>
>>
>> --
>>  If you reply to this email, your message will be added to the discussion
>> below:
>>
>> http://tapestry.1045711.n5.nabble.com/New-to-Tapestry-problem-with-EditBlock-tp4727269p4727697.html
>>  To unsubscribe from New to Tapestry, problem with EditBlock., click 
>> here.
>>
>>
>
>
>
> --
> Kveðja,
> Vignir Jónsson
>
>
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/New-to-Tapestry-problem-with-EditBlock-tp4727269p4730019.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.

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



Re: New to Tapestry, problem with EditBlock.

2011-08-24 Thread Edwin
I posted most of the related code in the first post, if you could take a
look; would be most helpful.



On 23 August 2011 18:11, Thiago H. de Paula Figueiredo [via Tapestry] <
ml-node+4727697-2096551977-244...@n5.nabble.com> wrote:

> On Tue, 23 Aug 2011 13:50:39 -0300, Vignir Jónsson <[hidden 
> email]>
>
> wrote:
>
> > Hello,
>
> Hello!
>
> > Thanks for lending a hand.
>
> :)
>
> > Why would the Authentication property be null? It is not null on the
> > actual Edit page.
>
> Without code it's almost impossible to say. I'd guess you're only setting
>
> the property during page render, not in the form submission request, and
> they're different requests, as Tapestry uses redirect-after-post by
> default.
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
> and instructor
> Owner, Ars Machina Tecnologia da Informação Ltda.
> http://www.arsmachina.com.br
>
> -
> To unsubscribe, e-mail: [hidden 
> email]
> For additional commands, e-mail: [hidden 
> email]
>
>
>
> --
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://tapestry.1045711.n5.nabble.com/New-to-Tapestry-problem-with-EditBlock-tp4727269p4727697.html
>  To unsubscribe from New to Tapestry, problem with EditBlock., click 
> here.
>
>



-- 
Kveðja,
Vignir Jónsson


--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/New-to-Tapestry-problem-with-EditBlock-tp4727269p4730019.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

Re: New to Tapestry, problem with EditBlock.

2011-08-23 Thread Thiago H. de Paula Figueiredo
On Tue, 23 Aug 2011 13:50:39 -0300, Vignir Jónsson   
wrote:



Hello,


Hello!


Thanks for lending a hand.


:)

Why would the Authentication property be null? It is not null on the  
actual Edit page.


Without code it's almost impossible to say. I'd guess you're only setting  
the property during page render, not in the form submission request, and  
they're different requests, as Tapestry uses redirect-after-post by  
default.


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

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



Re: New to Tapestry, problem with EditBlock.

2011-08-23 Thread Edwin
Job class was supposed to be:

@Entity 
public class Job { 

private Authentication authentication; 

... 

} 

in the name of simplifying things.

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/New-to-Tapestry-problem-with-EditBlock-tp4727269p4727273.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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



Re: New to Tapestry- Lots of questions sorry!

2009-03-21 Thread Thiago H. de Paula Figueiredo
Em Sat, 21 Mar 2009 04:06:13 -0300, Amit Nithian   
escreveu:



Also can you explain what this does?
 @Parameter(required=true)
 private String ccNumber


This is used to declare a component parameter, not being used in pages.

--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

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



Re: New to Tapestry- Lots of questions sorry!

2009-03-21 Thread Robert Zeigler

Nah, you wouldn't need that.  You can do things like:

.tml:
...

.java:
public String getTransactionClass() {
  switch(transactionType) {
 case ACCEPTED: return "validtransaction";
 case DECLINED: return "declinedtransaction";
 default: return "";
}

And so forth.

You can also do things like choose specific pieces to render via  
"t:block" and the "delegate" component:





  ... stuff in here



  ... other stuff in here


.java:

@Inject
private ComponentResources resources;
public Block getTransactionBlock() {
switch(transactionType) {
case ACCEPTED: return  
resources.getBlock("acceptedTransactionBlock");

default: return resources.getBlock("declinedTransactionBlock");
}
}


All of this is to say that there are many ways to make your displayed  
content highly dynamic, all while keeping the structure of the page  
static.


Robert

On Mar 21, 2009, at 3/212:06 AM , Amit Nithian wrote:

Thanks both for your answers! They were helpful. I guess my angle  
was more

from an older ASP web application paradigm or even old style PHP which
didn't have much distinction with models, views, and controllers. My  
only
question/complaint about the jumping back and forth between the  
template and
Page class is what do you do when you want to do different things  
based on
something like an enum instead of simply a boolean? Would you have  
to have
multiple boolean functions one for each possible enum value that you  
wish to

test?
For example, if I have (using a credit card theme here) an enum for a
transaction status with values of DECLINED and ACCEPTED, if I want to
display ACCEPTED in green and DECLINED in red, would I have to have  
two
functions isDeclined and isAccepted and do an t:if to control red  
and green
display? Sometimes here, I feel, is where having scripting  
capability helps
in the display of the page to prevent a page class with a ton of  
simple

getter methods.

Also can you explain what this does?
 @Parameter(required=true)
  private String ccNumber

Thanks again and I'm excited to continue using Tapestry!

- Amit


On Fri, Mar 20, 2009 at 6:10 AM, Christian Edward Gruber <
christianedwardgru...@gmail.com> wrote:

Thiago, I think he's misunderstanding the point of Tapestry.  You  
never do
scripting in the views.  In fact, you never do scripting.   
Scripting (in web
templates) mixes display layout and display flow with business  
logic, data
flow, and user workflow.  They're all mixed up together.  Anyone  
used to
that will have a hard time seeing how to accomplish the same  
features in
their application without access to any ability to embed scripted  
code into

the view.

Amit, you need to re-think your orientation when using something like
Tapestry.  All of your code is in controllers, with the exception  
of some

display layout flows like loops, conditionals, and such.  There are
components for these, but unlike JSP tags, they do not "unwind"  
into code,
they are components and all the pages are composed, with a  
rendering engine
that asks components to render themselves or their templates, and  
their
child components, who are in turn asked to render.  It's a very  
different

paradigm.

In practice though, if you're thinking of having a lot of logic you  
would
imagine going into scriptlets or the like, factor that code into  
methods
which return the displayable result.  For instance (this code is  
made up on

the spot):

<%
  CreditCard cc =
myDao.getCreditCardByNumber(request.getProperty("ccNumber"));
%>
<%=cc.getType().getName()%> card
Card <%=cc.getNumber()%> has the following purchases today:
DateVendorAmountPosted?th>

<%
  List txns =
myDao.getTransactionsForCC(cc.getNumber());
  for (CCTransaction txn: txns) { %>
  
  <%=MyUtil.format(txn.getDate())%>
  <%=txn.getVendor()%>
  <%=MyUtil.formatCurrency(txn.getAmount(),"USD") 
%>

  <%=txn.isPosted()%>
  
<%  }  %>


The above is pretty ugly JSP code, and even with Struts or other  
web MVC
frameworks that use JSPs as a base, it can be that ugly.  Tapestry  
goes a

different way. (this code was also cooked up at 8am after a red-eye
flight... it is uncompiled, let alone untested.  Don't cut-and- 
paste it.
This example uses credit card, but doesn't authenticate and is  
massively

insecure.  It's only paying attention to a certain aspect of things.)

MyPage.java
...
public class MyPage {

  @Inject
  private MyDao myDao;

  @Property
  private CCTransaction currentTransaction;

  @Parameter(required=true)
  private String ccNumber;

  @Property
  private CreditCard creditCard;

  @SetupRender
  public void init() {
  //do validation stuff...
  creditCard = myDao.getCreditCardByNumber(ccNumber);
  }

  public List getTransactions() {

  }

}

MyPage.tml
http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
.
${creditCard.type

Re: New to Tapestry- Lots of questions sorry!

2009-03-21 Thread Amit Nithian
Thanks both for your answers! They were helpful. I guess my angle was more
from an older ASP web application paradigm or even old style PHP which
didn't have much distinction with models, views, and controllers. My only
question/complaint about the jumping back and forth between the template and
Page class is what do you do when you want to do different things based on
something like an enum instead of simply a boolean? Would you have to have
multiple boolean functions one for each possible enum value that you wish to
test?
For example, if I have (using a credit card theme here) an enum for a
transaction status with values of DECLINED and ACCEPTED, if I want to
display ACCEPTED in green and DECLINED in red, would I have to have two
functions isDeclined and isAccepted and do an t:if to control red and green
display? Sometimes here, I feel, is where having scripting capability helps
in the display of the page to prevent a page class with a ton of simple
getter methods.

Also can you explain what this does?
  @Parameter(required=true)
   private String ccNumber

Thanks again and I'm excited to continue using Tapestry!

- Amit


On Fri, Mar 20, 2009 at 6:10 AM, Christian Edward Gruber <
christianedwardgru...@gmail.com> wrote:

> Thiago, I think he's misunderstanding the point of Tapestry.  You never do
> scripting in the views.  In fact, you never do scripting.  Scripting (in web
> templates) mixes display layout and display flow with business logic, data
> flow, and user workflow.  They're all mixed up together.  Anyone used to
> that will have a hard time seeing how to accomplish the same features in
> their application without access to any ability to embed scripted code into
> the view.
>
> Amit, you need to re-think your orientation when using something like
> Tapestry.  All of your code is in controllers, with the exception of some
> display layout flows like loops, conditionals, and such.  There are
> components for these, but unlike JSP tags, they do not "unwind" into code,
> they are components and all the pages are composed, with a rendering engine
> that asks components to render themselves or their templates, and their
> child components, who are in turn asked to render.  It's a very different
> paradigm.
>
> In practice though, if you're thinking of having a lot of logic you would
> imagine going into scriptlets or the like, factor that code into methods
> which return the displayable result.  For instance (this code is made up on
> the spot):
>
> <%
>CreditCard cc =
> myDao.getCreditCardByNumber(request.getProperty("ccNumber"));
> %>
> <%=cc.getType().getName()%> card
> Card <%=cc.getNumber()%> has the following purchases today:
> DateVendorAmountPosted?
> <%
>List txns =
> myDao.getTransactionsForCC(cc.getNumber());
>for (CCTransaction txn: txns) { %>
>
><%=MyUtil.format(txn.getDate())%>
><%=txn.getVendor()%>
><%=MyUtil.formatCurrency(txn.getAmount(),"USD")%>
><%=txn.isPosted()%>
>
> <%  }  %>
>
>
> The above is pretty ugly JSP code, and even with Struts or other web MVC
> frameworks that use JSPs as a base, it can be that ugly.  Tapestry goes a
> different way. (this code was also cooked up at 8am after a red-eye
> flight... it is uncompiled, let alone untested.  Don't cut-and-paste it.
>  This example uses credit card, but doesn't authenticate and is massively
> insecure.  It's only paying attention to a certain aspect of things.)
>
> MyPage.java
> ...
> public class MyPage {
>
>@Inject
>private MyDao myDao;
>
>@Property
>private CCTransaction currentTransaction;
>
>@Parameter(required=true)
>private String ccNumber;
>
>@Property
>private CreditCard creditCard;
>
>@SetupRender
>public void init() {
>//do validation stuff...
>creditCard = myDao.getCreditCardByNumber(ccNumber);
>}
>
>public List getTransactions() {
>
>}
>
> }
>
> MyPage.tml
> http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
> .
> ${creditCard.type} card
> Card ${creditCard.number} has the following purchases today:
>
> 
>DateVendorAmountPosted?
>
> t:value="currentTransaction.date"/>
>${currentTransaction.getVendor}
>USD ${currentTransaction.amount}>
>${currentTransaction.isPosted}
>
> 
>
> The display logic and flow control is in the template, but no actual data
> lookups or business calculations.  I don't know if it helps, but hopefully
> it gives you a taste of how things are different.
>
> On this note, it might be good to have some side-by-side mini-examples
> which show how someone would do something in vanilla JSP, in Struts, in JSF,
> and in Tapestry so people can make the mental leap.  Annoying to build, I
> know, but potentially highly useful.
>
> regards,
> Christian.
>
>
>

Re: New to Tapestry- Lots of questions sorry!

2009-03-20 Thread Christian Edward Gruber
Thiago, I think he's misunderstanding the point of Tapestry.  You  
never do scripting in the views.  In fact, you never do scripting.   
Scripting (in web templates) mixes display layout and display flow  
with business logic, data flow, and user workflow.  They're all mixed  
up together.  Anyone used to that will have a hard time seeing how to  
accomplish the same features in their application without access to  
any ability to embed scripted code into the view.


Amit, you need to re-think your orientation when using something like  
Tapestry.  All of your code is in controllers, with the exception of  
some display layout flows like loops, conditionals, and such.  There  
are components for these, but unlike JSP tags, they do not "unwind"  
into code, they are components and all the pages are composed, with a  
rendering engine that asks components to render themselves or their  
templates, and their child components, who are in turn asked to  
render.  It's a very different paradigm.


In practice though, if you're thinking of having a lot of logic you  
would imagine going into scriptlets or the like, factor that code into  
methods which return the displayable result.  For instance (this code  
is made up on the spot):


<%
	CreditCard cc =  
myDao.getCreditCardByNumber(request.getProperty("ccNumber"));	

%>
<%=cc.getType().getName()%> card
Card <%=cc.getNumber()%> has the following purchases today:
DateVendorAmountPosted?th>

<%
List txns = myDao.getTransactionsForCC(cc.getNumber());
for (CCTransaction txn: txns) { %>

<%=MyUtil.format(txn.getDate())%>
<%=txn.getVendor()%>
<%=MyUtil.formatCurrency(txn.getAmount(),"USD")%>
<%=txn.isPosted()%>

<%   }  %>


The above is pretty ugly JSP code, and even with Struts or other web  
MVC frameworks that use JSPs as a base, it can be that ugly.  Tapestry  
goes a different way. (this code was also cooked up at 8am after a red- 
eye flight... it is uncompiled, let alone untested.  Don't cut-and- 
paste it.  This example uses credit card, but doesn't authenticate and  
is massively insecure.  It's only paying attention to a certain aspect  
of things.)


MyPage.java
...
public class MyPage {

@Inject
private MyDao myDao;

@Property
private CCTransaction currentTransaction;

@Parameter(required=true)
private String ccNumber;

@Property
private CreditCard creditCard;

@SetupRender
public void init() {
//do validation stuff...
creditCard = myDao.getCreditCardByNumber(ccNumber);
}

public List getTransactions() {

}

}

MyPage.tml
http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
.
${creditCard.type} card
Card ${creditCard.number} has the following purchases today:


DateVendorAmountPosted?

		t:value="currentTransaction.date"/>

${currentTransaction.getVendor}
USD ${currentTransaction.amount}>
${currentTransaction.isPosted}



The display logic and flow control is in the template, but no actual  
data lookups or business calculations.  I don't know if it helps, but  
hopefully it gives you a taste of how things are different.


On this note, it might be good to have some side-by-side mini-examples  
which show how someone would do something in vanilla JSP, in Struts,  
in JSF, and in Tapestry so people can make the mental leap.  Annoying  
to build, I know, but potentially highly useful.


regards,
Christian.


On 20-Mar-09, at 08:07 , Thiago H. de Paula Figueiredo wrote:

On Fri, Mar 20, 2009 at 1:53 AM, Amit Nithian   
wrote:
1) With Tapestry, I understand the Controller is effectively the  
Page and

Components with the View being the template files. I haven't seen any
examples of complex "scripting" in the templates where you can  
build complex

views.


Please give us an example. Your description is a vague enough for me
to not understand what you're talking about.


How do people build nice looking, complex front ends with Tapestry
backends?


Again, I don't know exactly what you're talking about. Anything you
can do with HTML, CSS and JavaScript you can do with Tapestry.
Tapestry deals with the server side of things, but also helps with
some JavaScript issues, specially AJAX.

--
Thiago

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



Christian Edward Gruber
e-mail: christianedwardgru...@gmail.com
weblog: http://www.geekinasuit.com/


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



Re: New to Tapestry- Lots of questions sorry!

2009-03-20 Thread Thiago H. de Paula Figueiredo
On Fri, Mar 20, 2009 at 1:53 AM, Amit Nithian  wrote:
> 1) With Tapestry, I understand the Controller is effectively the Page and
> Components with the View being the template files. I haven't seen any
> examples of complex "scripting" in the templates where you can build complex
> views.

Please give us an example. Your description is a vague enough for me
to not understand what you're talking about.

> How do people build nice looking, complex front ends with Tapestry
> backends?

Again, I don't know exactly what you're talking about. Anything you
can do with HTML, CSS and JavaScript you can do with Tapestry.
Tapestry deals with the server side of things, but also helps with
some JavaScript issues, specially AJAX.

-- 
Thiago

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



Re: New to Tapestry- Lots of questions sorry!

2009-03-20 Thread Otho
Hi Amit,

1) For exmple:


  


  whatever

  


2) You can use whatever you want as long as you manage to pass the data to
tapestry and back. Look at the wiki
http://wiki.apache.org/tapestry/Tapestry5HowTos for examples about GWT for
example.

3) Tapestry is component oriented, while the others are mvc frameworks.
Pages in Tapestry are effectively not controllers in the MVC sense, but more
aggregators of components and services which in turn can consist of
components and services, which in turn... In Tapestry you build your own
building blocks or use predefined ones to assemble the functionality that
you want. If you do more complex things this differs quite much from the MVC
approach where controllers tend to get bloated (at least they do for me ;)
). Furthermore you have a completely different programming model thanks to
the annotation driven approach and the Tapestry IOC which makes many things
just so much simpler. RoR I cannot say much about, since I don't program in
Ruby. Grails is certanly a nice choice for applications which have only one
database, but it is somewhat more difficult to debug thanks to the dynamic
nature of Groovy (no static typechecking can lead to interesting bugs very
easily). I guess the same goes for Ruby. What is better for you in certain
circumstances or for a specific jobs is nothing wich anyone here could
answer, though.

2009/3/20 Amit Nithian 

> Hi all,
> My apologies if my questions are ignorant or have been answered already, if
> so, a link to the answer is more than satisfactory for the question.
> Basically, I am interested in learning one of the many web frameworks and
> have narrowed to looking at Java frameworks since I don't have enough
> experience in PHP, Python or more recently Ruby (and Rails) and I am a Java
> developer. In looking online, I came across Tapestry and am using that now
> to write a simple web application for work and ultimately, I am interested
> in learning how to use Tapestry to write larger scale web applications.
>
> I understand the MVC pattern to some end as it applies to Ruby on Rails
> (and
> subsequently Grails). My questions are as follows;
> 1) With Tapestry, I understand the Controller is effectively the Page and
> Components with the View being the template files. I haven't seen any
> examples of complex "scripting" in the templates where you can build
> complex
> views. Is that by design or am I missing something? For example, I am using
> the GridLayout component and I added an extra "delete" column; however, I
> would like to only enable the "Delete" link inside this phony column only
> if
> some condition on the current bean is true. How would I go about that?
> 2) I saw some discussion regarding JQuery vs Prototype etc which is fine (
> I
> don't know either one well) but how does one go about writing complex UIs
> using Tapestry and template files? Do you use YUI components inside a
> ? How do people build nice looking, complex front ends with
> Tapestry
> backends?
> 3) What are the differences conceptually between Tapestry and Grails or
> Ruby
> on Rails, Spring MVC etc and why is Tapestry better?
>
> Thanks for reading and I am excited about using Tapestry!
> - Amit
>


Re: New to Tapestry

2007-07-10 Thread Nick Westgate

Yeah, you'd have to use Javascript to make a URL for an AJAX update etc.

If you append the string to the URL it will be an argument to the event
(or page activation) handler, but because of the escaping performed on
the server-side you may need to do 2 AJAX calls: one to get the page URL
with the escaped argument, and the other to get the page.

Howard's example shows how you get the URL for an event handler from which
you can return text for the update. You can use similar code if you want
to get a link to a page and pass an activation parameter.

See page activation/passivation:
http://tapestry.apache.org/tapestry5/tapestry-core/guide/pagenav.html

See createPageLink:
http://tapestry.apache.org/tapestry5/tapestry-core/apidocs/org/apache/tapestry/
ComponentResourcesCommon.html#createPageLink(java.lang.String,%20boolean,%20java.lang.Object...)

Then again, this might be a lot easier with T4. (Not my area.)

Cheers,
Nick.


Matt Coatney wrote:

Thanks for your response. Let me be more specific and try to describe my
question better. New to Tapestry so bear with...

I have a textbox and a button. The user types something and clicks Go. I
want to, somehow, pass the information in the textbox to a service which
looks at the string and sends another one back. My thinking was to use a
javascript function to do this. Is there a way to do that? Or Is there a
better way to accomplish this that I haven't been exposed to yet?

MAtt


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: New to Tapestry

2007-07-10 Thread Matt Coatney
Thanks for your response. Let me be more specific and try to describe my
question better. New to Tapestry so bear with...

I have a textbox and a button. The user types something and clicks Go. I
want to, somehow, pass the information in the textbox to a service which
looks at the string and sends another one back. My thinking was to use a
javascript function to do this. Is there a way to do that? Or Is there a
better way to accomplish this that I haven't been exposed to yet?

MAtt

-Original Message-
From: Howard Lewis Ship [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 09, 2007 10:10 AM
To: Tapestry users
Subject: Re: New to Tapestry

You don't make a link to a service, what you can do is create a link
to a component (including a pgae).

Here's an example, off the top of my head (with errors, etc.), for a
chart-like service:

HTML:



Java:

@Inject
private MyChartService _chartService;

@Inject
private ComponentResources _resources;

public Link getChartURL()
{
  Link link = _resources.createActionLink("chart", false);

  // Can add query parameters to link here.

  return link;
}

// Invoked in second request:
public StreamResponse onChart()
{
  // Do something with _chartService.
  // Return a StreamReponse wrapper around the gif/png/jpeg bytestream
from the service

  return ...;
}

Notice how we build a "chart" event request link, then the handler
method, onChart(), is invoked for us.

For JavaScript/Ajax; we'll generate a Link and convert it to a string,
include it in a block of generated JavaScript.  Check out the
PageRenderSupport interface:

http://tapestry.apache.org/tapestry5/tapestry-core/apidocs/org/apache/tapest
ry/PageRenderSupport.html

The StreamResponse may send back text, markup or binary that is
meaningful for the client-side JavaScript.

T5's Ajax support will include easy support for responding to a
request by sending a JSON response used to update portions of the
page.



On 7/9/07, Ben Acker <[EMAIL PROTECTED]> wrote:
> I think the main thing that Matt wants is to:
>
> a.) know how to get a link to a home-brewed service
>
> and
>
> b.) know how to access that from a javascript call.
>
> I don't know how to get the link to access the T5 service, but here's a
good
> link for a simple javascript call.
>
> http://www.w3schools.com/ajax/default.asp
>
>
>
> On 7/9/07, Davor Hrg <[EMAIL PROTECTED]> wrote:
> >
> > Please give some more detail on what you are trying to acheive.
> >
> > Ajax infrastructure is not yet defined(I thin so at least) for T5,
> > however, T5 already can do varios tasks very well, so do tell what are
you
> > trying to acheive.
> >
> > Davor Hrg
> >
> > On 7/6/07, Matt Coatney <[EMAIL PROTECTED]> wrote:
> > >
> > > Hello and thanks in advance!
> > >
> > >
> > >
> > > I'm new to Tapestry and working on a T5 project. I found a T4 tutorial
> > > that
> > > described something similar to what I need to achieve, only to realize
> > > that
> > > T5 does things differently. Can anyone provide a tutorial or example
> > that
> > > describes all or part of the following:
> > >
> > >
> > >
> > > I need to call a tapestry service from a Javascript function. The
> > service
> > > generates a page then updates the Src of an Iframe setting it to the
> > newly
> > > generated page.
> > >
> > >
> > > Thanks,
> > >
> > > Matt
> > >
> > >
> >
>


-- 
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: New to Tapestry

2007-07-09 Thread Davor Hrg

I've put such example on Tapestry5HowtosPage
http://wiki.apache.org/tapestry/Tapestry5HowToCreatePieChartsInAPage

Davor Hrg

On 7/9/07, Howard Lewis Ship <[EMAIL PROTECTED]> wrote:


You don't make a link to a service, what you can do is create a link
to a component (including a pgae).

Here's an example, off the top of my head (with errors, etc.), for a
chart-like service:

HTML:



Java:

@Inject
private MyChartService _chartService;

@Inject
private ComponentResources _resources;

public Link getChartURL()
{
  Link link = _resources.createActionLink("chart", false);

  // Can add query parameters to link here.

  return link;
}

// Invoked in second request:
public StreamResponse onChart()
{
  // Do something with _chartService.
  // Return a StreamReponse wrapper around the gif/png/jpeg bytestream
from the service

  return ...;
}

Notice how we build a "chart" event request link, then the handler
method, onChart(), is invoked for us.

For JavaScript/Ajax; we'll generate a Link and convert it to a string,
include it in a block of generated JavaScript.  Check out the
PageRenderSupport interface:


http://tapestry.apache.org/tapestry5/tapestry-core/apidocs/org/apache/tapestry/PageRenderSupport.html

The StreamResponse may send back text, markup or binary that is
meaningful for the client-side JavaScript.

T5's Ajax support will include easy support for responding to a
request by sending a JSON response used to update portions of the
page.



On 7/9/07, Ben Acker <[EMAIL PROTECTED]> wrote:
> I think the main thing that Matt wants is to:
>
> a.) know how to get a link to a home-brewed service
>
> and
>
> b.) know how to access that from a javascript call.
>
> I don't know how to get the link to access the T5 service, but here's a
good
> link for a simple javascript call.
>
> http://www.w3schools.com/ajax/default.asp
>
>
>
> On 7/9/07, Davor Hrg <[EMAIL PROTECTED]> wrote:
> >
> > Please give some more detail on what you are trying to acheive.
> >
> > Ajax infrastructure is not yet defined(I thin so at least) for T5,
> > however, T5 already can do varios tasks very well, so do tell what are
you
> > trying to acheive.
> >
> > Davor Hrg
> >
> > On 7/6/07, Matt Coatney <[EMAIL PROTECTED]> wrote:
> > >
> > > Hello and thanks in advance!
> > >
> > >
> > >
> > > I'm new to Tapestry and working on a T5 project. I found a T4
tutorial
> > > that
> > > described something similar to what I need to achieve, only to
realize
> > > that
> > > T5 does things differently. Can anyone provide a tutorial or example
> > that
> > > describes all or part of the following:
> > >
> > >
> > >
> > > I need to call a tapestry service from a Javascript function. The
> > service
> > > generates a page then updates the Src of an Iframe setting it to the
> > newly
> > > generated page.
> > >
> > >
> > > Thanks,
> > >
> > > Matt
> > >
> > >
> >
>


--
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: New to Tapestry

2007-07-09 Thread Howard Lewis Ship

You don't make a link to a service, what you can do is create a link
to a component (including a pgae).

Here's an example, off the top of my head (with errors, etc.), for a
chart-like service:

HTML:



Java:

@Inject
private MyChartService _chartService;

@Inject
private ComponentResources _resources;

public Link getChartURL()
{
 Link link = _resources.createActionLink("chart", false);

 // Can add query parameters to link here.

 return link;
}

// Invoked in second request:
public StreamResponse onChart()
{
 // Do something with _chartService.
 // Return a StreamReponse wrapper around the gif/png/jpeg bytestream
from the service

 return ...;
}

Notice how we build a "chart" event request link, then the handler
method, onChart(), is invoked for us.

For JavaScript/Ajax; we'll generate a Link and convert it to a string,
include it in a block of generated JavaScript.  Check out the
PageRenderSupport interface:

http://tapestry.apache.org/tapestry5/tapestry-core/apidocs/org/apache/tapestry/PageRenderSupport.html

The StreamResponse may send back text, markup or binary that is
meaningful for the client-side JavaScript.

T5's Ajax support will include easy support for responding to a
request by sending a JSON response used to update portions of the
page.



On 7/9/07, Ben Acker <[EMAIL PROTECTED]> wrote:

I think the main thing that Matt wants is to:

a.) know how to get a link to a home-brewed service

and

b.) know how to access that from a javascript call.

I don't know how to get the link to access the T5 service, but here's a good
link for a simple javascript call.

http://www.w3schools.com/ajax/default.asp



On 7/9/07, Davor Hrg <[EMAIL PROTECTED]> wrote:
>
> Please give some more detail on what you are trying to acheive.
>
> Ajax infrastructure is not yet defined(I thin so at least) for T5,
> however, T5 already can do varios tasks very well, so do tell what are you
> trying to acheive.
>
> Davor Hrg
>
> On 7/6/07, Matt Coatney <[EMAIL PROTECTED]> wrote:
> >
> > Hello and thanks in advance!
> >
> >
> >
> > I'm new to Tapestry and working on a T5 project. I found a T4 tutorial
> > that
> > described something similar to what I need to achieve, only to realize
> > that
> > T5 does things differently. Can anyone provide a tutorial or example
> that
> > describes all or part of the following:
> >
> >
> >
> > I need to call a tapestry service from a Javascript function. The
> service
> > generates a page then updates the Src of an Iframe setting it to the
> newly
> > generated page.
> >
> >
> > Thanks,
> >
> > Matt
> >
> >
>




--
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: New to Tapestry

2007-07-09 Thread Ben Acker

I think the main thing that Matt wants is to:

a.) know how to get a link to a home-brewed service

and

b.) know how to access that from a javascript call.

I don't know how to get the link to access the T5 service, but here's a good
link for a simple javascript call.

http://www.w3schools.com/ajax/default.asp



On 7/9/07, Davor Hrg <[EMAIL PROTECTED]> wrote:


Please give some more detail on what you are trying to acheive.

Ajax infrastructure is not yet defined(I thin so at least) for T5,
however, T5 already can do varios tasks very well, so do tell what are you
trying to acheive.

Davor Hrg

On 7/6/07, Matt Coatney <[EMAIL PROTECTED]> wrote:
>
> Hello and thanks in advance!
>
>
>
> I'm new to Tapestry and working on a T5 project. I found a T4 tutorial
> that
> described something similar to what I need to achieve, only to realize
> that
> T5 does things differently. Can anyone provide a tutorial or example
that
> describes all or part of the following:
>
>
>
> I need to call a tapestry service from a Javascript function. The
service
> generates a page then updates the Src of an Iframe setting it to the
newly
> generated page.
>
>
> Thanks,
>
> Matt
>
>



Re: New to Tapestry

2007-07-09 Thread Davor Hrg

Please give some more detail on what you are trying to acheive.

Ajax infrastructure is not yet defined(I thin so at least) for T5,
however, T5 already can do varios tasks very well, so do tell what are you
trying to acheive.

Davor Hrg

On 7/6/07, Matt Coatney <[EMAIL PROTECTED]> wrote:


Hello and thanks in advance!



I'm new to Tapestry and working on a T5 project. I found a T4 tutorial
that
described something similar to what I need to achieve, only to realize
that
T5 does things differently. Can anyone provide a tutorial or example that
describes all or part of the following:



I need to call a tapestry service from a Javascript function. The service
generates a page then updates the Src of an Iframe setting it to the newly
generated page.


Thanks,

Matt




Re: New to Tapestry

2007-02-26 Thread Howard Lewis Ship

Like T4, T5 is totally pluggable (maybe even more so).  So there will
be a tapestry-hibernate integration module that extends the framework
in a number of ways, including adding editors and viewers for
Hibernate relationships inside the BeanEditForm and Grid components.

It's possible that a more generic tapestry-jpa3 library will do the
job, or that one will be layered on the other.  I expect to start some
work along these lines sooner rather than later.

On 2/26/07, Robert Zeigler <[EMAIL PROTECTED]> wrote:


> Drop downs to other objects will come with the Hibernate integration
> (since we need a way to identify the other objects that can be linked
> to).
>


Does this mean that you're planning to integrate hibernate directly
into the framework, ala trails?
Or are you going for a broader JPA integration? I hope you're not
going to tie tap5 too tightly to hibernate, as there are those of us
who prefer other ORMs...

Robert

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: New to Tapestry

2007-02-26 Thread Robert Zeigler



Drop downs to other objects will come with the Hibernate integration
(since we need a way to identify the other objects that can be linked
to).




Does this mean that you're planning to integrate hibernate directly  
into the framework, ala trails?
Or are you going for a broader JPA integration? I hope you're not  
going to tie tap5 too tightly to hibernate, as there are those of us  
who prefer other ORMs...


Robert

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: New to Tapestry

2007-02-25 Thread Howard Lewis Ship

Stability is good but features are limited; it's still an alpha (or,
as I like to call it, a "preview") release stage.

Dates haven't been implemented untiil the JavaScript support is realized.

Drop downs to other objects will come with the Hibernate integration
(since we need a way to identify the other objects that can be linked
to).

The Trails project, for Tapestry 4, gives you an idea of the kind of
things that will be possible in Tapestry 5.

What's been going on so far is the creation of the best page and
component oriented framework available, and it's most of the way
there. The JavaScript stuff in on the second wave, but much of the
groundwork has been laid.

On 2/25/07, Leandro Saad <[EMAIL PROTECTED]> wrote:

Hi all.

I'm new to Tapestry and I've been watching the screencasts available. I
really like the class reloading feature. Congrats!
I'm considering using Tapestry for a new project, but I still have some
questions that need answer:

1) How mature is Tapestry 5?

2) Does the BeanEditForm handles Dates, DropDowns (references to other
objects) ? If not, what is the Tapestry way of doing this?

3) Where do I put business logic? I come from a Action based framework
background. I think you use the Page objects for that, is this correct?

4) Any Ajax integration goodies? In Guara we can execute the exact same
business logic, but return differents types on text (whole page, partial
page, javascript) which makes Ajax integration easier.

Cheers!

--
Leandro Rodrigo Saad Cruz
software developer - certified scrum master
:: scrum.com.br
:: db.apache.org/ojb
:: guara-framework.sf.net
:: xingu.sf.net




--
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]