Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

PageContext.removeAttribute() doubt???

 
Amitkumar Dhama
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI all can anyone tell methe result of


PageContext.removeAttribute("amit")

If Attribute "amit" is available in all the scopes will it be removed from all the scopes, or only form the page scope....???

Thanking in advance.....
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Read the docs, there is no other better substitute.

Doc says:
removeAttribute() removes the object reference associated with the specified name in the given scope. Does nothing if there is no such object.

Thanks.
 
Amitkumar Dhama
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what if the scope is not specified???
 
Sai Patnala
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
removeAttribute on pageContext is overloaded, method that takes scope only removes from the specified scope, does nothing if there is no such object.

If scope is not specified, meaning using the removeAttribte(String name) mehtod, it removes the object reference associated with the given name from all scopes. Does nothing if there is no such object.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic