XPages设计自定义控件的定义

时间:2012-11-02 11:01:15

标签: jsp xpages

在XPages设计定义中如何获取自定义控件的名称。我找到了

<%=this.viewName %>

但这对我不起作用。

3 个答案:

答案 0 :(得分:1)

在此阶段,根据上述回应,这是不可能的。我必须通过输入自定义控件的名称来手动实现此目的。

答案 1 :(得分:0)

XPages是JSF而不是JSP。因此JSP构造不起作用(除了在设计定义中)。 因此,<%不是XPage中受支持的构造。 EL语法为#{...}${...}。您是否尝试使用视图对象?它是com.ibm.xsp.component.UIViewRootEx2,您可以使用该类或query a property或更好地使用API Inspector。至少className会为你提供你想要的东西

答案 2 :(得分:0)

设计定义中的xp.image标记可以在xpages中使用。 设计定义加速了DDE中的上传速度,没有设计定义,标签被计算出来,并且减慢了从DDE加载xpage的速度减慢,我发现。 XPages Design Definition for a custom control

<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core" xmlns:xc="http://www.ibm.com/xsp/custom">
<xp:div style="background-color:blue; color:white; padding:3px;">
Begin This is Month Picker Custom Control</xp:div>
<xp:image url="/esaCboxFilters.GIF"></xp:image> 
<xp:panel> 
tagCloud for <!-- %=this.viewName % this does not work --> 
</xp:panel> 
</xp:view>

How the Design Definition Looks in the Design Pane