页面查看器 Web 部件

发布于 2024-07-30 15:00:55 字数 584 浏览 1 评论 0原文

我想知道是否,

1。 我们可以查看外部门户/Web 应用程序的部分/portlet?

使用页面查看器 Web 部件,我们可以获得 Web 应用程序的完整视图,但我只想查看外部网页的部分/portlet。 这可能吗?

2.如何实现会话感知页面查看器Web部件

例如,

我。 登录到外部应用程序

我已使用页面查看器 Web 部分ii 。 编辑驻留在同一页面的不同 Web 部件上的我的日历事件,执行此操作会打开一个新页面。

三. 然后,在将更改应用于日历事件时,我的整个页面将被刷新,并且我会从页面查看器 Web 部件中的外部应用程序注销。 b. 在第二种情况下,如果我们为该应用程序启用了 SSO,那么用户将再次登录,但会话松散。

3.如何处理外部应用程序的 Ajax 调用。

例如,如果外部应用程序使用 Ajax 进行身份验证,则使用 Page Viewer 就无法对该应用程序使用 SSO。

如果您能分享您对上述内容的想法,我将不胜感激。

I wanted to know if,

1. We can view a section/portlet of an external portal/Web Application?

Using Page Viewer Web part we get a full view of the web application but I would like to ONLY view a section/portlet of the external web page. Is this possible?

2.How to achieve session aware Page viewer web part

a. For e.g.,

i. I have logged in to an external application using the Page Viewer Web part

ii. Edit my calendar event which resides on a different Web part in the same page, doing this opens up a new page.

iii. Then, on applying the changes to the calendar event my complete page gets refreshed and I m logged out of my external application in the Page Viewer Web part.
b. And in second scenario, if we have SSO enabled for that application then the user will get logged in again but loose session.

3.How to handle Ajax calls of external applications.

For e.g., if an external application is having its authentication using Ajax, then using Page Viewer it is not possible to use SSO for that application.

I would greatly appreciate if you can share your thoughts on the above.

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

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

发布评论

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

评论(1

泪之魂 2024-08-06 15:00:55

页面查看器 Web 部件非常有限。 它只是将 iframe 标记放入页面中,仅此而已。 因此,不要思考“这些事情可以在 iframe 中完成吗?”。

iframe 的内容可以通过 JavaScript 访问。 这是满足这些要求的最佳/唯一选择。 关于您问题中的要点的一些想法:

  1. 使用 JavaScript 在 iframe 内的文档元素上设置 CSS 属性 display:none。 这将折叠您不希望看到的元素,留下其余的元素。 当然,如果 iframe 内页面的 HTML 发生更改,您的脚本将会中断,因此不太易于维护。

  2. 一旦包含 iframe 的页面发生更改,所有对其的引用都会被销毁。 在此问题中查看其他人尝试类似操作的更多信息.

  3. 类似于 2 和 1。您的选择是有限的,但您可以使用 JavaScript 来完成。

    类似于

总结一下:页面查看器 Web 部件旨在显示静态内容,这就是您所能得到的全部内容。 如果可以的话,请考虑满足您要求的其他选项。 如果您需要帮助,请在新问题中详细说明要求,我们将尽力提供帮助。

The Page Viewer Web Part is very limited. It just puts an iframe tag into the page and that's about it. So think instead of "Can these things be done in an iframe?".

The contents of an iframe can be accessed via JavaScript. This is the best/only option for these requirements. Some thoughts on the points in your question:

  1. Use JavaScript to set the CSS attribute display:none on elements in the document inside the iframe. This will collapse the elements you don't want to see leaving the rest. Of course if the HTML of the page inside the iframe is changed your script will break so not very maintainable.

  2. As soon as the page containing the iframe is changed then all references to it are destroyed. See more information from someone else trying a similar thing in this SO question.

  3. Similar to 2 and 1. Your options are limited but you may be able to use JavaScript to do it.

To summarise: The Page Viewer Web Part is designed to display static content and that's all you'll get out of it. Consider other options for your requirements if you can. If you need help with one please detail the requirements in a new question and we'll do our best to help.

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