Overrule configuration and create Geomajas default FeatureAttributeWindow.

@param feature
@param editingAllowed
@return
434252
public static Window createDefaultFeatureDetailWindow(Feature feature, Layer<?> layer, boolean editingAllowed) {
		if (layer instanceof VectorLayer) {
			FeatureAttributeWindow w = new FeatureAttributeWindow(feature, editingAllowed);
			customize(w, feature);
			return w;
		} else {
			return new RasterLayerAttributeWindow(feature);
		}
	}
127002
private DefaultFeatureCollection sharedCreateFeatures(
            final LabelPositionCollector labels,
            final SimpleFeatureBuilder featureBuilder,
            final GridParam layerData,
            final MapfishMapContext mapContext,
            final double xSpace, final double ySpace,
            final double minX, final double minY) {
        // CSON: ParameterNumber
        GeometryFactory geometryFactory = new GeometryFactory();

        ReferencedEnvelope bounds = mapContext.toReferencedEnvelope();

        CoordinateReferenceSystem mapCrs = bounds.getCoordinateReferenceSystem();
        String unit = layerData.calculateLabelUnit(mapCrs);
        MathTransform labelTransform = layerData.calculateLabelTransform(mapCrs);

        final AxisDirection direction =
                bounds.getCoordinateReferenceSystem().getCoordinateSystem().getAxis(0).getDirection();
        int numDimensions = bounds.getCoordinateReferenceSystem().getCoordinateSystem().getDimension();
        Polygon rotatedBounds = GridUtils.calculateBounds(mapContext);
        AffineTransform worldToScreenTransform = GridUtils.getWorldToScreenTransform(mapContext);

        DefaultFeatureCollection features = new DefaultFeatureCollection();

        double pointSpacing = bounds.getSpan(1) / layerData.pointsInLine;
        int i = 0;
        for (double x = minX; x < bounds.getMaxX(); x += xSpace) {
            i++;
            final SimpleFeature feature = createFeature(featureBuilder, geometryFactory, layerData,
                                                        direction, numDimensions, pointSpacing, x,
                                                        bounds.getMinimum(1), i, 1);
            features.add(feature);
            GridUtils.topBorderLabel(labels, geometryFactory, rotatedBounds, unit, x,
                                     worldToScreenTransform, labelTransform, layerData.getGridLabelFormat());
            GridUtils.bottomBorderLabel(labels, geometryFactory, rotatedBounds, unit, x,
                                        worldToScreenTransform, labelTransform,
                                        layerData.getGridLabelFormat());
        }

        pointSpacing = bounds.getSpan(0) / layerData.pointsInLine;
        int j = 0;
        for (double y = minY; y < bounds.getMaxY(); y += ySpace) {
            j++;
            final SimpleFeature feature = createFeature(featureBuilder, geometryFactory, layerData,
                                                        direction, numDimensions, pointSpacing,
                                                        bounds.getMinimum(0), y, j, 0);
            features.add(feature);
            GridUtils.rightBorderLabel(labels, geometryFactory, rotatedBounds, unit, y,
                                       worldToScreenTransform, labelTransform,
                                       layerData.getGridLabelFormat());
            GridUtils.leftBorderLabel(labels, geometryFactory, rotatedBounds, unit, y,
                                      worldToScreenTransform, labelTransform, layerData.getGridLabelFormat());

        }

        return features;
    }
1106371
function(feature) {
        if (!feature.fid) { OpenLayers.Console.userError(OpenLayers.i18n("noFID")); }
        var updateNode = this.createElementNS(this.wfsns, 'wfs:Update');
        updateNode.setAttribute("typeName", this.featurePrefix + ':' + this.featureName); 
        updateNode.setAttribute("xmlns:" + this.featurePrefix, this.featureNS); 

        var propertyNode = this.createElementNS(this.wfsns, 'wfs:Property');
        var nameNode = this.createElementNS(this.wfsns, 'wfs:Name');
        
        var txtNode = this.createTextNode(this.geometryName);
        nameNode.appendChild(txtNode);
        propertyNode.appendChild(nameNode);
        
        var valueNode = this.createElementNS(this.wfsns, 'wfs:Value');
        
        var geometryNode = this.buildGeometryNode(feature.geometry);
        
        if(feature.layer){
            geometryNode.setAttribute(
                "srsName", feature.layer.projection.getCode()
            );
        }
        
        valueNode.appendChild(geometryNode);
        
        propertyNode.appendChild(valueNode);
        updateNode.appendChild(propertyNode);
        
         // add in attributes
        for(var propName in feature.attributes) {
            propertyNode = this.createElementNS(this.wfsns, 'wfs:Property');
            nameNode = this.createElementNS(this.wfsns, 'wfs:Name');
            nameNode.appendChild(this.createTextNode(propName));
            propertyNode.appendChild(nameNode);
            valueNode = this.createElementNS(this.wfsns, 'wfs:Value');
            valueNode.appendChild(this.createTextNode(feature.attributes[propName]));
            propertyNode.appendChild(valueNode);
            updateNode.appendChild(propertyNode);
        }
        
        
        var filterNode = this.createElementNS(this.ogcns, 'ogc:Filter');
        var filterIdNode = this.createElementNS(this.ogcns, 'ogc:FeatureId');
        filterIdNode.setAttribute("fid", feature.fid);
        filterNode.appendChild(filterIdNode);
        updateNode.appendChild(filterNode);

        return updateNode;
    }
496462
public static boolean isEditRestricted(@NotNull ComponentContext wcmComponentContext) {
    Page page = wcmComponentContext.getPage();
    if (page == null) {
      return false;
    }
    ResourceResolver resourceResolver = wcmComponentContext.getResource().getResourceResolver();
    Template template = page.getTemplate();

    if (template == null || isPageInTemplateDefinition(page) || !isEditableTemplate(template)) {
      return false;
    }

    // check if the current resource path already points to a structure path in the editable template
    String resourcePath = wcmComponentContext.getResource().getPath();
    String templateStructurePath = template.getPath() + "/" + NN_EDITABLE_TEMPLATE_STRUCTURE + "/" + JCR_CONTENT;
    String resourcePathInStructure = null;
    if (StringUtils.startsWith(resourcePath, templateStructurePath + "/")) {
      resourcePathInStructure = resourcePath;
    }
    else {
      // resource path points to the current page, build structure path from path in page
      String relativePathInPage = StringUtils.substringAfter(resourcePath, page.getContentResource().getPath());
      if (StringUtils.isNotEmpty(relativePathInPage)) {
        resourcePathInStructure = templateStructurePath + relativePathInPage;
      }
    }
    if (resourcePathInStructure == null) {
      return false;
    }

    Resource resourceInStructure = resourceResolver.getResource(resourcePathInStructure);
    if (resourceInStructure == null) {
      return false;
    }
    return !resourceInStructure.getValueMap().get(PN_EDITABLE, false);
  }
804796
@Override
	public void setFeature(Feature feature) {
		for (HasFeature action : actions) {
			action.setFeature(feature);
		}
		presenter.setFeature(feature);
	}
1317319
public static FeatureCollection fromFeature(@NonNull Feature feature) {
    List<Feature> featureList = Arrays.asList(feature);
    return new FeatureCollection(TYPE, null, featureList);
  }
717295
public void setEditable(String editable) {

        if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(editable)) {
            m_editable = Boolean.valueOf(editable).booleanValue();
        }
    }
148701
function(featureId, style, location) {
        var label = this.nodeFactory(featureId + this.LABEL_ID_SUFFIX, "olv:rect");
        var textbox = this.nodeFactory(featureId + this.LABEL_ID_SUFFIX + "_textbox", "olv:textbox");
        
        var resolution = this.getResolution();
        label.style.left = (((location.x - this.featureDx)/resolution - this.offset.x) | 0) + "px";
        label.style.top = ((location.y/resolution - this.offset.y) | 0) + "px";
        label.style.flip = "y";

        textbox.innerText = style.label;

        if (style.cursor != "inherit" && style.cursor != null) {
            textbox.style.cursor = style.cursor;
        }
        if (style.fontColor) {
            textbox.style.color = style.fontColor;
        }
        if (style.fontOpacity) {
            textbox.style.filter = 'alpha(opacity=' + (style.fontOpacity * 100) + ')';
        }
        if (style.fontFamily) {
            textbox.style.fontFamily = style.fontFamily;
        }
        if (style.fontSize) {
            textbox.style.fontSize = style.fontSize;
        }
        if (style.fontWeight) {
            textbox.style.fontWeight = style.fontWeight;
        }
        if (style.fontStyle) {
            textbox.style.fontStyle = style.fontStyle;
        }
        if(style.labelSelect === true) {
            label._featureId = featureId;
            textbox._featureId = featureId;
            textbox._geometry = location;
            textbox._geometryClass = location.CLASS_NAME;
        }
        textbox.style.whiteSpace = "nowrap";
        // fun with IE: IE7 in standards compliant mode does not display any
        // text with a left inset of 0. So we set this to 1px and subtract one
        // pixel later when we set label.style.left
        textbox.inset = "1px,0px,0px,0px";

        if(!label.parentNode) {
            label.appendChild(textbox);
            this.textRoot.appendChild(label);
        }

        var align = style.labelAlign || "cm";
        if (align.length == 1) {
            align += "m";
        }
        var xshift = textbox.clientWidth *
            (OpenLayers.Renderer.VML.LABEL_SHIFT[align.substr(0,1)]);
        var yshift = textbox.clientHeight *
            (OpenLayers.Renderer.VML.LABEL_SHIFT[align.substr(1,1)]);
        label.style.left = parseInt(label.style.left)-xshift-1+"px";
        label.style.top = parseInt(label.style.top)+yshift+"px";
        
    }
1297676
public static ApplicationFeatureViewModel newViewModel(
            final ApplicationFeatureId featureId,
            final ApplicationFeatureRepositoryDefault applicationFeatureRepository,
            final DomainObjectContainer container) {
        final Class<? extends ApplicationFeatureViewModel> cls = viewModelClassFor(featureId, applicationFeatureRepository);
        if(cls == null) {
            // TODO: not sure why, yet...
            return null;
        }
        return container.newViewModelInstance(cls, featureId.asEncodedString());
    }
761221
public void addFeature(String feature) {
        if (feature == null) {
            throw new IllegalArgumentException("Invalid null argument passed for addFeature");
        }
        feature = feature.trim();
        if (!feature.isEmpty()) { 
            Feature newFeature = new Feature();
            newFeature.addText(feature);
            featureList.add(newFeature);
        }
    }
1337405
private void enforceSrid(Object feature) throws LayerException {
		Geometry geom = getFeatureModel().getGeometry(feature);
		if (null != geom) {
			geom.setSRID(srid);
			getFeatureModel().setGeometry(feature, geom);
		}
	}
1187266
private static boolean isAnnotated(Feature feature)
    {
        for (final Class<?> current : feature.getClass().getInterfaces())
        {
            if (current.isAnnotationPresent(FeatureInterface.class))
            {
                return true;
            }
        }
        return feature.getClass().isAnnotationPresent(FeatureInterface.class);
    }
1060623
private static boolean applyEdit(Element edit, Document ilf) {
        String nodeID = edit.getAttribute(Constants.ATT_TARGET);

        Element channel = ilf.getElementById(nodeID);

        if (channel == null) return false;

        // now get the name of the parameter to be edited and find that element
        String parmName = edit.getAttribute(Constants.ATT_NAME);
        String parmValue = edit.getAttribute(Constants.ATT_USER_VALUE);
        NodeList ilfParms = channel.getChildNodes();
        Element targetParm = null;

        for (int i = 0; i < ilfParms.getLength(); i++) {
            Element ilfParm = (Element) ilfParms.item(i);
            if (ilfParm.getAttribute(Constants.ATT_NAME).equals(parmName)) {
                targetParm = ilfParm;
                break;
            }
        }
        if (targetParm == null) // parameter not found so we are free to set
        {
            Element parameter = ilf.createElement("parameter");
            parameter.setAttribute("name", parmName);
            parameter.setAttribute("value", parmValue);
            parameter.setAttribute("override", "yes");
            channel.appendChild(parameter);
            return true;
        }
        /* TODO Add support for fragments to set dlm:editAllowed attribute for
         * channel parameters. (2005.11.04 mboyd)
         *
         * In the commented code below, the check for editAllowed will never be
         * seen on a parameter element in the
         * current database schema approach used by DLM. This is because
         * parameters are second class citizens of the layout structure. They
         * are not found in the up_layout_struct table but only in the
         * up_layout_param table. DLM functionality like dlm:editAllowed,
         * dlm:moveAllowed, dlm:deleteAllowed, and dlm:addChildAllowed were
         * implemented without schema changes by adding these as parameters to
         * structural elements and upon loading any parameter that begins with
         * 'dlm:' is placed as an attribute on the containing structural
         * element. So any channel parameter entry with dlm:editAllowed has that
         * value placed as an attribute on the containing channel not on the
         * parameter that was meant to have it.
         *
         * The only solution would be to add special dlm:parm children below
         * channels that would get the editAllowed value and then when creating
         * the DOM don't create those as child elements but use them to set the
         * attribute on the corresponding parameter by having the name of the
         * dlm:parm element be the name of the parameter to which it is to be
         * related.
         *
         * The result of this lack of functionality is that fragments can't
         * mark any channel parameters as dlm:editAllowed='false' thereby
         * further restricting which channel parameters can be edited beyond
         * what the channel definition specifies during publishing.
         */
        // Attr editAllowed = targetParm.getAttributeNode( Constants.ATT_EDIT_ALLOWED );
        // if ( editAllowed != null && editAllowed.getNodeValue().equals("false"))
        //    return false;

        // target parm found. See if channel definition will still allow changes.

        Attr override = targetParm.getAttributeNode(Constants.ATT_OVERRIDE);
        if (override != null && !override.getNodeValue().equals(Constants.CAN_OVERRIDE))
            return false;

        // now see if the change is still needed
        if (targetParm.getAttribute(Constants.ATT_VALUE).equals(parmValue))
            return false; // user's edit same as fragment or chan def

        targetParm.setAttribute("value", parmValue);
        return true;
    }
929495
@Override
    public void onValueRestricted(final String value) {
        this.restrictedColumns.add(value);
        setEditorEnabled(value, false, DataSetEditorConstants.INSTANCE.columnIsUsedInFilter());
    }
793970
@Programmatic
    public ApplicationPermission newPermission(
            final ApplicationRole role,
            final ApplicationPermissionRule rule,
            final ApplicationPermissionMode mode,
            final ApplicationFeatureType featureType,
            final String featureFqn) {
        final ApplicationFeatureId featureId = ApplicationFeatureId.newFeature(featureType, featureFqn);
        final ApplicationFeature feature = applicationFeatureRepository.findFeature(featureId);
        if(feature == null) {
            container.warnUser("No such " + featureType.name().toLowerCase() + ": " + featureFqn);
            return null;
        }
        return newPermissionNoCheck(role, rule, mode, featureType, featureFqn);
    }
302520
function(id, geometry, style, featureId) {
        style = this.applyDefaultSymbolizer(style);
        // Get the node if it's already on the map.
        var node = this.nodeFactory(id, this.getNodeType(geometry, style));
        
        // Set the data for the node, then draw it.
        node._featureId = featureId;
        node._boundsBottom = geometry.getBounds().bottom;
        node._geometryClass = geometry.CLASS_NAME;
        node._style = style;

        var drawResult = this.drawGeometryNode(node, geometry, style);
        if(drawResult === false) {
            return false;
        }
         
        node = drawResult.node;
        
        // Insert the node into the indexer so it can show us where to
        // place it. Note that this operation is O(log(n)). If there's a
        // performance problem (when dragging, for instance) this is
        // likely where it would be.
        if (this.indexer) {
            var insert = this.indexer.insert(node);
            if (insert) {
                this.vectorRoot.insertBefore(node, insert);
            } else {
                this.vectorRoot.appendChild(node);
            }
        } else {
            // if there's no indexer, simply append the node to root,
            // but only if the node is a new one
            if (node.parentNode !== this.vectorRoot){ 
                this.vectorRoot.appendChild(node);
            }
        }
        
        this.postDraw(node);
        
        return drawResult.complete;
    }
231142
public void onChangeEditingState(GeometryEditChangeStateEvent event) {
		switch (event.getEditingState()) {
			case DRAGGING:
				mapWidget.setCursor(Cursor.MOVE);
				break;
			case IDLE:
			default:
				mapWidget.setCursorString(mapWidget.getDefaultCursorString());
				redraw();

				// Remove the temporary insert move line:
				if (editingService.getInsertIndex() != null) {
					String id = baseName + "."
							+ editingService.getIndexService().format(editingService.getInsertIndex());
					Object parentGroup = groups.get(id.substring(0, id.lastIndexOf('.')) + ".edges");
					mapWidget.getVectorContext().deleteElement(parentGroup, insertMoveEdgeId1);
					mapWidget.getVectorContext().deleteElement(parentGroup, insertMoveEdgeId2);
				}
		}
	}