This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Jun 27, 2012, 9:43 PM
13 Posts
topic has been resolvedResolved

How to add passthru HTML in xp:link

  • Category: Other Domino Designer Tooling
  • Platform: Windows
  • Release: 8.5.3
  • Role: Developer
  • Tags: passthrough span xp:span
  • Replies: 2
I'm trying to add an "x" to the end of a link (to indicate to the user that the value can be removed by clicking the link -- similar to how the xlib picker's work). I've gotten it to work, but the problem is that it puts the "x" at the front of the link text and I want it to appear after the link. Here's the code (note the 7th line of code - the "x" comes after the link text, but when rendered it is positioned before):
 

<xp:link styleClass="lotusFilter" escape="true" id="lnkPortUnitFilter">

<xp:this.text><![CDATA[#{javascript:

if(viewScope.filters_UnitFilter != "" && viewScope.filters_UnitFilter != null && viewScope.filters_UnitFilter != "All"){

return viewScope.filters_UnitFilter;

}

}]]></xp:this.text>

<xp:span styleClass="lotusClose">x</xp:span>

<xp:eventHandler

event="onclick" submit="true" refreshMode="partial"

refreshId="portUnitsDiv">

<xp:this.action><![CDATA[#{javascript:

viewScope.filters_UnitFilter = "";

loadPortfolioData("", "", true);

}]]></xp:this.action>

</xp:eventHandler>

</xp:link>

 If I could somehow pass thru the html, I could change the 4th line of code from:

return viewScope.filters_UnitFilter;

to:

return viewScope.filters_UnitFilter + '<xp:span styleClass="lotusClose">x</xp:span>';

And I think it will format correctly... Any ideas are greatly appreciated! 
 
Cheers! 
Jun 28, 2012, 5:29 AM
129 Posts
Re: How to add passthru HTML in xp:link
Remove the text attribute from the link, and put the "link label" inside the xp:link node.
 
For instance using an xp:text.
Jun 28, 2012, 5:07 PM
13 Posts
Re: How to add passthru HTML in xp:link
Awesome, thanks! That worked like a charm. Here's the new code:
 
*** 

<xp:link styleClass="lotusFilter"

escape="true" id="lnkPortUnitFilter">

<xp:text>

<xp:this.value><![CDATA[#{javascript:

if(viewScope.filters_UnitFilter != "" && viewScope.filters_UnitFilter != null && viewScope.filters_UnitFilter != "All"){

return viewScope.filters_UnitFilter;

}}]]></xp:this.value>

</xp:text>

<xp:span styleClass="lotusClose">

x

</xp:span>

<xp:eventHandler event="onclick"

submit="true" refreshMode="partial" refreshId="portUnitsDiv">

<xp:this.action><![CDATA[#{javascript:

viewScope.filters_UnitFilter = "";

loadPortfolioData("", "", true);

}]]></xp:this.action>

</xp:eventHandler>

</xp:link>


This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal