问题标签 [fubumvc]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
c# - 如何使用 fubumvc 运行 Silverlight xap
可能答案很简单,也许有人想打我,但显然我现在被困住了。
我想将 Silverlight XAP 集成到 fubumvc 视图页面中。我正在使用 HelloWorld 示例并在页面中输入以下内容。
在一个简单的 html 文件中运行此代码可以正常工作。XAP 与视图页面/html 文件位于同一文件夹中。
attributes - FubuMVC:如何在我的控制器上创建一个零模型输出动作?
在 FubuMVC 中,当我希望控制器操作方法返回 json 结果时,我在方法上使用 JsonEndpoint 属性。但是,我可以看到 void 方法没有相应的属性。
对于一个特定的动作,我不想返回任何东西,但是如果我有一个 void 返回结果,Fubu 会失败,因为它开始寻找一个与空模型匹配的视图。
是否存在允许特定操作方法返回 void 的属性或简单更改?
谢谢
fubumvc - 如何创建将站点配置值复制到输出模型的 FubuMVC 行为?
我试图弄清楚创建一个将布尔站点配置值复制到输出模型的行为。
这样,我不必在视图需要它的每个操作中复制 bool,而是可以简单地将行为添加到需要此值的控制器操作中。
在一些旧版本的 FubuMVC 中,我相信行为可能会在输出模型离开控制器后对其进行修改。但我不确定如何在最新版本的 FubuMVC 中执行此操作(或者我已经忘记了)。
谁能给我一个示例或指出将站点配置值复制到输出模型的最佳实践方向?
fubumvc - How do I find the output model type in a behavior?
With FubuMVC, I'm not sure what the best way is to determine the current action's output model type. I see different objects that I could get the current request's URL from. But that doesn't lead to a very good solution.
What's the easiest way to get the current action's output model type from the behavior?
If this isn't a good practice, what's a better way?
c# - 在框架中使用 Funcs 而不是实例
在查看几个项目的源代码时,我发现了一个我不太理解的模式。例如,在FubuMVC和Common Service LocatorFunc
中,当静态提供程序更改时使用 a 。谁能解释使用的好处:
代替:
fubumvc - 注册显示模型和 FubuControl 的正确方法是什么?
最近,我开始将FubuMVC 项目从 2010 年 5 月/6 月之前的 FubuMVC 框架版本更新到最新版本。
我遇到的最大障碍之一是如何配置 FubuControls 和它们使用的显示模型,以便我可以在Site.Master
页面中呈现这些控件。FubuException
我无法解决的一个错误消息是:
从第 69 行 的方法FindUniqueByInputType
中抛出。FubuMVC.Core.Registration.Querying.ChainResolver
这是我的 Web 项目的 Global.asax.cs:
这是我的FubuRegistry
:
更多信息和更新:
我发现的部分问题是,当我更新项目时,我改变了:
到
这意味着扩展功能RenderPartial<TViewModel>(this IFubuPage<TViewModel> viewPage)
不再可以从SiteMasterView
.
这是旧的和无效的RenderPartial<TViewModel>
Call in Site.Master
:
所以,我认为此时我考虑尝试创建自己的 RenderPartial 扩展函数,该函数可以使用FubuMasterPage
(而不仅仅是使用IFubuPage<EmptyModel>
)。但我想我不妨更新我对 FubuFramework 的使用并使用void Partial<TInputModel>(this IFubuPage page) where TInputModel : class;
扩展功能而不是旧的更冗长的版本。
新的召唤:
那时我开始ChainResolver
遇到. 我还尝试在我的. 但是我没有运气通过. IFubuCommand
ResourceDisplay
FubuRegistry
ChainResolver
向 FubuFramework 注册 FubuControls 及其视图模型的首选方法是什么?
如何解决上述错误?
fubumvc - How do I configure Fubu for a view without a controller?
I have an Index
action on a controller that's not doing anything.
The Index
view simply displays some html, with jQuery-driven ajax and the MasterPage doing all the heavy lifting on this particular page. When I remove this action function from it's controller, the aspx view will no longer display.
More Information and Update:
After making the changes mentioned in Chad's answer the url that used to return the index view now instead returns a 404. This issue may exist because most of the views' folder structure is done in the early Fubu Framework style (with View_Page_Type_Declarations.cs
and no code-behinds), rather than using the more intuitive and more recent default folder conventions. But it's possible my analysis is off.
Here's my FubuRegistry:
WebAppUrlPolicy:
ViewAndActionInDifferentFolders:
How do I reconfigure Fubu so that I can use a view without the action?
What changes need to be made to remove the action function above, and still maintain the same functionality?
openrasta - FubuMVC 和 OpenRasta 文档和资源
我正在考虑将 FuBuMVC 或 OpenRasta 框架用于我们这里即将开展的项目。在不深入了解项目性质的情况下,我想对当前可用框架背后的文档、支持、教程和社区发表一些意见。哪个框架更成熟,是否准备好生产,
谢谢
validation - 如何设置 FubuMVC 验证
我正在尝试学习 FubuMVC 并且一直在验证我的输入模型。我想要完成的是后验证重定向。也就是说,如果模型无效,则重定向到同一视图并显示错误。我在我的模型上使用属性。
另外,我将如何指定我自己的错误消息,即本地化?
我正在使用来自 nuget 的最新 Fubu 软件包。
我的注册表如下所示:
fubumvc - 如何创建嵌套 - 带有 HtmlTags 的标签 (FubuMVC)
我以前没有使用 FubuMVC HtmlTags 库的经验,当我尝试完成这样一个简单的嵌套结构时,我只是卡住了:
这是我在构建字符串时的方式:
工作正常,但我喜欢使用 HtmlTags 库(在 FubuMvc 之外,使用 HtmlTags 单独的 Nuget)。
编辑:我从两个答案中得到灵感,并想出了我需要的东西。所以这是我最终使用的代码。