Skip to Content
0
Former Member
Oct 12, 2006 at 09:28 AM

Help me . About EP's KM Development

18 Views

My Dynamic Page is

public void doProcessBeforeOutput() throws PageException {

// create your GUI here....

Form myForm = this.getForm(); // get the form from DynPage

myForm.setMethod("POST");

Group myGroup=new Group();

myGroup.setTitle("文档查找");

Label label=new Label("temp");

label.setText("请输入文档");

myGroup.addComponent(label);

InputField inputField=new InputField("resourceId");

myGroup.addComponent(inputField);

Button button1=new Button("button1","查找");

button1.setOKButton(true);

button1.setOnClick("onClick");

myGroup.addComponent(button1);

myForm.addComponent(myGroup);

myForm.setDefaultButton(button1);

}

public void onClick(Event event){

Form myForm = this.getForm();

myForm.setAction("IntrotoPortalAPI.FindResource");

}

And receive Parameter's component's code

try {

com.sap.security.api.IUser sapUser = request.getUser();

IUser ep5User = WPUMFactory.getUserFactory().getEP5User(sapUser);

IResourceContext context = new ResourceContext(ep5User);

RID rid = RID.getRID("/documents/News/"+request.getComponentContext().getProfile().getValue("resourceId"));

IResource resource =

ResourceFactory.getInstance().getResource(rid, context);

if (resource != null) {

response.write("resource "resource.getRID()" found");

} else {

response.write("resource "resource.getRID()" does not exist");

}

} catch (Exception e) {

response.write("Exception:"e.getMessage()request.getComponentContext().getProfile().getValue("resourceId"));

}

Why request.getParameter obtain 's parameter is null?

What do this?