How Default 'Find' works

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

How Default 'Find' works

Emad Radwan
Hi There,

While testing the Parties module I noticed that default find party results - returned records - are not all there in the database, this is while I didn't specify any parameters. What are the logic behind this and where its configured.

Regards,

Emad.
Reply | Threaded
Open this post in threaded view
|

Re: How Default 'Find' works

adityasharma
Hi Edmad,

Here is how you can trace out the flow based on the request

controller request
https://github.com/apache/ofbiz-framework/blob/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml#L511

view mapping
https://github.com/apache/ofbiz-framework/blob/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml#L1415

Screen & Forms
https://github.com/apache/ofbiz-framework/blob/trunk/applications/party/widget/partymgr/PartyScreens.xml#L25
https://github.com/apache/ofbiz-framework/blob/trunk/applications/party/groovyScripts/party/FindParty.groovy
https://github.com/apache/ofbiz-framework/blob/trunk/applications/party/widget/partymgr/PartyForms.xml#L131

performFindParty service which returns the results based upon the parameters
https://github.com/apache/ofbiz-framework/blob/trunk/applications/party/src/main/java/org/apache/ofbiz/party/party/PartyServices.java#L1519

HTH

Thanks and regards,
Aditya Sharma

On Sun, Oct 25, 2020 at 4:46 PM Emad Radwan <[hidden email]> wrote:

> Hi There,
>
> While testing the Parties module I noticed that default find party results
> - returned records - are not all there in the database, this is while I
> didn't specify any parameters. What are the logic behind this and where its
> configured.
>
> Regards,
>
> Emad.
>
Reply | Threaded
Open this post in threaded view
|

Re: How Default 'Find' works

Emad Radwan
Hello Aditya,

Thanks for your time. Actually I needed someone to guide me to the last step you mentioned which is the PartyService.Java as I went thru the available documentation and execution workflows starting from the URL up to the forms and services but was missing that one. This leads us to another related issue please that's if you know a good tutorial to show how to debug the code in Eclipse or Idea as from a programmer point of view this is the best way I know to trace program execution and understand what is being done where.

Regards,

Emad

On 2020/10/27 05:59:03, Aditya Sharma <[hidden email]> wrote:

> Hi Edmad,
>
> Here is how you can trace out the flow based on the request
>
> controller request
> https://github.com/apache/ofbiz-framework/blob/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml#L511
>
> view mapping
> https://github.com/apache/ofbiz-framework/blob/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml#L1415
>
> Screen & Forms
> https://github.com/apache/ofbiz-framework/blob/trunk/applications/party/widget/partymgr/PartyScreens.xml#L25
> https://github.com/apache/ofbiz-framework/blob/trunk/applications/party/groovyScripts/party/FindParty.groovy
> https://github.com/apache/ofbiz-framework/blob/trunk/applications/party/widget/partymgr/PartyForms.xml#L131
>
> performFindParty service which returns the results based upon the parameters
> https://github.com/apache/ofbiz-framework/blob/trunk/applications/party/src/main/java/org/apache/ofbiz/party/party/PartyServices.java#L1519
>
> HTH
>
> Thanks and regards,
> Aditya Sharma
>
> On Sun, Oct 25, 2020 at 4:46 PM Emad Radwan <[hidden email]> wrote:
>
> > Hi There,
> >
> > While testing the Parties module I noticed that default find party results
> > - returned records - are not all there in the database, this is while I
> > didn't specify any parameters. What are the logic behind this and where its
> > configured.
> >
> > Regards,
> >
> > Emad.
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: How Default 'Find' works

Jacques Le Roux
Administrator
Hi Emad,

Here you go for Eclipse: https://cwiki.apache.org/confluence/display/OFBIZ/Running+and+Debugging+OFBiz+in+Eclipse

HTH

Jacques

Le 27/10/2020 à 10:49, Emad Radwan a écrit :

> Hello Aditya,
>
> Thanks for your time. Actually I needed someone to guide me to the last step you mentioned which is the PartyService.Java as I went thru the available documentation and execution workflows starting from the URL up to the forms and services but was missing that one. This leads us to another related issue please that's if you know a good tutorial to show how to debug the code in Eclipse or Idea as from a programmer point of view this is the best way I know to trace program execution and understand what is being done where.
>
> Regards,
>
> Emad
>
> On 2020/10/27 05:59:03, Aditya Sharma <[hidden email]> wrote:
>> Hi Edmad,
>>
>> Here is how you can trace out the flow based on the request
>>
>> controller request
>> https://github.com/apache/ofbiz-framework/blob/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml#L511
>>
>> view mapping
>> https://github.com/apache/ofbiz-framework/blob/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml#L1415
>>
>> Screen & Forms
>> https://github.com/apache/ofbiz-framework/blob/trunk/applications/party/widget/partymgr/PartyScreens.xml#L25
>> https://github.com/apache/ofbiz-framework/blob/trunk/applications/party/groovyScripts/party/FindParty.groovy
>> https://github.com/apache/ofbiz-framework/blob/trunk/applications/party/widget/partymgr/PartyForms.xml#L131
>>
>> performFindParty service which returns the results based upon the parameters
>> https://github.com/apache/ofbiz-framework/blob/trunk/applications/party/src/main/java/org/apache/ofbiz/party/party/PartyServices.java#L1519
>>
>> HTH
>>
>> Thanks and regards,
>> Aditya Sharma
>>
>> On Sun, Oct 25, 2020 at 4:46 PM Emad Radwan <[hidden email]> wrote:
>>
>>> Hi There,
>>>
>>> While testing the Parties module I noticed that default find party results
>>> - returned records - are not all there in the database, this is while I
>>> didn't specify any parameters. What are the logic behind this and where its
>>> configured.
>>>
>>> Regards,
>>>
>>> Emad.
>>>
Reply | Threaded
Open this post in threaded view
|

Re: How Default 'Find' works

Emad Radwan
Hello Jacques,

That was very helpful and it did works! One more thing please. As a lazy
person - :) - would it be possible to find somehow while in Eclipse any
logs for the execution workflow sequence for the different XML
configuration files that Aditya mentioned? I assume not as XML isn't real
code but who knows.

Thanks.

On Tue, Oct 27, 2020 at 12:41 PM Jacques Le Roux <
[hidden email]> wrote:

> Hi Emad,
>
> Here you go for Eclipse:
> https://cwiki.apache.org/confluence/display/OFBIZ/Running+and+Debugging+OFBiz+in+Eclipse
>
> HTH
>
> Jacques
>
> Le 27/10/2020 à 10:49, Emad Radwan a écrit :
> > Hello Aditya,
> >
> > Thanks for your time. Actually I needed someone to guide me to the last
> step you mentioned which is the PartyService.Java as I went thru the
> available documentation and execution workflows starting from the URL up to
> the forms and services but was missing that one. This leads us to another
> related issue please that's if you know a good tutorial to show how to
> debug the code in Eclipse or Idea as from a programmer point of view this
> is the best way I know to trace program execution and understand what is
> being done where.
> >
> > Regards,
> >
> > Emad
> >
> > On 2020/10/27 05:59:03, Aditya Sharma <[hidden email]> wrote:
> >> Hi Edmad,
> >>
> >> Here is how you can trace out the flow based on the request
> >>
> >> controller request
> >>
> https://github.com/apache/ofbiz-framework/blob/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml#L511
> >>
> >> view mapping
> >>
> https://github.com/apache/ofbiz-framework/blob/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml#L1415
> >>
> >> Screen & Forms
> >>
> https://github.com/apache/ofbiz-framework/blob/trunk/applications/party/widget/partymgr/PartyScreens.xml#L25
> >>
> https://github.com/apache/ofbiz-framework/blob/trunk/applications/party/groovyScripts/party/FindParty.groovy
> >>
> https://github.com/apache/ofbiz-framework/blob/trunk/applications/party/widget/partymgr/PartyForms.xml#L131
> >>
> >> performFindParty service which returns the results based upon the
> parameters
> >>
> https://github.com/apache/ofbiz-framework/blob/trunk/applications/party/src/main/java/org/apache/ofbiz/party/party/PartyServices.java#L1519
> >>
> >> HTH
> >>
> >> Thanks and regards,
> >> Aditya Sharma
> >>
> >> On Sun, Oct 25, 2020 at 4:46 PM Emad Radwan <[hidden email]>
> wrote:
> >>
> >>> Hi There,
> >>>
> >>> While testing the Parties module I noticed that default find party
> results
> >>> - returned records - are not all there in the database, this is while I
> >>> didn't specify any parameters. What are the logic behind this and
> where its
> >>> configured.
> >>>
> >>> Regards,
> >>>
> >>> Emad.
> >>>
>
Reply | Threaded
Open this post in threaded view
|

Re: How Default 'Find' works

Jacques Le Roux
Administrator
Actually I don't know any other way but what Aditya mentioned

If you want some logs, look at runtime\logs into your local copy

HTH

Le 27/10/2020 à 12:27, Emad Radwan a écrit :

> Hello Jacques,
>
> That was very helpful and it did works! One more thing please. As a lazy
> person - :) - would it be possible to find somehow while in Eclipse any
> logs for the execution workflow sequence for the different XML
> configuration files that Aditya mentioned? I assume not as XML isn't real
> code but who knows.
>
> Thanks.
>
> On Tue, Oct 27, 2020 at 12:41 PM Jacques Le Roux <
> [hidden email]> wrote:
>
>> Hi Emad,
>>
>> Here you go for Eclipse:
>> https://cwiki.apache.org/confluence/display/OFBIZ/Running+and+Debugging+OFBiz+in+Eclipse
>>
>> HTH
>>
>> Jacques
>>
>> Le 27/10/2020 à 10:49, Emad Radwan a écrit :
>>> Hello Aditya,
>>>
>>> Thanks for your time. Actually I needed someone to guide me to the last
>> step you mentioned which is the PartyService.Java as I went thru the
>> available documentation and execution workflows starting from the URL up to
>> the forms and services but was missing that one. This leads us to another
>> related issue please that's if you know a good tutorial to show how to
>> debug the code in Eclipse or Idea as from a programmer point of view this
>> is the best way I know to trace program execution and understand what is
>> being done where.
>>> Regards,
>>>
>>> Emad
>>>
>>> On 2020/10/27 05:59:03, Aditya Sharma <[hidden email]> wrote:
>>>> Hi Edmad,
>>>>
>>>> Here is how you can trace out the flow based on the request
>>>>
>>>> controller request
>>>>
>> https://github.com/apache/ofbiz-framework/blob/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml#L511
>>>> view mapping
>>>>
>> https://github.com/apache/ofbiz-framework/blob/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml#L1415
>>>> Screen & Forms
>>>>
>> https://github.com/apache/ofbiz-framework/blob/trunk/applications/party/widget/partymgr/PartyScreens.xml#L25
>> https://github.com/apache/ofbiz-framework/blob/trunk/applications/party/groovyScripts/party/FindParty.groovy
>> https://github.com/apache/ofbiz-framework/blob/trunk/applications/party/widget/partymgr/PartyForms.xml#L131
>>>> performFindParty service which returns the results based upon the
>> parameters
>> https://github.com/apache/ofbiz-framework/blob/trunk/applications/party/src/main/java/org/apache/ofbiz/party/party/PartyServices.java#L1519
>>>> HTH
>>>>
>>>> Thanks and regards,
>>>> Aditya Sharma
>>>>
>>>> On Sun, Oct 25, 2020 at 4:46 PM Emad Radwan <[hidden email]>
>> wrote:
>>>>> Hi There,
>>>>>
>>>>> While testing the Parties module I noticed that default find party
>> results
>>>>> - returned records - are not all there in the database, this is while I
>>>>> didn't specify any parameters. What are the logic behind this and
>> where its
>>>>> configured.
>>>>>
>>>>> Regards,
>>>>>
>>>>> Emad.
>>>>>
Reply | Threaded
Open this post in threaded view
|

Re: How Default 'Find' works

Emad Radwan
In reply to this post by adityasharma
Hello Aditya,

Reference to the above that was helpful, in the Parties grid I'm finding
difficulty understanding how the 'main role' column was fetched from the
DB. I think the following line is the configuration of the column in the
grid - <field name="mainRole" title="${uiLabelMap.PartyMainRole}"><display
description="${mainRole.description}"/></field> - and I went thru
'PerformFindPart'
in mentioned PartyServices and although I'm not a Java expert but I guess
the code is building the conditions based on the search parameter, but
where
I can see the link between Party & Party_Role and how the main role is
calculated specially that there is no indicator in Party_Role for that, is
it based on the date
the role is linked to certain party?

Thanks for help,

Emad


On Tue, Oct 27, 2020 at 7:59 AM Aditya Sharma <[hidden email]>
wrote:

> Hi Edmad,
>
> Here is how you can trace out the flow based on the request
>
> controller request
>
> https://github.com/apache/ofbiz-framework/blob/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml#L511
>
> view mapping
>
> https://github.com/apache/ofbiz-framework/blob/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml#L1415
>
> Screen & Forms
>
> https://github.com/apache/ofbiz-framework/blob/trunk/applications/party/widget/partymgr/PartyScreens.xml#L25
>
> https://github.com/apache/ofbiz-framework/blob/trunk/applications/party/groovyScripts/party/FindParty.groovy
>
> https://github.com/apache/ofbiz-framework/blob/trunk/applications/party/widget/partymgr/PartyForms.xml#L131
>
> performFindParty service which returns the results based upon the
> parameters
>
> https://github.com/apache/ofbiz-framework/blob/trunk/applications/party/src/main/java/org/apache/ofbiz/party/party/PartyServices.java#L1519
>
> HTH
>
> Thanks and regards,
> Aditya Sharma
>
> On Sun, Oct 25, 2020 at 4:46 PM Emad Radwan <[hidden email]> wrote:
>
> > Hi There,
> >
> > While testing the Parties module I noticed that default find party
> results
> > - returned records - are not all there in the database, this is while I
> > didn't specify any parameters. What are the logic behind this and where
> its
> > configured.
> >
> > Regards,
> >
> > Emad.
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: How Default 'Find' works

Emad Radwan
Hello everyone,

Would you please have a look at my last reply and help if you can?

Regards,

Emad

On 2020/10/30 10:34:21, Emad Radwan <[hidden email]> wrote:

> Hello Aditya,
>
> Reference to the above that was helpful, in the Parties grid I'm finding
> difficulty understanding how the 'main role' column was fetched from the
> DB. I think the following line is the configuration of the column in the
> grid - <field name="mainRole" title="${uiLabelMap.PartyMainRole}"><display
> description="${mainRole.description}"/></field> - and I went thru
> 'PerformFindPart'
> in mentioned PartyServices and although I'm not a Java expert but I guess
> the code is building the conditions based on the search parameter, but
> where
> I can see the link between Party & Party_Role and how the main role is
> calculated specially that there is no indicator in Party_Role for that, is
> it based on the date
> the role is linked to certain party?
>
> Thanks for help,
>
> Emad
>
>
> On Tue, Oct 27, 2020 at 7:59 AM Aditya Sharma <[hidden email]>
> wrote:
>
> > Hi Edmad,
> >
> > Here is how you can trace out the flow based on the request
> >
> > controller request
> >
> > https://github.com/apache/ofbiz-framework/blob/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml#L511
> >
> > view mapping
> >
> > https://github.com/apache/ofbiz-framework/blob/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml#L1415
> >
> > Screen & Forms
> >
> > https://github.com/apache/ofbiz-framework/blob/trunk/applications/party/widget/partymgr/PartyScreens.xml#L25
> >
> > https://github.com/apache/ofbiz-framework/blob/trunk/applications/party/groovyScripts/party/FindParty.groovy
> >
> > https://github.com/apache/ofbiz-framework/blob/trunk/applications/party/widget/partymgr/PartyForms.xml#L131
> >
> > performFindParty service which returns the results based upon the
> > parameters
> >
> > https://github.com/apache/ofbiz-framework/blob/trunk/applications/party/src/main/java/org/apache/ofbiz/party/party/PartyServices.java#L1519
> >
> > HTH
> >
> > Thanks and regards,
> > Aditya Sharma
> >
> > On Sun, Oct 25, 2020 at 4:46 PM Emad Radwan <[hidden email]> wrote:
> >
> > > Hi There,
> > >
> > > While testing the Parties module I noticed that default find party
> > results
> > > - returned records - are not all there in the database, this is while I
> > > didn't specify any parameters. What are the logic behind this and where
> > its
> > > configured.
> > >
> > > Regards,
> > >
> > > Emad.
> > >
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: How Default 'Find' works

adityasharma
Hi Edmad,

In row-actions, we define actions related to each row which helps us to get
related data for each record
https://github.com/apache/ofbiz-framework/blob/trunk/applications/party/widget/partymgr/PartyForms.xml#L136

Here you can see the mainRole is populated by calling getPartyMainRole
service
https://github.com/apache/ofbiz-framework/blob/trunk/applications/party/widget/partymgr/PartyForms.xml#L141

HTH

Thanks and Regards,
Aditya Sharma


On Sun, Nov 1, 2020 at 8:51 PM Emad Radwan <[hidden email]> wrote:

> Hello everyone,
>
> Would you please have a look at my last reply and help if you can?
>
> Regards,
>
> Emad
>
> On 2020/10/30 10:34:21, Emad Radwan <[hidden email]> wrote:
> > Hello Aditya,
> >
> > Reference to the above that was helpful, in the Parties grid I'm finding
> > difficulty understanding how the 'main role' column was fetched from the
> > DB. I think the following line is the configuration of the column in the
> > grid - <field name="mainRole"
> title="${uiLabelMap.PartyMainRole}"><display
> > description="${mainRole.description}"/></field> - and I went thru
> > 'PerformFindPart'
> > in mentioned PartyServices and although I'm not a Java expert but I guess
> > the code is building the conditions based on the search parameter, but
> > where
> > I can see the link between Party & Party_Role and how the main role is
> > calculated specially that there is no indicator in Party_Role for that,
> is
> > it based on the date
> > the role is linked to certain party?
> >
> > Thanks for help,
> >
> > Emad
> >
> >
> > On Tue, Oct 27, 2020 at 7:59 AM Aditya Sharma <[hidden email]>
> > wrote:
> >
> > > Hi Edmad,
> > >
> > > Here is how you can trace out the flow based on the request
> > >
> > > controller request
> > >
> > >
> https://github.com/apache/ofbiz-framework/blob/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml#L511
> > >
> > > view mapping
> > >
> > >
> https://github.com/apache/ofbiz-framework/blob/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml#L1415
> > >
> > > Screen & Forms
> > >
> > >
> https://github.com/apache/ofbiz-framework/blob/trunk/applications/party/widget/partymgr/PartyScreens.xml#L25
> > >
> > >
> https://github.com/apache/ofbiz-framework/blob/trunk/applications/party/groovyScripts/party/FindParty.groovy
> > >
> > >
> https://github.com/apache/ofbiz-framework/blob/trunk/applications/party/widget/partymgr/PartyForms.xml#L131
> > >
> > > performFindParty service which returns the results based upon the
> > > parameters
> > >
> > >
> https://github.com/apache/ofbiz-framework/blob/trunk/applications/party/src/main/java/org/apache/ofbiz/party/party/PartyServices.java#L1519
> > >
> > > HTH
> > >
> > > Thanks and regards,
> > > Aditya Sharma
> > >
> > > On Sun, Oct 25, 2020 at 4:46 PM Emad Radwan <[hidden email]>
> wrote:
> > >
> > > > Hi There,
> > > >
> > > > While testing the Parties module I noticed that default find party
> > > results
> > > > - returned records - are not all there in the database, this is
> while I
> > > > didn't specify any parameters. What are the logic behind this and
> where
> > > its
> > > > configured.
> > > >
> > > > Regards,
> > > >
> > > > Emad.
> > > >
> > >
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: How Default 'Find' works

Emad Radwan
Many thanks Aditya. It looks like I need to understand actions and the mini-lang well to be able to understand Ofbiz. I'll appreciate it if you can refer to a good documentation for the same as I failed to find a complete one. On the other hand and with the example of the 'main_role' role concept its starts getting fun but again is this only mentioned in code? Or documented somehow? I feel I understand the Party and Roles model from the book but the role of a certain party like 'main_role' is for sure not there.

Please shed some light if you can.

Regards,

Emad.

On 2020/11/02 05:33:23, Aditya Sharma <[hidden email]> wrote:

> Hi Edmad,
>
> In row-actions, we define actions related to each row which helps us to get
> related data for each record
> https://github.com/apache/ofbiz-framework/blob/trunk/applications/party/widget/partymgr/PartyForms.xml#L136
>
> Here you can see the mainRole is populated by calling getPartyMainRole
> service
> https://github.com/apache/ofbiz-framework/blob/trunk/applications/party/widget/partymgr/PartyForms.xml#L141
>
> HTH
>
> Thanks and Regards,
> Aditya Sharma
>
>
> On Sun, Nov 1, 2020 at 8:51 PM Emad Radwan <[hidden email]> wrote:
>
> > Hello everyone,
> >
> > Would you please have a look at my last reply and help if you can?
> >
> > Regards,
> >
> > Emad
> >
> > On 2020/10/30 10:34:21, Emad Radwan <[hidden email]> wrote:
> > > Hello Aditya,
> > >
> > > Reference to the above that was helpful, in the Parties grid I'm finding
> > > difficulty understanding how the 'main role' column was fetched from the
> > > DB. I think the following line is the configuration of the column in the
> > > grid - <field name="mainRole"
> > title="${uiLabelMap.PartyMainRole}"><display
> > > description="${mainRole.description}"/></field> - and I went thru
> > > 'PerformFindPart'
> > > in mentioned PartyServices and although I'm not a Java expert but I guess
> > > the code is building the conditions based on the search parameter, but
> > > where
> > > I can see the link between Party & Party_Role and how the main role is
> > > calculated specially that there is no indicator in Party_Role for that,
> > is
> > > it based on the date
> > > the role is linked to certain party?
> > >
> > > Thanks for help,
> > >
> > > Emad
> > >
> > >
> > > On Tue, Oct 27, 2020 at 7:59 AM Aditya Sharma <[hidden email]>
> > > wrote:
> > >
> > > > Hi Edmad,
> > > >
> > > > Here is how you can trace out the flow based on the request
> > > >
> > > > controller request
> > > >
> > > >
> > https://github.com/apache/ofbiz-framework/blob/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml#L511
> > > >
> > > > view mapping
> > > >
> > > >
> > https://github.com/apache/ofbiz-framework/blob/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml#L1415
> > > >
> > > > Screen & Forms
> > > >
> > > >
> > https://github.com/apache/ofbiz-framework/blob/trunk/applications/party/widget/partymgr/PartyScreens.xml#L25
> > > >
> > > >
> > https://github.com/apache/ofbiz-framework/blob/trunk/applications/party/groovyScripts/party/FindParty.groovy
> > > >
> > > >
> > https://github.com/apache/ofbiz-framework/blob/trunk/applications/party/widget/partymgr/PartyForms.xml#L131
> > > >
> > > > performFindParty service which returns the results based upon the
> > > > parameters
> > > >
> > > >
> > https://github.com/apache/ofbiz-framework/blob/trunk/applications/party/src/main/java/org/apache/ofbiz/party/party/PartyServices.java#L1519
> > > >
> > > > HTH
> > > >
> > > > Thanks and regards,
> > > > Aditya Sharma
> > > >
> > > > On Sun, Oct 25, 2020 at 4:46 PM Emad Radwan <[hidden email]>
> > wrote:
> > > >
> > > > > Hi There,
> > > > >
> > > > > While testing the Parties module I noticed that default find party
> > > > results
> > > > > - returned records - are not all there in the database, this is
> > while I
> > > > > didn't specify any parameters. What are the logic behind this and
> > where
> > > > its
> > > > > configured.
> > > > >
> > > > > Regards,
> > > > >
> > > > > Emad.
> > > > >
> > > >
> > >
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: How Default 'Find' works

adityasharma
Hi Emad,

This might help
https://www.hotwaxsystems.com/ofbiz/ofbiz-tutorials/ofbiz-tutorial-enhancing-the-product-list-screen/

XSDs can be a great help to find available elements and their attributes
http://ofbiz.apache.org/dtds/widget-screen.xsd
http://ofbiz.apache.org/dtds/widget-form.xsd

The example component can also be a great place to take reference from.
https://github.com/apache/ofbiz-plugins/tree/trunk/example

If you haven't followed the basic tutorial following links might help:

https://cwiki.apache.org/confluence/display/OFBIZ/OFBiz+Tutorial+-+A+Beginners+Development+Guide+for+17.12
https://www.youtube.com/watch?v=bIS2kftvsq4&list=PLobIkeUbRXqc-lwvbdbajPJdbWjFm82Dj

Thanks and regards,
Aditya Sharma


On Mon, Nov 2, 2020 at 11:09 PM Emad Radwan <[hidden email]> wrote:

> Many thanks Aditya. It looks like I need to understand actions and the
> mini-lang well to be able to understand Ofbiz. I'll appreciate it if you
> can refer to a good documentation for the same as I failed to find a
> complete one. On the other hand and with the example of the 'main_role'
> role concept its starts getting fun but again is this only mentioned in
> code? Or documented somehow? I feel I understand the Party and Roles model
> from the book but the role of a certain party like 'main_role' is for sure
> not there.
>
> Please shed some light if you can.
>
> Regards,
>
> Emad.
>
> On 2020/11/02 05:33:23, Aditya Sharma <[hidden email]> wrote:
> > Hi Edmad,
> >
> > In row-actions, we define actions related to each row which helps us to
> get
> > related data for each record
> >
> https://github.com/apache/ofbiz-framework/blob/trunk/applications/party/widget/partymgr/PartyForms.xml#L136
> >
> > Here you can see the mainRole is populated by calling getPartyMainRole
> > service
> >
> https://github.com/apache/ofbiz-framework/blob/trunk/applications/party/widget/partymgr/PartyForms.xml#L141
> >
> > HTH
> >
> > Thanks and Regards,
> > Aditya Sharma
> >
> >
> > On Sun, Nov 1, 2020 at 8:51 PM Emad Radwan <[hidden email]>
> wrote:
> >
> > > Hello everyone,
> > >
> > > Would you please have a look at my last reply and help if you can?
> > >
> > > Regards,
> > >
> > > Emad
> > >
> > > On 2020/10/30 10:34:21, Emad Radwan <[hidden email]> wrote:
> > > > Hello Aditya,
> > > >
> > > > Reference to the above that was helpful, in the Parties grid I'm
> finding
> > > > difficulty understanding how the 'main role' column was fetched from
> the
> > > > DB. I think the following line is the configuration of the column in
> the
> > > > grid - <field name="mainRole"
> > > title="${uiLabelMap.PartyMainRole}"><display
> > > > description="${mainRole.description}"/></field> - and I went thru
> > > > 'PerformFindPart'
> > > > in mentioned PartyServices and although I'm not a Java expert but I
> guess
> > > > the code is building the conditions based on the search parameter,
> but
> > > > where
> > > > I can see the link between Party & Party_Role and how the main role
> is
> > > > calculated specially that there is no indicator in Party_Role for
> that,
> > > is
> > > > it based on the date
> > > > the role is linked to certain party?
> > > >
> > > > Thanks for help,
> > > >
> > > > Emad
> > > >
> > > >
> > > > On Tue, Oct 27, 2020 at 7:59 AM Aditya Sharma <
> [hidden email]>
> > > > wrote:
> > > >
> > > > > Hi Edmad,
> > > > >
> > > > > Here is how you can trace out the flow based on the request
> > > > >
> > > > > controller request
> > > > >
> > > > >
> > >
> https://github.com/apache/ofbiz-framework/blob/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml#L511
> > > > >
> > > > > view mapping
> > > > >
> > > > >
> > >
> https://github.com/apache/ofbiz-framework/blob/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml#L1415
> > > > >
> > > > > Screen & Forms
> > > > >
> > > > >
> > >
> https://github.com/apache/ofbiz-framework/blob/trunk/applications/party/widget/partymgr/PartyScreens.xml#L25
> > > > >
> > > > >
> > >
> https://github.com/apache/ofbiz-framework/blob/trunk/applications/party/groovyScripts/party/FindParty.groovy
> > > > >
> > > > >
> > >
> https://github.com/apache/ofbiz-framework/blob/trunk/applications/party/widget/partymgr/PartyForms.xml#L131
> > > > >
> > > > > performFindParty service which returns the results based upon the
> > > > > parameters
> > > > >
> > > > >
> > >
> https://github.com/apache/ofbiz-framework/blob/trunk/applications/party/src/main/java/org/apache/ofbiz/party/party/PartyServices.java#L1519
> > > > >
> > > > > HTH
> > > > >
> > > > > Thanks and regards,
> > > > > Aditya Sharma
> > > > >
> > > > > On Sun, Oct 25, 2020 at 4:46 PM Emad Radwan <[hidden email]
> >
> > > wrote:
> > > > >
> > > > > > Hi There,
> > > > > >
> > > > > > While testing the Parties module I noticed that default find
> party
> > > > > results
> > > > > > - returned records - are not all there in the database, this is
> > > while I
> > > > > > didn't specify any parameters. What are the logic behind this and
> > > where
> > > > > its
> > > > > > configured.
> > > > > >
> > > > > > Regards,
> > > > > >
> > > > > > Emad.
> > > > > >
> > > > >
> > > >
> > >
> >
>