Java Code Examples for ims.framework.controls.DynamicGridColumn.equals()

The following are Jave code examples for showing how to use equals() of the ims.framework.controls.DynamicGridColumn class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 5 votes
@Override
protected void onDyngrdReferralsColumnHeaderClicked(DynamicGridColumn column) 
{
	if (column.equals(getColumn(COL20KPI)))
	{
		if(form.getLocalContext().getSortOrder20DayKpi() == null)
			form.getLocalContext().setSortOrder20DayKpi(SortOrder.ASCENDING);
		
		CatsReferralListManualAssemblyVoCollection voColl = new CatsReferralListManualAssemblyVoCollection();
		
		for (int i = 0 ; i < form.dyngrdReferrals().getRows().size() ; i++)
			voColl.add(((CatsReferralListManualAssemblyVo) form.dyngrdReferrals().getRows().get(i).getValue()));	
		
		if(form.getLocalContext().getSortOrder20DayKpi().equals(SortOrder.ASCENDING))
		{
			form.getLocalContext().setSortOrder20DayKpi(SortOrder.DESCENDING);
			voColl.sort(SortOrder.DESCENDING);
		}
		else if(form.getLocalContext().getSortOrder20DayKpi().equals(SortOrder.DESCENDING))
		{
			form.getLocalContext().setSortOrder20DayKpi(SortOrder.ASCENDING);
			voColl.sort(SortOrder.ASCENDING);
		}
			
		populateGrid(voColl, form.dyngrdReferrals().getSelectedRow() != null ? (CatsReferralListManualAssemblyVo)form.dyngrdReferrals().getSelectedRow().getValue() : null);
	}
	else if(column.equals(getColumn(COLDAYSLEFT)))//WDEV-12994
	{
		if (form.getLocalContext().getSortOrderDaysLeft() == null || !form.getLocalContext().getSortOrderDaysLeft().equals(SortOrder.ASCENDING))
			form.getLocalContext().setSortOrderDaysLeft(SortOrder.ASCENDING);
		else
			form.getLocalContext().setSortOrderDaysLeft(SortOrder.DESCENDING);
		
		populateGrid(sortGridByDaysLeft(), form.dyngrdReferrals().getSelectedRow() != null ? (CatsReferralListManualAssemblyVo)form.dyngrdReferrals().getSelectedRow().getValue() : null);
	}
}
 
Example 2
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 5 votes
@Override
protected void onDyngrdNotesColumnHeaderClicked(DynamicGridColumn column)
{
	DynamicGridColumn colDate = getCol(COL_DATE_FLAT);
	
	if(colDate.equals(column))
	{
		if(form.getLocalContext().getDateSortOrder() == null)
		{
			form.getLocalContext().setDateSortOrder(SortOrder.DESCENDING);
		}
		else
		{
			form.getLocalContext().setDateSortOrder(SortOrder.ASCENDING.equals(form.getLocalContext().getDateSortOrder()) ? SortOrder.DESCENDING : SortOrder.ASCENDING);
		}
		
		sortFlatGrid(false);
	}
	
	DynamicGridColumn colHcp = getCol(COL_CONSULTANT_FLAT);
	
	if(colHcp.equals(column))
	{
		if(form.getLocalContext().getHcpSortOrder() == null)
		{
			form.getLocalContext().setHcpSortOrder(SortOrder.ASCENDING);
		}
		else
		{
			form.getLocalContext().setHcpSortOrder(SortOrder.ASCENDING.equals(form.getLocalContext().getHcpSortOrder()) ? SortOrder.DESCENDING : SortOrder.ASCENDING);
		}
		
		sortFlatGridAfterConsultant();
	}
	
	setSelectedInstance();
	updateControlsState();
}
 
Example 3
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 5 votes
@Override
protected void onDyngrdDischargeDetailsColumnHeaderClicked(DynamicGridColumn column)
{
	
	if (column.equals(getCol("DISCHARGE_DATE")))
	{
		if(form.getLocalContext().getSortOrderDateOfDischarge() == null)
			form.getLocalContext().setSortOrderDateOfDischarge(SortOrder.ASCENDING);
		
		EdischargeListSTHKManualAssemblyVoCollection voColl = new EdischargeListSTHKManualAssemblyVoCollection();
		
		for (int i = 0 ; i < form.dyngrdDischargeDetails().getRows().size() ; i++)
			voColl.add(((EdischargeListSTHKManualAssemblyVo) form.dyngrdDischargeDetails().getRows().get(i).getValue()));	
		
		if(form.getLocalContext().getSortOrderDateOfDischarge().equals(SortOrder.ASCENDING))
		{
			form.getLocalContext().setSortOrderDateOfDischarge(SortOrder.DESCENDING);
			voColl.sort(new DischargeComparator(SortOrder.DESCENDING));					// WDEV-13138 - Sort using custom comparator
		}
		else if(form.getLocalContext().getSortOrderDateOfDischarge().equals(SortOrder.DESCENDING))
		{
			form.getLocalContext().setSortOrderDateOfDischarge(SortOrder.ASCENDING);
			voColl.sort(new DischargeComparator(SortOrder.ASCENDING));					// WDEV-13138 - Sort using custom comparator
		}
			
		Object selected = form.dyngrdDischargeDetails().getValue();
		form.dyngrdDischargeDetails().getRows().clear();
		
		populateGrid(voColl, form.dyngrdDischargeDetails().getSelectedRow() != null ? (EdischargeListSTHKManualAssemblyVo)form.dyngrdDischargeDetails().getSelectedRow().getValue() : null);
		
		form.dyngrdDischargeDetails().setValue(selected);
		}
}