简体   繁体   English

抢劫可消化表单标签未展开

[英]Heist digestible form tags are not expanded

I looking for ideas what could go wrong with Snap Heist digestible forms.我正在寻找想法 go 与 Snap Heist 可消化 forms 有什么问题。 I copy pasted templates and handler.我复制粘贴的模板和处理程序。 Most of the page is rendered correctly, but digestible form tags are left intact ie instead form tag there is dfForm, input dfInputText etc. There is no warnings in backend console nor browser one.大多数页面都正确呈现,但可消化的表单标签保持不变,即表单标签有 dfForm、输入 dfInputText 等。后端控制台和浏览器中都没有警告。

I use bindDigestiveSplices so dfForm should be resolvable splice.我使用 bindDigestiveSplices 所以 dfForm 应该是可解析的拼接。

    (v, _) <- runForm "myform" myForm
    heistLocal (bindDigestiveSplices v) $ render "resources/myform"

<apply template='/layouts/application'>
  <bind tag='main'>
      <dfForm action="/justDoIt" method="POST">
        <apply template="/resources/_form"/>
      </dfForm>
  </bind>
</apply>

I made a typo (missed a letter) in source code routing.我在源代码路由中犯了一个错字(遗漏了一个字母)。 After hours of change/build/run cycle I figured out that there is 2 routing.经过数小时的更改/构建/运行周期后,我发现有 2 个路由。 First is described in source code where you can assign handlers to URI path and the second is automatic routing based on template file names.第一个在源代码中描述,您可以将处理程序分配给 URI 路径,第二个是基于模板文件名的自动路由。

So I made a typo in route binding in source code, mean while automatic routing was resolving template without any typo, but it doesn't bind Digestible splices, therefore 404 error were masked and proper content delivered by not evaluated correctly!所以我在源代码中的路由绑定中犯了一个错字,这意味着虽然自动路由正在解析模板而没有任何错字,但它没有绑定可消化的拼接,因此 404 错误被屏蔽,并且正确评估的内容未正确评估!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM