Skip to Content
0
Former Member
Sep 23, 2008 at 08:02 AM

Is it a bug or a feature?

6 Views

Hi,

I'm using Web DynPro 7.0 SP12. I have devoloped an Application with two Attributes: Count per Package and Package Count. For these Attributes I have add calculated tmp-Attributes which are bound to my view.

The coding for these is the following:

public int getArticelTmpCountperPackage(IPrivateKalkComp.IArticelElement element)

{

//@@begin getArticelTmpCountperPackage(IPrivateKalkComp.IArticelElement)

return wdContext.currentArticelElement().getCountperPackage();

//@@end

}

public void setArticelTmpCountperPackage(IPrivateKalkComp.IArticelElement element, int value)

{

//@@begin setArticelTmpCountperPackage(IPrivateKalkComp.IArticelElement, int)

wdContext.currentArticelElement().setCountperPackage(value);

wdContext.currentArticelElement().setPackageCount(

new BigDecimal(

(double) wdContext.currentArticelElement().getOrderCount()

/ (double) wdContext

.currentArticelElement()

.getCountperPackage())

.divide(new BigDecimal(1), 0, BigDecimal.ROUND_UP)

.intValue());

//@@end

}

public int getArticelTmpPackageCount(IPrivateKalkComp.IArticelElement element)

{

//@@begin getArticelTmpPackageCount(IPrivateKalkComp.IArticelElement)

return wdContext.currentArticelElement().getPackageCount();

//@@end

}

public void setArticelTmpPackageCount(IPrivateKalkComp.IArticelElement element, int value)

{

//@@begin setArticelTmpPackageCount(IPrivateKalkComp.IArticelElement, int)

wdContext.currentContextElement().setPackageCount(value);

wdContext.currentArticelElement().setCountperPackage(

new BigDecimal(

(double) wdContext.currentArticelElement().getOrderCount()

/ wdContext.currentContextElement().getPackageCount())

.divide(new BigDecimal(1), 0, BigDecimal.ROUND_UP)

.intValue());

//@@end

}

You can see, what I want to do?!

Okay.. it works fine, if i have changed the PackageCount or the CountperPackage at last, before I make the roundtrip. If I insert something into another attribute, there is nothing calculated. Bug or Feature or is anything wrong?

Greets,

Peter