On Wed, May 29, 2013 at 11:08 AM, Howard Lewis Ship <hls...@gmail.com>wrote:

>
>
> >
> > I had one problem getting it to run. I had to add
> >
> >     <dependency>
> >
> >       <groupId>org.slf4j</groupId>
> >
> >       <artifactId>slf4j-log4j12</artifactId>
> >
> >       <version>1.7.2</version>
> >
> >     </dependency>
> >
> >
> > to my pom file. It appears to be in tapestry-core but marked test.
> >
> >
> This has been going back and forth; the idea is to not lock you into a
> particular SLF4J implementation, at the expense of making you select one.
> If this was included as a core dependency and you wanted to switch to, say,
> logback, you would have to exclude this dependency then include logback.
>  The Maven archetype will include a specific SLF4J implementation.
>
>
In general I would prefer things work out of the box and exclude the
dependency if needed, but it did not take too long to figure out the
problem.


>
>
> >
> > I tried BeanEditForm and have a question about it. Unfortunately
> Bootstrap
> > changes the markup for forms when the class is form-horizontal. It
> appears
> > BeanEditForm always outputs the markup for form-horizontal so the other
> > form styles do not work correctly.
> >
> >
> More information on that would be great.
>

Basic forms in Bootstrap have little to no extra markup. The example has

http://twitter.github.io/bootstrap/base-css.html#forms


   1. <form>
   2. <fieldset>
   3. <legend>Legend</legend>
   4. <label>Label name</label>
   5. <input type="text" placeholder="Type something…">
   6. <span class="help-block">Example block-level help text here.</span>
   7. <label class="checkbox">
   8. <input type="checkbox"> Check me out
   9. </label>
   10. <button type="submit" class="btn">Submit</button>
   11. </fieldset>
   12. </form>


Only the form-horizontal has the extra control group

   1. <div class="control-group">
   2. <label class="control-label" for="inputPassword">Password</label>
   3. <div class="controls">
   4. <input type="password" id="inputPassword" placeholder="Password">
   5. </div>
   6. </div>
   7. <div class="control-group">
   8. <div class="controls">
   9. <label class="checkbox">
   10. <input type="checkbox"> Remember me
   11. </label>
   12. <button type="submit" class="btn">Sign in</button>
   13. </div>
   14. </div>


While the simple forms work with the control group the extra tags change
the output format. This means the output of each property in the BeanEditor
is dependent on the class parameter to BeanEditForm or Form. I guess the
class could be added to FormSupport so the underlying parameters could
render differently depending on the class. Also just to make things more
difficult notice how the label for the checkbox spans the input but the
textfield label does not.

On my Bootstrap module I did all this using the DOM and a visitor, but if
you are creating components from scratch I don't think I would do it that
way.


>
>
>
> > I'll try and build something real this weekend.
> >
> > Thanks
> > Barry
> >
> >
> > On Tue, May 28, 2013 at 3:28 PM, Howard Lewis Ship <hls...@gmail.com>
> > wrote:
> >
> > > For all you early adopters ...
> > >
> > > 5.4-alpha-4 preview release is now available
> > >
> > > Maven Repository:
> > >
> >
> https://repository.apache.org/content/repositories/orgapachetapestry-019/
> > >
> > > Big improvements:
> > >
> > > - URLs for compressed assets are now separate from uncompressed assets
> > > - Many problems with CSS url() rewriting have been fixed
> > > - new tapestry-wro4j library for runtime:
> > >   - CoffeeScript to JavaScript compilation
> > >   - Less to CSS compilation
> > >   - JavaScript minimization
> > >   - CSS minimization
> > >
> > > --
> > > Howard M. Lewis Ship
> > >
> > > Creator of Apache Tapestry
> > >
> > > The source for Tapestry training, mentoring and support. Contact me to
> > > learn how I can get you up and productive in Tapestry fast!
> > >
> > > (971) 678-5210
> > > http://howardlewisship.com
> > >
> >
>
>
>
> --
> Howard M. Lewis Ship
>
> Creator of Apache Tapestry
>
> The source for Tapestry training, mentoring and support. Contact me to
> learn how I can get you up and productive in Tapestry fast!
>
> (971) 678-5210
> http://howardlewisship.com
>

Reply via email to