Java

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • Validation

    12 answers - 376 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    Hi all
    In Tapestry 4 when doing validation, must I always place the binding tag on
    the page specification or can I do it on the .application file?
    I am asking because my application uses a fair amount of classes and I am
    simply maping pages to classes through the .application file and I am
    wondering if I'll have to create all the .page files now.
  • No.1 | | 683 bytes | |

    If you do all the binding in the .html template, and the class to page
    binding in the .application you don't need the .page in Tap4.
    Be more specific if this was not the answer you were looking for.

    Regards,

    5/9/06, Rui Pacheco <rui.pacheco (AT) gmail (DOT) comwrote:

    Hi all

    In Tapestry 4 when doing validation, must I always place the binding tag
    on
    the page specification or can I do it on the .application file?

    I am asking because my application uses a fair amount of classes and I am
    simply maping pages to classes through the .application file and I am
    wondering if I'll have to create all the .page files now.
  • No.2 | | 1231 bytes | |

    Tapestry is helping me avoid a lot of pain

    5/10/06, Pedro Viegas <pviegas (AT) gmail (DOT) comwrote:

    :-D

    No pain no gain!

    5/10/06, Rui Pacheco <rui.pacheco (AT) gmail (DOT) comwrote:

    I was just wondering if I was going to have to write .page files for
    every
    .html page that required validation.
    Now that my blindness has been healed, I am happily adding validators=""
    to
    all tags on all my .html pages :D

    5/10/06, Pedro Viegas <pviegas (AT) gmail (DOT) comwrote:

    If you do all the binding in the .html template, and the class to page
    binding in the .application you don't need the .page in Tap4.
    Be more specific if this was not the answer you were looking for.

    Regards,

    5/9/06, Rui Pacheco <rui.pacheco (AT) gmail (DOT) comwrote:

    Hi all

    In Tapestry 4 when doing validation, must I always place the binding
    tag
    on
    the page specification or can I do it on the .application file?

    I am asking because my application uses a fair amount of classes and
    I
    am
    simply maping pages to classes through the .application file and I
    am
    wondering if I'll have to create all the .page files now.
  • No.3 | | 1104 bytes | |

    :-D

    No pain no gain!

    5/10/06, Rui Pacheco <rui.pacheco (AT) gmail (DOT) comwrote:

    I was just wondering if I was going to have to write .page files for every
    .html page that required validation.
    Now that my blindness has been healed, I am happily adding validators=""
    to
    all tags on all my .html pages :D

    5/10/06, Pedro Viegas <pviegas (AT) gmail (DOT) comwrote:

    If you do all the binding in the .html template, and the class to page
    binding in the .application you don't need the .page in Tap4.
    Be more specific if this was not the answer you were looking for.

    Regards,

    5/9/06, Rui Pacheco <rui.pacheco (AT) gmail (DOT) comwrote:

    Hi all

    In Tapestry 4 when doing validation, must I always place the binding
    tag
    on
    the page specification or can I do it on the .application file?

    I am asking because my application uses a fair amount of classes and I
    am
    simply maping pages to classes through the .application file and I am
    wondering if I'll have to create all the .page files now.
  • No.4 | | 991 bytes | |

    I was just wondering if I was going to have to write .page files for every
    html page that required validation.
    Now that my blindness has been healed, I am happily adding validators="" to
    all tags on all my .html pages :D

    5/10/06, Pedro Viegas <pviegas (AT) gmail (DOT) comwrote:

    If you do all the binding in the .html template, and the class to page
    binding in the .application you don't need the .page in Tap4.
    Be more specific if this was not the answer you were looking for.

    Regards,

    5/9/06, Rui Pacheco <rui.pacheco (AT) gmail (DOT) comwrote:

    Hi all

    In Tapestry 4 when doing validation, must I always place the binding tag
    on
    the page specification or can I do it on the .application file?

    I am asking because my application uses a fair amount of classes and I
    am
    simply maping pages to classes through the .application file and I am
    wondering if I'll have to create all the .page files now.
  • No.5 | | 1443 bytes | |

    I have been wondering this for some time now: Is it the general consensus to get rid of .page files and do all binding in the html (and injection via annotations in the java classes)?

    Rui Pacheco wrote: I was just wondering if I was going to have to write .page files for every
    ..html page that required validation.
    Now that my blindness has been healed, I am happily adding validators="" to
    all tags on all my .html pages :D

    On 5/10/06, Pedro Viegas <pviegas (AT) gmail (DOT) com> wrote:

    If you do all the binding in the .html template, and the class to page
    binding in the .application you don't need the .page in Tap4.
    Be more specific if this was not the answer you were looking for.

    Regards,

    On 5/9/06, Rui Pacheco <rui.pacheco (AT) gmail (DOT) com> wrote:
    >
    > Hi all
    >
    > In Tapestry 4 when doing validation, must I always place the binding tag
    > on
    > the page specification or can I do it on the .application file?
    >
    > I am asking because my application uses a fair amount of classes and I
    am
    > simply maping pages to classes through the .application file and I am
    > wondering if I'll have to create all the .page files now.
    >
    > --
    > Cumprimentos,
    > Rui Pacheco
    >
    >

    --
    Pedro Viegas

    --
    Cumprimentos,
    Rui Pacheco
  • No.6 | | 1736 bytes | |

    Sounds simpler to me.
    The only problem is, there is going to be a break between the implementation
    and the documentation generally available on the web, which is almost all
    related to Tapestry 3.0

    If you do get rid of the .page files, there should be an effort to start
    spreading through the web new examples of how to do things.

    5/10/06, Martijn Hinten <martijn.hinten (AT) cumquat (DOT) nlwrote:

    I have been wondering this for some time now: Is it the general consensus
    to get rid of .page files and do all binding in the html (and injection via
    annotations in the java classes)?
    --
    Rui Pacheco wrote:

    I was just wondering if I was going to have to write .page files for every

    .html page that required validation.
    Now that my blindness has been healed, I am happily adding validators=""
    to
    all tags on all my .html pages :D

    5/10/06, Pedro Viegas <pviegas (AT) gmail (DOT) com<pviegas (AT) gmail (DOT) comwrote:
    --
    If you do all the binding in the .html template, and the class to page
    binding in the .application you don't need the .page in Tap4.
    Be more specific if this was not the answer you were looking for.

    Regards,

    5/9/06, Rui Pacheco <rui.pacheco (AT) gmail (DOT) com<rui.pacheco (AT) gmail (DOT) com>wrote:

    Hi all

    In Tapestry 4 when doing validation, must I always place the binding tag

    on
    the page specification or can I do it on the .application file?

    I am asking because my application uses a fair amount of classes and I
    am
    simply maping pages to classes through the .application file and I am
    wondering if I'll have to create all the .page files now.
  • No.7 | | 2238 bytes | |

    5/10/06, Martijn Hinten <martijn.hinten (AT) cumquat (DOT) nlwrote:
    I have been wondering this for some time now: Is it the general consensus
    to get rid of .page files and do all binding in the html (and injection via
    annotations in the java classes)?

    I think it depends on the size of your team and complexity of your
    app. With a fairly large team, including one person devoted to
    layout, I prefer to keep all component declarations in .page files, so
    that the layout templates are as clean as possible and least likely to
    get screwed up by someone making edits without a clue about how
    tapestry works. I've generally got nothing but jwcid attributes in my
    templates. A simple macro in just about any editor will make it easy
    to switch between .page and .html files in a single keystroke or mouse
    click, so the complaint about having to switch files really isn't
    valid, to my mind.

    We also attempt to keep components in the same order in the .page file
    as they are used in the .html template. It is a couple of minutes of
    developer time per page at the end of any release cycle on any pages
    that have gotten out of whack and it keeps things easy to find. In
    fact, I have a macro in vim which will switch to a .page file and go
    to the same location as I am currently at, as a percentage of the file
    length, with two keystrokes. are usually good that I can see the
    component that I am looking for as soon as the other file is visible,
    and both files are so much more readable as a result.

    The only thing I hate is when informal parameters are important to the
    function of the component, since, as far as I know, they must appear
    in the html file. I really wish there were a way to bind informal
    parameters to a component from within a .page file, overriding any
    informal parameters of the same name that are in the .html template
    which may be necessary for layout in the unrendered page. That way, I
    could put ALL of my parameter bindings in the .page file.

    To unsubscribe, e-mail: users-unsubscribe (AT) tapestry (DOT) apache.org
    For additional commands, e-mail: users-help (AT) tapestry (DOT) apache.org
  • No.8 | | 831 bytes | |

    I often put informal parameters in my .page file, it seems to work fine.

    Sam Gendler wrote:
    5/10/06, Martijn Hinten <martijn.hinten (AT) cumquat (DOT) nlwrote:
    The only thing I hate is when informal parameters are important to the
    function of the component, since, as far as I know, they must appear
    in the html file. I really wish there were a way to bind informal
    parameters to a component from within a .page file, overriding any
    informal parameters of the same name that are in the .html template
    which may be necessary for layout in the unrendered page. That way, I
    could put ALL of my parameter bindings in the .page file.

    To unsubscribe, e-mail: users-unsubscribe (AT) tapestry (DOT) apache.org
    For additional commands, e-mail: users-help (AT) tapestry (DOT) apache.org
  • No.9 | | 3611 bytes | |

    I think Sam has it right: it depends.

    In my development, I never write page files -- but we don't have any
    separate person devoted to the page design. That seems like the only
    compelling case left for the page files, but it is somewhat
    compelling: it keeps as much as possible out of the page file, so the
    designed can focus on the HTML and not have to tiptoe over so much
    extra baggage.

    ( can of course use annotations to achieve that, too, but it
    requires declaring tons of getXyzComponent() methods that clutter up
    classes.)

    However, without the separate designed role, I find the annotations
    approach keeps things much cleaner. Unless you're keen on keeping the
    templates as pared-down as possible, then, I'd recommend that.

    In Tap 5, it sounds like things are moving towards annotations only.
    Hopefully 5 will reduce the verbosity of some of the common cases.

    Cheers,

    Paul

    May 10, 2006, at 7:49 AM, Sam Gendler wrote:

    5/10/06, Martijn Hinten <martijn.hinten (AT) cumquat (DOT) nlwrote:
    >I have been wondering this for some time now: Is it the general
    >consensus
    >to get rid of .page files and do all binding in the html (and
    >injection via
    >annotations in the java classes)?
    >>

    >

    I think it depends on the size of your team and complexity of your
    app. With a fairly large team, including one person devoted to
    layout, I prefer to keep all component declarations in .page files, so
    that the layout templates are as clean as possible and least likely to
    get screwed up by someone making edits without a clue about how
    tapestry works. I've generally got nothing but jwcid attributes in my
    templates. A simple macro in just about any editor will make it easy
    to switch between .page and .html files in a single keystroke or mouse
    click, so the complaint about having to switch files really isn't
    valid, to my mind.

    We also attempt to keep components in the same order in the .page file
    as they are used in the .html template. It is a couple of minutes of
    developer time per page at the end of any release cycle on any pages
    that have gotten out of whack and it keeps things easy to find. In
    fact, I have a macro in vim which will switch to a .page file and go
    to the same location as I am currently at, as a percentage of the file
    length, with two keystrokes. are usually good that I can see the
    component that I am looking for as soon as the other file is visible,
    and both files are so much more readable as a result.

    The only thing I hate is when informal parameters are important to the
    function of the component, since, as far as I know, they must appear
    in the html file. I really wish there were a way to bind informal
    parameters to a component from within a .page file, overriding any
    informal parameters of the same name that are in the .html template
    which may be necessary for layout in the unrendered page. That way, I
    could put ALL of my parameter bindings in the .page file.

    To unsubscribe, e-mail: users-unsubscribe (AT) tapestry (DOT) apache.org
    For additional commands, e-mail: users-help (AT) tapestry (DOT) apache.org
    --

    Piano music podcast: http://inthehands.com
    interesting stuff: http://innig.net

    To unsubscribe, e-mail: users-unsubscribe (AT) tapestry (DOT) apache.org
    For additional commands, e-mail: users-help (AT) tapestry (DOT) apache.org
  • No.10 | | 464 bytes | |

    5/10/06, Martin Strand <martin.strand (AT) entcap (DOT) sewrote:
    I often put informal parameters in my .page file, it seems to work fine.

    Hmph. I guess I should have tried it. You just create a 'binding'
    tag with a parameter that isn't declared for the component?

    To unsubscribe, e-mail: users-unsubscribe (AT) tapestry (DOT) apache.org
    For additional commands, e-mail: users-help (AT) tapestry (DOT) apache.org
  • No.11 | | 768 bytes | |

    Yep. I mostly use it to generate CSS classes dynamically:
    <binding name="class" value="ognl:(itemActive ? 'active' : 'inactive')"/>

    Wed, 10 May 2006 21:40:20 +0300, Sam Gendler
    <sgendler (AT) ideasculptor (DOT) comwrote:

    5/10/06, Martin Strand <martin.strand (AT) entcap (DOT) sewrote:
    >I often put informal parameters in my .page file, it seems to work fine.
    >

    Hmph. I guess I should have tried it. You just create a 'binding'
    tag with a parameter that isn't declared for the component?

    To unsubscribe, e-mail: users-unsubscribe (AT) tapestry (DOT) apache.org
    For additional commands, e-mail: users-help (AT) tapestry (DOT) apache.org
  • No.12 | | 988 bytes | |

    Now that's something I have not thought of before!
    Nice catch, that must be handy sometimes!
    Nice tip Martin thanks for sharing. :-D

    5/10/06, Martin Strand <martin.strand (AT) entcap (DOT) sewrote:

    Yep. I mostly use it to generate CSS classes dynamically:
    <binding name="class" value="ognl:(itemActive ? 'active' : 'inactive')"/>

    Wed, 10 May 2006 21:40:20 +0300, Sam Gendler
    <sgendler (AT) ideasculptor (DOT) comwrote:

    5/10/06, Martin Strand <martin.strand (AT) entcap (DOT) sewrote:
    >I often put informal parameters in my .page file, it seems to work

    fine.

    Hmph. I guess I should have tried it. You just create a 'binding'
    tag with a parameter that isn't declared for the component?

    To unsubscribe, e-mail: users-unsubscribe (AT) tapestry (DOT) apache.org
    For additional commands, e-mail: users-help (AT) tapestry (DOT) apache.org
    --

Re: Validation


max 4000 letters.
Your nickname that display:
In order to stop the spam: 4 + 3 =
QUESTION ON "Java"

EMSDN.COM