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.
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);
Thanks. And that’s a good idea. Definitely worth a try.
Do you know which package PSCoreItem is in? I don’t seem to have it in the .java files on our system.
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
Thanks. And thanks for the link to the java docs too.