my nikka. what the fukk is that? can't tell where the parameters begin and end.
Bruh Im about to give you some back ground.....we got this table we filling up with getters......thats all good...but I got to this page where some of the getters are "derived"...meaning they are built off other getters...not from the database.....
like so:
funding bean has this:
public BigDecimal getRomTotalCost()
{
return MgmtviewBO.assumeNullBigDecimalAdd(plannedLabor, plannedMaterial);
}
This just adds to getters together and returns that to
getRomTotalCost()
Here is the problem...I need to loop through all the beans in a list and make a "total" row...thats easy using JSTL...but I have to dothis with backend J2EE
So what I had to do was create a "setter" that took those 2 parmeters:
public void setRomTotalCost(BigDecimal plannedLabor, BigDecimal plannedMaterial)
{
this.plannedLabor = plannedLabor;
this.plannedMaterial = plannedMaterial;
}
now in the action page...I loop through...and call that "getter" and
add it to itself with this method
MgmtviewBO.totalsBigDecimalAdd() and store it in the
setter
voila!!!!
// Create totals bean.
for (FundingMwslinBean bean : beans)
{
totals.setRomTotalCost(MgmtviewBO.totalsBigDecimalAdd(totals.getPlannedLabor(), bean.getPlannedLabor()), MgmtviewBO.totalsBigDecimalAdd(totals.getPlannedMaterial(), bean.getPlannedMaterial()));
}
beans.add(totals);
If you look closely to can see that
setRomTotalCost above is taking 2 parameters.....
its alot more involved..im just trying to type the general idea....