Tabnine Logo
DynaTag
Code IndexAdd Tabnine to your IDE (free)

How to use
DynaTag
in
org.apache.commons.jelly

Best Java code snippets using org.apache.commons.jelly.DynaTag (Showing top 9 results out of 315)

origin: stapler/stapler

private void configureTag(Tag tag, Map attributes) throws JellyException {
  if ( tag instanceof DynaTag ) {
    DynaTag dynaTag = (DynaTag) tag;
    for (Object o : attributes.entrySet()) {
      Entry entry = (Entry) o;
      String name = (String) entry.getKey();
      if(name.equals("xmlns"))    continue;   // we'll process this by ourselves
      Object value = getValue(entry, dynaTag.getAttributeType(name));
      dynaTag.setAttribute(name, value);
    }
  } else {
    // treat the tag as a bean
    DynaBean dynaBean = new ConvertingWrapDynaBean( tag );
    for (Object o : attributes.entrySet()) {
      Entry entry = (Entry) o;
      String name = (String) entry.getKey();
      if(name.equals("xmlns"))    continue;   // we'll process this by ourselves
      DynaProperty property = dynaBean.getDynaClass().getDynaProperty(name);
      if (property == null) {
        throw new JellyException("This tag does not understand the '" + name + "' attribute");
      }
      dynaBean.set(name, getValue(entry,property.getType()));
    }
  }
}
origin: org.jenkins-ci/commons-jelly

Expression expression = ((ExpressionAttribute) entry.getValue()).exp;
Class type = dynaTag.getAttributeType(name);
Object value = null;
if (type != null && type.isAssignableFrom(Expression.class) && !type.isAssignableFrom(Object.class)) {
  value = expression.evaluateRecurse(context);
dynaTag.setAttribute(name, value);
origin: org.jvnet.hudson/commons-jelly

if ( Expression.class.isAssignableFrom( dynaTag.getAttributeType(name) ) ) {
  value = expression;
} else {
  dynaTag.setAttribute(name, value);
origin: org.jenkins-ci/commons-jelly

if ( Expression.class.isAssignableFrom( dynaTag.getAttributeType(name) ) ) {
  value = expression;
} else {
  dynaTag.setAttribute(name, value);
origin: commons-jelly/commons-jelly

Expression expression = (Expression) entry.getValue();
Class type = dynaTag.getAttributeType(name);
Object value = null;
if (type != null && type.isAssignableFrom(Expression.class) && !type.isAssignableFrom(Object.class)) {
  value = expression.evaluateRecurse(context);
dynaTag.setAttribute(name, value);
origin: org.jvnet.hudson/commons-jelly

Expression expression = ((ExpressionAttribute) entry.getValue()).exp;
Class type = dynaTag.getAttributeType(name);
Object value = null;
if (type != null && type.isAssignableFrom(Expression.class) && !type.isAssignableFrom(Object.class)) {
  value = expression.evaluateRecurse(context);
dynaTag.setAttribute(name, value);
origin: org.hudsonci.stapler/commons-jelly

if ( Expression.class.isAssignableFrom( dynaTag.getAttributeType(name) ) ) {
  value = expression;
} else {
  dynaTag.setAttribute(name, value);
origin: commons-jelly/commons-jelly

if ( Expression.class.isAssignableFrom( dynaTag.getAttributeType(name) ) ) {
  value = expression;
} else {
dynaTag.setAttribute(name, value);
origin: org.hudsonci.stapler/commons-jelly

Expression expression = ((ExpressionAttribute) entry.getValue()).exp;
Class type = dynaTag.getAttributeType(name);
Object value = null;
if (type != null && type.isAssignableFrom(Expression.class) && !type.isAssignableFrom(Object.class)) {
  value = expression.evaluateRecurse(context);
dynaTag.setAttribute(name, value);
org.apache.commons.jellyDynaTag

Javadoc

DynaTag represents a Jelly custom tag which can take its attributes dynamically and store them in some data structure. Typically a DynaTag may use either a Map or a DynaBean to implement itself which avoids writing explicit getter and setter methods for each possible attribute.

This kind of tag can be extremely useful when making HTML-like tags which generally output all the attributes which are used in the markup, except one or two special attributes are used, all others pass through.

Most used methods

  • getAttributeType
  • setAttribute
    Sets an attribute value of this tag before the tag is invoked

Popular in Java

  • Making http post requests using okhttp
  • findViewById (Activity)
  • getContentResolver (Context)
  • setRequestProperty (URLConnection)
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • ImageIO (javax.imageio)
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • JTable (javax.swing)
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now