dbarra / xdocreport

Automatically exported from code.google.com/p/xdocreport
1 stars 0 forks source link

List of values not suppoerted in html text sylying with velocity marker #241

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Java code to set list of values
        FieldsMetadata metadata = report.createFieldsMetadata();
        for (i = 0;i<5;i++) {
            metadata.addField( "description", Boolean.TRUE, null, SyntaxKind.Html.name(), false );
            //metadata.addFieldAsTextStyling("desc"+i , SyntaxKind.Html);
            i=i+1;
        }

        IContext context = report.createContext();
        i = 0;
       for (i = 0;i<5;i++) {
          context.put("desc"+i,"User summary<i>Text</i> coming from <b>Java context</b>");
            i=i+1;
        }

2. #foreach($job in $resume.experience.jobs)
$job.description
3. currently it displays the content with html tags.User summary<i>Text</i> 
coming from <b>Java context</b>

What is the expected output? What do you see instead?

To intrepreted content

What version of the product are you using? On what operating system?
1.0.0 Version. Mac OS.

Please provide any additional information below.

Original issue reported on code.google.com by callonr...@gmail.com on 29 Mar 2013 at 6:01

GoogleCodeExporter commented 8 years ago
Hi,

Could you please attach a docx (or odt) and your Java main whith your problem, 
please.

Many thank's

Regards Angelo

Original comment by angelo.z...@gmail.com on 29 Mar 2013 at 7:16

GoogleCodeExporter commented 8 years ago
Yesterday whole day i was stuck with above issue, not able to figure out. It 
appears to be working fine Today. Please mark the issue as resolved fixed.

For future reference, Following code worked fine.

metadata.addField( "description", Boolean.TRUE, null, SyntaxKind.Html.name(), 
false ); // Description of job object contained html content 

public class Experience implements Serializable {

    private String employmentStatus;
    private Date startDate;
    private Date endDate;
    private List<Job> jobs;
}

public class Job implements Serializable {

    private String description;
    private String employer;
}

Original comment by callonr...@gmail.com on 29 Mar 2013 at 8:44

GoogleCodeExporter commented 8 years ago

Original comment by angelo.z...@gmail.com on 29 Mar 2013 at 11:17