From: Jim A. <J....@le...> - 2007-01-03 13:18:41
|
Hello, Happy New Year to All! I'm trying to fathom out what is up with the html rendering in log book sections and questions. Having investigated our database it seems as if the introduction_type and question_type fields of log_book_sections and log_book_questions aren't being set and remain null. This means that the content gets rendered by the plain text renderer as below protected SectionRenderer getSectionRenderer( LogBookSection section ) throws BuildingServerException { String type =3D section.getIntroductionType(); if (null =3D=3D type) return new PlainSectionRenderer(section); type =3D type.toLowerCase(); if (("xhtml".equals(type)) || ("html".equals(type))) return new HtmlSectionRenderer(section); // If we get here, we have no idea, so default it. return new PlainSectionRenderer(section); } Looking at when a new section is created seems to suggest that setIntroductionType is never called. // set initial properties section.setTitle( "Untitled Section" ); section.setIntroduction( "Introductory text goes here." ); section.setOrdinal( ordinal ); It may be that we had some custom code here, but would like to know how its meant to work before looking through our old files. Any help greatly appreciated. Cheers, Jim |