Xpages custom control computed text

I just started playing with xpages 2 days ago, I may be going about this all wrong.

I’m making a custom control header.

What I used to do in a header subform was put menu items in like this:

All

Inside the computed text, I’d have @webdbname.

That way the link would work no matter what the database was called.

What’s an equivalent way that I should be doing that now?

Subject: Use the text attribute of xp:link…

  • You may put #{javascript:;} in there.

  • You may omit the text attribute and use the text tag:

xp:link

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

any javascript at all;

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

</xp:link>

Hope this helps…

Subject: got it!

  • xp:this.value

    </xp:link>

  • I found a @wedbname function, so I’ll try to figure out where it gets stored:

    http://blog.gollmick.de/mgoblog.nsf/dx/News_on_WebDbName_for_XPages.htm

    Subject: thanks

    thanks good lead.

    xp:link

    xp:textxp:this.value<![CDATA[{<a id="a1" title="All" href="/ + #javascript:@DbName()}]]></xp:this.value></xp:text>“/all!openview”>All</a></p> <p></xp:link></p> <p>It’s tricky to figure out how to place it, rejects everything I’ve tried. The above sure don’t work.</p> <p>I might try the link control. Or just reject this approach all together, as it keeps replacing my id tags (as I knew it would) but I want them for search engine optimization… sigh.</p>