Now VelocityPortletAction works, but i have another problem, i tink i can solve but. 
well seems a bug apparently.

i have the VelocityPortletAction class with this strip of codes..

protected void buildNormalContext( VelocityPortlet portlet, Context context, RunData 
rundata ) throws Exception {
try{
   Criteria criteria = new Criteria();
   GroupSet groups = JetspeedSecurity.getGroups(criteria);
   context.put("groups", groups.getGroupsArray());
   context.put("table_name", portlet.getPortletConfig().getInitParameter( "table_name" 
) );
   context.put("table_gr_name", portlet.getPortletConfig().getInitParameter( 
"table_gr_name" ) 
....
public void doUpdate( RunData data, Context context) throws Exception {
try{
  String table_name    = data.getParameters().getString( "table_name" );
  String table_gr_name = data.getParameters().getString( "table_gr_name" );
....

i put two different portlet-entry tags on the xreg, but with same template and class.
Now, the parameters are different ( i've done this to reuse a portlet with different 
tables, without rewriting it)
And there the strange thing: table_gr_name takes the correct value, but table_name 
takes the same as the first case (two cases with different tables)
here a bit of xreg:

<portlet-entry name="InserisciBachecaInterna" hidden="false" type="ref" 
parent="CustomizerVelocity" application="false">
        <meta-info>
            <title>Inserimento in Bacheca Interna</title>
            <description>InserisciBachecaInterna</description>
        </meta-info>
        <parameter name="table_name" value="PORTAL_BACHECA" hidden="false"/>
        <parameter name="table_gr_name" value="PORTAL_BACHECA_GROUP" hidden="true"/>
        <parameter name="template" value="insbachecainternaform" hidden="false"/>
        <parameter name="action" value="portlets.InsBachecaInterna" hidden="false"/>
        <media-type ref="html"/>
</portlet-entry>
<portlet-entry name="InserisciBachecaInterna2" hidden="false" type="ref" 
parent="CustomizerVelocity" application="false">
        <meta-info>
            <title>Inserimento in Bacheca Agenti</title>
            <description>InserisciBachecaInterna</description>
        </meta-info>
        <parameter name="table_name" value="PORTAL_BACHECAI" hidden="false"/>
        <parameter name="table_gr_name" value="PORTAL_BACHECAI_GROUP" hidden="true"/>
        <parameter name="template" value="insbachecainternaform" hidden="false"/>
        <parameter name="action" value="portlets.InsBachecaInterna" hidden="false"/>
        <media-type ref="html"/>
</portlet-entry>

so when i'm going to use "InserisciBachecaInterna2" the table_name is PORTAL_BACHECA 
instead of PORTAL_BACHECAI
the var are passed like this(vm file):
<input type="hidden" name="table_name" value="$table_name">
<input type="hidden" name="table_gr_name" value="$table_gr_name">

till here works but when i push the submit button strangely the table_name takes the 
same of the other portlet.
Now, just for reminding, i use the same vm file, its that the problem? or is a chache 
problem?

Reply via email to