I’m trying to capture some page info to throw into header tags. i’m getting the data I want using this:
set field=“pageTitle” from=“sri.screenUrlInfo.extraPathNameList”
but the string I’m getting has some non-alpha characters in it. Specifically the left and right bracket [ ]
To experiment, I tried just getting rod of the alpha ‘a’ in the string.
set field=“pageTitle” from=“sri.screenUrlInfo.extraPathNameList.replaceAll(‘a’,’ ')”
I’ve tried several different permutations, but get the following error:
No signature of method: java.util.ArrayList.replaceAll() is applicable for argument types: (String, String) values: [a, ]
Is there a better way to manipulate string values once I’ve captured them in a field?
I might be stating the obvious but the error is self explanatory
isn't it? You are not getting back a string but rather a List. And
the method "replaceAll" is for strings. You're not getting back
non-alpha characters, it's just a List [1]. You need to simply
traverse the list to get what you need, either by specifying
index, or looping or whatever makes it work for you
[1] org.moqui.impl.screen.ScreenUrlInfo ->
ArrayList<String> extraPathNameList =
(ArrayList<String>) null
--
You received this message because you are subscribed to the Google Groups "Moqui Ecosystem" group.
To unsubscribe from this group and stop receiving emails from it, send an email to moqui+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/moqui/41ca147d-b52b-4e1b-be7b-ebfe46bb5482n%40googlegroups.com.