Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Attribute related methods for HttpRequestAtrributeListener  RSS feed

 
Deepan Devadasan
Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends,

In a class that implements HttpRequestAttributeListener, when HttpRequestAttributeEvent.getValue() called within attributeReplaced() and attributeRemoved()callbacks return only the previous values..

Whats the point in this?
 
Bosun Bello
Ranch Hand
Posts: 1511
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check the specs. That's the expected behavior.
 
D Rog
Ranch Hand
Posts: 472
Linux Objective C Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think question was why spec defined behavior in this way. Honestly I hate the spec too.
 
Deepan Devadasan
Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I accept the fact...

But the attributeAdded() returning the previous value, means, how are we going to use it and what are the possible applications..
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Theepan Thevathasan:
But the attributeAdded() returning the previous value, means, how are we going to use it and what are the possible applications..


Shouldn't be. Previous value only make sense with attributeRemoved, or attributeReplaced, right?

By invoking attributeReplaced() what do you expect? I would expect the value of the replaced attribute not the value it is replaced by. Similar goes with remove thingy.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!