Re: Question about com.opensymphony.xwork2.util.LocalizedTextUtil

2017-09-25 Thread Lukasz Lenart
2017-09-25 20:05 GMT+02:00 Roslyakova, Svetlana : > Hi, > > We have upgraded to struts2 version 2.3.34. > > After the upgrade s:hidden field stopped working. If I remove s:hidden tag > from the jsp page, the page is displayed correctly, with the the screen, css stop working. > > Any advice? Do

RE: Question about com.opensymphony.xwork2.util.LocalizedTextUtil

2017-09-25 Thread Roslyakova, Svetlana
: Question about com.opensymphony.xwork2.util.LocalizedTextUtil Hi, The - com.opensymphony.xwork2.util.LocalizedTextUtil was deleted with struts2 2.5.13. But I use following code in my small project and I'm not sure, how to replace it: ... import com.opensymphony.xwork2.util.LocalizedTex

Re: Question about com.opensymphony.xwork2.util.LocalizedTextUtil

2017-09-25 Thread Lukasz Lenart
2017-09-22 21:01 GMT+02:00 Klaus Tachtler : > Hi, > > thank you once again for your support, Łukasz and Adam! > > @Łukasz: you're absolutly right to say: > "I would rather pass a localised string to the bean (if possible), this > creates a dependency on Struts in non-Struts related bean" > > Depend

Re: Question about com.opensymphony.xwork2.util.LocalizedTextUtil

2017-09-22 Thread Klaus Tachtler
Hi, thank you once again for your support, Łukasz and Adam! @Łukasz: you're absolutly right to say: "I would rather pass a localised string to the bean (if possible), this creates a dependency on Struts in non-Struts related bean" Depending on that I ONLY want to use the same resource bundle as

Re: Question about com.opensymphony.xwork2.util.LocalizedTextUtil

2017-09-22 Thread Klaus Tachtler
Hi, thank you for the help! I will try the solution and implement it. Thank you! Klaus. Borrowing from Lukasz’s improvement. public class MyControlelr extends ActionSupport … @Override public String execute() { String msg = getText(‘myMessageKey”); FileReader.determineFileReader(msg,

Re: Question about com.opensymphony.xwork2.util.LocalizedTextUtil

2017-09-22 Thread Adam Brin
Borrowing from Lukasz’s improvement. public class MyControlelr extends ActionSupport … @Override public String execute() { String msg = getText(‘myMessageKey”); FileReader.determineFileReader(msg, userString); -- _ Adam Brin Director

Re: Question about com.opensymphony.xwork2.util.LocalizedTextUtil

2017-09-22 Thread Klaus Tachtler
Hi Adam, thank you so much for the example! BUT from where can I get the "TextProvider provider" (you said all ActionSupport classes implement this) Thank you! Klaus. import com.opensymphony.xwork2.TextProvider; public class FileReader { private static Locale locale = null;

Re: Question about com.opensymphony.xwork2.util.LocalizedTextUtil

2017-09-22 Thread Lukasz Lenart
2017-09-22 16:39 GMT+02:00 Adam Brin : > import com.opensymphony.xwork2.TextProvider; > > public class FileReader { > > private static Locale locale = null; > >// not sure if this needs to be static > public static Bean determineFileReader(String userString, > TextProvider

Re: Question about com.opensymphony.xwork2.util.LocalizedTextUtil

2017-09-22 Thread Adam Brin
import com.opensymphony.xwork2.TextProvider; public class FileReader { private static Locale locale = null; // not sure if this needs to be static public static Bean determineFileReader(String userString, TextProvider provider) { String i18nString = provi

Re: Question about com.opensymphony.xwork2.util.LocalizedTextUtil

2017-09-22 Thread Klaus Tachtler
Hi Adam, can you give me a small example, to understand what you mean? Sorry and thank you for your patience with me! Klaus. Ok, then from your Action/Controller pass in a TextProvider into the method which has the localization. All ActionSupport subclassess implement this, so you can pas

Re: Question about com.opensymphony.xwork2.util.LocalizedTextUtil

2017-09-22 Thread Adam Brin
Ok, then from your Action/Controller pass in a TextProvider into the method which has the localization. All ActionSupport subclassess implement this, so you can pass this in. -- _ Adam Brin Director of Technology, Digital Antiquity 480.965

Re: Question about com.opensymphony.xwork2.util.LocalizedTextUtil

2017-09-22 Thread Klaus Tachtler
Hi Adam, no it is no a subclass. package... import com.opensymphony.xwork2.ActionContext; import com.opensymphony.xwork2.util.LocalizedTextUtil; import net.tachtler.resources.Globals; public class FileReader { private static Locale locale = null; public static Bean determine

Re: Question about com.opensymphony.xwork2.util.LocalizedTextUtil

2017-09-22 Thread Adam Brin
what class are you doing this in? Are you subclassing off of ActionSupport? -- _ Adam Brin Director of Technology, Digital Antiquity 480.965.1278 > On Sep 22, 2017, at 7:20 AM, Klaus Tachtler wrote: > > Hi Łukasz, > > can you give me an

Re: Question about com.opensymphony.xwork2.util.LocalizedTextUtil

2017-09-22 Thread Klaus Tachtler
Hi Łukasz, can you give me an example, so that I can understand it right? I have ActionContext and ActionContext.getContext().getLocale() BUT how can I use getText(key) in my situation. Thank you patience with me! Klaus. 2017-09-22 16:12 GMT+02:00 Klaus Tachtler : is it possible to use g

Re: Question about com.opensymphony.xwork2.util.LocalizedTextUtil

2017-09-22 Thread Lukasz Lenart
2017-09-22 16:12 GMT+02:00 Klaus Tachtler : > is it possible to use getText("global.unkonwn") with the > ActionContext.getContext().getLocale() like > - getText("global.unknown", ActionContext.getContext().getLocale()); You don't have to, I mean "getText(key)" does it for you - it uses the current

Re: Question about com.opensymphony.xwork2.util.LocalizedTextUtil

2017-09-22 Thread Klaus Tachtler
Hi Łukasz, is it possible to use getText("global.unkonwn") with the ActionContext.getContext().getLocale() like - getText("global.unknown", ActionContext.getContext().getLocale()); Thank you! Klaus. 2017-09-22 15:57 GMT+02:00 Klaus Tachtler : I use it to fill up a bean with the string "un

Re: Question about com.opensymphony.xwork2.util.LocalizedTextUtil

2017-09-22 Thread Lukasz Lenart
2017-09-22 15:57 GMT+02:00 Klaus Tachtler : > I use it to fill up a bean with the string "unkonwn" or "unbekannt" to show > it later on the website. > > So, what I want to do is, get a string in different languages from the > Resource-Bundle from the ActionContext. Why don't you use "getText(key)"

Re: Question about com.opensymphony.xwork2.util.LocalizedTextUtil

2017-09-22 Thread Klaus Tachtler
Hi, thank you for your reply. I use it to fill up a bean with the string "unkonwn" or "unbekannt" to show it later on the website. So, what I want to do is, get a string in different languages from the Resource-Bundle from the ActionContext. Thank you! Klaus. 2017-09-22 15:40 GMT+02:0

Re: Question about com.opensymphony.xwork2.util.LocalizedTextUtil

2017-09-22 Thread Lukasz Lenart
2017-09-22 15:40 GMT+02:00 Klaus Tachtler : > String i18nString = LocalizedTextUtil.findDefaultText("global.unknown", > ActionContext.getContext().getLocale()); Where do you use "i18nString"? Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ -

Question about com.opensymphony.xwork2.util.LocalizedTextUtil

2017-09-22 Thread Klaus Tachtler
Hi, The - com.opensymphony.xwork2.util.LocalizedTextUtil was deleted with struts2 2.5.13. But I use following code in my small project and I'm not sure, how to replace it: ... import com.opensymphony.xwork2.util.LocalizedTextUtil; ... /* * Get the i18n text for "string" from ActionContext