Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Use of readonly affects text instance width
tsrookie
Hi all,
I wonder if anyone else has noticed this.
When I have a text instance in my dct with a size of 70 and set it as readonly it ignores the width setting
the apparent width when rendered is about 20
does anyone have a workaround?
cheers
Colin
see below.
<item name="url">
<label>URL of page</label>
<text size="70" required="t">
<allowed>
<not>
<or>
<cred role="author" />
<cred role="editor" />
<cred role="administrator" />
<cred role="master" />
</or>
</not>
</allowed>
</text>
<readonly/>
</item>
Find more posts tagged with
Comments
Migrateduser
You didn't mention which version you're using.
Dave
Current Environment(s):
(1) TS 6.1 SP1 on W2K3
(2) TS 6.1 SP1 on W2K
Migrateduser
That's bad syntax. I'm surprised it even worked at all. <readonly> is the same sort of element as <text> it should occur inside the item. It isn't intended to modify the behaviour of another item. In any case, use of readonly is deprecated as of 5.5. Best practice now is to use the setReadOnly method of FormAPI (see the FormAPI manual for details).
Migrateduser
His readonly tag
is
inside the item and a subling to text. That part is right, but you're correct in that it won't work with that version.
Try disabling the field from within FormAPI.
Dave
Current Environment(s):
(1) TS 6.1 SP1 on W2K3
(2) TS 6.1 SP1 on W2K
Migrateduser
Are you saying that it was at some point acceptable to include two different interface widgets inside a single item? I do not recall that being the case in any version post 4.5. I just checked the DTDs for 4.0, 5.0, and 6.0 and oddly, it's allowed. I'd be curious about what sort of behaviour you would get as a result, though.
Migrateduser
I agree with you in that it's strange, but the <readonly> element works rather nicely. I remember when I started using it I did a double or triple-take at whatever reference I was using at the time because the placement of the tag was strange and unexpected.
Dave
Current Environment(s):
(1) TS 6.1 SP1 on W2K3
(2) TS 6.1 SP1 on W2K
Migrateduser
Wow, I was thinking you were high, but this is how they show it in the 6.0 docs, now on p. 47.
In the old days, I'm pretty sure the syntax was more like this:
<item name="foo">
<readonly>This is some text</readonly>
</item>
which is more consistent with the idea of it being able to have a <callout> element within it
Dwayne
I'ts been like this for quite some time. It's always (well, for a long time anyway) been acceptable to have two different widgets defined for the same item. The intent was to use the
<allowed>
tag to control which one is actually instantiated.
Although I'm not sure if it was ever defined what would happen if two different widgets both passed the filters set by the various
<allowed>
tags. I'm guessing it's first one wins, but I don't know that this was ever guaranteed.
--
Current project: TS 5.5.2/6.1 W2K
Migrateduser
Ah, so in the pre-formapi days you could set up the allowed tags in such a way that some users would get the actual widget and others would get a readonly for instance. Somehow I managed to not ever understand that even when I was a trainer. My poor students....
report designer.JPG
iserver mgmt console.JPG
Dwayne
Yup. As long as you were only switching between leaf-level widgets, you were fine. You couldn't mix, for instance, a replicant with a hidden to hide entire blocks of fields from some users (which I tried to do).
--
Current project: TS 5.5.2/6.1 W2K
jbonifaci
There was a similar post to this almost a year ago where I suggested a workaround via formapi.
Clicky