The <t:if> component is fine. What is unwieldy are the hoops I'd need to
jump through in order to use it in this particular case.
Now having thought about it, I'm not even sure how to replicate the server
side java code in tmi. Here's the code:
// figure out some display booleans
boolean isYes=this.positiveTermList.contains(member);
boolean isNo=this.negativeTermList.contains(member);
// start row, add hashtag
sb.append("<tr><td >");
sb.append(member);
// add "yes"
sb.append("</td><td>");
if((!isNo&&!isYes)||isNo)
sb.append("<a href=\"/discoveryassistant/refine:addyesterm/"+member+
"\">yes</a>");
else if(isYes)
sb.append("<font color='green'>yes!</font>");
// add "no"
sb.append("</td><td>");
if((!isNo&&!isYes)||isYes)
sb.append("<a href=\"/discoveryassistant/refine:addnoterm/"+member+
"\">no</a>");
else if(isNo)
sb.append("<font color='red'>no!</font>");
// terminate row
sb.append("</td></tr>");
Would I not need to create a wrapper around the member object, and a then
have several boolean methods to return !isNo&&!isYes)||isYes etc.? Does it
even work if you do <t:if source="member.myBooleanTest">?
On Tue, Jul 31, 2012 at 6:52 PM, Thiago H de Paula Figueiredo <
[email protected]> wrote:
> On Tue, 31 Jul 2012 21:43:22 -0300, George Ludwig <[email protected]>
> wrote:
>
> I use outputraw because it would be unwieldy to use Tapestry's <t:if>
>> construct to control the rendering.
>>
>
> Could you please say why you think Tapestry's If component is unwieldy?
> And what exactly changes from the if to the else? It seems to me you can
> avoid the If, as you could use t:event="prop:eventName" and have a
> getEventName() method that defines which event will be triggered.
>
> --
> Thiago H. de Paula Figueiredo
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail:
> users-unsubscribe@tapestry.**apache.org<[email protected]>
> For additional commands, e-mail: [email protected]
>
>