NickK
September 10, 2013, 11:43am
1
Is there a way to determine the type of text field on a content-type using the API?
I’ve found PSFieldDataType but that doesn’t seem to disntinguish between EditLive and EditBox … they’re just text.
I have some HTML-escaping issues that I think would be easier to deal with if I knew which type of content the field was expecting.
Thanks.
Not ideal, but i use:
boolean isEditLive = aFld.getItemFieldMeta().getFieldDef().mayHaveInlineLinks();
as I figure an editlive field would be the only type of field that will have inline links set…
In the above, aFld is defined as (See thread on saving on how to get to this point):
PSCoreItem item = (PSCoreItem) itemList.get(0);
// fieldName something like "sys_title" or "body"
PSItemField aFld = item.getFieldByName(fieldName);
NickK
September 11, 2013, 6:22am
3
Thanks. And that’s a good idea. Definitely worth a try.
NickK
October 16, 2013, 3:47am
4
Do you know which package PSCoreItem is in? I don’t seem to have it in the .java files on our system.
Via http://code.percussion.com/javadoc/cmsystem/7.0.3/
It is in com.percussion.cms.objectstore
In terms of the actual jar, it is in rxclient.jar … which should be located in /AppServer/server/rx/deploy/rxapp.ear/rxapp.war/WEB_INF/lib
NickK
October 17, 2013, 6:18am
6
Thanks. And thanks for the link to the java docs too.