ChicagoBoss遇到的几个问题

Boss 主要最成部分: BossDb, Models, Event, WebController, BossMq, Session, Templates
1、BossDb:实现对数据库的操作
2、Models:定义数据模型,提供相关操作方法
3、Event:定义对models事件
4、WebController: 定义Url和方法
5、BossMq:实现comet功能
6、Session:保存cookie和会话session
7、Templates:采用模板实现页面展现


1、文件上传用
       Req:post_files(). 对应
  可以同时一次上传多个文件默认指定目录是 scratch
2、 About boss_flash does not work
       First, ensure that your controller parametrized module has the SessionID:

-module(cbmock_test_controler, [Req, SessionID]).

Next (use SessionID, not Req): 

boss_flash:add(SessionID, notice, "Flash Titel", "Flash Message")

I can confirm that is working with the latests github code.
 我用的参数没有sessionId, API文档上没有明确指定,而是用Req 反而错了
3、英语语法问题,本不是问题的
      There is a people.erl and address.erl
     I set event with:
      1) boss_news:set_watch(4,"addresss",fun(Event, Record)-> error_logger:error_msg("Event=~p~nRecord=~p",[Event,Record]) end).
      2) boss_news:set_watch(4,"peoples",fun(Event, Record)-> error_logger:error_msg("Event=~p~nRecord=~p",[Event,Record]) end).
     
      Address = addres:new(id,"beijing","010").
      Address:save().
      There is nothing output.
      But, People:save() can output "=ERROR REPORT==== 1-Mar-2012::12:01:19 ===
Event=updated
回复
The correct plural forms are "addresses" and "people" 
我试了一下果然ok了
4、一个方法对应一个模板

你可能感兴趣的:(chicagoboss)