• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can we use jsf tags inside applet in XHTML

 
Praveen Yendluri
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Everyone,

Below is my Xhtml code the that has to generate bar charts using perspective for java (pfj.jar).
In this code I have used an applet to display. I am trying to set data dynamically(using <ui:repeat> tag) from back bean "myBean" in the applet. At this point it is throwing error.

Can we use jsf tags inside applet? But when I set it with static data (like (setData(0,1,30)) )it displaying graph properly and able to print bean values properly.

<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets">
<h:head>
<title>Facelet Title</title>
<script>
</script>
</h:head>
<h:body>
<h:form>

<!-- Just Printing Bean values -->
<ui:repeat value="#{myBean.releasedData}" var="released" >
#{released.late} #{released.good} #{released.warned}


</ui:repeat>

<applet
code="TDGChartApplet.class"
archive="PfjFull.jar"
width="750"
height="425" >
<param name="TDGSCRIPT" value='
setUseSampleData(false);
setGraphType(18);
setDepthRadius (0);
setStackedDataValueSum (true);

setDataTextDisplay (true);

<ui:repeat value=#{myBean.releasedData}" var="released" >
setData(0,0,#{released.late});
setData(1,0, #{released.good});
setData(2,0, #{released.warned});
</ui:repeat>
setDataRangeToExtent();
setSeriesLabel (0,"Good");
setSeriesLabel (1,"Warned");
setSeriesLabel (2,"Late");


setSeriesType(getSeries(1),1);
setSeriesFillColor(0,new Color(0,255,0));
setSeriesFillColor(1, new Color(0,0,255));
setSeriesFillColor(2, new Color(0,0,10));

setLineWidth(getSeries(1),1);
setMarkerShape(getSeries(1),3);
setAxisAssignment(0,0);
setAxisAssignment(getSeries(1),1);

setY1ScaleMinAuto (false);
setY1ScaleMin(0);
setY2ScaleMinAuto(false);
setY2ScaleMin(0);
setY1TitleString ("Number of Work Orders");
setY2TitleString ("Average Number Of Days");
setTextRotation(getY2Title(),1);
setFillColor(getY2Title(),new Color(0,0,255));

setFontSizeVC (getGroup(0),600);


'/>

</applet>
</h:form>
</h:body>
</html>


Error it is throwing:

javax.faces.view.facelets.FaceletException: Error Parsing /index.xhtml: Error Traced[line: 36] The value of attribute "value" associated with an element type "null" must not contain the '<' character.

Please can anyone assist on this?

Thank you,
Praveen
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic