-1

I view link demo of openxava.http://demo.sicflex.com/group/empresas-abc/inventory-items. - I enter to Inventory Management->Item.when i choose "Inventory Group" then "Inv.Sub Group " will have list of Inventory Group. Help me. Thank All.

NoNaMe
  • 6,020
  • 30
  • 82
  • 110

1 Answers1

0

You should use a @SearchAction in the inventory group reference.

You can annotate the reference in this way:

@ManyToOne(fetch=FetchType.LAZY) @SearchAction("MyReference.search")
private Seller seller;

Then you define the action in controllers.xml, thus:

<controller name="MyReference">
  <action name="search" hidden="true"
     class="org.openxava.test.actions.MySearchAction"
     image="images/search.gif">
  </action>
</controller>

Finally, you have to write your own search action where you can define your own filter:

public class MySearchAction extends ReferenceSearchAction {

   public void execute() throws Exception {
      super.execute(); // The standard search behaviour
      getTab().setBaseCondition("${number} < 3"); // Adding a filter to the list
   }

}
javierpaniza
  • 677
  • 4
  • 10