2012-05-10 8 views
0

私はVisualforceの電子メールテンプレートに関連する1つの問題があります。 私はTRを非表示にするコードの下に使用しています:電子メールテンプレートで条件文を使用するにはどうすればよいですか?

<apex:repeat var="cx" value="{!relatedTo.Airline_Conf_s__r}"> 
<tr style="{!IF(!cx.Include_in_Confirmation__c == true,"display:none!important; ","")}"> 
<td> 
<apex:outputText value="{!cx.Airlines_Url__c}" escape="false" /> 
</td> 
</tr> 
</apex:repeat> 

but i need it to done without inline style .how can it possible. 

答えて

1

あなたが頂点の「レンダリング」属性使用して試みることができる:outputPanel:あなたが頂点を使用したほうが良いです。この

<apex:outputText rendered = "{cx.Include_in_Confirmation__c}" value="{!cx.Airlines_Url__c}" escape="false" /> 
1

のように、のoutputTextをタグとレンダリングプロパティ使用:素人はその

<apex:repeat var="cx" value="{!relatedTo.Airline_Conf_s__r}"> 
<apex:outputPanel layout="none" rendered="{!cx.Include_in_Confirmation__c == true}"> 
    <tr> 
     <td> 
      <apex:outputText value="{!cx.Airlines_Url__c}" escape="false" /> 
     </td> 
    </tr> 
</apex:outputPanel> 

注意をout属性が "none"に設定されていると、VFにタグを表示しないように指示しますが、TRタグをリピータループとして動的にレンダリングできるという利点があります。

関連する問題