on 08-01-2005 9:40 AM
Hi,
how can i change the chartType and dimension of a Business Graphics UI during running the application.
Sebastian
Hi,
Write this code in "wdDoModify" method...it should work !!!
Regards, Anilkumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I think somewhere you are missing the "ContextMapping" and what is the cardinality of the Node ??
If the cardinality is 0..n then you need to add the element to the node again.
Ex:wdContext.Node<<NodeName>>.addElement(<ElementName>);
Regards, Anilkumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
public void onPlugBgIN(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
{
WDBusinessGraphicsType type = wdThis.wdGetSimpleGraphicsController().wdGetContext().currentBgContextElement().getBgType();
wdContext.currentBgContextElement().setBgType(type);
I want to set the Value in the onPlugBgIN Method. The user should select his own type and dimension. So i have 2 Views. One to select the type and dimension and one to show the Business Graphic UI.
This code doesn´t work either.
WDBusinessGraphicsType type = null;
wdContext.currentBgContextElement().setBgType(type.LINES);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
These properties "dimension" and "chartType" in the BusinessGraphics element are not bindable to the context.
To change such a non-bindable property from an event handler or plug-method, you can store the new value in this method and later set it to the UI element in method wdDoModifyView().
For storing the value you can use a context attribute of the view controller (as shown below).
void onPlugXYZ()
{
wdContext.currentContextElement()
.setChartType(WDBusinessGraphicsType.BARS);
}
static void wdDoModifyView(...)
{
IWDBusinessGraphics gfx = (IWDBusinessGraphics)
view.getElement("graphicsID");
gfx.setChartType(
wdContext.currentContextElement().getChartType()
);
}
Armin
Hi
Where are you setting the value ??
I mean categoryElement.setBgType(<<Value>>);
Regards, Anilkumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
okay now i can change the chartType frm the wdDoModifyView method. But i am not able to change this Value from a Context Variable.
IPrivateSimpleGraphicsView.IBgContextElement categoryElement;
categoryElement = wdContext.createBgContextElement();
WDBusinessGraphicsType type = null;
type = categoryElement.getBgType();
IWDBusinessGraphics myBG = (IWDBusinessGraphics) view.getElement("BusinessGraphic");
myBG.setChartType(type);
But always the standart Bars chartType is choosen. where my misstake?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
How do i get de Business Graphic. It doesn´t work correctly:
IWDBusinessGraphics myBG = (IWDBusinessGraphics) view.getElement("");
view.getElement doesn´t work. I replaced already view against my view Name. But the Method getElement doesn´t exists.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sebastian,
Try this code
IWDBusinessGraphics myBG = (IWDBusinessGraphics)view.getElement("<Business Graphics id>");
WDBusinessGraphicsType chartType = null;
WDBusinessGraphicsDimension dimension = null;
myBG.setChartType(chartType.SPEEDOMETER);
myBG.setDimension(dimension.THREE);
Regards,
Jaydeep
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.