Flex:线程样式回复

发布于 2024-07-26 17:04:32 字数 326 浏览 2 评论 0原文

我当前的 Flex 应用程序中的功能之一要求我维护评论部分。 在这里,用户可以发表评论以及对现有评论的回复。 我想要的只是像通常的线程风格评论一样。

假设我正在回复别人的评论,因此,它会将我的评论按一个选项卡左右对齐,人们可以轻松地看到评论和回复。

例如

USER ABC : COMMENT 1

-----USER XYZ: RE:COMMENT1

----------USER DEF: RE:RE:COMMENT1

等等...

任何人都可以建议一种方法来做到这一点吗?

谢谢 :)

One of the functionalities in my current flex application requires me to maintain a comments section. Here, the users can post the comments and the replies to existing comments. All I want is like the usual thread style commenting.

Let say, I am replying to someone else's comment, so, it will align my comment by a tab or so and people can easily see the comments and replies.

e.g.

USER ABC : COMMENT 1

-----USER XYZ: RE:COMMENT1

----------USER DEF: RE:RE:COMMENT1

and so on...

Can anyone suggest a way to do this?

Thanks :)

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

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

发布评论

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

评论(1

箹锭⒈辈孓 2024-08-02 17:04:32

在您的数据库中,您将存储每个评论的parentID。 您可以查询该数据并循环遍历它,创建新对象以根据需要显示评论。

将结果存储在 ArrayCollection 中

var tmpCanvas:Canvas;
for(var i:int = 0; i < ac.length; i++)
{
    // display data
    tmpCanvas = new Canvas();
    tmpCanvas.x = ...
    tmpCanvas.y = ...
    // add items to the canvas      
    this.addChild(tmpCanvas);
}

In your database you would store the parentID for each comment. You can query that data and loop through it creating new objects to display the comments however you want.

Store the results in an ArrayCollection

var tmpCanvas:Canvas;
for(var i:int = 0; i < ac.length; i++)
{
    // display data
    tmpCanvas = new Canvas();
    tmpCanvas.x = ...
    tmpCanvas.y = ...
    // add items to the canvas      
    this.addChild(tmpCanvas);
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文