Hello all,
I am working on the jira issue
https://issues.apache.org/jira/browse/OFBIZ-1642.

I am getting problem of being shown same searched result twice instead of
once, this is happening because I iterated a list and in that list also
iterated a second list and applied a condition of matching partyId of both
the list to display searched result including a form. If I put the partyId
in parameters of both the list and compare the partyIds' outside the
iteration then I get only last  partyId rather than all.When I search by
address1,address2 etc. then I need to conceal some fields like area code,
contact number etc. and vice versa , so I how can I do so in form widget.


Here is the code for screen

<screen name="FindContact">
        <section>
            <actions>
                <set field="titleProperty" value="MarketingContactPage"/>
                <set field="labelTitleProperty"
value="MarketingContactInformation"/>
                <set field="tabButtonItem" value="FindContacts"/>
                <service service-name="findParty"
auto-field-map="parameters" result-map-name="findPartyMap"/>
            </actions>
            <widgets>
                <decorator-screen name="main-decorator"
location="component://marketing/widget/sfa/CommonScreens.xml">
                    <decorator-section name="body">
                        <container style="screenlet">
                            <container style="screenlet-title-bar">
                                <container style="h3">
                                    <label text="${
uiLabelMap.PageTitleFindContact}"/>
                                </container>
                            </container>
                            <container style="screenlet-body">
                                <section>
                                    <widgets>
                                        <container style="button-bar"><link
target="editContact" text="${uiLabelMap.MarketingNewContact}"
style="buttontext"/></container>
                                        <include-form name="FindContact"
location="component://marketing/widget/sfa/FindContactForms.xml"/>
                                    </widgets>
                                </section>
                            </container>
                        </container>
                        <container style="screenlet">
                            <container style="screenlet-title-bar">
                                <container style="h3">
                                    <label text="${
uiLabelMap.PageTitleFindContact}"/>
                                </container>
                            </container>
                            <container style="screenlet-body">
                                <section>
                                    <actions>
                                        <set field="partyList" from-field="
findPartyMap.partyList" type="List"/>
                                    </actions>
                                    <widgets>
                                        <iterate-section
list-name="partyList" entry-name="party">
                                            <section>
                                                <actions>
                                                    <set field="partyIdList"
from-field="party.partyId" type="List"/>
                                                    <set field="
parameters.partyIdTo" from-field="party.partyIdTo"/>
                                                </actions>
                                                <widgets>
                                                    <iterate-section
list-name="partyIdList" entry-name="contactPartyId">
                                                        <section>
                                                            <actions>
                                                                <entity-and
entity-name="PartyAndContactMech" list-name="partyAndContactMechList">

<field-map field-name="partyId" env-name="contactPartyId"/>

<field-map field-name="roleTypeId" value="CUSTOMER"/>

</entity-and>
                                                            </actions>
                                                            <widgets>

<iterate-section list-name="partyAndContactMechList"
entry-name="partyAndContactMech">

<section>

<actions>

<set field="parameters.partyContactMechPartyId" from-field="
partyAndContactMech.partyId" global="true"/>

</actions>

<widgets/>

</section>

</iterate-section>
                                                                <section>

<condition>

<if-compare-field field-name="contactPartyId" operator="equals"
to-field-name="parameters.partyContactMechPartyId"/>

</condition>

<widgets>

<include-form  name="ListContact"
location="component://marketing/widget/sfa/FindContactForms.xml"></include-form>

</widgets>
                                                                </section>
                                                            </widgets>
                                                         </section>
                                                    </iterate-section>
                                                </widgets>
                                            </section>
                                        </iterate-section>
                                    </widgets>
                                </section>
                            </container>
                        </container>
                    </decorator-section>
                </decorator-screen>
            </widgets>
        </section>
    </screen>
</screens>

Reply via email to