XPages disableOutput tag issue
Asked Answered
R

2

5

Has anyone experienced an issue with disableOutputTag property where if you disable output tag for a computed field control inside a repeat control and have ssjs computed content inside that tag, it won't compute the content? Is disableOutputtag property only meant to work with static content inside a repeat control or is it a bug?

Ringworm answered 14/3, 2012 at 11:14 Comment(4)
I also noticed such an issue with the disableoutputtag that in some situations it behaves like the 'rendered' property. Unfortunatly i couldn't reproduce the issue.Edo
I don't know whether its a bug or not, but you can emulate the behavior of disableOutputTag by removing the ID attribute from <xp:text> and setting the disableTheme attribute to true. Maybe this helps you in short term.Senecal
Thanks Naveen - I will try that out and let you know.Ringworm
Naveen it works without even setting the disableTheme option. Thank you - if you post this as an answer, I am happy to accept your answer.Ringworm
S
4

I don't know whether its a bug or not, but you can emulate the behavior of disableOutputTag by removing the ID attribute from and setting the disableTheme attribute to true. Maybe this helps you in short term.

EDIT: You can refer here for more information.

Senecal answered 15/3, 2012 at 15:11 Comment(1)
As @Ringworm said, just remove the ID attribute was enough, I didn't touch the disableTheme property. Thank you.Esposito
E
3

Not only does this happen when placing the xp:Text control inside a repeat but in also when you create a new XPage, add a xp:text onto it and define its value like:

<xp:text value="This is a test" disableOutputTag="true"/>

In the above example the xp:text will disappear. This is not what you would have expected. I would expect that only the value would be visible on the rendered page. But I think I can explain why this happens. Since there are no tags defined (disableoutputtag) somewhere in the rendered of this component it states that it should not generate anything. Because it can not bind its id to 'nothing' and so on.

Anyway, I could not think of a scenario where I would like to render plain text without any surrounding tags. It should at least be surrounded by a span or paragraph (<p>) tag so you can style it. And an ID would be nice so I can change the contents with a partial refresh.

Edo answered 14/3, 2012 at 12:25 Comment(1)
There are many scenarios when you don't want the surrounding tags, when you are using it to generate your own HTML for example. Or when you have a repeat control and you wish to add </tr><tr> based on the index variable etc etc. In classic Notes web development using forms, we can insert a field on a form and compute the value or use LS to populate the value. I normally achieve similar effect using a computed text to generate HTML in xpages, unless there are other ways to do it in xpages?Ringworm

© 2022 - 2024 — McMap. All rights reserved.