system/src/sc/lang/html/Element.java
public void addMixinProperties(BodyTypeDeclaration tagType) {
      // NOTE: using this method, not isMarkedServerTag which only looks at this element.  Instead, we need to look at the merged-version of the final tag
      // type after the annotations have been merged to determine if it's a server tag in this instance.  Otherwise, we can't modify the exec attribute in
      // another layer.
      boolean serverTag = tagType.isServerTagType();
      if (serverTag) {
         Element parentTag = getEnclosingTag();
         // For now, only setting the serverTag property on the first parent which is a serverTag.  This won't work as is for
         // switching back to a client tag from within a server tag, but not sure that use case makes sense anyway.  We could add 'clientTag'
         // to switch it back in that case rather than having to set this on every inner tag object.
         if (parentTag == null || !parentTag.isMarkedAsServerTag()) {
            addSetServerAtt(tagType, 0, "serverTag");
         }
      }
      else {
         LayeredSystem sys = getLayeredSystem();
         // If we're on the server system and there's no client type for this page, we'll mark it to run using serverTags
         if (sys.serverEnabled && tagType.getEnclosingType() == null) {
            if (!sys.hasSyncPeerTypeDeclaration(tagType)) {
               addSetServerAtt(tagType, 0, "serverTag");
            }
         }
      }
   }
/** Called during transform to set properties specific to the java version of the StrataCode.
    * Used to modify the generated Java based on the merged version of the type, not know in convertToObject.  Specifically because the
    * exec attribute can affect the tag properties, but is not know until transform type because we create the tagObject during init.
    * TODO: could be implemented as a mixinTemplate but since we have the element in the tagObject this is easier
    */
Called during transform to set properties specific to the java version of the StrataCode.
Used to modify the generated Java based on the merged version of the type, not know in convertToObject.  Specifically because the
exec attribute can affect the tag properties, but is not know until transform type because we create the tagObject during init.
TODO: could be implemented as a mixinTemplate but since we have the element in the tagObject this is easier
Called during transform to set properties specific to the java version of the StrataCode . Used to modify the generated Java based on the merged version of the type not know in convertToObject . Specifically because the exec attribute can affect the tag properties but is not know until transform type because we create the tagObject during init . TODO : could be implemented as a mixinTemplate but since we have the element in the tagObject this is easier
public void addMixinProperties(BodyTypeDeclaration tagType) {
      boolean serverTag = tagType.isServerTagType();
      if (serverTag) {
         Element parentTag = getEnclosingTag();
         if (parentTag == null || !parentTag.isMarkedAsServerTag()) {
            addSetServerAtt(tagType, 0, "serverTag");
         }
      }
      else {
         LayeredSystem sys = getLayeredSystem();
         if (sys.serverEnabled && tagType.getEnclosingType() == null) {
            if (!sys.hasSyncPeerTypeDeclaration(tagType)) {
               addSetServerAtt(tagType, 0, "serverTag");
            }
         }
      }
   }
public void addMixinProperties ( BodyTypeDeclaration tagType ) { boolean serverTag = tagType . isServerTagType ( ) ; if ( serverTag ) { Element parentTag = getEnclosingTag ( ) ; if ( parentTag == null || ! parentTag . isMarkedAsServerTag ( ) ) { addSetServerAtt ( tagType , 0 , "serverTag" ) ; } } else { LayeredSystem sys = getLayeredSystem ( ) ; if ( sys . serverEnabled && tagType . getEnclosingType ( ) == null ) { if ( ! sys . hasSyncPeerTypeDeclaration ( tagType ) ) { addSetServerAtt ( tagType , 0 , "serverTag" ) ; } } } }
Called during transform to set properties specific to the java version of the StrataCode.
Called during transform to set properties specific to the java version of the StrataCode .
// NOTE: using this method, not isMarkedServerTag which only looks at this element.  Instead, we need to look at the merged-version of the final tag // type after the annotations have been merged to determine if it's a server tag in this instance.  Otherwise, we can't modify the exec attribute in // another layer. // For now, only setting the serverTag property on the first parent which is a serverTag.  This won't work as is for // switching back to a client tag from within a server tag, but not sure that use case makes sense anyway.  We could add 'clientTag' // to switch it back in that case rather than having to set this on every inner tag object. // If we're on the server system and there's no client type for this page, we'll mark it to run using serverTags