• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Javascript "this" in portal not referring properly, any solution please?

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
While migrating the existing struts 2 application to portlet in jboss portal, Im facingt the following problem.

In a javascript file, "this." keyword is used in many places but when deployed in portal this(current object) is not referred properly.

The javascript method is not calling at all.

Your response is appreciated.
Thanks in advance,

Regards
Paul.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Unless you are manipulating the creation of the JavaScript code on the server, I don;t see how changing what happens on the server can affect your JS code.

Without more detailed information, I'm not sure anything can be done.
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As Bear says....We need to see code.

I am guessing that your scope is out of whack and you probably need to learn about closures.

Eric
 
reply
    Bookmark Topic Watch Topic
  • New Topic