Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 340299 - RAP doesn't wrap "\n" in table cell
Summary: RAP doesn't wrap "\n" in table cell
Status: RESOLVED DUPLICATE of bug 320742
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-17 06:27 EDT by Sun CLA
Modified: 2011-03-17 06:55 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sun CLA 2011-03-17 06:27:13 EDT
Build Identifier: 20110218-0911

RCP (on Linux platform) table cell content is wrapped when "\n" is used but RAP doesn't wrap the same.

Multi-line rows in web based gui is very common. Just take an example of our RAP Community Forum web page " http://www.eclipse.org/forums/index.php?t=thread&frm_id= 34&S=93d9acc82566642c9de7f1a0b73ebc23", it also uses table with multi-line for main table.

More details and findings on the problem are there in RAP community Forum topic, "http://www.eclipse.org/forums/index.php?t=msg&th=206214&start=0&S=93d9acc82566642c9de7f1a0b73ebc23"

Note: On Windows even RCP doesn't wrap the table cell content. But there is a work-around. More details on this can be fount at above mentioned forum topic.

Reproducible: Always

Steps to Reproduce:
Here is a sample code to create table with multi-line,

private void createSimpleTable(Composite parent) {
TableViewer tv = new TableViewer(parent);
tv.setContentProvider(new IStructuredContentProvider() {
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
}
public void dispose() {
}
public Object[] getElements(Object inputElement) {
return (Object[]) inputElement;
}
});
tv.getTable().setLinesVisible(true);
tv.setInput(new String[]{"line 1\n line2", "line1 \n line2", "line 1\n line2", "line1 \n line2"});
}

This shows multi-line table in RCP app on Linux platform. Using the same code in RAP shows tripped off text in single line for each rows.
Comment 1 Ivan Furnadjiev CLA 2011-03-17 06:55:46 EDT
.

*** This bug has been marked as a duplicate of bug 320742 ***