بنقرة واحدة
ewl-page
Create and configure EWL pages with parameters, URL routing, parent hierarchy, and access control
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Create and configure EWL pages with parameters, URL routing, parent hierarchy, and access control
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Configure opencode on a new development machine for EWL work by creating the global AGENTS.md and granting access to the EWL source, EWL System Manager source, EWL folder, and EWL client systems directory. Use when setting up opencode on a new machine, or when the user asks to bootstrap, initialize, or configure global opencode for EWL.
Run local EWL Development Utility (DU) operations on EWL systems. Use when asked to run DU operations such as sync or update-data against a particular path or system.
Database schema migration using FluentMigrator with the EWL Data Migrator project
Inspect and troubleshoot EWL systems hosted in Azure — locating an installation's App Service, Container App Job, and Log Analytics workspace, and reliably reading Container App (data migrator) console and system logs. Use when checking whether a deploy's data migrator ran, reading container logs for a hosted installation, or investigating an installation's Azure resources. Companion to ewl-azure-pipelines, which covers the build/deploy pipelines that create these resources.
Test changes to EWL agent rules, subagents, skills, OpenCode plugins, and MCP tools by driving OpenCode headlessly, capturing transcripts, and cleaning up afterwards. Load this skill when verifying changes to anything under Library\Files\Agent Rules.md, Library\Files\Agents\, Library\Files\Agent Skills\, Library\Files\OpenCode Plugins\, or Library\Files\OpenCode Tools\.
Azure Pipelines CI/CD for EWL systems including build templates, deploy templates, and pipeline code generation
| name | ewl-page |
| description | Create and configure EWL pages with parameters, URL routing, parent hierarchy, and access control |
Every page is a partial class with a // EwlPage comment directive above
the class declaration. The Development Utility generates the other partial.
// EwlPage
namespace MySystem.Website;
partial class Home {
protected override string getResourceName() => "";
protected override IEnumerable<UrlPattern> getChildUrlPatterns() =>
RequestDispatchingStatics.GetFrameworkUrlPatterns( WebApplicationNames.Website );
protected override PageContent getContent() =>
new UiPageContent().Add( new Paragraph( "Hello!".ToComponents() ) );
}
Use // EwlResource instead of // EwlPage for non-page resources such as
file downloads, CSS, or robots.txt.
Run sync after adding or changing any page class.
Declare parameters via comments above the class. The DU generates constructor
parameters, URL encoding/decoding, and typed UrlPatterns methods.
// EwlPage
// Parameter: int serviceOrderId
Optional parameters use // OptionalParameter: and can have defaults:
// EwlPage
// Parameter: int organizationId
// OptionalParameter: int? roomId
// OptionalParameter: int calendarViewId
Provide defaults via the generated specifyParameterDefaults partial method:
static partial void specifyParameterDefaults( OptionalParameterSpecifier specifier, Parameters parameters ) {
specifier.CalendarViewId = CalendarViewsRows.MonthView;
}
Every page (except the root) must specify a parent:
protected override ResourceParent createParent() => new Home();
Parent pages declare child URL patterns in getChildUrlPatterns:
protected override IEnumerable<UrlPattern> getChildUrlPatterns() =>
RequestDispatchingStatics.GetFrameworkUrlPatterns( WebApplicationNames.Website )
.Append( ServiceOrder.UrlPatterns.ServiceOrderIdPositiveInt( "create" ) );
This creates child URLs like /123 for each existing ID and /create for
creating new records.
Entity setups group related pages under a shared parent with navigation tabs:
// EwlPage
// Parameter: int organizationId
partial class EntitySetup {
protected override ResourceParent createParent() => new Home();
protected override IEnumerable<ResourceGroup> createListedResources() =>
new ResourceGroup( new Details( this ), new Rooms( this ), new Users( this ) ).ToCollection();
}
Child pages take the entity setup as a constructor parameter and use it as their parent.
UiPageContent provides the standard EWL UI chrome (sidebar, content area).
Use BasicPageContent for pages without the EWL UI shell. The Add method
is chainable:
protected override PageContent getContent() =>
new UiPageContent()
.Add( formItemList )
.Add( table );
Override userCanAccess to restrict access:
protected override bool userCanAccess => SystemUser.Current is not null;
Authorization is hierarchical: child pages inherit the parent's restrictions
and can only add additional ones. A child's userCanAccess never loosens the
parent's. To access a child, the user must pass
parentConditions && childConditions.
When linking to a page, always check UserCanAccess to avoid linking to
pages the user cannot reach:
var page = new ServiceOrder( id );
if( page.UserCanAccess )
// create hyperlink
The framework throws an exception if you create a link to an unauthorized page, to prevent users from ever seeing "access denied" errors.
Each web application must have a RequestDispatching provider:
partial class RequestDispatching {
protected override IEnumerable<BaseUrlPattern> GetBaseUrlPatterns() =>
Home.UrlPatterns.BaseUrlPattern().ToCollection();
public override UrlHandler GetFrameworkUrlParent() => new Home();
}