Re: Feasibility of Programming in GWT

2009-12-18 Thread Alex Siman
I have programmed in GWT in past. The advantage over Struts 2 is GWT's component model. It allows to reuse code and leverage your favorite safe refactoring tools (say Eclipse). JSP sucks on refactoring. The main GWT disadvantage is Java-to-JavaScript compilation. It has no incremental compilati

Re: unicode character is in wrong format

2009-12-14 Thread Alex Siman
Here is the best checklist for Java webdev + UTF-8 http://stackoverflow.com/questions/138948/how-to-get-utf-8-working-in-java-webapps Nguyen Xuan Son-2 wrote: > > dear all > im using PreparedStatement.setNString(int, String) > to insert the japanese characters into my MySQL database > but the r

Re: Struts 2 Result + GWT

2009-12-11 Thread Alex Siman
Maybe just use Struts 2 Convention plugin? It will allow you to reuse Java constants in Struts 2 and GWT code. package gwtapp.server.action; import static gwtapp.client.consts.StrutsLocations; @Results({ @Result( name = Action.SUCCESS, location = REGISTRATI

Re: [S2] i18n not using default bundle

2009-12-10 Thread Alex Siman
The trick is simple: create an empty file: global-message_zh_CN.properties This is not Struts 2 problem, but Java ResourceBundle's. You can read more here: http://old.nabble.com/Struts2-%2B--I18N-td24973817.html#a24978732 mailtolouis2020-str...@yahoo.com wrote: > > Hello, > > I got a doubt on

Re: Where to disable encrypting of non latin chars?

2009-11-28 Thread Alex Siman
utput this but first you must imo >> try >> s:property with escape="false" >> >> >> On Sat, Nov 28, 2009 at 5:57 AM, Alex Siman >> wrote: >> >>> >>> I don't know... Do I need these extra bytes in output? And are that >>

Re: Where to disable encrypting of non latin chars?

2009-11-28 Thread Alex Siman
Nov 28, 2009 at 6:50 AM, Saeed Iqbal wrote: >> >>> These are encoded characters. Either output this but first you must imo >>> try >>> s:property with escape="false" >>> >>> >>> On Sat, Nov 28, 2009 at 5:57 AM, Alex Siman >&

Re: Where to disable encrypting of non latin chars?

2009-11-27 Thread Alex Siman
lse" can help you or show those characters as encoded values >> >> >> On Fri, Nov 27, 2009 at 8:17 AM, Alex Siman >> wrote: >> >>> >>> I just have found another issue after upgrading from [2.1.6] -> [2.1.8]. >>> Struts now encode any non la

Re: Where to disable encrypting of non latin chars?

2009-11-27 Thread Alex Siman
This option will unescape everything. But I need to leave escaping of next chars: < > ' " As I know it is enough for security. Saeed Iqbal-2 wrote: > > escape="false" can help you or show those characters as encoded values > > On Fri, Nov 27, 2009 at 8

Re: Where to disable encrypting of non latin chars?

2009-11-27 Thread Alex Siman
Oh, Nabble does not show those entities. Them look like next (but w/o spaces between): & #1086;& #1087;& #1080;& #1089;& #1072;& #1085;& #1080;& #1077; Alex Siman wrote: > > I just have found another issue after upgrading from [2.1.6] -> [2.1.8]. >

Where to disable encrypting of non latin chars?

2009-11-26 Thread Alex Siman
I just have found another issue after upgrading from [2.1.6] -> [2.1.8]. Struts now encode any non latin char to its HTML entity of property. E.g. now I have such a mess in HTML output (in browser it looks OK): описание How to disable encoding of every char but leave only encoding of special ch

Re: Hibernate/Spring

2009-11-15 Thread Alex Siman
Can we just remove this "magainty"/"Martin Gainty" from Struts mailing lists? I do not understand what it/he writes. Musachy Barroso wrote: > > never mind him, he is a troll, or a bot, or very very stupid, or all of > them. > > On Sat, Nov 14, 2009 at 9:18 PM, Denis Cabasson > wrote: >> Hi Mar

Form wizard: how to manage state?

2009-11-11 Thread Alex Siman
Suppose a state of the form wizard is stored in session. And ID of current wizard process is passed with every form submit. But if user unfinishes process and leaves the form wizard, then wizard data will pollute the session. What is the best way to manage form wizard state? -- View this message

Re: Struts 2.1.8: Do we need to escape messages?

2009-10-17 Thread Alex Siman
ext? a > s:property? > > Denis. > > Alex Siman a écrit : >> I just have found that Struts 2.1.8 escapes messages, so instead of >> message >> (in browser) like: >> User with email u...@example.com registered successfully. >> >> now I get this

Re: about s:generator (struts 2.1.8) - new information

2009-10-16 Thread Alex Siman
> iterator into page context so try this: jspContext.getAttribute("myAtt "); leftkaren wrote: > > Hello, all > > Sorry for sending my email twice, I found something wired. > > Document from http://struts.apache.org/2.x/docs/generator.html > tell us: > var - The name to store the resu

Re: Struts 2.1.8: Do we need to escape messages?

2009-10-16 Thread Alex Siman
t; > If you set it to false, then you will probably get what you want. > > -Wes > > On Fri, Oct 16, 2009 at 6:05 AM, Alex Siman > wrote: >> >> I just have found that Struts 2.1.8 escapes messages, so instead of >> message >> (in browser) like: >> User

Struts 2.1.8: Do we need to escape messages?

2009-10-16 Thread Alex Siman
I just have found that Struts 2.1.8 escapes messages, so instead of message (in browser) like: User with email u...@example.com registered successfully. now I get this one: User with email u...@example.com registered successfully. In first example I used to escape only the inser

Re: How to get value of tag attribute from OGNL?

2009-10-13 Thread Alex Siman
Cool, welcome back, JSTL-EL! DNewfield wrote: > > Alex Siman wrote: >>>> I switched off the JSTL-EL (as it was recomended in Struts2 wiki) >>> Can you please point me to that? Seems quite strange to me... > > Since we've removed the possibility of incl

Re: Changing the border color of a text field

2009-10-13 Thread Alex Siman
l I haven't got it working. > "value="%{fieldErrors['zipCode[ >> >> ' + >> #rowstatus.index + ']']}"/>" - always evaluates to null. Can you think of >> any reason why it could be so? >> > > > On Mon, Oct 12, 2009 at 3

Re: How to get value of tag attribute from OGNL?

2009-10-13 Thread Alex Siman
function to *Action class? Musachy Barroso wrote: > > on top of that, you can use the the struts "set" tag to set stuff in > any of the contexts. Scriptlets are evil. > > musachy > > On Tue, Oct 13, 2009 at 9:41 AM, Dale Newfield wrote: >> Alex Siman w

Re: How to get value of tag attribute from OGNL?

2009-10-13 Thread Alex Siman
>> I switched off the JSTL-EL (as it was recomended in Struts2 wiki) > > Can you please point me to that? Seems quite strange to me... Read the section "JSP 2.1" here: http://struts.apache.org/2.1.8/docs/ognl.html > "The answer is easier if this .tag file contains no recursive calls." I think

[CLOSED] Re: How to get value of tag attribute from OGNL?

2009-10-13 Thread Alex Siman
Seems like question is closed now. Thanks. Alex Siman wrote: > > Thanx you Dave for your advice! > > I switched off the JSTL-EL (as it was recomended in Struts2 wiki), so I > wrote another working code: > > <% request.setAttribute("jspContext", js

Re: How to get value of tag attribute from OGNL?

2009-10-13 Thread Alex Siman
he .tag file receives attributes through jstl-el, not > ognl. You can use the jstl-el c:set tag to promote that value into a > namespace that's also accessible from ognl. > > Alex Siman wrote: >> /WEB-INF/tags/formField.tag >>

Re: Why is PageContext null?

2009-10-13 Thread Alex Siman
OK, let it be so. Musachy Barroso wrote: > > that should be available inside tags only, not actions..I think. > > On Tue, Oct 13, 2009 at 6:57 AM, Alex Siman > wrote: >> >> I do try to get PageContext inside action in a such way: >> >>        ServletAc

Why is PageContext null?

2009-10-13 Thread Alex Siman
I do try to get PageContext inside action in a such way: ServletActionContext.getPageContext(); and it is null. Why? -- View this message in context: http://www.nabble.com/Why-is-PageContext-null--tp25873385p25873385.html Sent from the Struts - User mailing list archive at Nabble.com.

RE: How to get value of tag attribute from OGNL?

2009-10-13 Thread Alex Siman
Did you mean this variant?: This code does NOT work. So the question still open. Mike Baranski-2 wrote: > > Why not use this? > http://struts.apache.org/2.1.6/docs/set.html > >>-Original Message- >>From: Alex Siman [mailto:aleksandr.si...@gmail.com] >>S

Re: How to get value of tag attribute from OGNL?

2009-10-13 Thread Alex Siman
OK, I figured out how to get value of tag attribute in JSP: <%= jspContext.getAttribute("fieldName", PageContext.PAGE_SCOPE) %> Now I need to put this value into some OGNL variable, say '#ognlFieldName', to get access to this value from Struts2 tags. So, how to get access to jspContext

Re: How to get value of tag attribute from OGNL?

2009-10-13 Thread Alex Siman
.debug("pageContext.findAttribute('fieldName'): " + pageContext.findAttribute("fieldName")); } Musachy Barroso wrote: > > I am not sure I understand what you mean. Is "someTagAttribute" set in > the context by your

How to get value of tag attribute from OGNL?

2009-10-12 Thread Alex Siman
I have created JSP file tag as it is described here http://java.sun.com/javaee/5/docs/tutorial/doc/bnama.html To get value of tag attribute 'someTagAttribute' I use this code: OGNL context works fine within this file tag. But I realized that if there will be an action property with the same n

Re: Changing the border color of a text field

2009-10-12 Thread Alex Siman
Try to add next code: james billa wrote: > > Hi, > > I have a field called "Preferred Zip codes : ". The user is provided with > 10 > textfields for this to enter. > He may enter 1 or more and submit the form. If any of the zip codes that > he > entered is not in my > database, I ne

Re: Refactoring of Interceptor.intercept(ActionInvocation)

2009-10-06 Thread Alex Siman
achy > > On Tue, Oct 6, 2009 at 7:50 PM, Alex Siman > wrote: >> >> Is it safe to get ActionInvocation inside of [Interceptor.intercept()] in >> this way?: >> >> ActionInvocation invocation = >> ActionContext.getContext().getActionInvocation(); >> &

Re: Refactoring of Interceptor.intercept(ActionInvocation)

2009-10-06 Thread Alex Siman
Is it safe to get ActionInvocation inside of [Interceptor.intercept()] in this way?: ActionInvocation invocation = ActionContext.getContext().getActionInvocation(); Alex Siman wrote: > > Is there any way to refactor method [intercept(ActionInvocation)] to > remove ActionInvocation

Refactoring of Interceptor.intercept(ActionInvocation)

2009-10-06 Thread Alex Siman
Is there any way to refactor method [intercept(ActionInvocation)] to remove ActionInvocation parameter. It is not usable to have this parameter, because it makes refactoring of method interceptor hard. Instead of this: public class SomeInterceptor extends AbstractInterceptor { @Override

Re: Struts2 and TestNG

2009-10-06 Thread Alex Siman
dolsen-2 wrote: > > Does this method work if I declare my actions with annotations instead of > declaring them in struts.xml? > Of course, I also declare actions w/ annos. dolsen-2 wrote: > > It looks like from the errors I get that it is trying to read the action > definitions from the stru

Re: Struts2 and TestNG

2009-10-05 Thread Alex Siman
Look here: http://struts.apache.org/2.x/docs/testing-actions.html dolsen-2 wrote: > > I am looking for some good ways of using TestNG to test my actions. I > know I can test them like any other POJO but I would like it to include > all the interceptors if possible. Can anyone give me any good

Re: Struts 2 runtime variable names

2009-10-05 Thread Alex Siman
I use such approach: ... "%{'form.cvgcode' + #i}" ... "%{'form.cvglimit' + #i}" ... hisameer wrote: > > hello everyone, > > I need to change the s:select name parameter's value depending on the > index of the list. > > I have the following code : > > <%! int i=1;

Re: Struts 2 runtime variable names

2009-10-05 Thread Alex Siman
I use such approach: ... "%{'form.cvgcode' + #i}" ... "%{'form.cvglimit' + #i}" ... hisameer wrote: > > hello everyone, > > I need to change the s:select name parameter's value depending on the > index of the list. > > I have the following code : > > <%! int i=1;

Re: Problem with available Strus2 Releases

2009-09-28 Thread Alex Siman
2.1.8 is here: http://people.apache.org/builds/struts/2.1.8/ gustavo-49 wrote: > > I even tried to go to the listing from the mirrors and there are no 2.1.7 > or 2.1.8 there: > -- View this message in context: http://www.nabble.com/Problem-with-available-Strus2-Releases-tp25634547p25645166.h

Re: restful URL issue

2009-09-28 Thread Alex Siman
Look here: http://www.nabble.com/parameters-in-url-td25602877.html Restful plugin is not so good as it supposed to be. struts-restful wrote: > > Does anyone know how to get the restful web service to call a method > different to show or edit. > > For example I have the following url > > http

%{} confuses me

2009-09-19 Thread Alex Siman
I must use ${} to evaluete expression either in .properties, struts.xml, java strings - everywhere, but not in JSP. In JSPs I must use %{}. Damn. Inconsistency. Is there any workaround to use ${} instead of %{} in JSPs? And more: note ' (apostrophes) around the Struts2 word. So "val

Re: How does Struts serve assets from JAR?

2009-09-19 Thread Alex Siman
nd use the url tag to > build a url for it, like: > > > > see http://struts.apache.org/2.x/docs/static-content.html > > musachy > > On Fri, Sep 18, 2009 at 8:32 PM, Alex Siman > wrote: >> >> I see that Struts serve theme files (validation.js, styl

How does Struts serve assets from JAR?

2009-09-18 Thread Alex Siman
I see that Struts serve theme files (validation.js, styles.css, ...) from JAR. How does it do it? All I want is to pack all 3rd part web libs like jQuery, YUI, FCKEdtior... into JARs e.g.: jquery.jar yui.jar ... -- View this message in context: http://www.nabble.com/How-does-Struts-serve-asset

Re: [OT] RE: How do you refactor JSP, HTML, JavaScript, CSS, etc?

2009-09-18 Thread Alex Siman
> http://www.eclipse.org/mail/ > http://www.eclipse.org/articles/article.php?file=Article-Unleashing-the- > Power-of-Refactoring/index.html > > >> -Original Message- >> From: Alex Siman [mailto:aleksandr.si...@gmail.com] >> Sent: Friday, September 18, 200

How do you refactor JSP, HTML, JavaScript, CSS, etc?

2009-09-18 Thread Alex Siman
I'm using Eclipse and the current solution (which I dislike) is to "Search/Replace". This is error prone solution. Do you now any better approach to refactor non Java resources in big apps? Or do you use any cool refactoring tool? P.S. Maybe this topic does not relate to Struts directly, but Str

Convention plugin: @Result name aliases?

2009-08-31 Thread Alex Siman
I have LoginAction which maps to "login.jsp". How to use the same JSP for "input" (or whatever else) result w/o using of result location? ...for now I have this workaround, which I dislike: @Results({ @Result( name = Action.INPUT, location = "login.jsp"