Listpage
interaction class:( NetReservationListPageInteraction-interaction class,
NetReservationListPage-listpage
name , btnReserve-button name(autodeclaration yes),
NetReservation_NoFilter-listpage
query, NetReservationTable-listpage table)
Class declaration:
public class
NetReservationListPageInteraction extends
ListPageInteraction
{
smmLeadTable
smmLeadTable;
smmActivityParentLinkTable
smmActivityParentLinkTable;
QueryBuildRange
leadProcessRange;
HierarchyName selectedProcess;
NetReservationTable
netReservationTable;
}
selectionChanged:
public void
selectionChanged()
{
super();
this.setButtonEnabled();
if(netReservationTable.RentalApprovalState ==
ApprovalState::WorkflowCompleted)// &&
NetReservationListPage.& NetAgreement.FinalizeAgree == NoYes::No)
this.listPage().actionPaneControlEnabled(formControlStr(NetReservationListPage,btnReserve),true);
else
this.listPage().actionPaneControlEnabled(formControlStr(NetReservationListPage,btnReserve),false);
}
setButtonEnabled:
void setButtonEnabled ()
{
boolean isCustomer;
smmOpportunityTable
smmOpportunityTable;
boolean enableContacts = false;
DirOrgPersonRelations
dirOrgPersonRelations;
netReservationTable = this.listPage().activeRecord(queryDataSourceStr(NetReservation_NoFilter,
NetReservationTable));
/* isCustomer =
DirPartyTable::isCustomer(netReservationTable.Party);
if (!netReservationTable.RecId ||
!netReservationTable.Party || isCustomer)
{
this.listPage().actionPaneControlEnabled(formControlStr(NetReservationListPage,createCustomer),false);
}
else
{
this.listPage().actionPaneControlEnabled(formControlStr(NetReservationListPage,createCustomer),true);
}
this.listPage().actionPaneControlEnabled(formControlStr(NetReservationListPage,customerButton),netReservationTable.RecId
!= 0 && isCustomer);
*/
}
setDBEnabled:
public void
setDBEnabled()
{
boolean isDraft;
;
/*
// DNS-Hussain on 12-09-2013
netReservationTable =
this.listPage().activeRecord(queryDataSourceStr(NetReservation_NoFilter, NetReservationTable));
isDraft =
netReservationTable.RentalApprovalState == ApprovalState::NotSubmitted;
if(NetReservationTable.RentalApprovalState
!= ApprovalState::NotSubmitted)
{
NetReservationTable_ds.allowEdit(isDraft);
NetReservationTable_ds.allowDelete(isDraft);
}
// end.
this.setButtonEnabled();
if(netReservationTable.RentalApprovalState
== ApprovalState::WorkflowCompleted)// && NetReservationListPage.&
NetAgreement.FinalizeAgree == NoYes::No)
this.listPage().actionPaneControlEnabled(formControlStr(NetReservationListPage,btnReserve),true);
else
this.listPage().actionPaneControlEnabled(formControlStr(NetReservationListPage,btnReserve),false);
*/
}
fefe
ReplyDelete