Skip to content

Commit 4609418

Browse files
dmealingclaude
andcommitted
FIX: Complete WebView inheritance pattern for architectural consistency
Fixed missing inheritance in WebView to complete the base type architecture pattern across all MetaObjects type families. ## Changes Made ### MetaView.java (metadata module) • Added @MetaDataType annotation for consistency with other base types • Maintains existing view.base registration and attributes • Provides clear annotation-based type identification ### WebView.java (web module) • Added missing inheritance from "view.base" in type registration • WebView now inherits common view attributes from base type • Follows same cross-module inheritance pattern used by key types • Added documentation comments explaining inheritance structure ## Architectural Impact ✅ **Inheritance Consistency**: All view types now properly inherit from view.base ✅ **Cross-Module Pattern**: Demonstrates string-based inheritance working between modules ✅ **Plugin Extensibility**: WebView provides web-specific extension point while inheriting base capabilities ✅ **Architecture Alignment**: Completes the base type pattern across all 5 core type families ## Inheritance Chain Now Complete ``` MetaView (view.base) ├── WebView (view.web) → inherits from view.base ✅ │ └── HtmlView → TextView, DateView, etc. ✅ └── Other view types inheriting directly from view.base ✅ ``` This fix ensures view inheritance follows the same clean patterns as field, object, attr, validator, and key type families for complete architectural consistency. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 782e15a commit 4609418

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

metadata/src/main/java/com/draagon/meta/view/MetaView.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@
99
import com.draagon.meta.util.MetaDataUtil;
1010
import com.draagon.meta.object.MetaObject;
1111
import com.draagon.meta.registry.MetaDataRegistry;
12+
import com.draagon.meta.registry.MetaDataType;
1213
import static com.draagon.meta.MetaData.ATTR_IS_ABSTRACT;
1314
import org.slf4j.Logger;
1415
import org.slf4j.LoggerFactory;
1516

17+
@MetaDataType(type = "view", subType = "base", description = "Base view metadata with common view attributes")
1618
public abstract class MetaView extends MetaData {
1719
private static final Logger log = LoggerFactory.getLogger(MetaView.class);
1820

web/src/main/java/com/draagon/meta/web/view/WebView.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,13 @@ public abstract class WebView extends MetaView
3131
MetaDataRegistry.registerType(WebView.class, def -> def
3232
.type("view").subType(SUBTYPE_WEB)
3333
.description("Web-based view for HTML form rendering")
34+
35+
// INHERIT FROM BASE VIEW
36+
.inheritsFrom("view", "base")
37+
38+
// WEB-SPECIFIC CHILD REQUIREMENTS (base requirements inherited)
3439
.optionalChild("attr", "*")
40+
// Note: Base view attributes are inherited from view.base
3541
);
3642
log.debug("Registered WebView type with unified registry");
3743
} catch (Exception e) {

0 commit comments

Comments
 (0)