0
votes

I cant find a solution for this problem. I am using design definitions for almost all my controls.

They are working fine the only problem i have is that if i am computing one of the properties i cant use the property anymore in the design definition. It will create a text in red and the xpages will prompt some error messages.

Is there a way to ask if the property is computed and show a standard text instead.

This is the design definition.

<?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:inputText type="text" value="<%=this.field_name %>"></xp:inputText>
</xp:view>

Whenever the value of the property field_name is computed in the custom control it brings up that error.

Anybody any ideas?

When I insert the Field custom control with a static text value for field_name, the design definition will display the field_name properly.

<xc:Field field_type="text" field_name="myfield_1"></xc:Field>

If I insert the Field custom control with a computed text value for field_name, it doesn't:

<xc:Field field_type="text"><xc:this.field_name><![CDATA[#  {javascript:"myfield_"+@Text(1)}]]></xc:this.field_name>
</xc:Field>
1

1 Answers

0
votes

Make sure field_name is the exact name of the property passed in as CompositeData. For example, I was able to reference the string property 'create' to create the image of field this way:

<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core">
    <xp:inputText value="<%=this.create%>">
    </xp:inputText>
</xp:view>

So, I suspect it's a typo, a missing property, or not a string.