cancel
Showing results for 
Search instead for 
Did you mean: 

strange error in iViw development

martine_bombardelli
Participant
0 Kudos

Hi,

I do an iView and I have the folowwing error in my controleur for any 1° method after the declaration (here, it is the doInitialization methode

public void doInitialization() {

IPortalComponentRequest request = (IPortalComponentRequest) this.getRequest();

IPortalComponentContext context = request.getComponentContext();

IPortalComponentProfile profile = context.getProfile();

Vector resultat = new Vector();

myBean = new beanchamp(resultat);

profile.putValue("myBean",myBean);

profile.setProperty(INPUT_NAME,"");

}

each time, Elipse underlined the "()" after doInitialization. the message is :

syntaxe error on token "(" ,";" expected.

this is the end before the methode :

public void doContent(IPortalComponentRequest request, IPortalComponentResponse response)

{

private final static String INPUT_FIELD = "InputField";

public String name;

final String INPUT_NAME = "Name";

final beanchamp myBean = null;

can somebody help me?

Regards

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

You probably missing a ; in a variable declaration before the doInitialization method.

Could you post the entire java class ?

martine_bombardelli
Participant
0 Kudos

hi,

this is my java file, the error is the () under the line /***************/

package test;

import com.sapportals.portal.prt.component.*;

import com.sapportals.portal.prt.resource.IResource;

import java.lang.ClassNotFoundException;

import com.sapportals.htmlb.Form;

import com.sapportals.htmlb.*;

import com.sapportals.htmlb.event.*;

import com.sapportals.htmlb.page.*;

import com.sapportals.htmlb.table.*;

import bean.beanchamp;

import java.sql.*;

import java.util.Vector;

public class processForm extends AbstractPortalComponent

{

private final static String INPUT_FIELD = "InputField";

public String name;

final String INPUT_NAME = "Name";

final beanchamp myBean = null;

public void doContent(IPortalComponentRequest request, IPortalComponentResponse response)

{

request.getLogger().info("appel du jsp");

IResource jspResource = request.getResource("jsp", "pagelet/HelloWorld");

response.include(request, jspResource);

request.getLogger().info("Exiting sortie du jsp");

/***********************************/

public void doInitialization() {

IPortalComponentRequest request = (IPortalComponentRequest) this.getRequest();

IPortalComponentContext context = request.getComponentContext();

IPortalComponentProfile profile = context.getProfile();

Vector resultat = new Vector();

myBean = new beanchamp(resultat);

profile.putValue("myBean",myBean);

profile.setProperty(INPUT_NAME,"");

}

public void doProcessBeforeOutput(){

}

}

}

Regards

Former Member
0 Kudos

Hi Martine,

add a closing bracket '}' behind request.getLogger().info("Exiting sortie du jsp"); and remove the closing bracket at the end.

Regards

Stefan

martine_bombardelli
Participant
0 Kudos

hi Stefan,

ok, it all right now

Regards