ofbiz-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shiny Vijyaraghavan <shinyvijayaragha...@gmail.com>
Subject How to pass partyID to ListEmplLeaves form
Date Wed, 05 May 2010 01:07:12 GMT
Hi,

I am pretty new to Ofbiz. I am trying to create a "Total available leave"
function in OfBiz HR module. I would like to reuse the ListEmplLeaves form
to list out the current taken leaves of the employee. Sssuming I have the
partyId available, which I would take from the session, How do I pass the
partyID to the below?

*This is my screen:*
<screen name="TotalLeaveBalance">
        <section>
            <actions>
                <set field="titleProperty" value="HumanLeaveBalance"/>
                <set field="headerItem" value="Leave Balance"/>
                <set field="emplLeaveCtx" from-field="10010" type="Long"/>
               * <set field="partyId" value="10010" type="Long"/> <!-- I
have hardcoded the party ID for now.-->*
            </actions>
            <widgets>
                <decorator-screen name="main-decorator"
location="${parameters.mainDecoratorLocation}">
                 <decorator-section name="search-results">
                     <include-form name="ListEmplLeaves"
location="component://humanres/widget/forms/EmplLeaveForms.xml"/>
                 </decorator-section>
                </decorator-screen>
            </widgets>
        </section>
    </screen>

*This is the already available for Form to list employee leaves in Ofbiz HR
module:*
 <form name="ListEmplLeaves" type="multi" use-row-submit="true"
separate-columns="true" target="updateEmplLeaveExt?partyId=${partyId}"
list-name="listIt" paginate-target="FindEmplLeaves"
        odd-row-style="alternate-row" header-row-style="header-row-2"
default-table-style="basic-table hover-bar">
        <actions>
            <service service-name="performFind" result-map="result"
result-map-list="listIt">
                <field-map field-name="inputFields"
from-field="parameters"/>
                <field-map field-name="entityName" value="EmplLeave"/>
                <field-map field-name="orderBy" value="fromDate"/>
            </service>
            <set field="insideEmployee"
from-field="parameters.insideEmployee"/>
        </actions>
        <alt-target use-when="insideEmployee==null"
target="updateEmplLeave"/>
        <auto-fields-service service-name="updateEmplLeave"/>
        <field name="partyId"><display/></field>
        <field name="leaveTypeId"><display/></field>
        <field name="fromDate"><display/></field>
        <field name="_rowSubmit" title="${uiLabelMap.CommonSelect}"><hidden
value="Y"/></field>
        <field name="submitButton" title="${uiLabelMap.CommonSubmit}"
widget-style="smallSubmit"><submit/></field>
    </form>

Thanks,
Shiny

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message