Re: ApacheCon EU 2006 (fwd)

2006-02-19 Thread Ahmed Hashim
I wonder, did Apache make any conference on the Middle East?


On 2/17/06, Martin Cooper [EMAIL PROTECTED] wrote:


 -- Forwarded message --
 Date: Fri, 17 Feb 2006 15:29:56 -0500
 From: Rich Bowen [EMAIL PROTECTED]
 Subject: ApacheCon EU 2006

 The ApacheCon Planners are pleased to announce that ApacheCon Europe
 2006 will be held in Dublin, Ireland, at the Burlington Hotel
 (http://www.jurysdoyle.com/ireland/doyle_burlington.htm), June 26-30.
 Further details to follow as they are available. CFP to follow shortly.
 Please feel free to spread this information far and wide.

 --
 Rich Bowen
 [EMAIL PROTECTED]


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




--
http://del.icio.us/ahashim


Help:Clay+dataTable

2006-02-19 Thread lisaan markuen
Hi.,
  I'm trying CLAY and fed up with displaying dynamic
datatable (list) coming from my managed bean (already
went through the examples but no success yet). 
 Could anyone please give me an example snippet of how
to insert jsfid into the mock html code so that I
could achieve same like:

JSF code:
h:dataTable value=#{managedBean.list}  var=item
 h:outputText value=#{item.property}
/h:dataTable

 

Thank you. 

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



SV: Help:Clay+dataTable

2006-02-19 Thread Hermod Opstvedt
Hi

span jsfid=t:dataList value=#{managedBean.list}  var=item
span jsfid=outputText value=#{item.property}/
/span

You need to get clay-tomahawk.xml. Search the list for it

Hermod

-Opprinnelig melding-
Fra: lisaan markuen [mailto:[EMAIL PROTECTED] 
Sendt: 19. februar 2006 18:24
Til: user@struts.apache.org
Emne: Help:Clay+dataTable

Hi.,
  I'm trying CLAY and fed up with displaying dynamic
datatable (list) coming from my managed bean (already
went through the examples but no success yet). 
 Could anyone please give me an example snippet of how
to insert jsfid into the mock html code so that I
could achieve same like:

JSF code:
h:dataTable value=#{managedBean.list}  var=item
 h:outputText value=#{item.property}
/h:dataTable

 

Thank you. 

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-
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: Help:Clay+dataTable

2006-02-19 Thread Gary VanMatre
From: lisaan markuen [EMAIL PROTECTED] 

 Hi., 
 I'm trying CLAY and fed up with displaying dynamic 
 datatable (list) coming from my managed bean (already 
 went through the examples but no success yet). 
 Could anyone please give me an example snippet of how 
 to insert jsfid into the mock html code so that I 
 could achieve same like: 
 
 JSF code: 
h:dataTable value=#{managedBean.list}  var=item
 h:outputText value=#{item.property}
/h:dataTable

 


I'll give you a couple options.  My first recommendation would be to use the 
tomahawk dataList component.

Clay configuration definition for the tomahawk dataList:
 component jsfid=t:dataList componentType=org.apache.myfaces.HtmlDataList 
extends=baseHtml
  attributes
   set name=id bindingType=VB /
   set name=binding bindingType=VB /
   set name=forceId bindingType=VB /
   set name=forceIdIndex bindingType=VB /
   set name=value bindingType=VB /
   set name=var bindingType=VB /
   set name=rows bindingType=VB /
   set name=first bindingType=VB /
   set name=enabledOnUserRole bindingType=VB /
   set name=visibleOnUserRole bindingType=VB /
   set name=layout bindingType=VB /
   set name=rowIndexVar bindingType=VB /
   set name=rowCountVar bindingType=VB /
  /attributes
 /component

HTML using tomahawk dataList:
span jsfid=t:dataList id=data1
 styleClass=standardList
 var=person
 value=[EMAIL PROTECTED]
 layout=simple
 rowCountVar=rowCount
 rowIndexVar=rowIndex allowBody=true
 
 span jsfid=outputText value=#{person.firstName}/nbsp;
 span jsfid=outputText value=#{person.lastName}/
 span jsfid=t:htmlTag value=br rendered=#{(rowIndex != 
(rowCount - 1))}/ 
 /span

Another option is to use the clayForEach component.

Clay configuration definition:
   component jsfid=myItem extends=outputText
 attributes
set name=value value=[EMAIL PROTECTED]/
 /attributes
   /component

The var attribute in the example below is like the JSTL var attribute. 
It's the name of a map that will be placed in session scope.  It will be
populated from the value EL, a value binding expression that returns a 
Map, List or Object[].  The bodyJsfid attribute is the content that
will be repeated for each item in the value list.
span jsfid=clayForEach var=mySessionScopedMap value=[EMAIL PROTECTED] 
bodyJsfid=myItem/

This is probably more helpful when the bodyJsfid is a html template.  
table
tr jsfid=clayForEach var=mySessionScopedMap value=[EMAIL PROTECTED] 
bodyJsfid=/myItem.html/
/table

html template file myItem.html:
trtd[EMAIL PROTECTED]/td/tr


Gary

 
 Thank you. 
 
 __ 
 Do You Yahoo!? 
 Tired of spam? Yahoo! Mail has the best spam protection around 
 http://mail.yahoo.com 
 
 - 
 To unsubscribe, e-mail: [EMAIL PROTECTED] 
 For additional commands, e-mail: [EMAIL PROTECTED] 
 

Recharge resource without stop server

2006-02-19 Thread Angel Navarro
Hi,

I have a web application based on Struts 1.3.
I have a problem, I need change resources (internationalition) without stop
the server. It's possible?



Thanks


Action forms and numeric coercion

2006-02-19 Thread Scott Van Wart
I'm new to struts and am setting up some form beans.  I'm using 
hibernate, and one of my tables has a lot of foreign keys.  The target 
tables are pretty much just lookup tables, which I use to populate a 
good number of drop-downs on my web page.  Most of the foreign keys are 
optional, and I'm storing the values in the action form as java.lang.Long.


The optional dropdowns all have option value=None/option, but when 
the form is submitted, and the empty string is coerced to a 
java.lang.Long, it gives me a value of 0 instead of null.  Am I going 
about this the right way?  Should I just suck it up and handle the 0 
value, or is there a better way to lay out my form bean's class?


Thanks,
 Scott

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



why my page can't redirect under Struts with Javascript?

2006-02-19 Thread red phoenix
I use Javascript in Struts,like follows:

script language=JavaScript
function goURL(tmp){
alert(tmp);
document.forms[0].action=/log.do?action=+eval(tmp);
document.forms[0].submit();
}
/script

html:form method=post action=log.do
html:link page=/log.do?action=FirstFirst Page/html:link
html:select property=pageID size=1 onchange=javascript:goURL(
this.options[this.selectedIndex].value)
option value=0First/option
option value=1Second/option
option value=2Third/option
/html:select
/html:form

when click First Page,I can redirect my page to log.do page,but when I
change the value of select,and call goURL,I find my page don't redirect to
the log.do page,why? I am puzzled with it! Anybody can tell me how to
redirect my page with Javascript under Struts?

Thanks


Re: why my page can't redirect under Struts with Javascript?

2006-02-19 Thread Saul Qunming Yuan

For the following:

document.forms[0].action=/log.do?action=+eval(tmp);

You'll need to prefix /log.do with your web context. Or you can use: 
html:rewrite page='/log.do' / in place of /log.do above.


hope it helps.
Saul


- Original Message - 
From: red phoenix [EMAIL PROTECTED]

To: user@struts.apache.org
Sent: Sunday, February 19, 2006 6:48 PM
Subject: why my page can't redirect under Struts with Javascript?


I use Javascript in Struts,like follows:

script language=JavaScript
function goURL(tmp){
alert(tmp);
document.forms[0].action=/log.do?action=+eval(tmp);
document.forms[0].submit();
}
/script

html:form method=post action=log.do
html:link page=/log.do?action=FirstFirst Page/html:link
html:select property=pageID size=1 onchange=javascript:goURL(
this.options[this.selectedIndex].value)
option value=0First/option
option value=1Second/option
option value=2Third/option
/html:select
/html:form

when click First Page,I can redirect my page to log.do page,but when I
change the value of select,and call goURL,I find my page don't redirect to
the log.do page,why? I am puzzled with it! Anybody can tell me how to
redirect my page with Javascript under Struts?

Thanks


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



Acessing TagHandlerPool for TagSupport

2006-02-19 Thread Steve Vanspall
I know this isn't specifically struts realted, but am having trouble 
finding a jasper mailing list.


Basically was wondering if I can have a custom tagsupport tag's 
doStartTag() method acess the taghandlerpool.


Basically i want ot be able to create a form, where neccesary, with a 
start tag.


but, like struts does, only know the action and parameters adn be able 
to look up what form I should be using.


Also it would help if I knew how many form were laready in use, and if a 
form tag was open, and hence can throw an error.


So basically, I could create a html:form within some code that this tag 
creates.


Alternatively, although not the most desirable option, is the a way to 
output html:form as part fo the start tag, and get the JSP to re 
evaluated it again.


Theres' probably a simple, duh!, solution coming my way, just can't seem 
to find the answer.


Thanks

Steve



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



Value-ChangeEvent under Struts-Faces

2006-02-19 Thread Leila Carvalho
Can I apply Value-change Event in my jsp pages under Struts-Faces
Integration ???
How??
Thanks in advance.
Leila.


Re: why my page can't redirect under Struts with Javascript?

2006-02-19 Thread red phoenix
My  web context is Log,so I add prefix before,like follows:

document.forms[0].action=/Log/log.do?action=+eval(tmp);

but when I change the value of html:select,it still can't redirect,I am
puzzled it for several days.I don't know why it don't redirect!!!

I want to use above code to make a pagination program,the html:select
shows all pages,such as 1st Page,2nd Page,3rd Page and so on,when selected
one of items of html:select,it will call Javascript and redirect page to a
action.

Anybody can give me some adivce?



On 2/20/06, Saul Qunming Yuan [EMAIL PROTECTED] wrote:

 For the following:

 document.forms[0].action=/log.do?action=+eval(tmp);

 You'll need to prefix /log.do with your web context. Or you can use:
 html:rewrite page='/log.do' / in place of /log.do above.

 hope it helps.
 Saul


 - Original Message -
 From: red phoenix [EMAIL PROTECTED]
 To: user@struts.apache.org
 Sent: Sunday, February 19, 2006 6:48 PM
 Subject: why my page can't redirect under Struts with Javascript?


 I use Javascript in Struts,like follows:

 script language=JavaScript
 function goURL(tmp){
 alert(tmp);
 document.forms[0].action=/log.do?action=+eval(tmp);
 document.forms[0].submit();
 }
 /script

 html:form method=post action=log.do
 html:link page=/log.do?action=FirstFirst Page/html:link
 html:select property=pageID size=1 onchange=javascript:goURL(
 this.options[this.selectedIndex].value)
 option value=0First/option
 option value=1Second/option
 option value=2Third/option
 /html:select
 /html:form

 when click First Page,I can redirect my page to log.do page,but when I
 change the value of select,and call goURL,I find my page don't redirect to
 the log.do page,why? I am puzzled with it! Anybody can tell me how to
 redirect my page with Javascript under Struts?

 Thanks


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




Re: Value-ChangeEvent under Struts-Faces

2006-02-19 Thread Gary VanMatre
From: Leila Carvalho [EMAIL PROTECTED] 

 Can I apply Value-change Event in my jsp pages under Struts-Faces 
 Integration ??? 
 How?? 
 Thanks in advance. 
 Leila. 

You can add a value change listener as an action binding method on a backing 
bean,

h:outputText id=city value=mybean.city 
valueChangeListener=mybean.cityChanged/


public void cityChanged(ValueChangeEvent event) {
}

or, as a nested object.

h:ouputText id=city value=mybean.city
f:valueChangeListener type=com.acme.MyListener/   
/h:ouputText

public class MyListener implements ValueChangeListener {
public void processValueChange(ValueChangeEvent event) {
   
}
}

 

Gary

Re: why my page can't redirect under Struts with Javascript?

2006-02-19 Thread Saul Qunming Yuan

A few things here,

1) I think you need build the action like the following;

document.forms[0].action=eval(/Log/log.do?action=+tmp);

or do it in two steps:

var newAct = /Log/log.do?action=+tmp;
document.forms[0].action = newAct;

2) how are you checking the action parameter in your Action class, checking 
action=First or action=0?
the above will give you action=0, or action=1 etc, but not action=First, 
action=Second. The reason I ask the question is b/c you mentioned html:link 
page=/log.do?action=FirstFirst Page/html:link works for you, you are 
passing a First to the action in this case.



Saul

- Original Message - 
From: red phoenix [EMAIL PROTECTED]

To: Struts Users Mailing List user@struts.apache.org
Sent: Sunday, February 19, 2006 10:12 PM
Subject: Re: why my page can't redirect under Struts with Javascript?


My  web context is Log,so I add prefix before,like follows:

document.forms[0].action=/Log/log.do?action=+eval(tmp);

but when I change the value of html:select,it still can't redirect,I am
puzzled it for several days.I don't know why it don't redirect!!!

I want to use above code to make a pagination program,the html:select
shows all pages,such as 1st Page,2nd Page,3rd Page and so on,when selected
one of items of html:select,it will call Javascript and redirect page to a
action.

Anybody can give me some adivce?



On 2/20/06, Saul Qunming Yuan [EMAIL PROTECTED] wrote:


For the following:

document.forms[0].action=/log.do?action=+eval(tmp);

You'll need to prefix /log.do with your web context. Or you can use:
html:rewrite page='/log.do' / in place of /log.do above.

hope it helps.
Saul


- Original Message -
From: red phoenix [EMAIL PROTECTED]
To: user@struts.apache.org
Sent: Sunday, February 19, 2006 6:48 PM
Subject: why my page can't redirect under Struts with Javascript?


I use Javascript in Struts,like follows:

script language=JavaScript
function goURL(tmp){
alert(tmp);
document.forms[0].action=/log.do?action=+eval(tmp);
document.forms[0].submit();
}
/script

html:form method=post action=log.do
html:link page=/log.do?action=FirstFirst Page/html:link
html:select property=pageID size=1 onchange=javascript:goURL(
this.options[this.selectedIndex].value)
option value=0First/option
option value=1Second/option
option value=2Third/option
/html:select
/html:form

when click First Page,I can redirect my page to log.do page,but when I
change the value of select,and call goURL,I find my page don't redirect to
the log.do page,why? I am puzzled with it! Anybody can tell me how to
redirect my page with Javascript under Struts?

Thanks


-
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]



i18n with javascript validations

2006-02-19 Thread Kalra, Ashwani

Hi,
My project is using javascript validations generated through struts
validator. I want to do some currency validations based on the
language/country. Is it possible?


__
Regards
Ashwani Kalra





This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient,  you are not authorized 
to read, print, retain, copy, disseminate,  distribute, or use this message or 
any part thereof. If you receive this  message in error, please notify the 
sender immediately and delete all  copies of this message.


[HELP] i80n :(

2006-02-19 Thread Pham Anh Tuan
Hi all,

I got a problem, so I need all your help :(

i18n,

I want my Struts app to have default language is Vietnamese, but I couldn't :(

I have 3 files below:
+ mylanguage.properties --- Vietnamese file
+ mylanguage_ja.properties --- Japanese file
+ mylanguage_en.properties --- English file

I have a action which include these code:


Local myLocal = getLocale(request);

locale = new Locale(request.getParameter(language);

HttpSession session = request.getSession();
session.setAttribute(Globals.LOCALE_KEY, locale);
...

in struts-config.xml
message-resources parameter=properties.mylanguage/

but my webapp still use English language default :( ...

I want my webapp use Vietnamese language by default, how can I do that, help me 
:(

thanks in advance

bowlkhin


Re: why my page can't redirect under Struts with Javascript?

2006-02-19 Thread red phoenix
I have try follows two method:
function goURL(tmp){
 document.forms[0].action=eval(/Log/log.do?action=+tmp);
 alert(eval(/Log/log.do?action=+tmp));
 document.forms[0].submit();
 }

and

 function goURL(tmp){
 var newAct = /Log/log.do?action=+tmp;
 document.forms[0].action = newAct;
 alert(newAct)
 document.forms[0].submit();
 }

I find Javasript can alert right value,such as /Log/log.do?action=3
but I find Javascript don't redirect any page,my action don't be called!
Why?


On 2/20/06, Saul Qunming Yuan [EMAIL PROTECTED] wrote:

 A few things here,

 1) I think you need build the action like the following;

 document.forms[0].action=eval(/Log/log.do?action=+tmp);

 or do it in two steps:

 var newAct = /Log/log.do?action=+tmp;
 document.forms[0].action = newAct;

 2) how are you checking the action parameter in your Action class,
 checking
 action=First or action=0?
 the above will give you action=0, or action=1 etc, but not action=First,
 action=Second. The reason I ask the question is b/c you mentioned
 html:link
 page=/log.do?action=FirstFirst Page/html:link works for you, you are
 passing a First to the action in this case.


 Saul

 - Original Message -
 From: red phoenix [EMAIL PROTECTED]
 To: Struts Users Mailing List user@struts.apache.org
 Sent: Sunday, February 19, 2006 10:12 PM
 Subject: Re: why my page can't redirect under Struts with Javascript?


 My  web context is Log,so I add prefix before,like follows:

 document.forms[0].action=/Log/log.do?action=+eval(tmp);

 but when I change the value of html:select,it still can't redirect,I am
 puzzled it for several days.I don't know why it don't redirect!!!

 I want to use above code to make a pagination program,the html:select
 shows all pages,such as 1st Page,2nd Page,3rd Page and so on,when selected
 one of items of html:select,it will call Javascript and redirect page to
 a
 action.

 Anybody can give me some adivce?



 On 2/20/06, Saul Qunming Yuan [EMAIL PROTECTED] wrote:
 
  For the following:
 
  document.forms[0].action=/log.do?action=+eval(tmp);
 
  You'll need to prefix /log.do with your web context. Or you can use:
  html:rewrite page='/log.do' / in place of /log.do above.
 
  hope it helps.
  Saul
 
 
  - Original Message -
  From: red phoenix [EMAIL PROTECTED]
  To: user@struts.apache.org
  Sent: Sunday, February 19, 2006 6:48 PM
  Subject: why my page can't redirect under Struts with Javascript?
 
 
  I use Javascript in Struts,like follows:
 
  script language=JavaScript
  function goURL(tmp){
  alert(tmp);
  document.forms[0].action=/log.do?action=+eval(tmp);
  document.forms[0].submit();
  }
  /script
 
  html:form method=post action=log.do
  html:link page=/log.do?action=FirstFirst Page/html:link
  html:select property=pageID size=1 onchange=javascript:goURL(
  this.options[this.selectedIndex].value)
  option value=0First/option
  option value=1Second/option
  option value=2Third/option
  /html:select
  /html:form
 
  when click First Page,I can redirect my page to log.do page,but when I
  change the value of select,and call goURL,I find my page don't redirect
 to
  the log.do page,why? I am puzzled with it! Anybody can tell me how to
  redirect my page with Javascript under Struts?
 
  Thanks
 
 
  -
  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: why my page can't redirect under Struts with Javascript?

2006-02-19 Thread Swapnil Patil
Hi red,

html:link page=/log.do?action=FirstFirst Page/html:link
this works with action parameter containing value= First NOT 0.

Your 'tmp' variable in script function contains  value 0,1 or 2.  Your
log.do action might be checking content of action parameter with values
First, Second or Third

Try it again with following manner.

html:select property=pageID size=1 onchange=javascript:goURL(
this.options[this.selectedIndex].value)
option value=FirstFirst/option
option value=SecondSecond/option
option value=ThirdThird/option
/html:select

I hope it will work.


On 2/20/06, red phoenix [EMAIL PROTECTED] wrote:

 I have try follows two method:
 function goURL(tmp){
 document.forms[0].action=eval(/Log/log.do?action=+tmp);
 alert(eval(/Log/log.do?action=+tmp));
 document.forms[0].submit();
 }

 and

 function goURL(tmp){
 var newAct = /Log/log.do?action=+tmp;
 document.forms[0].action = newAct;
 alert(newAct)
 document.forms[0].submit();
 }

 I find Javasript can alert right value,such as /Log/log.do?action=3
 but I find Javascript don't redirect any page,my action don't be called!
 Why?


 On 2/20/06, Saul Qunming Yuan [EMAIL PROTECTED] wrote:
 
  A few things here,
 
  1) I think you need build the action like the following;
 
  document.forms[0].action=eval(/Log/log.do?action=+tmp);
 
  or do it in two steps:
 
  var newAct = /Log/log.do?action=+tmp;
  document.forms[0].action = newAct;
 
  2) how are you checking the action parameter in your Action class,
  checking
  action=First or action=0?
  the above will give you action=0, or action=1 etc, but not action=First,
  action=Second. The reason I ask the question is b/c you mentioned
  html:link
  page=/log.do?action=FirstFirst Page/html:link works for you, you
 are
  passing a First to the action in this case.
 
 
  Saul
 
  - Original Message -
  From: red phoenix [EMAIL PROTECTED]
  To: Struts Users Mailing List user@struts.apache.org
  Sent: Sunday, February 19, 2006 10:12 PM
  Subject: Re: why my page can't redirect under Struts with Javascript?
 
 
  My  web context is Log,so I add prefix before,like follows:
 
  document.forms[0].action=/Log/log.do?action=+eval(tmp);
 
  but when I change the value of html:select,it still can't redirect,I
 am
  puzzled it for several days.I don't know why it don't redirect!!!
 
  I want to use above code to make a pagination program,the html:select
  shows all pages,such as 1st Page,2nd Page,3rd Page and so on,when
 selected
  one of items of html:select,it will call Javascript and redirect page
 to
  a
  action.
 
  Anybody can give me some adivce?
 
 
 
  On 2/20/06, Saul Qunming Yuan [EMAIL PROTECTED] wrote:
  
   For the following:
  
   document.forms[0].action=/log.do?action=+eval(tmp);
  
   You'll need to prefix /log.do with your web context. Or you can use:
   html:rewrite page='/log.do' / in place of /log.do above.
  
   hope it helps.
   Saul
  
  
   - Original Message -
   From: red phoenix [EMAIL PROTECTED]
   To: user@struts.apache.org
   Sent: Sunday, February 19, 2006 6:48 PM
   Subject: why my page can't redirect under Struts with Javascript?
  
  
   I use Javascript in Struts,like follows:
  
   script language=JavaScript
   function goURL(tmp){
   alert(tmp);
   document.forms[0].action=/log.do?action=+eval(tmp);
   document.forms[0].submit();
   }
   /script
  
   html:form method=post action=log.do
   html:link page=/log.do?action=FirstFirst Page/html:link
   html:select property=pageID size=1 onchange=javascript:goURL(
   this.options[this.selectedIndex].value)
   option value=0First/option
   option value=1Second/option
   option value=2Third/option
   /html:select
   /html:form
  
   when click First Page,I can redirect my page to log.do page,but when
 I
   change the value of select,and call goURL,I find my page don't
 redirect
  to
   the log.do page,why? I am puzzled with it! Anybody can tell me how to
   redirect my page with Javascript under Struts?
  
   Thanks
  
  
   -
   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]
 
 




--
Thanks  Regards
Swapnil Patil.


Re: Acessing TagHandlerPool for TagSupport

2006-02-19 Thread Craig McClanahan
On 2/19/06, Steve Vanspall [EMAIL PROTECTED] wrote:

 I know this isn't specifically struts realted, but am having trouble
 finding a jasper mailing list.

 Basically was wondering if I can have a custom tagsupport tag's
 doStartTag() method acess the taghandlerpool.


There is no API for this.  Indeed, in JSP 2.0 if you use simple tags there
is no pooling of tag instances either.

Basically i want ot be able to create a form, where neccesary, with a
 start tag.

 but, like struts does, only know the action and parameters adn be able
 to look up what form I should be using.

 Also it would help if I knew how many form were laready in use, and if a
 form tag was open, and hence can throw an error.

 So basically, I could create a html:form within some code that this tag
 creates.

 Alternatively, although not the most desirable option, is the a way to
 output html:form as part fo the start tag, and get the JSP to re
 evaluated it again.

 Theres' probably a simple, duh!, solution coming my way, just can't seem
 to find the answer.


What you need to build forms like this dynamically is a component model like
the one provided by JavaServer Faces or Tapestry.  The Shale framework[1]
(also part of the Struts community), built on top of JSF, has an example of
building views dynamically that is somewhat different than your use case (it
lets you do SQL Browser queries, and dynamically decides what columns to
show in the output table based on which database columns were returned in
response to executing the query), but illustrates the principle.  It would
be straightforward, for example, to dynamically generate a set of field
labels and input fields based on the columns in a database, or the
properties of a JavaBean.

Trying to dynamically construct JSP code and then re-evaluate it is not
the right approach to this kind of problem.

Thanks

 Steve


Craig

[1] http://struts.apache.org/struts-shale/


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




Re: Value-ChangeEvent under Struts-Faces

2006-02-19 Thread Craig McClanahan
On 2/19/06, Gary VanMatre [EMAIL PROTECTED] wrote:

 From: Leila Carvalho [EMAIL PROTECTED]

  Can I apply Value-change Event in my jsp pages under Struts-Faces
  Integration ???
  How??
  Thanks in advance.
  Leila.

 You can add a value change listener as an action binding method on a
 backing bean,

 h:outputText id=city value=mybean.city valueChangeListener=
 mybean.cityChanged/


This kind of thing will work in Struts-Faces, but only if you correctly
specify the expressions, and use an input field :-)

  h:inputText id=city value=#{mybean.city} valueChangeListener=#{
mybean.cityChanged}/

Craig

public void cityChanged(ValueChangeEvent event) {
 }

 or, as a nested object.

 h:ouputText id=city value=mybean.city
 f:valueChangeListener type=com.acme.MyListener/
 /h:ouputText

 public class MyListener implements ValueChangeListener {
 public void processValueChange(ValueChangeEvent event) {

 }
 }

 

 Gary



Re: why my page can't redirect under Struts with Javascript?

2006-02-19 Thread red phoenix
I modify my Javascript like follows:
function goURL(tmp){
 document.forms[0].action=eval(/Log/log.do?action=First);
 document.forms[0].submit();
}

But when I change the value of html:select,it still can't redirect. I am
mad with it!


On 2/20/06, Swapnil Patil [EMAIL PROTECTED] wrote:

 Hi red,

 html:link page=/log.do?action=FirstFirst Page/html:link
 this works with action parameter containing value= First NOT 0.

 Your 'tmp' variable in script function contains  value 0,1 or 2.  Your
 log.do action might be checking content of action parameter with values
 First, Second or Third

 Try it again with following manner.

 html:select property=pageID size=1 onchange=javascript:goURL(
 this.options[this.selectedIndex].value)
 option value=FirstFirst/option
 option value=SecondSecond/option
 option value=ThirdThird/option
 /html:select

 I hope it will work.


 On 2/20/06, red phoenix [EMAIL PROTECTED] wrote:
 
  I have try follows two method:
  function goURL(tmp){
  document.forms[0].action=eval(/Log/log.do?action=+tmp);
  alert(eval(/Log/log.do?action=+tmp));
  document.forms[0].submit();
  }
 
  and
 
  function goURL(tmp){
  var newAct = /Log/log.do?action=+tmp;
  document.forms[0].action = newAct;
  alert(newAct)
  document.forms[0].submit();
  }
 
  I find Javasript can alert right value,such as /Log/log.do?action=3
  but I find Javascript don't redirect any page,my action don't be called!
  Why?
 
 
  On 2/20/06, Saul Qunming Yuan [EMAIL PROTECTED] wrote:
  
   A few things here,
  
   1) I think you need build the action like the following;
  
   document.forms[0].action=eval(/Log/log.do?action=+tmp);
  
   or do it in two steps:
  
   var newAct = /Log/log.do?action=+tmp;
   document.forms[0].action = newAct;
  
   2) how are you checking the action parameter in your Action class,
   checking
   action=First or action=0?
   the above will give you action=0, or action=1 etc, but not
 action=First,
   action=Second. The reason I ask the question is b/c you mentioned
   html:link
   page=/log.do?action=FirstFirst Page/html:link works for you, you
  are
   passing a First to the action in this case.
  
  
   Saul
  
   - Original Message -
   From: red phoenix [EMAIL PROTECTED]
   To: Struts Users Mailing List user@struts.apache.org
   Sent: Sunday, February 19, 2006 10:12 PM
   Subject: Re: why my page can't redirect under Struts with Javascript?
  
  
   My  web context is Log,so I add prefix before,like follows:
  
   document.forms[0].action=/Log/log.do?action=+eval(tmp);
  
   but when I change the value of html:select,it still can't redirect,I
  am
   puzzled it for several days.I don't know why it don't redirect!!!
  
   I want to use above code to make a pagination program,the
 html:select
   shows all pages,such as 1st Page,2nd Page,3rd Page and so on,when
  selected
   one of items of html:select,it will call Javascript and redirect
 page
  to
   a
   action.
  
   Anybody can give me some adivce?
  
  
  
   On 2/20/06, Saul Qunming Yuan [EMAIL PROTECTED] wrote:
   
For the following:
   
document.forms[0].action=/log.do?action=+eval(tmp);
   
You'll need to prefix /log.do with your web context. Or you can
 use:
html:rewrite page='/log.do' / in place of /log.do above.
   
hope it helps.
Saul
   
   
- Original Message -
From: red phoenix [EMAIL PROTECTED]
To: user@struts.apache.org
Sent: Sunday, February 19, 2006 6:48 PM
Subject: why my page can't redirect under Struts with Javascript?
   
   
I use Javascript in Struts,like follows:
   
script language=JavaScript
function goURL(tmp){
alert(tmp);
document.forms[0].action=/log.do?action=+eval(tmp);
document.forms[0].submit();
}
/script
   
html:form method=post action=log.do
html:link page=/log.do?action=FirstFirst Page/html:link
html:select property=pageID size=1 onchange=javascript:goURL(
this.options[this.selectedIndex].value)
option value=0First/option
option value=1Second/option
option value=2Third/option
/html:select
/html:form
   
when click First Page,I can redirect my page to log.do page,but
 when
  I
change the value of select,and call goURL,I find my page don't
  redirect
   to
the log.do page,why? I am puzzled with it! Anybody can tell me how
 to
redirect my page with Javascript under Struts?
   
Thanks
   
   
   
 -
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]
  
  
 
 


 --
 Thanks  Regards
 Swapnil Patil.




Re: why my page can't redirect under Struts with Javascript?

2006-02-19 Thread raja sekar
modify your javascript like this

function goURL(tmp){
 var url = %=response.encodeURL(/Log/log.do)%;
 document.forms[0].action=url + ?action= + tmp;
 document.forms[0].submit();
}

and try...

On 2/20/06, red phoenix [EMAIL PROTECTED] wrote:

 I modify my Javascript like follows:
 function goURL(tmp){
 document.forms[0].action=eval(/Log/log.do?action=First);
 document.forms[0].submit();
 }

 But when I change the value of html:select,it still can't redirect. I am
 mad with it!


 On 2/20/06, Swapnil Patil [EMAIL PROTECTED] wrote:
 
  Hi red,
 
  html:link page=/log.do?action=FirstFirst Page/html:link
  this works with action parameter containing value= First NOT 0.
 
  Your 'tmp' variable in script function contains  value 0,1 or 2.  Your
  log.do action might be checking content of action parameter with values
  First, Second or Third
 
  Try it again with following manner.
 
  html:select property=pageID size=1 onchange=javascript:goURL(
  this.options[this.selectedIndex].value)
  option value=FirstFirst/option
  option value=SecondSecond/option
  option value=ThirdThird/option
  /html:select
 
  I hope it will work.
 
 
  On 2/20/06, red phoenix [EMAIL PROTECTED] wrote:
  
   I have try follows two method:
   function goURL(tmp){
   document.forms[0].action=eval(/Log/log.do?action=+tmp);
   alert(eval(/Log/log.do?action=+tmp));
   document.forms[0].submit();
   }
  
   and
  
   function goURL(tmp){
   var newAct = /Log/log.do?action=+tmp;
   document.forms[0].action = newAct;
   alert(newAct)
   document.forms[0].submit();
   }
  
   I find Javasript can alert right value,such as /Log/log.do?action=3
   but I find Javascript don't redirect any page,my action don't be
 called!
   Why?
  
  
   On 2/20/06, Saul Qunming Yuan [EMAIL PROTECTED] wrote:
   
A few things here,
   
1) I think you need build the action like the following;
   
document.forms[0].action=eval(/Log/log.do?action=+tmp);
   
or do it in two steps:
   
var newAct = /Log/log.do?action=+tmp;
document.forms[0].action = newAct;
   
2) how are you checking the action parameter in your Action class,
checking
action=First or action=0?
the above will give you action=0, or action=1 etc, but not
  action=First,
action=Second. The reason I ask the question is b/c you mentioned
html:link
page=/log.do?action=FirstFirst Page/html:link works for you,
 you
   are
passing a First to the action in this case.
   
   
Saul
   
- Original Message -
From: red phoenix [EMAIL PROTECTED]
To: Struts Users Mailing List user@struts.apache.org
Sent: Sunday, February 19, 2006 10:12 PM
Subject: Re: why my page can't redirect under Struts with
 Javascript?
   
   
My  web context is Log,so I add prefix before,like follows:
   
document.forms[0].action=/Log/log.do?action=+eval(tmp);
   
but when I change the value of html:select,it still can't
 redirect,I
   am
puzzled it for several days.I don't know why it don't redirect!!!
   
I want to use above code to make a pagination program,the
  html:select
shows all pages,such as 1st Page,2nd Page,3rd Page and so on,when
   selected
one of items of html:select,it will call Javascript and redirect
  page
   to
a
action.
   
Anybody can give me some adivce?
   
   
   
On 2/20/06, Saul Qunming Yuan [EMAIL PROTECTED] wrote:

 For the following:

 document.forms[0].action=/log.do?action=+eval(tmp);

 You'll need to prefix /log.do with your web context. Or you can
  use:
 html:rewrite page='/log.do' / in place of /log.do above.

 hope it helps.
 Saul


 - Original Message -
 From: red phoenix [EMAIL PROTECTED]
 To: user@struts.apache.org
 Sent: Sunday, February 19, 2006 6:48 PM
 Subject: why my page can't redirect under Struts with Javascript?


 I use Javascript in Struts,like follows:

 script language=JavaScript
 function goURL(tmp){
 alert(tmp);
 document.forms[0].action=/log.do?action=+eval(tmp);
 document.forms[0].submit();
 }
 /script

 html:form method=post action=log.do
 html:link page=/log.do?action=FirstFirst Page/html:link
 html:select property=pageID size=1
 onchange=javascript:goURL(
 this.options[this.selectedIndex].value)
 option value=0First/option
 option value=1Second/option
 option value=2Third/option
 /html:select
 /html:form

 when click First Page,I can redirect my page to log.do page,but
  when
   I
 change the value of select,and call goURL,I find my page don't
   redirect
to
 the log.do page,why? I am puzzled with it! Anybody can tell me how
  to
 redirect my page with Javascript under Struts?

 Thanks



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

Re: why my page can't redirect under Struts with Javascript?

2006-02-19 Thread red phoenix
when I Javascript execute
var url = %=response.encodeURL(/Log/log.do)%;

IE raise script error:
Raise error during running period,debug or not
Line:81
Error:missing ';'


On 2/20/06, raja sekar [EMAIL PROTECTED] wrote:

 modify your javascript like this

 function goURL(tmp){
 var url = %=response.encodeURL(/Log/log.do)%;
 document.forms[0].action=url + ?action= + tmp;
 document.forms[0].submit();
 }

 and try...

 On 2/20/06, red phoenix [EMAIL PROTECTED] wrote:
 
  I modify my Javascript like follows:
  function goURL(tmp){
  document.forms[0].action=eval(/Log/log.do?action=First);
  document.forms[0].submit();
  }
 
  But when I change the value of html:select,it still can't redirect. I
 am
  mad with it!
 
 
  On 2/20/06, Swapnil Patil [EMAIL PROTECTED] wrote:
  
   Hi red,
  
   html:link page=/log.do?action=FirstFirst Page/html:link
   this works with action parameter containing value= First NOT 0.
  
   Your 'tmp' variable in script function contains  value 0,1 or 2.  Your
   log.do action might be checking content of action parameter with
 values
   First, Second or Third
  
   Try it again with following manner.
  
   html:select property=pageID size=1 onchange=javascript:goURL(
   this.options[this.selectedIndex].value)
   option value=FirstFirst/option
   option value=SecondSecond/option
   option value=ThirdThird/option
   /html:select
  
   I hope it will work.
  
  
   On 2/20/06, red phoenix [EMAIL PROTECTED] wrote:
   
I have try follows two method:
function goURL(tmp){
document.forms[0].action=eval(/Log/log.do?action=+tmp);
alert(eval(/Log/log.do?action=+tmp));
document.forms[0].submit();
}
   
and
   
function goURL(tmp){
var newAct = /Log/log.do?action=+tmp;
document.forms[0].action = newAct;
alert(newAct)
document.forms[0].submit();
}
   
I find Javasript can alert right value,such as /Log/log.do?action=3
but I find Javascript don't redirect any page,my action don't be
  called!
Why?
   
   
On 2/20/06, Saul Qunming Yuan [EMAIL PROTECTED] wrote:

 A few things here,

 1) I think you need build the action like the following;

 document.forms[0].action=eval(/Log/log.do?action=+tmp);

 or do it in two steps:

 var newAct = /Log/log.do?action=+tmp;
 document.forms[0].action = newAct;

 2) how are you checking the action parameter in your Action class,
 checking
 action=First or action=0?
 the above will give you action=0, or action=1 etc, but not
   action=First,
 action=Second. The reason I ask the question is b/c you mentioned
 html:link
 page=/log.do?action=FirstFirst Page/html:link works for you,
  you
are
 passing a First to the action in this case.


 Saul

 - Original Message -
 From: red phoenix [EMAIL PROTECTED]
 To: Struts Users Mailing List user@struts.apache.org
 Sent: Sunday, February 19, 2006 10:12 PM
 Subject: Re: why my page can't redirect under Struts with
  Javascript?


 My  web context is Log,so I add prefix before,like follows:

 document.forms[0].action=/Log/log.do?action=+eval(tmp);

 but when I change the value of html:select,it still can't
  redirect,I
am
 puzzled it for several days.I don't know why it don't redirect!!!

 I want to use above code to make a pagination program,the
   html:select
 shows all pages,such as 1st Page,2nd Page,3rd Page and so on,when
selected
 one of items of html:select,it will call Javascript and redirect
   page
to
 a
 action.

 Anybody can give me some adivce?



 On 2/20/06, Saul Qunming Yuan [EMAIL PROTECTED] wrote:
 
  For the following:
 
  document.forms[0].action=/log.do?action=+eval(tmp);
 
  You'll need to prefix /log.do with your web context. Or you
 can
   use:
  html:rewrite page='/log.do' / in place of /log.do above.
 
  hope it helps.
  Saul
 
 
  - Original Message -
  From: red phoenix [EMAIL PROTECTED]
  To: user@struts.apache.org
  Sent: Sunday, February 19, 2006 6:48 PM
  Subject: why my page can't redirect under Struts with
 Javascript?
 
 
  I use Javascript in Struts,like follows:
 
  script language=JavaScript
  function goURL(tmp){
  alert(tmp);
  document.forms[0].action=/log.do?action=+eval(tmp);
  document.forms[0].submit();
  }
  /script
 
  html:form method=post action=log.do
  html:link page=/log.do?action=FirstFirst Page/html:link
  html:select property=pageID size=1
  onchange=javascript:goURL(
  this.options[this.selectedIndex].value)
  option value=0First/option
  option value=1Second/option
  option value=2Third/option
  /html:select
  /html:form
 
  when click First Page,I can redirect my page to log.dopage,but
   when
I
  change the value of 

validator frame work for struts Action Errors

2006-02-19 Thread Raghuveer
Is it possaible to use Validator framework for Struts  Action Errors.
My requirement is to validate my JSP page with Action Errors .
I have 10 fields in my JSP page.
Once the user enters some fields and submit the page , My ActionForm need to
validate the fields and if any errors in JSP,i need to send all action erros
to JSP page.

Example:

First name is required
Phone Number should be numeric
Email is Invalid.

Experts please suggest me!!


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



Re: why my page can't redirect under Struts with Javascript?

2006-02-19 Thread raja sekar
try this

function goURL(tmp){
 var url = %=response.encodeURL(/Log/log.do)%;
 document.forms[0].action=url + ?action= + tmp;
 document.forms[0].submit();
}


On 2/20/06, red phoenix [EMAIL PROTECTED] wrote:

 when I Javascript execute
 var url = %=response.encodeURL(/Log/log.do)%;

 IE raise script error:
 Raise error during running period,debug or not
 Line:81
 Error:missing ';'


 On 2/20/06, raja sekar [EMAIL PROTECTED] wrote:
 
  modify your javascript like this
 
  function goURL(tmp){
  var url = %=response.encodeURL(/Log/log.do)%;
  document.forms[0].action=url + ?action= + tmp;
  document.forms[0].submit();
  }
 
  and try...
 
  On 2/20/06, red phoenix [EMAIL PROTECTED] wrote:
  
   I modify my Javascript like follows:
   function goURL(tmp){
   document.forms[0].action=eval(/Log/log.do?action=First);
   document.forms[0].submit();
   }
  
   But when I change the value of html:select,it still can't redirect.
 I
  am
   mad with it!
  
  
   On 2/20/06, Swapnil Patil [EMAIL PROTECTED] wrote:
   
Hi red,
   
html:link page=/log.do?action=FirstFirst Page/html:link
this works with action parameter containing value= First NOT 0.
   
Your 'tmp' variable in script function contains  value 0,1 or
 2.  Your
log.do action might be checking content of action parameter with
  values
First, Second or Third
   
Try it again with following manner.
   
html:select property=pageID size=1 onchange=javascript:goURL(
this.options[this.selectedIndex].value)
option value=FirstFirst/option
option value=SecondSecond/option
option value=ThirdThird/option
/html:select
   
I hope it will work.
   
   
On 2/20/06, red phoenix [EMAIL PROTECTED] wrote:

 I have try follows two method:
 function goURL(tmp){
 document.forms[0].action=eval(/Log/log.do?action=+tmp);
 alert(eval(/Log/log.do?action=+tmp));
 document.forms[0].submit();
 }

 and

 function goURL(tmp){
 var newAct = /Log/log.do?action=+tmp;
 document.forms[0].action = newAct;
 alert(newAct)
 document.forms[0].submit();
 }

 I find Javasript can alert right value,such as
 /Log/log.do?action=3
 but I find Javascript don't redirect any page,my action don't be
   called!
 Why?


 On 2/20/06, Saul Qunming Yuan [EMAIL PROTECTED] wrote:
 
  A few things here,
 
  1) I think you need build the action like the following;
 
  document.forms[0].action=eval(/Log/log.do?action=+tmp);
 
  or do it in two steps:
 
  var newAct = /Log/log.do?action=+tmp;
  document.forms[0].action = newAct;
 
  2) how are you checking the action parameter in your Action
 class,
  checking
  action=First or action=0?
  the above will give you action=0, or action=1 etc, but not
action=First,
  action=Second. The reason I ask the question is b/c you
 mentioned
  html:link
  page=/log.do?action=FirstFirst Page/html:link works for
 you,
   you
 are
  passing a First to the action in this case.
 
 
  Saul
 
  - Original Message -
  From: red phoenix [EMAIL PROTECTED]
  To: Struts Users Mailing List user@struts.apache.org
  Sent: Sunday, February 19, 2006 10:12 PM
  Subject: Re: why my page can't redirect under Struts with
   Javascript?
 
 
  My  web context is Log,so I add prefix before,like follows:
 
  document.forms[0].action=/Log/log.do?action=+eval(tmp);
 
  but when I change the value of html:select,it still can't
   redirect,I
 am
  puzzled it for several days.I don't know why it don't
 redirect!!!
 
  I want to use above code to make a pagination program,the
html:select
  shows all pages,such as 1st Page,2nd Page,3rd Page and so
 on,when
 selected
  one of items of html:select,it will call Javascript and
 redirect
page
 to
  a
  action.
 
  Anybody can give me some adivce?
 
 
 
  On 2/20/06, Saul Qunming Yuan [EMAIL PROTECTED] wrote:
  
   For the following:
  
   document.forms[0].action=/log.do?action=+eval(tmp);
  
   You'll need to prefix /log.do with your web context. Or you
  can
use:
   html:rewrite page='/log.do' / in place of /log.do above.
  
   hope it helps.
   Saul
  
  
   - Original Message -
   From: red phoenix [EMAIL PROTECTED]
   To: user@struts.apache.org
   Sent: Sunday, February 19, 2006 6:48 PM
   Subject: why my page can't redirect under Struts with
  Javascript?
  
  
   I use Javascript in Struts,like follows:
  
   script language=JavaScript
   function goURL(tmp){
   alert(tmp);
   document.forms[0].action=/log.do?action=+eval(tmp);
   document.forms[0].submit();
   }
   /script
  
   html:form method=post action=log.do
   html:link 

Re: why my page can't redirect under Struts with Javascript?

2006-02-19 Thread red phoenix
I have tried
 function goURL(tmp){
var url = %=response.encodeURL(/Log/log.do)%;
document.forms[0].action=url + ?action= + tmp;
alert(url + ?action= + tmp);
document.forms[0].submit();
}

Javascript can alert the right information,such as /Log/log.do?action=3
But the page still can't redirect!
Why can't redirect?



On 2/20/06, raja sekar [EMAIL PROTECTED] wrote:

 try this

 function goURL(tmp){
 var url = %=response.encodeURL(/Log/log.do)%;
 document.forms[0].action=url + ?action= + tmp;
 document.forms[0].submit();
 }


 On 2/20/06, red phoenix [EMAIL PROTECTED] wrote:
 
  when I Javascript execute
  var url = %=response.encodeURL(/Log/log.do)%;
 
  IE raise script error:
  Raise error during running period,debug or not
  Line:81
  Error:missing ';'
 
 
  On 2/20/06, raja sekar [EMAIL PROTECTED] wrote:
  
   modify your javascript like this
  
   function goURL(tmp){
   var url = %=response.encodeURL(/Log/log.do)%;
   document.forms[0].action=url + ?action= + tmp;
   document.forms[0].submit();
   }
  
   and try...
  
   On 2/20/06, red phoenix [EMAIL PROTECTED] wrote:
   
I modify my Javascript like follows:
function goURL(tmp){
document.forms[0].action=eval(/Log/log.do?action=First);
document.forms[0].submit();
}
   
But when I change the value of html:select,it still can't
 redirect.
  I
   am
mad with it!
   
   
On 2/20/06, Swapnil Patil [EMAIL PROTECTED] wrote:

 Hi red,

 html:link page=/log.do?action=FirstFirst Page/html:link
 this works with action parameter containing value= First NOT
 0.

 Your 'tmp' variable in script function contains  value 0,1 or
  2.  Your
 log.do action might be checking content of action parameter with
   values
 First, Second or Third

 Try it again with following manner.

 html:select property=pageID size=1
 onchange=javascript:goURL(
 this.options[this.selectedIndex].value)
 option value=FirstFirst/option
 option value=SecondSecond/option
 option value=ThirdThird/option
 /html:select

 I hope it will work.


 On 2/20/06, red phoenix [EMAIL PROTECTED] wrote:
 
  I have try follows two method:
  function goURL(tmp){
  document.forms[0].action=eval(/Log/log.do?action=+tmp);
  alert(eval(/Log/log.do?action=+tmp));
  document.forms[0].submit();
  }
 
  and
 
  function goURL(tmp){
  var newAct = /Log/log.do?action=+tmp;
  document.forms[0].action = newAct;
  alert(newAct)
  document.forms[0].submit();
  }
 
  I find Javasript can alert right value,such as
  /Log/log.do?action=3
  but I find Javascript don't redirect any page,my action don't be
called!
  Why?
 
 
  On 2/20/06, Saul Qunming Yuan [EMAIL PROTECTED] wrote:
  
   A few things here,
  
   1) I think you need build the action like the following;
  
   document.forms[0].action=eval(/Log/log.do?action=+tmp);
  
   or do it in two steps:
  
   var newAct = /Log/log.do?action=+tmp;
   document.forms[0].action = newAct;
  
   2) how are you checking the action parameter in your Action
  class,
   checking
   action=First or action=0?
   the above will give you action=0, or action=1 etc, but not
 action=First,
   action=Second. The reason I ask the question is b/c you
  mentioned
   html:link
   page=/log.do?action=FirstFirst Page/html:link works for
  you,
you
  are
   passing a First to the action in this case.
  
  
   Saul
  
   - Original Message -
   From: red phoenix [EMAIL PROTECTED]
   To: Struts Users Mailing List user@struts.apache.org
   Sent: Sunday, February 19, 2006 10:12 PM
   Subject: Re: why my page can't redirect under Struts with
Javascript?
  
  
   My  web context is Log,so I add prefix before,like follows:
  
   document.forms[0].action=/Log/log.do?action=+eval(tmp);
  
   but when I change the value of html:select,it still can't
redirect,I
  am
   puzzled it for several days.I don't know why it don't
  redirect!!!
  
   I want to use above code to make a pagination program,the
 html:select
   shows all pages,such as 1st Page,2nd Page,3rd Page and so
  on,when
  selected
   one of items of html:select,it will call Javascript and
  redirect
 page
  to
   a
   action.
  
   Anybody can give me some adivce?
  
  
  
   On 2/20/06, Saul Qunming Yuan [EMAIL PROTECTED] wrote:
   
For the following:
   
document.forms[0].action=/log.do?action=+eval(tmp);
   
You'll need to prefix /log.do with your web context. Or
 you
   can
 use:
html:rewrite page='/log.do' / in place of /log.do above.
   
hope it helps.
Saul
   
   
- Original Message -
From: