K2 Blackpearl - 填充 SmartObject 属性

发布于 2024-07-26 17:10:26 字数 334 浏览 1 评论 0原文

我对如何使用 K2 Blackpearl 非常陌生,并且正在尝试了解如何有效地使用 SmartObjects。

基本上我有一个想要问用户的问题列表,所以目前我创建了一个具有 2 个属性(问题、答案)的 smartObject。 我有一个存储在 SQL Server 数据库中的所有我想问的问题的列表。

是否可以自动创建 InfoPath 表单或 ASP.NET 页面(在这个阶段,我不太关心我使用哪一个 - 只是想看看有什么东西可以工作,所以请随时推荐哪一个最简单)将从数据库中获取问题并自动创建用户需要放置问题答案的“字段”...然后将其保存回智能对象?

预先感谢您的任何帮助,非常感谢!

I'm very new to learning how to use K2 Blackpearl and am trying to understand how to effectively use SmartObjects.

Basically I have a list of questions I want to ask a user so currently I've created a smartObject with 2 attributes (Question, Answer). I have a list of all the questions I want to ask stored in a SQL server db.

Is it possible to auto-create either an InfoPath form or as ASP.NET page (At this stage I'm not too bothered which one I use - just want to see something working so please feel free to recommend which one is easiest) which will get the questions from the database and auto-create the 'fields' which the user will need to place an answer to the question... Then save this back to the smart object?

Thanks in advance for any help, much appreciated!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

不甘平庸 2024-08-02 17:10:26

我发现这个问题很老了,当时使用 InfoPath 的建议可能很好。 根据记录,从今天开始,InfoPath 不再是推荐的选项。

今天,使用 SmartForms,我将为您的问题/答案表创建一个 SmartObject (smo)(假设每个问题只有一个答案,一个表就足够了)。 在表中,不要忘记存储问题是否被回答、由谁回答以及何时回答的列。

然后,我建议制作 2 个视图:一个列表视图用于查看所有问题,一个项目视图主要用于回答问题。

当用户单击列表视图中的问题时,您会将其加载到项目视图中。 用户可以在项目视图中键入/选择并回答,然后单击按钮“发送答案”,这会有效地调用 smo 的更新方法。

这是标准模式,类似于列出更新用户或数据库中的几乎所有数据。 您只需要考虑您的数据模型,以确保您以后不会陷入困境。

I see this question is very old and the suggestion of using InfoPath was probably good back then. For the record, as of today, InfoPath is no longer the recommended option.

Today, using SmartForms, I would create one SmartObject (smo) for your question/answer table (assuming there is a single answer per question, one table it enough). In your table, don´t forget colums to store whether the question is answered or not, by whom and when.

I would then suggest making 2 views: one list view to see all the questions and one item view mainly to answer a question.

When the user clicks on a question in the list view, you load it into the item view. The user can type/select and answer in the item view and click a button to 'send the answer' which effectively calls the update method of the smo.

This is s standard pattern, similar to listing updating users or pretty much any data in your DB. You just need to think about your data model to ensure you won´t stuck later on.

月隐月明月朦胧 2024-08-02 17:10:26

InfoPath是最容易上手的,没有真正的开发,只需点击即可。

您可以在 SQL 数据库上使用 smartObject(使用动态 SQL Service Broker)来获取问题并将其加载到 InfoPath 表单中。 提交表单后,您可以将问题和答案推送到 SmartObject。

我建议将“答案”智能对象也基于 SQL 表,这样您的数据就可以很好地放置在一起。

InfoPath is easiest to go, there's no real development, just clicking.

You can use a smartObject on the SQL database (using the Dynamic SQL Service Broker) to get the questions and load them in the InfoPath form. On the submit of the form, you can push the questions and answers to the SmartObject.

I would suggest making the 'answer' smartobject also based on a sql table, so you're data is nicely placed together.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文