xpages - Concatenating parameters -


i'm trying concatenate string in expression language access property of object , failing so.

within xpage in lotus notes, want programatically select field want bind control on current xpage.

the result achieve follows.

#{podoc[advertisingdatestart];} 

i have variable named fieldname supply "advertisingdate" , want append "start" field , "end" end date field. tried several variations not work, such as:

#{podoc[fieldname{'start'}];} 

note work if passed in "advertisingdatestart" , used

#{podoc[fieldname];} 

the goal able place start date field , end date field while dynamically binding based on configuration documents. is, adding fields xpage using configuration documents , repeats instead of changing design. here 1 of ways tried create ending date field:

<xp:inputtext id="inputtext5"     style="padding-top:2px;text-align:left">     <xp:this.rendered><![cdata[#{javascript:rowdata.getcolumnvalue("fieldtype") == "date range"; }]]></xp:this.rendered>     <xp:datetimehelper id="datetimehelper3"></xp:datetimehelper>     <xp:this.converter>         <xp:convertdatetime type="date"></xp:convertdatetime>     </xp:this.converter>     <xp:this.value><![cdata[#{javascript:podoc[fieldname+"end"];}]]></xp:this.value> </xp:inputtext> 

i can't figure out.

unfortunately, cannot bind using 'javascript:' notation. in ssjs there no way of pointing 'object property' (getter , setter) bound component property.

only expression language can dot notation.

if need bind dynamic fields, have compute fieldname before using per henrik lausten suggested (xp:datacontext way go). since want 2 date fields 1 entry, should use different variables new values, computing value using javascript

<xp:this.datacontexts>      <xp:datacontext var="fieldname">         <xp:this.value>         <![cdata[#{javascript:rowdata.getcolumnvalue ("fieldname");}]]>        </xp:this.value>      </xp:datacontext>     <xp:datacontext var="fieldnamedatestart">      <xp:this.value>          <![cdata[#{javascript:return rowdata.getcolumnvalue ("fieldname") + "start";}]]>      </xp:this.value>     </xp:datacontext> <xp:datacontext var="fieldnamedateend">      <xp:this.value>         <![cdata[#{javascript:return rowdata.getcolumnvalue ("fieldname") + "end";}]]>      </xp:this.value>     </xp:datacontext> </xp:this.datacontexts>  

fieldname used single field entries, while others used start dates , end dates.


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -