I am probably missing something easy, but I am at a loss and I am hoping someone can help.
Using Version 7.1.1. I have a CountryRaDetails entity that has a many to one association with Project and Country entities.
In the view for the countryRaDetails entity I see that the attribute projectNo is available.
On the PROJECT editor screen I have the countryRaDetails table embedded on the page. Currently the countryRaDetails table is showing all projects.
I would like this table to only show entries for the current project number that is opened.
The project-edit.xml file
<instance id="projectDc"
class="com.chi.starship.entity.Project"
view="project-view">
<loader/>
<collection id="projectSiteDc" property="projectSite"/>
<collection id="productDc" property="product"/>
</instance>
<collection id="countryRaDetailsDc" class="com.chi.starship.entity.CountryRaDetails" view="countryRaDetails-view">
<loader id="countryRaDetailsDl">
<query><![CDATA[select e from starship_CountryRaDetails e ]]></query>
</loader>
</collection>
<table id="countryRaTable" dataContainer="countryRaDetailsDc" width="100%" height="200px">
<actions>
<action id="create" type="create"/>
<action id="edit" type="edit"/>
<action id="remove" type="remove"/>
</actions>
<columns>
<column id="region" caption="Region" />
<column id="country" caption="Country" />
<column id="project" caption="Project" />
<column id="raSubmissionPlanned" caption="Submission Planned" />
<column id="raSubmissionActual" caption="Submission Actual" />
<column id="raApprovalPlanned" caption="Approval Planned" />
<column id="raApprovalActual" caption="Approval Actual" />
<!--<column id="regionName"/>-->
</columns>
<buttonsPanel>
<button id="createRaButton" action="countryRaTable.create"
caption="Add RA Details"/>
<button id="editRaButton" action="countryRaTable.edit" stylename="friendly"
caption="Edit RA Details"/>
<button id="removeRaButton" action="countryRaTable.remove" stylename="danger"/>
</buttonsPanel>
</table>
In the countryRaDetailsDc collection if I hard code the specific project number it filters as expected.
select e from starship_CountryRaDetails e where e.project.projectNo = ‘1234’
I can’t seem to figure out how to filter based on the current opened Project.
Any help would be much appreciated.