FORUM PLAN UPDATE
Date revision: This forum will remain open to new posts and responses until December 1, 2018. (After that date, you will still be able to view and search the forum.) Also, we're taking a second look at the best place to host future conversation. For now, keep using this forum, and stay tuned for more news.



Jul 11, 2012, 2:24 PM
68 Posts

Re: Additional param in ViewControl.

  • Category: Server Side JavaScript
  • Platform: All
  • Release: 8.5.3
  • Role: End user,Developer,Administrator
  • Tags:
  • Replies: 8
Without any parameters link look like that:
 
/%24%24OpenDominoDocument.xsp?documentId=16EAE326CB485815C1257A0F004DD8D2&action=editDocument
 
Code:
 
     <xp:viewPanel rows="30" id="viewPanel1" viewStyle="width:100.0%">
        <xp:this.facets>
            <xp:pager partialRefresh="true" layout="Previous Group Next"
                xp:key="headerPager" id="pager1">
            </xp:pager>
        </xp:this.facets>
        <xp:this.data>
            <xp:dominoView var="view1" viewName="vAnkiety"></xp:dominoView>
        </xp:this.data>
        <xp:viewColumn columnName="Tytul_Ankieta" id="viewColumn1"
            displayAs="link">
            <xp:viewColumnHeader value="Tytuł Ankiety:"
                id="viewColumnHeader1">
            </xp:viewColumnHeader>
        </xp:viewColumn>
    </xp:viewPanel>
 
With your parameters
 
Url looks like that:
 
/xAnkieta_Detale.xsp?documentId=E262CE1D1CB9BBABC12579C90074B659&action=editDocument&test=value  
 
 
Code:
 
    <xp:viewPanel rows="30" id="viewPanel1" viewStyle="width:100.0%">
        <xp:this.facets>
            <xp:pager partialRefresh="true" layout="Previous Group Next"
                xp:key="headerPager" id="pager1">
            </xp:pager>
        </xp:this.facets>
        <xp:this.data>
            <xp:dominoView var="view1" viewName="vAnkiety"></xp:dominoView>
        </xp:this.data>
        <xp:viewColumn columnName="Tytul_Ankieta" id="viewColumn1"
            displayAs="link">
            <xp:this.pageUrl><![CDATA[#{javascript:return "/xAnkieta_Detale.xsp?documentId=" + view1.getUniversalID() + "&action=editDocument&test=value";}]]>
            </xp:this.pageUrl>
            <xp:viewColumnHeader value="Tytuł Ankiety:"
                id="viewColumnHeader1">
            </xp:viewColumnHeader>
        </xp:viewColumn>
    </xp:viewPanel>
 
 
What more such url is working (ID is from 1st option);
 
/xAnkieta_Detale.xsp?documentId=16EAE326CB485815C1257A0F004DD8D2&action=editDocument&test=value
 
To sum up getUniversalID give such an id: E262CE1D1CB9BBABC12579C90074B659
Normal way give such an id:  16EAE326CB485815C1257A0F004DD8D2
 
But in normal way I can't add additional parameter so I need get somehow this id (16EAE326CB485815C1257A0F004DD8D2)
 

Jul 12, 2012, 3:10 AM
126 Posts
Re: Additional param in ViewControl.
Your issue is that your using
 
view1.getUniversalID();
 
in your code this is the "var" attached to the domino view, in my code sample I attached a "var" property "rowData" to my viewPanel and used
 
rowdata.getUniversalID()
 
The ID your getting is a static id for the view and not for the document your clicking on. Make that change and it should be fine 

FORUM PLAN UPDATE
Date revision: This forum will remain open to new posts and responses until December 1, 2018. (After that date, you will still be able to view and search the forum.) Also, we're taking a second look at the best place to host future conversation. For now, keep using this forum, and stay tuned for more news.