Hm. My impression of howard's original suggestion was not that this was
another component declaration method. Rather, it was a more... direct
way of inserting text.
As it happens... you could conceivably then mimic various other
behavior, such as @Any, @Insert, etc. But that's a side-effect.
While I understand the "more is less" sentiment, sometimes the question
must be posed: what if what's there isn't right? Sure, @Insert and @Any
"Get the job done", but there are so many times where I find myself
putting in yet more markup, doing even more typing, just for some very
simple things. Tapestry goes a long way towards making difficult things
possible; why not go a little further in making simple things simple?
<h2><span jwcid="@Insert" value="message:title"/></h2>
Oh, and... since this template /is/ previewable... you end up having to
do something like this for wysiwyg preview:
<h2><span jwcid="@Insert" value="message:title">Title Text</span></h2>

Frankly, to a designer, "Title Text" is just as meaningful(meaningless?)
as:
${message:title}
only, they don't have to understand that "the span isn't really a
span... unless you put a class in there, then it really will be a span..."
<h2>${message:title}</h2>

Smaller, simpler, cleaner, lighter.
Do that... and deprecate <span key="message">Message</span>
Then you're back to two ways of doing things.

For that matter, if all I need is a dynamically defined class on
something, why do:
<ol jwcid="@Any" class="ognl:dynamicClass">
...
</ol>
why not just:
<ol class="${dynamicclass}">
...
</ol>
I wholeheartedly disagree that this is messy, ugly, or unclean. In fact,
I think it's at least 2x cleaner. :) But... to each his own, I guess. =)

Robert

Richard Lewis-Shell wrote:
> I don't much like this idea (-1).  I agree that we don't need yet
> another way of declaring a component in a template, especially one that
> is completely different to the existing templating syntax.  What
> happened to "less is more"?  This feels like "more is less" to me :-(
> 
> Richard
> 
> Howard M. Lewis Ship (JIRA) wrote:
> 
>> Simplified insert binding template syntax
>> -----------------------------------------
>>
>>          Key: TAPESTRY-331
>>          URL: http://issues.apache.org/jira/browse/TAPESTRY-331
>>      Project: Tapestry
>>         Type: New Feature
>>   Components: Framework      Versions: 4.0        Reporter: Howard M.
>> Lewis Ship
>>     Priority: Minor
>>      Fix For: 4.0
>>
>>
>> It would be desirable to support a simplified syntax for obtaining
>> data via bindings and inserting it.  A proposal has been to adopt
>> ant-like syntax ("${...}") and interpret the expression within the
>> braces as a binding reference.  This would eliminate the need for many
>> Insert components, i.e.:
>>
>>
>> <h1>${thread.title}</h1>
>>
>> rather than:
>>
>> <h1><span jwcid="@Insert" value="thread.title"/></h1>
>>
>> Or:
>>
>> ${message:prompt}
>>
>> rather than:
>>
>> <span key="prompt"/>
>>
>>
>> This kind of substitution is less invisible, but generally less
>> intrusive, than creating a new component.
>>
>> Further, the use of the Any component could be reduced via support for:
>>
>> <img src="${imagePath}"/>
>>
>> rather than:
>>
>> <img jwcid="@Any" src="ognl:imagePath"/>
>>
>>
>> Some questions occur; are the following legal?
>>
>> <${element}> ... </${element}>
>> <img jwcid="@Image" src="${asset:foo}"/>
>> <div ${attribute}="${value}"/>
>>
>>
>> A final note: these bindings should be treated as we treat informal
>> parameters today; this includes automatically expanding IAssets into
>> their corresponding URLs.
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to