I guess you can just bind the properties parameter to this :
    public String getProperties() {
        Object obj = this.getPojo();
        if (obj instanceof Manager) {
            return "id,lastname,firstname,salary";
        } else {
            return "lastname,firstname";
        }
    }

and you can then even use the id_disabled informal parameter...

As for the validation messages, i get those in FF & IE only when i
enter a non-number in a numeric field...
Is that the case for you? I agree that they're misleading though...
should have been "this is not a number"



On Jan 21, 2008 6:09 PM, Andreas Andreou <[EMAIL PROTECTED]> wrote:
> no - but i'm on to it right now... will report back in an hour or so
> ( + a chance to see more of beanform's internals, since it's D.Gredler's work)
>
>
> On Jan 21, 2008 4:36 PM, Ulrich Stärk <[EMAIL PROTECTED]> wrote:
> > Andreas, did you have a chance to look into this?
> >
> > Uli
> >
> > Am Mo, 14.01.2008, 22:28, schrieb Ulrich Stärk:
> >
> > > Forgot to mention it, that works as expected, but I DO want to display
> > > the ID just not for editing. And the errors are from the client side
> > > validation, forgot to say so too...
> > >
> > >
> > > Andreas Andreou schrieb:
> > >> hmmm - i don't think i'll have time to look at this before the
> > >> weekend...
> > >>
> > >> What happens if you use the excludes parameter for the id?
> > >> http://tacos.sourceforge.net/tacos4.1/beanform/component-reference.html
> > >>
> > >>
> > >> On Jan 14, 2008 4:18 PM, Ulrich Stärk <[EMAIL PROTECTED]>
> > >> wrote:
> > >>> Hi there,
> > >>>
> > >>> I just played around with the BeanForm component to edit some POJOs of
> > >>> mine. The class of the bean I want to edit is an abstract superclass
> > >>> and
> > >>> the actual objects are subtypes of this class and have different
> > >>> fields.
> > >>> So I can't set the properties parameter of the BeanForm component,
> > >>> otherwise I would get errors with fields not present in the particular
> > >>> Object.
> > >>> Omitting the properties parameter leads to BeanForm ignoring a
> > >>> id_disabled="ognl:true" informal parameter and still displaying the id
> > >>> as
> > >>> editable. Is there a way around it?
> > >>> Secondly I always get validation errors in Firefox when trying to save
> > >>> the
> > >>> object. No problemsn in IE though:
> > >>>
> > >>> * [ID] must not be smaller than -2.147483648E9.
> > >>> * [ID] must not be larger than 2.147483647E9.
> > >>>
> > >>> id is a plain int field in my POJO and I believe that '1' matches both
> > >>> conditions. As I already said, I can't use the properties parameter to
> > >>> specify custom validators because of the subtype case I'm having.
> > >>>
> > >>> Cheers,
> > >>>
> > >>> Uli
> > >>>
> > >>>
> > >>>
> > >>>
> > >>> -------------------------------------------------------------------------
> > >>> Check out the new SourceForge.net Marketplace.
> > >>> It's the best place to buy or sell services for
> > >>> just about anything Open Source.
> > >>> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
> > >>> _______________________________________________
> > >>> Tacos-devel mailing list
> > >>> Tacos-devel@lists.sourceforge.net
> > >>> https://lists.sourceforge.net/lists/listinfo/tacos-devel
> > >>>
> > >>
> > >>
> > >>
> > >
> > >
> > >
> > > -------------------------------------------------------------------------
> > > Check out the new SourceForge.net Marketplace.
> > > It's the best place to buy or sell services for
> > > just about anything Open Source.
> > > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
> > > _______________________________________________
> > > Tacos-devel mailing list
> > > Tacos-devel@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/tacos-devel
> > >
> >
> >
> >
> > -------------------------------------------------------------------------
> > This SF.net email is sponsored by: Microsoft
> > Defy all challenges. Microsoft(R) Visual Studio 2008.
> > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> >
> > _______________________________________________
> > Tacos-devel mailing list
> > Tacos-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/tacos-devel
> >
> >
>
>
>
>
> --
> Andreas Andreou - [EMAIL PROTECTED] - http://blog.andyhot.gr
> Tapestry / Tacos developer
> Open Source / JEE Consulting
>



-- 
Andreas Andreou - [EMAIL PROTECTED] - http://blog.andyhot.gr
Tapestry / Tacos developer
Open Source / JEE Consulting

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Tacos-devel mailing list
Tacos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tacos-devel

Reply via email to