tags:

views:

350

answers:

2

I have several places in my facelets web app where we are using custom facelet functions. For some reason they feel dirty and I can't quite peg why. What is StackOverflow's view of custom facelet functions?

+2  A: 

I can see how you might think that. I think excessive use of such functions is probably poor design. However, there are cases where your life is just easier defining a custom facelet function; therefore you shouldn't dismiss them out of hand.

BobbyShaftoe
Because you can "see how I might think that" means that I'm not too far off base, right? I definitely agree that they can be useful, but I feel a compulsive need to minimize their use, and that's what I'm trying to get a handle on.
digitaljoel
A: 

As I hit submit, I think I figured it out. In our case, we generally have to use a custom facelet function to provide additional functionality to our API objects. The functionality doesn't really belong in the domain API, so we create the custom facelet function. Rather than use custom facelet functions, we ought to have a business layer between the UI and domain-api. The additional functionality could then be added to the business objects.

digitaljoel