2 embedded views on a form, one not showing :-?

I thought this way something of the past, but currently I am struggling with 2 embedded views on a form. Basically I was adding a tagcloud in Jake’s Blog template on the $$NavigatorTemplate for webLaunch form.

This form uses an embedded view to display a first amount of blogs. So I added a second embedded view below the document, just as Ferdy describes in his tagcloud approach. But the JS array tagMap (tip: define it as var tagMap= {};) showed no values. So after some other approaches I deleted the first embedded view and the tagcloud appeared.

Question: “Are 2 embedded views still not possible?”

12 thoughts on “2 embedded views on a form, one not showing :-?

  1. Curt Carlson 2009-March-8 / 5:22 pm

    We have many forms displaying multiple embedded views. 1 form actually displays 7 different embedded views from multiple other databases. I beleive we have beed doing this since R6.

  2. Dragon Cotterill 2009-March-8 / 5:23 pm

    Umm, as far as I’m aware, you still cannot have 2 embedded views on the same form… at least without going down the xpages route.

    I cheated. When I did the EBTC website ( http://ebtc.dofusguilds.com ) I put the tag cloud has a dbcolumn entry. It’s very similar to the view version, with a slight twist. You will hit an issue with the 64k lookup when the view gets too big, but depending on your needs it might do you. If you want the changes/code that I made then send me an email.

  3. quintessens 2009-March-8 / 7:36 pm

    hej ‘Dragon’ I guess the view makes use of a @DocDescendents function which will not be available in the @DBColumn…

  4. Flaz 2009-March-8 / 8:07 pm

    That is a big problem in web programming.
    You can do that by using java applet embedded view, but you know that wouldn’t be as goos as html views.

    A simple workaround consist of using a webqueryopen agent that fills a field with the view content needed.

    This is one of the reason why i prefer to use slef-coded pages in domino, views included.

  5. smdelfin 2009-March-9 / 4:36 am

    Yes, it is still not possible in web. In our case, we used Dojo. We didn’t actually use Domino Views, instead, we used multiple Dojo Grids in a Domino form.

  6. quintessens 2009-April-7 / 11:25 pm

    Here is some code I received which enables you to avoid wanting to use multiple embedded views:

    The code on the sub-form is thus:

    var tagMap= new Array();


    Where the computed text is just a simple:
    tmp:=@DbColumn(“Notes”; “”; “(TagCloud)”; 1);
    @If(@IsError(tmp); “”; @Implode(tmp; @NewLine));

    The view itself is a single column. Sorted, with multiple entries shown as seperate values:
    “if (tagMap[\”” + Tags + “\”]==undefined) {tagMap[\”” + Tags + “\”]=1}else{tagMap[\”” + Tags + “\”]++}” + “;”;

    Why did I do it this way?

    Well for starters it avoids any @DocChildren/@DocDescendents or any other special text in the computations. But of course the major point is that on a 6.5 server, you cannot embed two views on a form. Since I need a main view, the original TagCloud implementation is not suitable. Hence this version.


    David “Dragon” Cotterill

  7. nath 2010-June-7 / 4:43 pm

    here is solution…

    column := @DbColumn(“”:””;@ReplicaID;”vwDocsByTag”;1);

    @For(n := 1; n <= @Elements(column); n := n + 1;
    count := @Text(@Elements(@DbLookup("":"";@ReplicaID;"vwDocsByTag";column[n];2)));
    tmp:= tmp + "tagMap"+"[" + column[n] + "(" + count + ")" + "]" + "=" + count + ";" +@NewLine

  8. nath 2010-June-7 / 5:17 pm

    more specific solution to remove embedded view :
    column := @DbColumn(“”:””;@ReplicaID;”vwDocsByTag”;1);

    @For(n := 1; n <= @Elements(column); n := n + 1;
    count := @Text(@Elements(@DbLookup("":"";@ReplicaID;"vwDocsByTag";column[n];2)));
    tmp:= tmp + "tagMap" + "[" + '\"' + @Text(column[n]) + "(" + count + ")" + '\"' + + "]" + "=" + count + ";"

  9. Masri 2010-September-23 / 3:59 pm

    use iframe technique. You can use multiple view in form.

  10. Steve Dance 2010-November-8 / 6:40 pm

    You can use editors – for each view that want to to display:
    Create a form and embed a view in the form;
    on the form you want to display on the web, create an embedded editor using the form containing the embedded view as the editor;
    repeat this process for each embdded view you want to render;
    If you don’t want documents to open up in a separate window, code up an HTML Href in each view column using target = _parent.

  11. Ivan 2012-November-5 / 5:57 am

    solution with editors does not work for single category embedded view because I could not find a way to pass single category value from main doc to the embedded editor form.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s