I have a requirement to present large text files in the browser but do not want to criple the browser and the results should look very simple (like an HtmlPane) and non-editable.
The solution I'm working on constructs a listgrid to look like plain text area and takes advantage of the listgrid paging model. My initial testing shows that this should work just fine. Here's the general solution.
1. Add the following to the project CSS file.
2. Create a datasource with the following field.
3. Create a listgrid as normal setting the following attributes.
4. Handle paging as appropriate on the server-side CGI script based on the _startRow and _endRow attributes in the GET.
My questions are:
Am I on the right track?
Does this make sense or is there a better way to do what I want to do?
Has anyone done anything similiar?
The solution I'm working on constructs a listgrid to look like plain text area and takes advantage of the listgrid paging model. My initial testing shows that this should work just fine. Here's the general solution.
1. Add the following to the project CSS file.
Code:
.myPlainGridCell, .myPlainGridCellDark, .myPlainGridCellOver, .myPlainGridCellOverDark, .myPlainGridCellSelected, .myPlainGridCellSelectedDark, .myPlainGridCellSelectedOver, .myPlainGridCellSelectedOverDark, .myPlainGridCellDisabled, .myPlainGridCellDisabledDark { font-family:monospace; font-size:11px; color:#333333; }
Code:
DataSourceTextField LineField = new DataSourceTextField("Line"); setFields(LineField);
Code:
setShowHeader(false); setCellHeight(10); setBaseStyle("myPlainGridCell"); setDataSource(objDS); ListGridField LineField = new ListGridField("Line", "Line"); setFields(LineField);
My questions are:
Am I on the right track?
Does this make sense or is there a better way to do what I want to do?
Has anyone done anything similiar?