Re: Browser Back button intercept, no javascript

2022-01-26 Thread Lukasz Lenart
f a browser, my application likes to > intercept that and display a text message at the current web page. > How to do that without using javascript? > > The following codes show an approach with AbstractInterceptor. > Please review whether it will work. > If yes, how to get th

Browser Back button intercept, no javascript

2022-01-25 Thread albert kao
If the user presses the Back button of a browser, my application likes to intercept that and display a text message at the current web page. How to do that without using javascript? The following codes show an approach with AbstractInterceptor. Please review whether it will work. If yes, how to

Re: Struts 2.3.28.1 - Populate Java Property from Controller inside JavaScript

2016-08-29 Thread Christoph Nenning
> Hi all, > > First of all, greetings, from Brazil. > > I would like to populate this Java Script variable with name > *flightPlanCoordinates > *from a Action Controller. > > var flightPlanCoordinates = [ > > > {lat: -23.533592, lng: -46.742744}, > > {lat: -23.533592, lng: -46.742744}, > > {

Re: Struts 2.3.28.1 - Populate Java Property from Controller inside JavaScript

2016-08-29 Thread Lukasz Lenart
2016-08-27 0:08 GMT+02:00 Guilherme Bisconcini : > Hi all, > > First of all, greetings, from Brazil. > > I would like to populate this Java Script variable with name > *flightPlanCoordinates > *from a Action Controller. > > var flightPlanCoordinates = [ > > > {lat: -23.533592, lng: -46.742744}, > >

Struts 2.3.28.1 - Populate Java Property from Controller inside JavaScript

2016-08-26 Thread Guilherme Bisconcini
Hi all, First of all, greetings, from Brazil. I would like to populate this Java Script variable with name *flightPlanCoordinates *from a Action Controller. var flightPlanCoordinates = [ {lat: -23.533592, lng: -46.742744}, {lat: -23.533592, lng: -46.742744}, {lat: -23.533870, lng: -46.742804

Re: How to Use JavaScript in Struts2

2014-06-04 Thread Dave Newton
It's not clear to me what the underlying question is. If you have a lot of dynamic elements on the page you'll probably want to look at the S2 jQuery library: https://code.google.com/p/struts2-jquery/ It makes simple usecases drop-dead easy, and might be enough to serve your needs--although usin

Re: How to Use JavaScript in Struts2

2014-06-04 Thread Dave Newton
o...@gmail.com > > Date: Wed, 4 Jun 2014 10:50:14 +0530 > > Subject: How to Use JavaScript in Struts2 > > To: user@struts.apache.org > > > > Hi, > > I'm developing an an application to conduct Online Examinations. Lots of > > table displays are used i

RE: How to Use JavaScript in Struts2

2014-06-04 Thread Martin Gainty
> From: nijo...@gmail.com > Date: Wed, 4 Jun 2014 10:50:14 +0530 > Subject: How to Use JavaScript in Struts2 > To: user@struts.apache.org > > Hi, > I'm developing an an app

Re: How to Use JavaScript in Struts2

2014-06-04 Thread Christoph Nenning
> Hi, > I'm developing an an application to conduct Online Examinations. Lots of > table displays are used in every module. for example Questions, Exam, > Results, etc, > I have a form which saves a question to db. > > My Scenario is Following I Have three types of Questions > 1. Single choice > 2

How to Use JavaScript in Struts2

2014-06-03 Thread NIJO GEORGE
Hi, I'm developing an an application to conduct Online Examinations. Lots of table displays are used in every module. for example Questions, Exam, Results, etc, I have a form which saves a question to db. My Scenario is Following I Have three types of Questions 1. Single choice 2. Mutiple Choice 3

Re: S2: Not generating javascript validation

2013-10-01 Thread Lukasz Lenart
I have updated the example to show how validation works with ! https://github.com/lukaszlenart/struts2-dmi-validation 2013/10/2 Lukasz Lenart : > 2013/10/1 Néstor Boscán : >> Sorry I made that change so I could use only login in the form tag to make >> the validation work. > > Ok, but you have Lo

Re: S2: Not generating javascript validation

2013-10-01 Thread Lukasz Lenart
2013/10/1 Néstor Boscán : > Sorry I made that change so I could use only login in the form tag to make > the validation work. Ok, but you have LoginAction-validation.xml which should be applied to the whole LoginAction - doesn't matter what method do you use. I have prepared a small example base o

Re: S2: Not generating javascript validation

2013-10-01 Thread Néstor Boscán
Sorry I made that change so I could use only login in the form tag to make the validation work. On Tuesday, October 1, 2013, Lukasz Lenart wrote: > 2013/9/30 Néstor Boscán : >> > > Why do you use login!login as action login is already defined to use > login method? > > So login.action is the

Re: S2: Not generating javascript validation

2013-09-30 Thread Lukasz Lenart
2013/9/30 Néstor Boscán : > Why do you use login!login as action login is already defined to use login method? So login.action is the same as login!login.action (just drop .action) Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ --

Re: S2: Not generating javascript validation

2013-09-30 Thread Néstor Boscán
I have: struts.xml: struts-seguridad.xml: /WEB-INF/jsp/seguridad/login.jsp /WEB-INF/jsp/seguridad/login.jsp /WEB-INF/jsp/seguridad/login.jsp Thanks for the help On Sun, Sep 22, 2013 at 1:49 PM, Lukasz Lenart wrote: > Can

Re: S2: Not generating javascript validation

2013-09-22 Thread Lukasz Lenart
Can you post your struts.xml? And you don't have such constant defined ? Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ 2013/9/22 Néstor Boscán : > Yes and it doesn't work. It only works with "login". > > Thanks for the help > > On Sunday, September 22, 2013, Lukasz Lenart > wro

Re: S2: Not generating javascript validation

2013-09-22 Thread Néstor Boscán
Yes and it doesn't work. It only works with "login". Thanks for the help On Sunday, September 22, 2013, Lukasz Lenart wrote: > 2013/9/22 Néstor Boscán : >> Hi >> >> > validate="true"> > > Have you tried to use: login!login ? Attribute action expects action > name, not how it is rendered (i.e

Re: S2: Not generating javascript validation

2013-09-22 Thread Lukasz Lenart
2013/9/22 Néstor Boscán : > Hi > > validate="true"> Have you tried to use: login!login ? Attribute action expects action name, not how it is rendered (i.e. if you change default action extension to .html) Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ ---

Re: S2: Not generating javascript validation

2013-09-22 Thread Néstor Boscán
Yes that seems to be the problem. But I have many applications working on older struts 2 libraries and the dmi + javascript validation worked. On Sunday, September 22, 2013, JOSE L MARTINEZ-AVIAL wrote: > Maybe it is not able to match the action name in the form (with the !login) with the act

Re: S2: Not generating javascript validation

2013-09-22 Thread Néstor Boscán
Yes I reenabled DMI but javascript validation is not working when using DMI. If you use action!method the javascript field validations won't appear. On Sun, Sep 22, 2013 at 2:47 AM, Chris Pratt wrote: > I believe one of the recent changes was to change the default to disabling > D

Re: S2: Not generating javascript validation

2013-09-22 Thread Chris Pratt
t; > Regards, > > Néstor > > > On Sat, Sep 21, 2013 at 5:24 PM, wrote: > > > Can you provide the jsp snipset for the form? > > Sent via BlackBerry from T-Mobile > > > > -Original Message- > > From: Néstor Boscán > > Date: Sat, 21 Sep 20

Re: S2: Not generating javascript validation

2013-09-21 Thread Néstor Boscán
> Can you provide the jsp snipset for the form? > Sent via BlackBerry from T-Mobile > > -Original Message- > From: Néstor Boscán > Date: Sat, 21 Sep 2013 16:15:23 > To: Struts Users Mailing List > Reply-To: "Struts Users Mailing List" > Subject: S2: Not

Re: S2: Not generating javascript validation

2013-09-21 Thread Néstor Boscán
> To: Struts Users Mailing List > Reply-To: "Struts Users Mailing List" > Subject: S2: Not generating javascript validation > > Hi > > I'm using the latest 2.3.15.2 version of struts 2 on weblogic 10.3.6. This > are my files: > > LoginAction-validation

Re: S2: Not generating javascript validation

2013-09-21 Thread jlmagc
Can you provide the jsp snipset for the form? Sent via BlackBerry from T-Mobile -Original Message- From: Néstor Boscán Date: Sat, 21 Sep 2013 16:15:23 To: Struts Users Mailing List Reply-To: "Struts Users Mailing List" Subject: S2: Not generating javascript validation Hi

S2: Not generating javascript validation

2013-09-21 Thread Néstor Boscán
Hi I'm using the latest 2.3.15.2 version of struts 2 on weblogic 10.3.6. This are my files: LoginAction-validation.xml: http://struts.apache.org/dtds/xwork-validator-1.0.3.dtd";> El usuario es requerido La contrasenia es requerida validators.xml:

Re: JavaScript errors on exception-handling.html

2013-09-05 Thread Chris
ot;execute">     <result name="success">/HelloWorld.jsp</result> </action> ]]> What about ? De : Volker Krebs À : Str

Re: JavaScript errors on exception-handling.html

2013-09-05 Thread Lukasz Lenart
age > <http://struts.apache.org/release/2.3.x/docs/exception-handling.html> > has some JavaScript Errors. > > I stumbled over this a couple of weeks ago ... and now again. So I thought > I'll write it to the list, hoping to reac

JavaScript errors on exception-handling.html

2013-09-05 Thread Volker Krebs
Hello, the Exception Handling Documentation Page <http://struts.apache.org/release/2.3.x/docs/exception-handling.html> has some JavaScript Errors. I stumbled over this a couple of weeks ago ... and now again. So I thought I'll write it to the list, hoping to reach someone who

Re: Struts Javascript error

2013-08-12 Thread Sreekanth S. Nair
Javscript error got resolved by adding between html tag. but still i'm unable to see the field error message which i have added using addFieldError() method. Sreekanth S. Nair wrote: > Hi, > Getting the following error in javascript console, happening with latest > struts

Struts Javascript error

2013-08-12 Thread Sreekanth S. Nair
Hi, Getting the following error in javascript console, happening with latest struts2 distribution 1. Uncaught ReferenceError: StrutsUtils is not defined validation.js:161<http://localhost:8080/tradelicense/struts/css_xhtml/validation.js> <http://localhost:8080/tradelicen

Re: sj:tabbedpanel javascript

2013-08-09 Thread john lee
ot;partmoreinfo"; options_partmoreinfo.oncom = "tabcomplete"; options_partmoreinfo.oncha = "tabchange"; jQuery.struts2_jquery_ui.bind(jQuery('#partmoreinfo'),options_partmoreinfo); }); <script type='text/javascript'>jQuery(document).ready(function () {

Re: sj:tabbedpanel javascript

2013-08-09 Thread Chris Pratt
I have no idea what you mean. The sj:tabbedpanel generates HTML Elements and some jQuery based JavaScript. It'll all be there in the source. What's not "match"ing? (*Chris*) On Fri, Aug 9, 2013 at 11:00 AM, john lee wrote: > thanks for reply, > > i did view so

Re: sj:tabbedpanel javascript

2013-08-09 Thread john lee
: sj:tabbedpanel javascript Use the "View Source" feature in your browser to see what's being generated, then you should be able to see for yourself how to use JavaScript to interact with the on-screen components.   (*Chris*) On Fri, Aug 9, 2013 at 10:25 AM, john lee wr

Re: sj:tabbedpanel javascript

2013-08-09 Thread Chris Pratt
Use the "View Source" feature in your browser to see what's being generated, then you should be able to see for yourself how to use JavaScript to interact with the on-screen components. (*Chris*) On Fri, Aug 9, 2013 at 10:25 AM, john lee wrote: > > try to us

sj:tabbedpanel javascript

2013-08-09 Thread john lee
  try to using javascript to set sj:tabbedpanel's attribute, but not working   what is the correct format for access attribute sj:tabbedpanel's atrtribute in javascript?   thanks in advance   John         function setpartmoreinfo(id) {     $("#Cross").tabs( "optio

Re: [jira] [Resolved] (WW-3980) javascript Error : Dojo is undefined

2013-02-14 Thread Lukasz Lenart
Hi, You must map also Struts2 related resources as you limited filter mapping just to *.action. The simplest way to check what else has to be mapped is return to default mapping (/*) and check with browser what other resources are fetched, eg. /struts*, /static* Regards -- Łukasz + 48 606 323 1

Fwd: [jira] [Resolved] (WW-3980) javascript Error : Dojo is undefined

2013-02-14 Thread prashant borse
4 PM Subject: [jira] [Resolved] (WW-3980) javascript Error : Dojo is undefined To: prashant.bo...@gmail.com [ https://issues.apache.org/jira/browse/WW-3980?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel] Lukasz Lenart resolved WW-3980. ---

Re: [Struts2] SessionToken Interceptor used with json Result and Javascript Calls

2012-11-07 Thread Ken McWilliams
jsp pages. But in one case, I call an > action from javascript via jquery.ajax and return a json result. > > To do that, I added two properties to the json result object > (documenTable) with token and tokenName and populate them in the action with > documentTable.setTo

[Struts2] SessionToken Interceptor used with json Result and Javascript Calls

2012-11-07 Thread Jan Fröhlich
Hi... I try to secure one of my web applications with tokens. Everything works fine with basic jsp pages. But in one case, I call an action from javascript via jquery.ajax and return a json result. To do that, I added two properties to the json result object (documenTable) with token and

Re: How does struts 2 and struts2 jquery includes javascript files in a jsp from their jar files

2012-07-02 Thread Łukasz Lenart
2012/6/30 Anandraj : > Hi, > > we are using struts2 with struts2 jquery in our application and i > have noticed Struts2 and Struts2-jquery includes the javascripts files from > the jar by including the tag of the framework. how it included the > javascript file by inc

How does struts 2 and struts2 jquery includes javascript files in a jsp from their jar files

2012-06-30 Thread Anandraj
Hi, we are using struts2 with struts2 jquery in our application and i have noticed Struts2 and Struts2-jquery includes the javascripts files from the jar by including the tag of the framework. how it included the javascript file by including the tag ,is there any way to manually

Re: Doest struts 2 accept “POST” method to send data from javascript to an Action server?

2011-12-16 Thread Dave Newton
rv:8.0) > > Gecko/20100101 Firefox/8.0 Acceptapplication/json, text/javascript, */*; > > q=0.01 Accept-Languagees-es,es;q=0.8,en-us;q=0.5,en;q=0.3 > Accept-Encodinggzip, > > deflateAccept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7Connection keep-alive > > Content-Typeapplication/js

Re: Doest struts 2 accept “POST” method to send data from javascript to an Action server?

2011-12-16 Thread José Manuel Sendín Cruz
1; WOW64; rv:8.0) > Gecko/20100101 Firefox/8.0 Acceptapplication/json, text/javascript, */*; > q=0.01 Accept-Languagees-es,es;q=0.8,en-us;q=0.5,en;q=0.3 Accept-Encodinggzip, > deflateAccept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7Connection keep-alive > Content-Typeapplication/json; charset

Re: Doest struts 2 accept “POST” method to send data from javascript to an Action server?

2011-12-16 Thread José Manuel Sendín Cruz
Hello Maurizio, thanks. Headers sended as "GET" are: Hostlocalhost:8080User-AgentMozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20100101 Firefox/8.0Acceptapplication/json, text/javascript, */*; q=0.01Accept-Languagees-es,es;q=0.8,en-us;q=0.5,en;q=0.3Accept-Encodinggzip, def

Re: Doest struts 2 accept “POST” method to send data from javascript to an Action server?

2011-12-16 Thread Maurizio Cucchiara
d setJgGridData(String resultado){ > System.out.append(resultado); >} >public String getJgGridData(){ >return this.jgGridData >} >public String getCustomData() { >return customData; > } >public void setCustomData(String customDa

Doest struts 2 accept “POST” method to send data from javascript to an Action server?

2011-12-16 Thread José Manuel Sendín Cruz
ata(){ return this.jgGridData } public String getCustomData() { return customData; } public void setCustomData(String customData) { this.customData = customData; } //And the method called and defined in struts.xml (properly called) public void guardarUsuario

Re: checking fielderrors into javascript

2011-06-24 Thread Dave Newton
tions. >> >> Dave >> >> On Friday, June 24, 2011, Arpan wrote: >> > yes right..but i cant use the same in javascript.. >> > >> > On Fri, Jun 24, 2011 at 10:19 PM, Dave Newton >> wrote: >> > >> >>

Re: checking fielderrors into javascript

2011-06-24 Thread Arpan
alert("${theActionProperty}"); > > > > Now try it, and see how it compares with your expectations. > > Dave > > On Friday, June 24, 2011, Arpan wrote: > > yes right..but i cant use the same in javascript.. > > > > On Fri, Jun 24, 2011 at 10:19 PM

Re: checking fielderrors into javascript

2011-06-24 Thread Dave Newton
Let's take a further step back. What do you believe happens if this is your JSP? alert("${theActionProperty}"); Now try it, and see how it compares with your expectations. Dave On Friday, June 24, 2011, Arpan wrote: > yes right..but i cant use the

Re: checking fielderrors into javascript

2011-06-24 Thread Arpan
yes right..but i cant use the same in javascript.. On Fri, Jun 24, 2011 at 10:19 PM, Dave Newton wrote: > On Fri, Jun 24, 2011 at 12:47 PM, Arpan wrote: > > Can I aceess the field errors in java script? > > like : document.getElementById("fieldErrors") o

Re: checking fielderrors into javascript

2011-06-24 Thread Dave Newton
On Fri, Jun 24, 2011 at 12:47 PM, Arpan wrote: > Can I aceess the field errors in java script? > like : document.getElementById("fieldErrors") or how can i get the value? ... Let's take a step back: how would you access a simple action property in JavaScript, assuming, say,

Re: checking fielderrors into javascript

2011-06-24 Thread Arpan
Can I aceess the field errors in java script? like : document.getElementById("fieldErrors") or how can i get the value? On Fri, Jun 24, 2011 at 10:08 PM, Dave Newton wrote: > On Friday, June 24, 2011, Arpan wrote: > > In my JavaScript method I want to check if the page has g

Re: checking fielderrors into javascript

2011-06-24 Thread Dave Newton
On Friday, June 24, 2011, Arpan wrote: > In my JavaScript method I want to check if the page has got any fielderror > or messege. > > How to access these struts2 objects into java script.Any example? Just write the JavaScript in something (JSP, FreeMarker, etc.) that processes serv

checking fielderrors into javascript

2011-06-24 Thread Arpan
Hi, In my JavaScript method I want to check if the page has got any fielderror or messege. How to access these struts2 objects into java script.Any example? Thanks

Re: Html:link Javascript validation

2011-06-21 Thread Dave Newton
bbura...@verizonwireless.com] > Sent: Tuesday, June 21, 2011 11:14 AM > To: user@struts.apache.org > Subject: Html:link Javascript validation > > Hi, > > I wanted to perform javascript validation when HTML link is clicked. If > validation fails, I want to stop the process.

RE: Html:link Javascript validation

2011-06-21 Thread Sunil Choppara
AM To: user@struts.apache.org Subject: Html:link Javascript validation Hi, I wanted to perform javascript validation when HTML link is clicked. If validation fails, I want to stop the process. In Javascript function, i added return false. so that it stops the process. When I was runnin

Html:link Javascript validation

2011-06-20 Thread sivaks75
Hi, I wanted to perform javascript validation when HTML link is clicked. If validation fails, I want to stop the process. In Javascript function, i added return false. so that it stops the process. When I was running the application, after performing the javascript validation (though Layout ID

Re: javascript array to Struts 2 action

2011-05-10 Thread Paweł Wielgus
Hi, try with String[] field in your action, or create a custom field setter that will take String[] as a parameter. I also assume that on your page You are submiting it as an array? Best greetings, Paweł Wielgus. 2011/5/10 srsankar : > i am having a array of strings on javascript and i wo

javascript array to Struts 2 action

2011-05-10 Thread srsankar
i am having a array of strings on javascript and i would like to make an ajax call to struts 2 action which expects List. I need to know a way to pass these values to action which will recognize it. If i pass the array directly, SOP is printing it as an Object and it couldnt able to cast it to

RE: Calling an action class through Javascript -Struts 2.

2011-03-21 Thread CRANFORD, CHRIS
I would highly recommend AJAX/JSON/jQuery, they are Javascript. Question - Does your requirement state that the data should be server-call back delay delivered? Does your requirement expect the data to be pre-rendered and the DOM updated real-time? Either way, I would use jQuery to perform

Re: Calling an action class through Javascript -Struts 2.

2011-03-21 Thread Dave Newton
On Mon, Mar 21, 2011 at 9:31 AM, adam pinder wrote: > you can use AJAX functionality straight from plain old javascript without > using DOJO > or other javascript libraries - its just those libs make it easier. Make it easier to the point of it being a Really Bad Idea to do it *with

RE: Calling an action class through Javascript -Struts 2.

2011-03-21 Thread adam pinder
if you don't use AJAX then you can only do the standard get/post based on form submission which is a synchronous call. you can use AJAX functionality straight from plain old javascript without using DOJO or other javascript libraries - its just those libs make it easier. adam &

Re: Calling an action class through Javascript -Struts 2.

2011-03-21 Thread Dave Newton
On Mon, Mar 21, 2011 at 1:16 AM, JavaNoobie87 wrote: > Im trying to implement it only using Javascript as part of our project > requirements , and so using AJAX with JSON , dwr etc is ruled out. Both Ajax and JSON are JavaScript.

Re: Calling an action class through Javascript -Struts 2.

2011-03-21 Thread APE SHOW
a dropdown > box in my jsp .I also have to pass a value to the action class to execute > the method . Im trying to implement it only using Javascript as part of our > project requirements , and so using AJAX with JSON , dwr etc is ruled out . > If anyone could provide pointers of its imp

Calling an action class through Javascript -Struts 2.

2011-03-20 Thread JavaNoobie87
Hi All , I'm trying to call an action class , On change of the values in a dropdown box in my jsp .I also have to pass a value to the action class to execute the method . Im trying to implement it only using Javascript as part of our project requirements , and so using AJAX with JSON , dwr e

Re: Invoking Javascript function from Struts 1.3

2010-12-23 Thread Dave Newton
Right, and I said don't use a struts link tag :) Dave On Dec 23, 2010 5:22 AM, "Dennis Atkinson" wrote: > Thanks to the repliers! > > Tom, your solution is perfect. Thank you! > > Dave, I might have been unclear as to what I was looking for. I wasn't specifically looking to get the tag working

Re: Invoking Javascript function from Struts 1.3

2010-12-23 Thread Dennis Atkinson
Thanks to the repliers! Tom, your solution is perfect.  Thank you! Dave, I might have been unclear as to what I was looking for.  I wasn't specifically looking to get the tag working; I was just looking for a solution, with whatever would possibly help. Dennis

Re: Invoking Javascript function from Struts 1.3

2010-12-22 Thread Dave Newton
On Wed, Dec 22, 2010 at 12:16 PM, wrote: > > Why use a struts tag to generate a non-struts link? > And, this seems like a perfectly reasonable thing to do. Not really. The whole point of the Struts tags is to access Struts functionality, like action mappings. All this is is pure JavaS

RE: Invoking Javascript function from Struts 1.3

2010-12-22 Thread Thomas.Sattler
> > Why use a struts tag to generate a non-struts link? > >Dave > Dave, The OP wrote: > It really, really needs to work this way. So I am going to assume that it does. And, this seems like a perfectly reasonable thing to do. If a company has existing functionality in jav

Re: Invoking Javascript function from Struts 1.3

2010-12-22 Thread Dave Newton
Why use a struts tag to generate a non-struts link? Dave On Tuesday, December 21, 2010, Dennis Atkinson wrote: > Greetings all. > > I have a problem invoking Javascript that I can't seem to solve.  I'm hoping > someone here has run into the same kind of thing. > > W

Invoking Javascript function from Struts 1.3

2010-12-22 Thread Dennis Atkinson
Greetings all. I have a problem invoking Javascript that I can't seem to solve.  I'm hoping someone here has run into the same kind of thing.   When I am iterating through a List of items to display (via the tag), one cell I am trying to write has to be a link to a Javascript funct

Re: execute javascript after action's html renders

2010-12-03 Thread Colin Freas
leitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht > dient lediglich dem Austausch von Informationen und entfaltet keine > rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von > E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. > Ce message est

Re: execute javascript after action's html renders

2010-12-02 Thread Colin Freas
So, the "parent" action is using a Dojo *div* tag, with the *executeScripts* attribute set to true. The script in the "child" action, which is referenced in the *div* tag, is inline JavaScript. So parent is like: Child is: ... html/jsp fragments ... alert("blah

Re: Calling Struts Action from JavaScript

2010-12-01 Thread Li Ying
the raw data. Basically, if you want some simple html view, you can generate it on server side, by using normal JSP. If you want more complex flexible view, it is better to response the raw data(in JSON), and manipulate it on the client side, by JavaScript

Re: execute javascript after action's html renders

2010-12-01 Thread Dave Newton
How is the JavaScript implemented in the child action? And do you mean that an tag is being used (from a JSP? FM?) to load an action (the "child" from above)? Dave On Tue, Nov 30, 2010 at 4:50 PM, Colin Freas wrote: > On Struts 2.1.6, Dojo and JSON plugins. > > I w

execute javascript after action's html renders

2010-12-01 Thread Colin Freas
On Struts 2.1.6, Dojo and JSON plugins. I want to execute some JavaScript after an action's HTML finishes loading. I can't figure out how to make this happen consistently. The action that I'm trying to modify is as part of another action. When I access the child action direc

RE: Calling Struts Action from JavaScript

2010-12-01 Thread Biesbrock, Kevin
me:'field2'} ]; ---- JavaScript: var table = ''; for(var i=0,il=rows.length; i';

Re: Calling Struts Action from JavaScript

2010-12-01 Thread Anjib Mulepati
: Wednesday, December 01, 2010 10:24 AM To: Struts Users Mailing List Subject: Re: Calling Struts Action from JavaScript Can you please write me simple example of this JSON? I have never used this. Anjib On 12/1/2010 10:13 AM, Li Ying wrote: 2010/12/1 Anjib Mulepati: Li When you say sending response

Re: Calling Struts Action from JavaScript

2010-12-01 Thread Li Ying
I recommend JSON when you need exchange complex data strut between client and server. Because it is very friendly to JavaScript, so you can easily handle complex data strut in your client side JavaScript code. Sample for JSON can be find in the web site Biesbrock has told you. The idea of JSON is

RE: Calling Struts Action from JavaScript

2010-12-01 Thread Biesbrock, Kevin
Subject: Re: Calling Struts Action from JavaScript Can you please write me simple example of this JSON? I have never used this. Anjib On 12/1/2010 10:13 AM, Li Ying wrote: > 2010/12/1 Anjib Mulepati: >> Li >> When you say sending response using JSON what does that mean? > > I m

Re: Calling Struts Action from JavaScript

2010-12-01 Thread Anjib Mulepati
Can you please write me simple example of this JSON? I have never used this. Anjib On 12/1/2010 10:13 AM, Li Ying wrote: 2010/12/1 Anjib Mulepati: Li When you say sending response using JSON what does that mean? I mean, send a string in JSON format as response. If your response is simple, fo

Re: Calling Struts Action from JavaScript

2010-12-01 Thread Li Ying
2010/12/1 Anjib Mulepati : > Li > When you say sending response using JSON what does that mean? I mean, send a string in JSON format as response. If your response is simple, for example, just a "OK" or "ERROR" flag, you can use plain text. But when you need send a complex data strut back to cli

Re: Calling Struts Action from JavaScript

2010-12-01 Thread Anjib Mulepati
Li When you say sending response using JSON what does that mean? I have been sending result between view and action class by putting in request object as request.setAttribute("result",resultFrom); and request.getAttribute("result") What can be better approach than this? Thanks Anjib On 11/

Re: Calling Struts Action from JavaScript

2010-11-30 Thread Li Ying
Chris is right. On the client side, there is not such a concept of "Struts Action".There is Server Side Resource only. You have to access(post or get) it by URL, param, and you must handle the response from the server side. Code should looks like: (1)Client side JavaScript Send a

Re: Calling Struts Action from JavaScript

2010-11-30 Thread Chris Pratt
Either use ajax or submit the page request, there's no other good way to access a server side resource from the client side. (*chris*) On Nov 30, 2010 1:15 PM, "Anjib Mulepati" wrote: > Struts 1.3.8 > > I have text box and button in the JSP page with the function on > onCLick() event. >

Calling Struts Action from JavaScript

2010-11-30 Thread Anjib Mulepati
Struts 1.3.8 I have text box and button in the JSP page with the function on onCLick() event.

Re: Running external Javascript files through Struts/Freemarker -- access to ActionContext and ValueStack?

2010-11-12 Thread Li Ying
My suggestion: (1)Reference your js file as a static resource. (2)If the js need some dynamic information from your action. You can put js variables or hidden tags in your jsp, and retrieve these variables or hidden tags in your js. The js can be static outside resource, but [dynamic information

Re: Running external Javascript files through Struts/Freemarker -- access to ActionContext and ValueStack?

2010-11-12 Thread Dave Newton
object and referencing it from the JS, and so on. Dave On Nov 12, 2010 8:48 PM, wrote: > I have an action and freemarker result that includes an external Javascript file. This javascript files needs to be able to use the getText() method. I figured I'd name it "util.js.ftl" so that

Running external Javascript files through Struts/Freemarker -- access to ActionContext and ValueStack?

2010-11-12 Thread struts . rgm
I have an action and freemarker result that includes an external Javascript file. This javascript files needs to be able to use the getText() method. I figured I'd name it "util.js.ftl" so that accessing it directly caused the sitemesh-freemarker filter to catch it, bu

Re: referencing javascript files from (action) jsp file

2010-10-15 Thread Li Ying
Thanks a lot, I will try it. 2010/10/15 Robert Taylor : > Hi Li, > > JSTL and EL give you access to the implicit pageContext object. > From there you can access attributes from request and session. > > > For example: > > > And then use contextPath variable however you wish. > > I'm not sure how

Re: referencing javascript files from (action) jsp file

2010-10-15 Thread Robert Taylor
rs on this list do :) /robert - Original Message - From: "Li Ying" To: "Struts Users Mailing List" Sent: Friday, October 15, 2010 4:12 AM Subject: Re: referencing javascript files from (action) jsp file Hi Robert and Dave: I tried in my application, and it

Re: referencing javascript files from (action) jsp file

2010-10-15 Thread Dale Newfield
On 10/15/10 4:12 AM, Li Ying wrote: I tried "%{#request.getContextPath()}", but it don't work for some reason i don't know. #request is not the request object, it's a map containing the items in request scope. -Dale - To un

Re: referencing javascript files from (action) jsp file

2010-10-15 Thread Li Ying
Domain Security Administrator: Pas gebruiker aan > " rel="stylesheet" > type="text/css"> > " type="text/javascript"> > " > type="text/javascript"> > > > is converted into: > > > D

Re: referencing javascript files from (action) jsp file

2010-10-15 Thread Li Ying
his works. I would like to draw your attention to possible > problems with the struts head tag. See below. > > > Domain Security Administrator: Pas gebruiker aan > " rel="stylesheet" > type="text/css"> > " type="text/javascript">

Re: referencing javascript files from (action) jsp file

2010-10-15 Thread Li Ying
Hi Robert and Dave: I tried in my application, and it works for almost all the case. But there is one exception: In my application, i customized the CSS files shiped with Struts JQuery plugin and put them under path [{contextPath}/res/struts/]. In JSP, i need add code likes: to tell Struts

RE: referencing javascript files from (action) jsp file

2010-10-14 Thread Guy Thomas
Thank you, this works. I would like to draw your attention to possible problems with the struts head tag. See below. Domain Security Administrator: Pas gebruiker aan " rel="stylesheet" type="text/css"> " type="text/javascript"> " type="

Re: referencing javascript files from (action) jsp file

2010-10-14 Thread Li Ying
Hi guys: looks like a better choice. I will try it in my project. Thanks~~~ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org

Re: referencing javascript files from (action) jsp file

2010-10-14 Thread Dave Newton
hu, Oct 14, 2010 at 10:54 AM, Robert Taylor wrote: > Or you could simply use JSTL. > The following works for me: > "> > > > > /robert > > - Original Message - From: "Li Ying" > To: "Struts Users Mailing List" > Sent: Thursday, Oct

Re: referencing javascript files from (action) jsp file

2010-10-14 Thread Robert Taylor
Or you could simply use JSTL. The following works for me: "> /robert - Original Message - From: "Li Ying" To: "Struts Users Mailing List" Sent: Thursday, October 14, 2010 10:33 AM Subject: Re: referencing javascript files from (action) jsp file I s

Re: referencing javascript files from (action) jsp file

2010-10-14 Thread Li Ying
I suggest you to reference your resource file(js, image, css and so on) in this way: /path/filename.js"> The [] part will render the contextPath where the web application is deployed. The [contextPath] is a property defined in Action: public String getContextPath() { ret

  1   2   3   4   5   6   7   8   9   10   >