Hello All,

Still trying to get my head around best UI practices in CFMX. Responses to
date seem equally split between using UI cfc's and preferring custom tags. 

Here's a question that maybe someone on the "custom tag" side should speak
to.

Lets say I need an HTML UI comprising of a form, and the FirstName field
must have the following code: <input type="text" name="UserFirstName"
size=="50" maxlength="150">. Lets further assume that some of those
properties are unique to FirstName, so I can't just generically loop through
a struct of passed field names in the UI and use default field HTML for all
of the properties.

How can I put the code above into a custom tag without breaking
encapsulation? In short, how can I create a specific UI for an object while
ensuring that the UI has no knowledge of the fields and their associated
display properties for that object?!

It seems to me that I must put the UI into the appropriate object as a
displayAsHTML method or similar otherwise something other than the object
knows about and depends on the internal structure of what should be private
properties. (Of course, the displayAsHTML should wrap the getUserDetail
method rather than knowing anything about data access)

I'm sure I am missing something here. Any input on what I'm missing would be
most gratefully received!

Best Wishes,
Peter





----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to 
[email protected] with the words 'unsubscribe cfcdev' as the subject of the 
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting 
(www.cfxhosting.com).

An archive of the CFCDev list is available at 
www.mail-archive.com/[email protected]


Reply via email to