You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xap-commits@incubator.apache.org by mt...@apache.org on 2006/09/01 21:22:07 UTC
svn commit: r439486 -
/incubator/xap/trunk/src/xap/taghandling/AbstractTagImpl.js
Author: mturyn
Date: Fri Sep 1 14:22:06 2006
New Revision: 439486
URL: http://svn.apache.org/viewvc?rev=439486&view=rev
Log:
Backed out of beforeAttributeSet() changes, since something seems to be wrong with it that's keeping the build from building correctly.
Modified:
incubator/xap/trunk/src/xap/taghandling/AbstractTagImpl.js
Modified: incubator/xap/trunk/src/xap/taghandling/AbstractTagImpl.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/taghandling/AbstractTagImpl.js?rev=439486&r1=439485&r2=439486&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/taghandling/AbstractTagImpl.js (original)
+++ incubator/xap/trunk/src/xap/taghandling/AbstractTagImpl.js Fri Sep 1 14:22:06 2006
@@ -636,72 +636,8 @@
/**
* @param e The AttributeChangeEvent
*/
-xap.taghandling.AbstractTagImpl.prototype.beforeAttributeSet = function(/*AttributeChangeEvent*/ e){
+xap.taghandling.AbstractTagImpl.prototype.beforeAttributeSet = function( e ){
- var attributeValue = e.getNewValue() ;
-
- if ( attributeValue == null
- || attributeValue.length == 0
- || attributeValue.charAt(0) != "{"
- || attributeValue.charAt(attributeValue.length - 1) != "}"
- ){
- // There's nothing interesting here....
- return ;
- } else {
- // Work with what's between the {}'s from here on in:
- attributeValue = attributeValue.substring(1,attributeValue.length - 1) ;
- }
-
-
- // Stealing code from this.fireEvent() and EventHandler.fireEvent():
- var session = this.getSession() ;
- var handler = session.getEventHandler() ;
-
- var eventElement = this.getElement();
- var clientEvent = new xap.session.ClientEvent( eventElement, this.getSession());
- try{
- // If this works, move this to resolver:
- if (handler._isObjectEvent(attributeValue)){
-
- // This will go to a more complete unescaping method later:
- attributeValue = attributeValue.replace(/\\{/g,"{") ;
- attributeValue = attributeValue.replace(/\\}/g,"}") ;
-
- //we use parseArgument here because technically an object event is just an argument
- //as they can be imbedded in other arugments etc
- var parseResult =
- session.getDeclarativeArgumentParser().parseArgument(attributeValue,0,eventElement, clientEvent);
-
- if( parseResult._resultObject){
- e.setNewValue(parseResult._resultObject);
- }
- //= resolverRegistry.resolveAttribute(getElement(),attributeName,attributeValue);
- }
-// Deal with unescaping later:
-// else{
-// e.setNewValue(resolverRegistry.unescapeString(attributeValue));
-// }
-
- //now that we handled escaping also handle the fact that the thing
- //can be a url that needs to be qualified
- //attributeValue = e.getNewValue();
-
-// Skip implementing URL resolution for now:
-// var newAttributeValue = this.qualifyToFullUrl(attributeName, attributeValue,this);
-//if ( newAttributeValue != null && !newAttributeValue.equals(attributeValue)){
-// e.setNewValue(newAttributeValue);
-//}
- }
- catch(anException){
- xap.util.Utils.interrogate(anException,true) ;
- if(true /*resolverException test?*/){
- session.handleException(ExceptionContext.RESOLVER_ERROR,anException);
- } else if (false /*escapeSyntaxException test?*/){
- session.handleException(ExceptionContext.RESOLVER_ERROR,anException);
- } else {
- // TODO: handle unknown exception.
- }
- }
}