cancel
Showing results for 
Search instead for 
Did you mean: 

How to execute component method if it is already used for fill datagrid

Former Member
0 Kudos

Hello !

Could anybody help me.

I have appliction where datagrid has been filled using method of component controller e.g. companyComponent.executeFilterCompany();

In view for edit data I made button, if I press this button I have to call this method companyComponent.executeFilterCompany(); to make some checks based on my own input parameters. When I call it then datagrid refreshes by new results, but this behaviour is wrong. I have only to receive result from webservice and make some my comparing and actions. So I don't know how to call companyComponent.executeFilterCompany() twice in diferent places of application.

Thank you in advance.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Sergey,

You create a new method where you execute web service (do not call other method again)

You can achieve all the steps by applying Service Controller Template on the component controller.

In Web Dynpro Explorer, right click on component controller, choose Template -> Apply, choose Service Controller & go through the wizard pages. This will create a new context structure for the chosen executable model class, write some initialization code in wdDoInit() method and create execute... method (name you give in last wizard page) with execution code. Now, your this new context will have resultset when you call this newly created execute method. Work on this context.

Kind Regards,

Nitin

Former Member
0 Kudos

Thank you very much. Super ! )))

Former Member
0 Kudos

I deleted Context elements with bad name and made new one. After compilation I received error

I tryed to delete folders

gen

gen_ddic

gen_wdp

but it doesn't help, after rebuild error apeared again.

What is it bug of WebDynPro ? What to do with it ?

Thanks

C:\Documents and Settings\csv\.dtc\0\t\5C2F358FBB2F0D21A82E97ADFEC057B7\gwd\packages\com\accenture\mdp\company\components\Company.java:133: cannot resolve symbol

symbol : method nodeRequest_FilterCompanyCheck ()

location: class com.accenture.mdp.company.components.wdp.IPublicCompany.IContextNode

wdContext.nodeRequest_FilterCompanyCheck().bind(new Request_CompanyServiceViDocument_filterCompany0());

^

C:\Documents and Settings\csv\.dtc\0\t\5C2F358FBB2F0D21A82E97ADFEC057B7\gwd\packages\com\accenture\mdp\company\components\Company.java:820: cannot resolve symbol

symbol : method currentRequest_FilterCompanyCheckElement ()

location: class com.accenture.mdp.company.components.wdp.IPublicCompany.IContextNode

wdContext.currentRequest_FilterCompanyCheckElement().modelObject().execute();

^

C:\Documents and Settings\csv\.dtc\0\t\5C2F358FBB2F0D21A82E97ADFEC057B7\gwd\packages\com\accenture\mdp\company\components\Company.java:821: cannot resolve symbol

symbol : method nodeResponse_FilterCompanyCheck ()

location: class com.accenture.mdp.company.components.wdp.IPublicCompany.IContextNode

wdContext.nodeResponse_FilterCompanyCheck().invalidate();

^

C:\Documents and Settings\csv\.dtc\0\t\5C2F358FBB2F0D21A82E97ADFEC057B7\gwd\packages\com\accenture\mdp\company\components\Company.java:822: cannot resolve symbol

symbol : method nodeResult ()

location: class com.accenture.mdp.company.components.wdp.IPublicCompany.IContextNode

wdContext.nodeResult().invalidate();

^

Note: Some input files use or override a deprecated API.

Note: Recompile with -deprecation for details.

4 errors

Ant build finished with ERRORS

file:C:/Documents and Settings/csv/.dtc/0/DCs/accenture.com/mdp/company/wd/_comp/gen/default/logs/build.xml:137: Compile failed; see the compiler error output for details.

Ant build finished at 2009-01-20 16:28:14 GMT+03:00 (MSK), Duration: 34 seconds

Build finished with ERROR

Cleaning up.

nikhil_bose
Active Contributor
0 Kudos

If gen_wdp is deleted, choose Reload from dc's context menu.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello Sergey,

What I get is that in this component method, you execute the webservice method, the results fills up the context, your datagrid is bound to this context hence gets filled up.

Now, you want to execute webservice for some other task also with diff parameters and your datagrid should not refresh.

I feel you will not able to call this component method as such, instead I would advise you to create a separate context for the same, a separate method where you execute webservice & let resultset fill this new context & then work on this context.

Kind Regards,

Nitin

Former Member
0 Kudos

I tried to make new context, it is filterCompanyCheck to the same method as filterCompany.

http://haxt.narod.ru/projects/1.JPG

is it correctly to make it as on the picture ?

But in this case it will be necessary to call the same method for context filterCompanyCheck as for filterCompany, it will cause problem I described

companyComponent = wdThis.wdGetCompanyController();

companyComponent.executeFilterCompany();

Something I can't understand, Maybe somebody has some documentation about it or examples ?

nikhil_bose
Active Contributor
0 Kudos

Probably old filtering values may be passed to web service. In side companyComponent.executeFilterCompany() print input parameters.

nikhil

Former Member
0 Kudos

My problem is: I have webservice method that is used to obtain data for datagrid, I want to use this method also for other task, but I don't know how to do it because call of this method refreshes context that connected with datagrid. Please suggest me how to make independent call of webservice ?

Former Member
0 Kudos

Does anyone know it possible to call webservice method independently to context ? Overwise this webdynpro framework updates datagrid based on results of this method.