Saturday, 15 May 2010

xpages - view daterange , end date not correct -


I'm selecting the documents by daterange in a scene. The start date is absolutely correct but not the expiration date. The selection goes from start to final entry. My code is:

var vDateRange = session.createDateRange (sessionScope.selectedStartDate, sessionScope.selectedEndDate); Var Projects: Notesview = DatabaseGateView ('visit_bite_dataVV') var Viewpoint: Notes VivnVigator = Projects .createViewNav (); Var Viewer Collection: NoteSweepEntertainment = Projects.Gate Lantrzbach (vDateRange); Var View: Notes View View = ViewIntergrid.GateFirstFind (); Var output: string = ""; While (visible = null) {output = = "& lt; tr & gt;"; Output + = "& lt; td & gt;" + Viewpoint.gate column value () [0]; + "& Lt; / td>"; Output + = "& lt; td & gt;" + VisualEnt.Gate column value () [3] + "& lt; / td>"; Output + = "& lt; td & gt;" + Viewant.Gate column value () [4] + "& lt; / td>; Output + = "& lt; td & gt;" + ViewAnt.Gate column price () [5] + ""; Output + = "& lt; / tr & gt;"; ViewEnt = viewNav.getNext (view); }

Edit

Select the date with the following code:

  & lt; Xe: djDateTextBox id = "StartDate" defaultValue = "# {javascript: sessionScope.selectedStartDate}" value = "# {sessionScope.selectedStartDate}" & gt; & Lt; XP: this.converter & gt; & Lt; Xp: convert datetime type = "date" date style = "full" & gt; & Lt; / XP: convertDateTime & gt; & Lt; / XP: this.converter & gt; & Lt; / XE: djDateTextBox & gt; & Lt; Xe: djDateTextBox id = "endDate" defaultValue = "# {Javascript: sessionScope.selectedEndDate}" value = "# {sessionScope.selectedEndDate}" & gt; & Lt; XP: this.converter & gt; & Lt; Xp: convert datetime type = "date" date style = "full" & gt; & Lt; / XP: convertDateTime & gt; & Lt; / XP: this.converter & gt; & Lt; / XE: djDateTextBox & gt;  

The first column of the view is a date / time "style" is sorted on the Arohan form, which stores the dates on a date time field.

);

to

  viewEnt = viewEntryCollection.getNextEntry (viewEnt);  

And it will work.

Start viewNav with full visual content This is why it starts with the correct date from the entry collection, but always runs to see the end of this Code viewNav is not required and can delete this line.


No comments:

Post a Comment