yes i understand this, but the function doesnt output directly, but merely
returns a string to the form view, which technically is 'legal' as its
returning a single value? i dunno.
i will live with the spanner for the time being until i have read a little
more :-)
taco, so with your method you create a sort of xml class, then output
where necessary. Im going to look at this method and see if i can
implement it
cheers for the info guys
jamo
> Just to drop a spanner in your works -
>
> It's generally considered a 'bad thing' to use CFC's to output html,
> as they are better placed in the logic tier of an application, rather
> than in the output.
>
> There has been many past discussions on why that is (check out the
> macromedia site, lots of articles there).
>
> Just as a side note (came into this a bit late) there was a
> 'discussion' over learning OO with ColdFusion, and the general
> consensus was to learn OOP with something like Java, C++, C#
> (whatever) and then come back to CF and apply the theory of it.
>
> Unfortunatley CF is not the best language to learn these concepts
> with, as it is missing some ingredients.
>
> But good luck on your journey!
>
> Mark
>
> On Thu, 29 Jul 2004 11:35:00 +1000, Jamie Lawrence Jenner
> <[EMAIL PROTECTED]> wrote:
> > gareth
> >
> > The method i have now finished, uses cfcs to output the form field. the
> > cfc is in the application scope, and when i want a form field i use the
> > following, and pass it the type and the relevant arguments for that
> > element
> >
> > #application.elementbuilder.basicElement(type="text",name="address2",ID="Addess2",ClassName="maintext",Size="",Maxlength="50",value="")#
> >
> > #application.elementbuilder.basicElement(type="checkbox",name="check1",ID="check1",ClassName="formelements",value="terms")#
> >
> > and for selectors
> > #application.formbuilder.selectElement("DOBDay","Date of
> > birth",IDList="01,02,03,04,05",ValuesList="a,b,c,d,e")#
> >
> > the cfc then returns the html needed for the field. it will output any
> > form field you give it (using the type argument) by using a switch
> >
> > Using this method i can have whatever form fields, by whatever name, with
> > whatever attributes but still use the same cfc and not have to add to it.
> >
> > Taco, by using your method, if you needed a field for say chickens, would
> > you have to add to the xml file a new object called chicken?
> >
> > Ive binned the prefix for validation, and instead, i pass an xml string
> > with the form,
> >
> > <string>
> > <element>name<element>
> > <element>address<element>
> > <string>
> > <numeric>
> > <element>phone<element>
> > </numeric>
> > <whateverelse>
> >
> > This then refrences the relevant form fields and passes them to the
> > validation obj, which if there is a fault, creates the errorobj
> >
> > I suppose this is one of those things for which their is no right or wrong
> > way. I do prefer to write things like this myself though cos thats what i
> > do!
> >
> > chow
> >
> > jamo
>
>
> --
> E: [EMAIL PROTECTED]
> W: www.compoundtheory.com
> ICQ: 3094740
---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/