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
: 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
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
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
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,
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
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;
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
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
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
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
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
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
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
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
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
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)"
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
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/
-
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
20 matches
Mail list logo