congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
StaticFacesUtils.wrapExpression
Code IndexAdd Tabnine to your IDE (free)

How to use
wrapExpression
method
in
org.metawidget.statically.faces.StaticFacesUtils

Best Java code snippets using org.metawidget.statically.faces.StaticFacesUtils.wrapExpression (Showing top 17 results out of 315)

origin: org.metawidget.modules/metawidget-all

  @Override
  public void initNestedMetawidget( StaticMetawidget nestedMetawidget, Map<String, String> attributes ) {

    super.initNestedMetawidget( nestedMetawidget, attributes );

    if ( ( (StaticUIMetawidget) nestedMetawidget ).getValue() == null ) {

      String valueExpression = getValue();
      valueExpression = StaticFacesUtils.unwrapExpression( valueExpression );
      valueExpression += StringUtils.SEPARATOR_DOT_CHAR + attributes.get( NAME );
      valueExpression = StaticFacesUtils.wrapExpression( valueExpression );

      ( (StaticUIMetawidget) nestedMetawidget ).setValue( valueExpression );
    }
  }
}
origin: org.metawidget.modules/metawidget-all

valueExpression = StaticFacesUtils.wrapExpression( valueExpression );
origin: org.jboss.forge.addon/scaffold-faces

/**
* Overrriden to enhance the default f:selectItem widget with more suitable item labels
*/
@Override
protected void addSelectItems(HtmlSelectOneMenu select, String valueExpression, Map<String, String> attributes)
{
 // Empty option
 //
 // Note: a 'null' value (rather than an empty String') renders an <f:selectItem/> rather
 // than an <f:selectItem itemValue=""/>. This works out better if the HtmlSelectOneMenu has
 // a converter, because the empty String may not be a compatible value
 if (WidgetBuilderUtils.needsEmptyLookupItem(attributes))
 {
   addSelectItem(select, null, null);
 }
 // Add the select items
 SelectItems selectItems = new SelectItems();
 selectItems.putAttribute("value", valueExpression);
 // For each item to be displayed, set the label to the reverse primary key value
 if (attributes.containsKey(REVERSE_PRIMARY_KEY))
 {
   selectItems.putAttribute("var", SELECT_ITEM);
   selectItems.putAttribute("itemValue", StaticFacesUtils.wrapExpression(SELECT_ITEM));
   String displayExpression = "forgeview:display(_item)";
   ((BaseStaticXmlWidget) selectItems).putAdditionalNamespaceURI("forgeview", "http://jboss.org/forge/view");
   selectItems.putAttribute("itemLabel", StaticFacesUtils.wrapExpression(displayExpression));
 }
 select.getChildren().add(selectItems);
}
origin: org.jboss.forge/forge-scaffold-faces

/**
* Overrriden to enhance the default f:selectItem widget with more suitable item labels
*/
@Override
protected void addSelectItems( HtmlSelectOneMenu select, String valueExpression, Map<String, String> attributes ) {
 // Empty option
 //
 // Note: a 'null' value (rather than an empty String') renders an <f:selectItem/> rather
 // than an <f:selectItem itemValue=""/>. This works out better if the HtmlSelectOneMenu has
 // a converter, because the empty String may not be a compatible value
 if ( WidgetBuilderUtils.needsEmptyLookupItem( attributes ) ) {
   addSelectItem( select, null, null );
 }
 // Add the select items
 SelectItems selectItems = new SelectItems();
 selectItems.putAttribute("value", valueExpression);
 // For each item to be displayed, set the label to the reverse primary key value
 if (attributes.containsKey(REVERSE_PRIMARY_KEY))
 {
   selectItems.putAttribute("var", SELECT_ITEM);
   selectItems.putAttribute("itemValue", StaticFacesUtils.wrapExpression(SELECT_ITEM));
   String displayExpression = "forgeview:display(_item)";
   ((BaseStaticXmlWidget) selectItems).putAdditionalNamespaceURI("forgeview", "http://jboss.org/forge/view");
   selectItems.putAttribute("itemLabel", StaticFacesUtils.wrapExpression(displayExpression));
 }
 select.getChildren().add( selectItems );
}
origin: org.jboss.forge.addon/scaffold-faces

param.putAttribute(
    "value",
    StaticFacesUtils.wrapExpression(dataTable.getAttribute("var") + StringUtils.SEPARATOR_DOT_CHAR
         + primaryKeyName));
link.getChildren().add(param);
      + StringUtils.SEPARATOR_DOT_CHAR
      + StringUtils.decapitalize(columnAttributes.get(NAME));
 output.setValue(StaticFacesUtils.wrapExpression(displayExpression));
 output.setValue(StaticFacesUtils.wrapExpression(valueExpression));
   footerMetawidget.setValue(StaticFacesUtils.wrapExpression(controllerName + "Bean.add." + columnName));
   footerMetawidget.setPath(componentType + StringUtils.SEPARATOR_FORWARD_SLASH_CHAR + columnName);
   footerMetawidget.setLayout(new SimpleLayout());
origin: org.jboss.forge/forge-scaffold-faces

param.putAttribute(
    "value",
    StaticFacesUtils.wrapExpression(dataTable.getAttribute("var") + StringUtils.SEPARATOR_DOT_CHAR
         + primaryKeyName));
link.getChildren().add(param);
      + StringUtils.decapitalize(columnAttributes.get(NAME)) + ")";
 ((BaseStaticXmlWidget) link).putAdditionalNamespaceURI("forgeview", "http://jboss.org/forge/view");
 output.setValue(StaticFacesUtils.wrapExpression(displayExpression));
 output.setValue(StaticFacesUtils.wrapExpression(valueExpression));
   footerMetawidget.setValue(StaticFacesUtils.wrapExpression(controllerName + "Bean.add." + columnName));
   footerMetawidget.setPath(componentType + StringUtils.SEPARATOR_FORWARD_SLASH_CHAR + columnName);
   footerMetawidget.setLayout(new SimpleLayout());
origin: org.jboss.forge.addon/scaffold-faces

     StaticFacesUtils.wrapExpression("!empty " + StaticFacesUtils.unwrapExpression(link.getValue())));
param.putAttribute(
     "value",
     StaticFacesUtils.wrapExpression(StaticFacesUtils.unwrapExpression(link.getValue())
         + StringUtils.SEPARATOR_DOT_CHAR
         + reverseKey));
  outputText.putAttribute("styleClass", StaticFacesUtils.wrapExpression(styleClassEl));
  outputText.setValue("");
String unwrappedExpression = StaticFacesUtils.unwrapExpression(nestedMetawidget.getValue());
nestedMetawidget.putAttribute("rendered",
     StaticFacesUtils.wrapExpression("!empty " + unwrappedExpression));
commandLink.putAttribute(
     "action",
     StaticFacesUtils.wrapExpression(parentExpression + ".new"
         + StringUtils.capitalize(childExpression)));
commandLink.putAttribute("rendered", StaticFacesUtils.wrapExpression("empty " + unwrappedExpression));
origin: org.jboss.forge/forge-scaffold-faces

attributes
    .put(FACES_LOOKUP,
         StaticFacesUtils.wrapExpression(StringUtils.decapitalize(ClassUtils.getSimpleName(property
             .getType())) + "Bean.all"));
         StaticFacesUtils.wrapExpression(StringUtils.decapitalize(ClassUtils.getSimpleName(property
             .getType())) + "Bean.converter"));
origin: org.metawidget.modules/metawidget-all

  columnContents.putAttribute( "value", StaticFacesUtils.wrapExpression( dataTable.getAttribute( "var" ) ) );
} else {
  columnContents.putAttribute( "value", StaticFacesUtils.wrapExpression( valueExpression ) );
origin: org.jboss.forge/forge-scaffold-faces

param.putAttribute(
     "value",
     StaticFacesUtils.wrapExpression(StaticFacesUtils.unwrapExpression(link.getValue()) + StringUtils.SEPARATOR_DOT_CHAR
         + reverseKey));
link.getChildren().add(param);
  outputText.putAttribute("styleClass", StaticFacesUtils.wrapExpression(styleClassEl));
  outputText.setValue("");
String unwrappedExpression = StaticFacesUtils.unwrapExpression(nestedMetawidget.getValue());
nestedMetawidget.putAttribute("rendered",
     StaticFacesUtils.wrapExpression("!empty " + unwrappedExpression));
commandLink.putAttribute(
     "action",
     StaticFacesUtils.wrapExpression(parentExpression + ".new"
         + StringUtils.capitalize(childExpression)));
commandLink.putAttribute("rendered", StaticFacesUtils.wrapExpression("empty " + unwrappedExpression));
origin: org.jboss.forge/forge-scaffold-faces

removeLink.putAttribute("styleClass", "remove-button");
String removeExpression = COLLECTION_VAR + ".remove(" + dataTable.getAttribute("var") + ")";
removeLink.putAttribute("action", StaticFacesUtils.wrapExpression(removeExpression));
   addLink.putAttribute("styleClass", "add-button");
   String addExpression = COLLECTION_VAR + ".add(" + controllerName + "Bean.added)";
   addLink.putAttribute("action", StaticFacesUtils.wrapExpression(addExpression));
   setPropertyActionListener.putAttribute(
        "target",
        StaticFacesUtils.wrapExpression(controllerName + "Bean.add." + inverseRelationship));
   StandardBindingProcessor bindingProcessor = metawidget.getWidgetProcessor(StandardBindingProcessor.class);
origin: org.jboss.forge.addon/scaffold-faces

valueHolderTable.setValue(StaticFacesUtils.wrapExpression(asListValueExpression));
((BaseStaticXmlWidget) dataTable).putAdditionalNamespaceURI("forgeview", "http://jboss.org/forge/view");
valueHolderTable.setValue(StaticFacesUtils.wrapExpression("forgeview:asList(" + COLLECTION_VAR + ")"));
valueHolderTable.setValue(StaticFacesUtils.wrapExpression(COLLECTION_VAR));
select.putAttribute("id", selectId);
String requestScopedValue = "requestScope['" + selectId + "']";
select.setValue(StaticFacesUtils.wrapExpression(requestScopedValue));
String simpleComponentType = ClassUtils.getSimpleName(componentType);
String controllerName = StringUtils.decapitalize(simpleComponentType);
select.setConverter(StaticFacesUtils.wrapExpression(controllerName + "Bean.converter"));
addSelectItems(select, StaticFacesUtils.wrapExpression(controllerName + "Bean.all"), attributes);
panelGrid.getChildren().add(select);
addLink.putAttribute("styleClass", "add-button");
String addExpression = COLLECTION_VAR + ".add(" + requestScopedValue + ")";
addLink.putAttribute("action", StaticFacesUtils.wrapExpression(addExpression));
addLink.putAttribute("onclick", "if (document.getElementById(document.forms[0].id+':" + selectId
    + "').selectedIndex &lt; 1) { alert('Must select a " + StringUtils.uncamelCase(simpleComponentType)
origin: org.jboss.forge/forge-scaffold-faces

valueHolderTable.setValue(StaticFacesUtils.wrapExpression(asListValueExpression));
((BaseStaticXmlWidget) dataTable).putAdditionalNamespaceURI("forgeview", "http://jboss.org/forge/view");
valueHolderTable.setValue(StaticFacesUtils.wrapExpression("forgeview:asList(" + COLLECTION_VAR + ")"));
valueHolderTable.setValue(StaticFacesUtils.wrapExpression(COLLECTION_VAR));
select.putAttribute("id", selectId);
String requestScopedValue = "requestScope['" + selectId + "']";
select.setValue(StaticFacesUtils.wrapExpression(requestScopedValue));
String simpleComponentType = ClassUtils.getSimpleName(componentType);
String controllerName = StringUtils.decapitalize(simpleComponentType);
select.setConverter(StaticFacesUtils.wrapExpression(controllerName + "Bean.converter"));
addSelectItems(select, StaticFacesUtils.wrapExpression(controllerName + "Bean.all"), attributes);
panelGrid.getChildren().add(select);
addLink.putAttribute("styleClass", "add-button");
String addExpression = COLLECTION_VAR + ".add(" + requestScopedValue + ")";
addLink.putAttribute("action", StaticFacesUtils.wrapExpression(addExpression));
addLink.putAttribute("onclick", "if (document.getElementById(document.forms[0].id+':" + selectId
    + "').selectedIndex &lt; 1) { alert('Must select a " + StringUtils.uncamelCase(simpleComponentType)
origin: org.jboss.forge.addon/scaffold-faces

removeLink.putAttribute("styleClass", "remove-button");
String removeExpression = COLLECTION_VAR + ".remove(" + dataTable.getAttribute("var") + ")";
removeLink.putAttribute("action", StaticFacesUtils.wrapExpression(removeExpression));
   addLink.putAttribute("styleClass", "add-button");
   String addExpression = COLLECTION_VAR + ".add(" + controllerName + "Bean.added)";
   addLink.putAttribute("action", StaticFacesUtils.wrapExpression(addExpression));
   setPropertyActionListener.putAttribute(
        "target",
        StaticFacesUtils.wrapExpression(controllerName + "Bean.add." + inverseRelationship));
   StandardBindingProcessor bindingProcessor = metawidget.getWidgetProcessor(StandardBindingProcessor.class);
origin: org.jboss.forge.addon/scaffold-faces

attributes
    .put(FACES_LOOKUP,
         StaticFacesUtils.wrapExpression(StringUtils.decapitalize(ClassUtils.getSimpleName(property
             .getType())) + "Bean.all"));
         StaticFacesUtils.wrapExpression(StringUtils.decapitalize(ClassUtils.getSimpleName(property
             .getType())) + "Bean.converter"));
origin: org.jboss.forge.addon/scaffold-faces

this.entityMetawidget.setValue(StaticFacesUtils.wrapExpression(beanName + "." + ccEntity));
this.entityMetawidget.setPath(entity.getQualifiedName());
this.entityMetawidget.setReadOnly(false);
this.searchMetawidget.setValue(StaticFacesUtils.wrapExpression(beanName + ".example"));
this.searchMetawidget.setPath(entity.getQualifiedName());
this.beanMetawidget.setValue(StaticFacesUtils.wrapExpression(beanName + ".pageItems"));
this.beanMetawidget.setPath(viewBean.getQualifiedName() + "/pageItems");
writeSearchAndBeanMetawidget(context, this.searchTemplateSearchMetawidgetIndent,
origin: org.jboss.forge/forge-scaffold-faces

this.entityMetawidget.setValue(StaticFacesUtils.wrapExpression(beanName + "." + ccEntity));
this.entityMetawidget.setPath(entity.getQualifiedName());
this.entityMetawidget.setReadOnly(false);
this.searchMetawidget.setValue(StaticFacesUtils.wrapExpression(beanName + ".example"));
this.searchMetawidget.setPath(entity.getQualifiedName());
this.beanMetawidget.setValue(StaticFacesUtils.wrapExpression(beanName + ".pageItems"));
this.beanMetawidget.setPath(viewBean.getQualifiedName() + "/pageItems");
writeSearchAndBeanMetawidget(context, this.searchTemplateSearchMetawidgetIndent,
org.metawidget.statically.facesStaticFacesUtilswrapExpression

Popular methods of StaticFacesUtils

  • unwrapExpression
  • isExpression
    Return true if the specified value conforms to the syntax requirements of a value binding expression
  • matchExpression

Popular in Java

  • Making http post requests using okhttp
  • scheduleAtFixedRate (Timer)
  • getApplicationContext (Context)
  • getExternalFilesDir (Context)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • Join (org.hibernate.mapping)
  • 14 Best Plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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