Re: [S2] autocompleter, predefining initial value

2006-12-31 Thread Musachy Barroso

Both problems should now be fixed on IE 6.

regards
musachy

Musachy Barroso wrote:

I will fix it so it ignores that null value. UTF-8 works.

regards
musachy

Dariusz Wojtas wrote:

I am not really sure if it worked before, both autcompleter and my
code do evolve ;)
I was always using JSP with UTF-8 encoding to generate my options.
Is UTF-8 a problem here?

You mean
   [ [A, B] , ]
is problematical for IE, but
   [ [A, B] ]
will work? Should I change something in the json list generation or
the autocompleter will recognize such case?

Dariusz Wojtas

On 12/28/06, Musachy Barroso [EMAIL PROTECTED] wrote:

This is what I found so far, there are 2 problems, one is that when
there is a json array like:

[ [A, B] , ]

IE puts a null object in the array. That one is easy to fix. The other
problem is that using freemaker, like in showcase to render the json
array, the charset of the response is set to Cp1252, which causes the
error on IE. If I use a jsp to render the json array, the encoding is
ISO-8859-1 which works fine. Was this working for you before?

regards
musachy


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [tiles 2] Accessing items from a putList?

2006-12-31 Thread Eric Rank

Thanks Antonio,

I think I was just feeling a little insecure about the code I was  
writing. Ultimately, I just want to make sure that I'm doing things  
the right way. If using JSTL falls within the scope of best practices  
for pulling out putList attribute values, I'm satisfied.


To answer your question, I didn't like the approach because I managed  
to build most of my application without the Core JSTL (using the  
Struts tags with OGNL support instead). Introducing another taglib  
just felt wrong. For some reason, the tests I did using the iterate  
tag didn't work -- probably because I don't fully grasp the OGNL  
syntax yet.


Conclusion: Looping over the attribute sent in from the named putList  
is the right way to pull values out. If using the JSTL Core forEach  
tag is acceptable, I'm satisfied. However, I'll be more satisfied  
when I can get it to work with the struts iterate tag.


Thanks again,

Eric Rank






On Dec 31, 2006, at 4:24 AM, Antonio Petrelli wrote:


Eric Rank ha scritto:

Hi all,

I am trying to insert items from a putList defined in my tiles.xml  
file in a template file. The only way that I can seem to do it is  
by using the following process


1. make the putList 'List' accessible on the page with  
tiles:useAttribute name=myPutList /

2. sending that variable in to a JSTL Core taglib forEach loop
3. using tiles:insertDefinition name=${putListItem} /



I think your code is perfect, so why don't you like it?
Tiles 2 does not depend on Struts anymore, so the best practice  
is to use the most generic tag libraries, that is JSTL.
Instead of tiles:useAttribute you can use tiles:importAttribute  
that does not create a scripting variable, but only a page context  
attribute.

Anyway you can use all the iterate tags you like.

Antonio

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [tiles 2] Accessing items from a putList?

2006-12-31 Thread Eric Rank
I figured out a way to get by without using the Core JSTL forEach  
tag. Antonio, as you state, I can use any method of iteration I  
choose. In my case, my goal was to use the struts iterator tag.  
Code that works follows:


==

tiles:importAttribute name=myPutList scope=request/

s:iterator value=#request['myPutList'] id=part 
s:set value=#part name=p/
tiles:insertDefinition name=${p} /
/s:iterator

==

However, this seems a little less elegant than using the Core JSTL  
forEach tag. But, does it work? Yes. Is it ok? Yes. Is it somewhat  
confusing to mix the syntaxes, scopes and contexts? Yes.


I find the context / variable scoping to be more of a challenge to  
deal with than anything else. In this example, in order to access the  
imported tiles attribute on the page, I need to set it into a scope  
that the struts tags have access to. Here , I just put it into the  
request scope. Then, once the struts iterator tag loops through the  
list, it sets the values into it's own OGNL context, which the tiles  
tags cannot access. Then, I have to bring it back, once again, into a  
scope that the tiles tags can access. This requires explicitly  
placing the value into an accessible context with the set tag.  
Finally, I can insert the tiles definition with EL syntax.


For me, I think the challenge will be figuring out a set of  
conventions and self-imposed rules for when it's appropriate to use  
Struts tags with OGNL syntax, and when to use EL and JSTL. It's nice  
to have the flexibility to put it all together, but it definitely  
increases the amount of knowledge required to assemble a page of  
code. Just my opinion.


Thanks again for the help,

Eric Rank


On Dec 31, 2006, at 4:24 AM, Antonio Petrelli wrote:


Eric Rank ha scritto:

Hi all,

I am trying to insert items from a putList defined in my tiles.xml  
file in a template file. The only way that I can seem to do it is  
by using the following process


1. make the putList 'List' accessible on the page with  
tiles:useAttribute name=myPutList /

2. sending that variable in to a JSTL Core taglib forEach loop
3. using tiles:insertDefinition name=${putListItem} /



I think your code is perfect, so why don't you like it?
Tiles 2 does not depend on Struts anymore, so the best practice  
is to use the most generic tag libraries, that is JSTL.
Instead of tiles:useAttribute you can use tiles:importAttribute  
that does not create a scripting variable, but only a page context  
attribute.

Anyway you can use all the iterate tags you like.

Antonio

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[S2] client validation problem

2006-12-31 Thread Nick Tucker

Hi

I have been having trouble with client side validation for some time.
I am not sure if this usage case has been reported before, or even if this
is the
right place to report it, as it is an old problem from webwork.

On experimenting with the  quiz_client.jsp in the showcase application I
found that if I changed
the form tag to include an action attribute, then the javascript for  the
form validation was not
generated. This was also the case when I switched to using freemarker rather
than jsp.

i.e. 

s:form method=post validate=true action=quizClient.action
s:textfield label=Name name=name/
s:textfield label=Age name=age/
s:textfield label=Favorite color name=answer/
s:submit/
/s:form

or 

[EMAIL PROTECTED] method=post validate=true]
[EMAIL PROTECTED] label=Name name=name/]
[EMAIL PROTECTED] label=Age name=age/]
[EMAIL PROTECTED] label=Favorite color name=answer/]
[EMAIL PROTECTED]/]
[/@s.form]

So a simple work around for some of the client validation problems would be
to
only supply the action attribute when absolutely necessary.

I hope that this will be of some use.

Nick Tucker


-- 
View this message in context: 
http://www.nabble.com/-S2--client-validation-problem-tf2902376.html#a8108947
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [S2] autocompleter, predefining initial value

2006-12-31 Thread Dariusz Wojtas

Hi Musachy,

I have just built new S2 (after tag 2.0.2), made sure that the old JAR
files are replaced and restarted it. If something is fixed - great,
but it still misbehaves under IE and Opera.
There is also some issue common to all browsers (including FF):

*) If I have 3 stacked autocompleters, every autocompleter has a value
and I submit the form to go to the same action (reload with selected
values), then only the top autocompleter is displayed with the correct
value. The other 2 autocompleters are empty - but the code in
generated HTML suggests that the correct values were passed to dojo:
  input dojoType=struts:ComboBox ... initialValue=A4 initialKey=3541 ...

The dependent autocompleters are just blank.
And the funny thing is that the browser asks the server for valus to
be shown in autocompleter2 and autocompleter3 and gets the correct
values - on page load. Even more funny is that it shows autocompleter1
with the predefined value, and I may expand both autocompleter2 and
autocompleter3 (nothing selected in autocompleter2).


*) Problem under Opera 9.0.2.
I know a little more about problems under Opera.
It is enough to have single autocompleter to reproduce it.
Some value is selected, the dropdown is hidden.
I click the downArrow with mouse, the dropdown with options nicely
opens and I may change selection. If I mark with mouse/keyboard at
least 1 character in the selected value (as if you were preparing for
copy/paste) then clicking the downArrow has no effect. If I deselect
the character - it works again.
The problem is that after making a selection with mouse - the value is
automatically marked/selected and the downArrow will not work.
Possibly the solution would be to make sure that no character is
marked after choosing an option. Or changing the condition under which
the dropdown checks what options to display.

Similar problem under Opera when typing something in the autocompleter.
If the dropdown is already shown/opened - it will work.
But if you start typing when it is hidden, it will not work because
some characters are automatically marked/selected. Pressing backspace
makes it work.
It is all reproductible with the sample I have sent you.

*) IE 6
Still problems on my machine. Even with simple autocompletes.
I can see an error in the status bar. No details. Just:
 Line:  4872   [It must be sth in the javascript, the HTML code is
much shorter]
 Char:  1
 Error:  [object error]
 Code: 0


Thanks for your help.
And a Happy New Year!

Dariusz Wojtas



On 12/31/06, Musachy Barroso [EMAIL PROTECTED] wrote:

Both problems should now be fixed on IE 6.

regards
musachy

Musachy Barroso wrote:
 I will fix it so it ignores that null value. UTF-8 works.

 regards
 musachy

 Dariusz Wojtas wrote:
 I am not really sure if it worked before, both autcompleter and my
 code do evolve ;)
 I was always using JSP with UTF-8 encoding to generate my options.
 Is UTF-8 a problem here?

 You mean
[ [A, B] , ]
 is problematical for IE, but
[ [A, B] ]
 will work? Should I change something in the json list generation or
 the autocompleter will recognize such case?

 Dariusz Wojtas

 On 12/28/06, Musachy Barroso [EMAIL PROTECTED] wrote:
 This is what I found so far, there are 2 problems, one is that when
 there is a json array like:

 [ [A, B] , ]

 IE puts a null object in the array. That one is easy to fix. The other
 problem is that using freemaker, like in showcase to render the json
 array, the charset of the response is set to Cp1252, which causes the
 error on IE. If I use a jsp to render the json array, the encoding is
 ISO-8859-1 which works fine. Was this working for you before?

 regards
 musachy


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] Will you install VISTA?

2006-12-31 Thread Peter L. Berghold
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Leon Rosenberg wrote:

 http://www.cs.auckland.ac.nz/~pgut001/pubs/vista_cost.txt
 
 


Well.. not to fuel a flame war, but reading stuff like this makes me all
the more comfortable with my decision from long ago to just say no to
Microsoft.

For some folks Microsoft is the right answer, but I'm not one of them.

- --

Peter L. Berghold [EMAIL PROTECTED]
Those who fail to learn from history are condemned to repeat it.
AIM: redcowdawgYahoo IM: blue_cowdawg  ICQ: 11455958
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.6 (GNU/Linux)
Comment: Using GnuPG with Red Hat - http://enigmail.mozdev.org

iD8DBQFFmAIVUM9/01RIhaARAvejAJ4/fP8FP7Ho9e7yOX+bh91u2G3/2wCcDiUP
hAiUwXJZN02RJ05a/HwKTCA=
=CKRT
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: [S2] autocompleter, predefining initial value

2006-12-31 Thread Musachy Barroso
Sorry for the false news :). The issue was closed but it seems like it 
hasn't been committed yet. https://issues.apache.org/struts/browse/WW-1583


regards
musachy

Dariusz Wojtas wrote:

Hi Musachy,

I have just built new S2 (after tag 2.0.2), made sure that the old JAR
files are replaced and restarted it. If something is fixed - great,
but it still misbehaves under IE and Opera.
There is also some issue common to all browsers (including FF):

*) If I have 3 stacked autocompleters, every autocompleter has a value
and I submit the form to go to the same action (reload with selected
values), then only the top autocompleter is displayed with the correct
value. The other 2 autocompleters are empty - but the code in
generated HTML suggests that the correct values were passed to dojo:
  input dojoType=struts:ComboBox ... initialValue=A4 
initialKey=3541 ...


The dependent autocompleters are just blank.
And the funny thing is that the browser asks the server for valus to
be shown in autocompleter2 and autocompleter3 and gets the correct
values - on page load. Even more funny is that it shows autocompleter1
with the predefined value, and I may expand both autocompleter2 and
autocompleter3 (nothing selected in autocompleter2).


*) Problem under Opera 9.0.2.
I know a little more about problems under Opera.
It is enough to have single autocompleter to reproduce it.
Some value is selected, the dropdown is hidden.
I click the downArrow with mouse, the dropdown with options nicely
opens and I may change selection. If I mark with mouse/keyboard at
least 1 character in the selected value (as if you were preparing for
copy/paste) then clicking the downArrow has no effect. If I deselect
the character - it works again.
The problem is that after making a selection with mouse - the value is
automatically marked/selected and the downArrow will not work.
Possibly the solution would be to make sure that no character is
marked after choosing an option. Or changing the condition under which
the dropdown checks what options to display.

Similar problem under Opera when typing something in the autocompleter.
If the dropdown is already shown/opened - it will work.
But if you start typing when it is hidden, it will not work because
some characters are automatically marked/selected. Pressing backspace
makes it work.
It is all reproductible with the sample I have sent you.

*) IE 6
Still problems on my machine. Even with simple autocompletes.
I can see an error in the status bar. No details. Just:
 Line:  4872   [It must be sth in the javascript, the HTML code is
much shorter]
 Char:  1
 Error:  [object error]
 Code: 0


Thanks for your help.
And a Happy New Year!

Dariusz Wojtas



On 12/31/06, Musachy Barroso [EMAIL PROTECTED] wrote:

Both problems should now be fixed on IE 6.

regards
musachy

Musachy Barroso wrote:
 I will fix it so it ignores that null value. UTF-8 works.

 regards
 musachy

 Dariusz Wojtas wrote:
 I am not really sure if it worked before, both autcompleter and my
 code do evolve ;)
 I was always using JSP with UTF-8 encoding to generate my options.
 Is UTF-8 a problem here?

 You mean
[ [A, B] , ]
 is problematical for IE, but
[ [A, B] ]
 will work? Should I change something in the json list generation or
 the autocompleter will recognize such case?

 Dariusz Wojtas

 On 12/28/06, Musachy Barroso [EMAIL PROTECTED] wrote:
 This is what I found so far, there are 2 problems, one is that when
 there is a json array like:

 [ [A, B] , ]

 IE puts a null object in the array. That one is easy to fix. The 
other

 problem is that using freemaker, like in showcase to render the json
 array, the charset of the response is set to Cp1252, which causes 
the
 error on IE. If I use a jsp to render the json array, the 
encoding is

 ISO-8859-1 which works fine. Was this working for you before?

 regards
 musachy


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [S2] autocompleter, predefining initial value

2006-12-31 Thread Musachy Barroso

That was quick! The change is on head already.

musachy

Musachy Barroso wrote:
Sorry for the false news :). The issue was closed but it seems like it 
hasn't been committed yet. 
https://issues.apache.org/struts/browse/WW-1583


regards
musachy

Dariusz Wojtas wrote:

Hi Musachy,

I have just built new S2 (after tag 2.0.2), made sure that the old JAR
files are replaced and restarted it. If something is fixed - great,
but it still misbehaves under IE and Opera.
There is also some issue common to all browsers (including FF):

*) If I have 3 stacked autocompleters, every autocompleter has a value
and I submit the form to go to the same action (reload with selected
values), then only the top autocompleter is displayed with the correct
value. The other 2 autocompleters are empty - but the code in
generated HTML suggests that the correct values were passed to dojo:
  input dojoType=struts:ComboBox ... initialValue=A4 
initialKey=3541 ...


The dependent autocompleters are just blank.
And the funny thing is that the browser asks the server for valus to
be shown in autocompleter2 and autocompleter3 and gets the correct
values - on page load. Even more funny is that it shows autocompleter1
with the predefined value, and I may expand both autocompleter2 and
autocompleter3 (nothing selected in autocompleter2).


*) Problem under Opera 9.0.2.
I know a little more about problems under Opera.
It is enough to have single autocompleter to reproduce it.
Some value is selected, the dropdown is hidden.
I click the downArrow with mouse, the dropdown with options nicely
opens and I may change selection. If I mark with mouse/keyboard at
least 1 character in the selected value (as if you were preparing for
copy/paste) then clicking the downArrow has no effect. If I deselect
the character - it works again.
The problem is that after making a selection with mouse - the value is
automatically marked/selected and the downArrow will not work.
Possibly the solution would be to make sure that no character is
marked after choosing an option. Or changing the condition under which
the dropdown checks what options to display.

Similar problem under Opera when typing something in the autocompleter.
If the dropdown is already shown/opened - it will work.
But if you start typing when it is hidden, it will not work because
some characters are automatically marked/selected. Pressing backspace
makes it work.
It is all reproductible with the sample I have sent you.

*) IE 6
Still problems on my machine. Even with simple autocompletes.
I can see an error in the status bar. No details. Just:
 Line:  4872   [It must be sth in the javascript, the HTML code is
much shorter]
 Char:  1
 Error:  [object error]
 Code: 0


Thanks for your help.
And a Happy New Year!

Dariusz Wojtas



On 12/31/06, Musachy Barroso [EMAIL PROTECTED] wrote:

Both problems should now be fixed on IE 6.

regards
musachy

Musachy Barroso wrote:
 I will fix it so it ignores that null value. UTF-8 works.

 regards
 musachy

 Dariusz Wojtas wrote:
 I am not really sure if it worked before, both autcompleter and my
 code do evolve ;)
 I was always using JSP with UTF-8 encoding to generate my options.
 Is UTF-8 a problem here?

 You mean
[ [A, B] , ]
 is problematical for IE, but
[ [A, B] ]
 will work? Should I change something in the json list generation or
 the autocompleter will recognize such case?

 Dariusz Wojtas

 On 12/28/06, Musachy Barroso [EMAIL PROTECTED] wrote:
 This is what I found so far, there are 2 problems, one is that when
 there is a json array like:

 [ [A, B] , ]

 IE puts a null object in the array. That one is easy to fix. The 
other
 problem is that using freemaker, like in showcase to render the 
json
 array, the charset of the response is set to Cp1252, which 
causes the
 error on IE. If I use a jsp to render the json array, the 
encoding is

 ISO-8859-1 which works fine. Was this working for you before?

 regards
 musachy


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [S2] autocompleter, predefining initial value

2006-12-31 Thread Musachy Barroso
With the Object error and the encoding problem out of the way I will 
start looking at other problems next year :)


regards
musachy

Dariusz Wojtas wrote:

Hi Musachy,

I have just built new S2 (after tag 2.0.2), made sure that the old JAR
files are replaced and restarted it. If something is fixed - great,
but it still misbehaves under IE and Opera.
There is also some issue common to all browsers (including FF):

*) If I have 3 stacked autocompleters, every autocompleter has a value
and I submit the form to go to the same action (reload with selected
values), then only the top autocompleter is displayed with the correct
value. The other 2 autocompleters are empty - but the code in
generated HTML suggests that the correct values were passed to dojo:
  input dojoType=struts:ComboBox ... initialValue=A4 
initialKey=3541 ...


The dependent autocompleters are just blank.
And the funny thing is that the browser asks the server for valus to
be shown in autocompleter2 and autocompleter3 and gets the correct
values - on page load. Even more funny is that it shows autocompleter1
with the predefined value, and I may expand both autocompleter2 and
autocompleter3 (nothing selected in autocompleter2).


*) Problem under Opera 9.0.2.
I know a little more about problems under Opera.
It is enough to have single autocompleter to reproduce it.
Some value is selected, the dropdown is hidden.
I click the downArrow with mouse, the dropdown with options nicely
opens and I may change selection. If I mark with mouse/keyboard at
least 1 character in the selected value (as if you were preparing for
copy/paste) then clicking the downArrow has no effect. If I deselect
the character - it works again.
The problem is that after making a selection with mouse - the value is
automatically marked/selected and the downArrow will not work.
Possibly the solution would be to make sure that no character is
marked after choosing an option. Or changing the condition under which
the dropdown checks what options to display.

Similar problem under Opera when typing something in the autocompleter.
If the dropdown is already shown/opened - it will work.
But if you start typing when it is hidden, it will not work because
some characters are automatically marked/selected. Pressing backspace
makes it work.
It is all reproductible with the sample I have sent you.

*) IE 6
Still problems on my machine. Even with simple autocompletes.
I can see an error in the status bar. No details. Just:
 Line:  4872   [It must be sth in the javascript, the HTML code is
much shorter]
 Char:  1
 Error:  [object error]
 Code: 0


Thanks for your help.
And a Happy New Year!

Dariusz Wojtas



On 12/31/06, Musachy Barroso [EMAIL PROTECTED] wrote:

Both problems should now be fixed on IE 6.

regards
musachy

Musachy Barroso wrote:
 I will fix it so it ignores that null value. UTF-8 works.

 regards
 musachy

 Dariusz Wojtas wrote:
 I am not really sure if it worked before, both autcompleter and my
 code do evolve ;)
 I was always using JSP with UTF-8 encoding to generate my options.
 Is UTF-8 a problem here?

 You mean
[ [A, B] , ]
 is problematical for IE, but
[ [A, B] ]
 will work? Should I change something in the json list generation or
 the autocompleter will recognize such case?

 Dariusz Wojtas

 On 12/28/06, Musachy Barroso [EMAIL PROTECTED] wrote:
 This is what I found so far, there are 2 problems, one is that when
 there is a json array like:

 [ [A, B] , ]

 IE puts a null object in the array. That one is easy to fix. The 
other

 problem is that using freemaker, like in showcase to render the json
 array, the charset of the response is set to Cp1252, which causes 
the
 error on IE. If I use a jsp to render the json array, the 
encoding is

 ISO-8859-1 which works fine. Was this working for you before?

 regards
 musachy


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[S2] Strange problem with Date handling

2006-12-31 Thread Dariusz Wojtas

Now I am stuck with some other issue, something so strange that seems
to be irrational.

I have an URL
   /myAction.action?dataPierwszejRejestracji=2006-12-31
that leads to an action with a Date property - dataPierwszejRejestracji

I submit this URL in IE and Firefox - works.
I submit the same URL under Opera and it fails with long stacktrace on
the Tomcat console.
I repeated it several times.

java.lang.NullPointerException
   
com.opensymphony.xwork2.DefaultActionInvocation.createResult(DefaultActionInvocation.java:197)
   
com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:337)
   
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
   
com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:115)
   
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
   
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219)
   
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:217)
   
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
   
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216)
   
com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:123)
   
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219)
   
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:217)
   
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
   
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216)
   
com.opensymphony.xwork2.interceptor.ParametersInterceptor.intercept(ParametersInterceptor.java:154)
   
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219)
   
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:217)
   
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
   
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216)
   
com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:105)
   
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219)
   
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:217)
   
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
   
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216)
[...]


Has anyone faced this problem?
It does not make sense to me, but that's how it behaves.
The date comes from dropdowndatetimepicker.
I have cut all other request properties to narrow the problem down,
and this is the property left. Without this param in URL the action
executes.

Using Struts 2,
2.0.3 snapshot from trunk.

Regards
Dariusz Wojtas

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [S2] autocompleter, predefining initial value

2006-12-31 Thread Dariusz Wojtas

Hey!
Your fix works as you said.
Under both IE and Opera.

There are still the issues described in my previous mail (resubmit of
stacked autocompleters on all browsers, dropdown problem on Opera),
but the things that you just fixed - do work as expected.
I just had to refresh/clear cache in IE and it started to work.

Best regards
Dariusz Wojtas


On 12/31/06, Musachy Barroso [EMAIL PROTECTED] wrote:

With the Object error and the encoding problem out of the way I will
start looking at other problems next year :)

regards
musachy

Dariusz Wojtas wrote:
 Hi Musachy,

 I have just built new S2 (after tag 2.0.2), made sure that the old JAR
 files are replaced and restarted it. If something is fixed - great,
 but it still misbehaves under IE and Opera.
 There is also some issue common to all browsers (including FF):

 *) If I have 3 stacked autocompleters, every autocompleter has a value
 and I submit the form to go to the same action (reload with selected
 values), then only the top autocompleter is displayed with the correct
 value. The other 2 autocompleters are empty - but the code in
 generated HTML suggests that the correct values were passed to dojo:
   input dojoType=struts:ComboBox ... initialValue=A4
 initialKey=3541 ...

 The dependent autocompleters are just blank.
 And the funny thing is that the browser asks the server for valus to
 be shown in autocompleter2 and autocompleter3 and gets the correct
 values - on page load. Even more funny is that it shows autocompleter1
 with the predefined value, and I may expand both autocompleter2 and
 autocompleter3 (nothing selected in autocompleter2).


 *) Problem under Opera 9.0.2.
 I know a little more about problems under Opera.
 It is enough to have single autocompleter to reproduce it.
 Some value is selected, the dropdown is hidden.
 I click the downArrow with mouse, the dropdown with options nicely
 opens and I may change selection. If I mark with mouse/keyboard at
 least 1 character in the selected value (as if you were preparing for
 copy/paste) then clicking the downArrow has no effect. If I deselect
 the character - it works again.
 The problem is that after making a selection with mouse - the value is
 automatically marked/selected and the downArrow will not work.
 Possibly the solution would be to make sure that no character is
 marked after choosing an option. Or changing the condition under which
 the dropdown checks what options to display.

 Similar problem under Opera when typing something in the autocompleter.
 If the dropdown is already shown/opened - it will work.
 But if you start typing when it is hidden, it will not work because
 some characters are automatically marked/selected. Pressing backspace
 makes it work.
 It is all reproductible with the sample I have sent you.

 *) IE 6
 Still problems on my machine. Even with simple autocompletes.
 I can see an error in the status bar. No details. Just:
  Line:  4872   [It must be sth in the javascript, the HTML code is
 much shorter]
  Char:  1
  Error:  [object error]
  Code: 0


 Thanks for your help.
 And a Happy New Year!

 Dariusz Wojtas



 On 12/31/06, Musachy Barroso [EMAIL PROTECTED] wrote:
 Both problems should now be fixed on IE 6.

 regards
 musachy

 Musachy Barroso wrote:
  I will fix it so it ignores that null value. UTF-8 works.
 
  regards
  musachy
 
  Dariusz Wojtas wrote:
  I am not really sure if it worked before, both autcompleter and my
  code do evolve ;)
  I was always using JSP with UTF-8 encoding to generate my options.
  Is UTF-8 a problem here?
 
  You mean
 [ [A, B] , ]
  is problematical for IE, but
 [ [A, B] ]
  will work? Should I change something in the json list generation or
  the autocompleter will recognize such case?
 
  Dariusz Wojtas
 
  On 12/28/06, Musachy Barroso [EMAIL PROTECTED] wrote:
  This is what I found so far, there are 2 problems, one is that when
  there is a json array like:
 
  [ [A, B] , ]
 
  IE puts a null object in the array. That one is easy to fix. The
 other
  problem is that using freemaker, like in showcase to render the json
  array, the charset of the response is set to Cp1252, which causes
 the
  error on IE. If I use a jsp to render the json array, the
 encoding is
  ISO-8859-1 which works fine. Was this working for you before?
 
  regards
  musachy


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [S2] Redirecting to another action with preserving error messages

2006-12-31 Thread Nick Tucker

out of the box there is the Message Store Interceptor.
I have not tried it myself.

Nick


Dariusz Wojtas wrote:
 
 ok, this is the obvious candidate if I want to make it 'by hand'.
 Some little method in the base action or filter that takes care for it
 as I would do it in Struts 1.
 
 But I thought about something ... out of the box.
 I do not need to make extra redirect through the browser, I want to
 switch to another action in the same request - and in such case it
 should be possible to do it without playing with session. I tried to
 play with the result of type 'chain' but I only got exceptions.
 I am not sure if I understand 'chain' as it did not work for me.
 
 
 

-- 
View this message in context: 
http://www.nabble.com/-S2--Redirecting-to-another-action-with-preserving-error-messages-tf2890519.html#a8105274
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [tiles 2] Accessing items from a putList?

2006-12-31 Thread Antonio Petrelli

Eric Rank ha scritto:

Hi all,

I am trying to insert items from a putList defined in my tiles.xml 
file in a template file. The only way that I can seem to do it is by 
using the following process


1. make the putList 'List' accessible on the page with 
tiles:useAttribute name=myPutList /

2. sending that variable in to a JSTL Core taglib forEach loop
3. using tiles:insertDefinition name=${putListItem} /



I think your code is perfect, so why don't you like it?
Tiles 2 does not depend on Struts anymore, so the best practice is to 
use the most generic tag libraries, that is JSTL.
Instead of tiles:useAttribute you can use tiles:importAttribute that 
does not create a scripting variable, but only a page context attribute.

Anyway you can use all the iterate tags you like.

Antonio

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tiles putList question

2006-12-31 Thread Antonio Petrelli

Rick Mangi ha scritto:

Hello list,

I am trying to use a putList in tiles to insert a list of pre-defined
tile definitions.

definition name=spa.page path=/tiles/spaPage.jsp
put name=body.content
value=/tiles/spaDetails/displayTile.jsp /

putList name=header.content
add value=details.metatags type=definition
/
add value=details.headerScript
type=definition /
/putList
/definition
  


I will try to adapt a code posted by Eric Rank in a later message 
(thanks Eric):


tiles:useAttribute name=header.content /
c:forEach items=${myPutList} var=item
   tiles:insert definition=${item} /
/c:forEach

HTH
Antonio


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]