<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to dynamically set the URL for webview dashlet in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/how-to-dynamically-set-the-url-for-webview-dashlet/m-p/280502#M233632</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks. That does seem a lot of work. What other ways would be easier? In my java code, I retrieve preferences and access settings for the user and launch a different web page or same web page but different parameters based on these settings.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 26 Aug 2013 13:10:43 GMT</pubDate>
    <dc:creator>vince20151</dc:creator>
    <dc:date>2013-08-26T13:10:43Z</dc:date>
    <item>
      <title>How to dynamically set the URL for webview dashlet</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-dynamically-set-the-url-for-webview-dashlet/m-p/280500#M233630</link>
      <description>I need the functionality of a webview dashlet that displays a web page inside the dashlet. However, I need to form the URL dynamically (for example based on user login). How can I accomplish this. I would prefer a java controller since I have access to data that is specific to the user. However, I c</description>
      <pubDate>Fri, 23 Aug 2013 22:01:54 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-dynamically-set-the-url-for-webview-dashlet/m-p/280500#M233630</guid>
      <dc:creator>vince20151</dc:creator>
      <dc:date>2013-08-23T22:01:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to dynamically set the URL for webview dashlet</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-dynamically-set-the-url-for-webview-dashlet/m-p/280501#M233631</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This should be a simple task. Depending on your requirements, the implementation can vary a bit, but what I would do is this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- just copy the webview dashlet code, rename it to your own.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- remove the frontend code which allows the user to change the address (or make it optional)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;just remove the markup for the Config click and remove the JS code in share/components/dashlets/webview.js which handles config click&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- edit the controller (which is Javascript, but it's still easy) or just delete it and create a Java one. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- in the controller, set the config property of the URL and possibly title to render to whatever you need.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Ie: the default code for Alfresco 4.2 is &lt;/SPAN&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;var webView = {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; id : "WebView",&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; name : "Alfresco.dashlet.WebView",&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; assignTo : "webView",&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; options : {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; componentId : instance.object.id,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; webviewURI : model.uri,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; webviewTitle : model.webviewTitle,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; webviewHeight : model.height,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; isDefault : model.isDefault&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp; };&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Just change the &amp;lt;strong&amp;gt;model.uri&amp;lt;/strong&amp;gt; and &amp;lt;strong&amp;gt;model.webviewTitle&amp;lt;/strong&amp;gt; to your constructed url.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But all of this seems to be so you can load some custom web, depending on the user? Because depending on what you want to show, there are easier ways.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Aug 2013 16:19:04 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-dynamically-set-the-url-for-webview-dashlet/m-p/280501#M233631</guid>
      <dc:creator>zladuric</dc:creator>
      <dc:date>2013-08-24T16:19:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to dynamically set the URL for webview dashlet</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-dynamically-set-the-url-for-webview-dashlet/m-p/280502#M233632</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks. That does seem a lot of work. What other ways would be easier? In my java code, I retrieve preferences and access settings for the user and launch a different web page or same web page but different parameters based on these settings.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Aug 2013 13:10:43 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-dynamically-set-the-url-for-webview-dashlet/m-p/280502#M233632</guid>
      <dc:creator>vince20151</dc:creator>
      <dc:date>2013-08-26T13:10:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to dynamically set the URL for webview dashlet</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-dynamically-set-the-url-for-webview-dashlet/m-p/280503#M233633</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Well, all the steps are optional. You just want to update the &amp;lt;strong&amp;gt;model.uri&amp;lt;/strong&amp;gt; in your controller. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This will always render that one url. But the users can then still change the url until they refresh the page. You'll override their URL on the next pageload anyway, but if you want to disable that too, then do the other steps.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Aug 2013 10:47:59 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-dynamically-set-the-url-for-webview-dashlet/m-p/280503#M233633</guid>
      <dc:creator>zladuric</dc:creator>
      <dc:date>2013-08-29T10:47:59Z</dc:date>
    </item>
  </channel>
</rss>

