0

I have a bean class which renders some chart, it works perfect, but if i make 2 request for the same bean simultaneously, the private properties of bean class are being overridden by second one, resulting in i normal behavior.

public class SomeGraphBean extends BaseChartGraphBean{

private String name;

    public ComplianceGraphBean(){
        super();
        name = request.getparameter("name");
    }
......
}

So the name is being rendered with the same value for 1-st and 2-nd call if i call simultaneously.

Grigor Nazaryan
  • 497
  • 4
  • 17

2 Answers2

1

Put the bean in the request or view scope, not in the session or application scope.

See also:

Community
  • 1
  • 1
BalusC
  • 1,040,783
  • 362
  • 3,548
  • 3,513
0
<h:panelGrid columns="1" style="width:100%">
    <jvcf:chartView
       **id="${id}"**
       height="#{chartHeight}"
       width="#{chartWidth}"
       ...../>
</h:panelGrid>

a unique id should be generated for each View

Grigor Nazaryan
  • 497
  • 4
  • 17