You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Jessica Sobieski <je...@gmail.com> on 2007/06/04 18:56:05 UTC

T5: how to control form display

Hi,

What is the proper (and easiest) way to controlling <t:form> in a way it
renders final HTML? If I place table inside <t:form> it doesn't get
rendered.

Jess

Re: T5: how to control form display

Posted by Daniel Jue <te...@gmail.com>.
I have T5 with tomcat running via eclipse (add servers/etc, the way it
is shown in some articles about using WTP with Tapestry and Tomcat).
I recently ran into an issue with using the maven tomcat plugin (i.e.
running mvn tomcat:run from a command line or Eclipses external
tools).  So I've reverted to running my Tomcat through eclipse, and it
works directly out of the workspace.

I had another issue with this because of a "commons-logging" issue.
Tomcat was working when I deployed a WAR, but not when run from the
workspace.  I guess something else in my app was using commons loggin,
so I was getting a duplicate library error on loading.  I found the
fix to that problem on this blog:
http://marcus-christie.blogspot.com/2006/09/getting-commons-logging-to-behave-in.html

>From what I can tell, things like JNDI setup are a bit different in
Jetty, so if you want to consider it, be aware.  Jetty does load
quickly!

On 6/4/07, Marcus <mv...@gmail.com> wrote:
> Hi Jess,
>
> Search your gmail messages for:
> t5 tomcat eclipse
>
> you will find something like this:
>
> " (I use Eclipse WTP 1.5.3, so I have to run
>
> mvn -Dwtpversion=1.5 eclipse:eclipse
>
> whenever I add a new dependency. Then I refresh my eclipse view and it
> autobuilds for me, which then causes Tomcat to auto publish. Whew! )"
>
> maybe help you.
>
> Marcus
>

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


Re: T5: how to control form display

Posted by Marcus <mv...@gmail.com>.
Hi Jess,

Search your gmail messages for:
t5 tomcat eclipse

you will find something like this:

" (I use Eclipse WTP 1.5.3, so I have to run

mvn -Dwtpversion=1.5 eclipse:eclipse

whenever I add a new dependency. Then I refresh my eclipse view and it
autobuilds for me, which then causes Tomcat to auto publish. Whew! )"

maybe help you.

Marcus

Re: T5: how to control form display

Posted by Howard Lewis Ship <hl...@gmail.com>.
I do my day to day development with Jetty; I'm not sure what's up with
Tomcat in this regard.  Have you configured Tomcat to operate against your
workspace files?

I like Jetty because it doesn't get in the way.

On 6/4/07, Jessica Sobieski <je...@gmail.com> wrote:
>
> I'm sorry. I could have been more precise. I'm new to Tapestry and I'm
> still
> trying to figure out what is probably obvious to many. Anyway, I got the
> form (with table inside) working but I had to restart my application (in
> Tomcat application manager) What confused me is that I was under the
> impression that any changes to HTML files are picked up by Tapestry on the
> fly.. This is my code:
>
> <t:layout id="layout" xmlns:t="
> http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
> <h1>Login</h1>
>
> <t:form>
> <t:errors/>
> <table border="1">
> <tr>
> <td width="200"><t:label for="loginId" width="100px" /></td>
> <td><input t:type="TextField" t:id="loginId" t:validate="required" /></td>
> </tr>
> <tr>
> <td width="200"><t:label for="password" /></td>
> <td><input t:type="PasswordField" t:id="password" t:validate="required"
> /></td>
> </tr>
> <tr>
> <td colspan="2"><input type="submit" value="Login" /></td>
> </tr>
> </table>
> </t:form>
>
> </t:layout>
>
> public class Start {
> @Persist
> private String _loginId;
> private String _password;
> @Component(id="password")
> private PasswordField _passwordField;
>
> public String getLoginId() {
> return _loginId;
> }
>
> public void setLoginId(String aLoginId) {
> _loginId = aLoginId;
> }
>
> public String getPassword() {
> return _password;
> }
>
> public void setPassword(String aPassword) {
> _password = aPassword;
> }
> }
>
>
>
>
> On 6/4/07, Howard Lewis Ship <hl...@gmail.com> wrote:
> >
> > I'm pretty sure it does.  Do that all the time.  Something must not be
> as
> > it
> > seems.
> >
> > http://www.catb.org/~esr/faqs/smart-questions.html
> >
> > On 6/4/07, Jessica Sobieski <je...@gmail.com> wrote:
> > >
> > > Hi,
> > >
> > > What is the proper (and easiest) way to controlling <t:form> in a way
> it
> > > renders final HTML? If I place table inside <t:form> it doesn't get
> > > rendered.
> > >
> > > Jess
> > >
> >
> >
> >
> > --
> > 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
> >
>



-- 
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

Re: T5: how to control form display

Posted by Jessica Sobieski <je...@gmail.com>.
I'm sorry. I could have been more precise. I'm new to Tapestry and I'm still
trying to figure out what is probably obvious to many. Anyway, I got the
form (with table inside) working but I had to restart my application (in
Tomcat application manager) What confused me is that I was under the
impression that any changes to HTML files are picked up by Tapestry on the
fly.. This is my code:

<t:layout id="layout" xmlns:t="
http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
<h1>Login</h1>

<t:form>
<t:errors/>
<table border="1">
<tr>
<td width="200"><t:label for="loginId" width="100px" /></td>
<td><input t:type="TextField" t:id="loginId" t:validate="required" /></td>
</tr>
<tr>
<td width="200"><t:label for="password" /></td>
<td><input t:type="PasswordField" t:id="password" t:validate="required"
/></td>
</tr>
<tr>
<td colspan="2"><input type="submit" value="Login" /></td>
</tr>
</table>
</t:form>

</t:layout>

public class Start {
@Persist
private String _loginId;
private String _password;
@Component(id="password")
private PasswordField _passwordField;

public String getLoginId() {
return _loginId;
}

public void setLoginId(String aLoginId) {
_loginId = aLoginId;
}

public String getPassword() {
return _password;
}

public void setPassword(String aPassword) {
_password = aPassword;
}
}




On 6/4/07, Howard Lewis Ship <hl...@gmail.com> wrote:
>
> I'm pretty sure it does.  Do that all the time.  Something must not be as
> it
> seems.
>
> http://www.catb.org/~esr/faqs/smart-questions.html
>
> On 6/4/07, Jessica Sobieski <je...@gmail.com> wrote:
> >
> > Hi,
> >
> > What is the proper (and easiest) way to controlling <t:form> in a way it
> > renders final HTML? If I place table inside <t:form> it doesn't get
> > rendered.
> >
> > Jess
> >
>
>
>
> --
> 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
>

Re: T5: how to control form display

Posted by Howard Lewis Ship <hl...@gmail.com>.
I'm pretty sure it does.  Do that all the time.  Something must not be as it
seems.

http://www.catb.org/~esr/faqs/smart-questions.html

On 6/4/07, Jessica Sobieski <je...@gmail.com> wrote:
>
> Hi,
>
> What is the proper (and easiest) way to controlling <t:form> in a way it
> renders final HTML? If I place table inside <t:form> it doesn't get
> rendered.
>
> Jess
>



-- 
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