cancel
Showing results for 
Search instead for 
Did you mean: 

Background of UIelements

Former Member
0 Kudos

Hi all,

is it possible to set a background (picture or color) of an UIelement (e.g. a container) ?

Challenge 1: I need a dynamic text in front of a picture

Challenge 2: the only colors I found where set by the background-attributes. But this colors are (censored). What about Yellow or whatever I want ?

Has somebody an idea or a code fragment ?

Regards

Uwe

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Uwe,

as far as I know the things you want to achieve are not possible with WD ABAP.

One of the goals of WD is to have a standardized UI. For that sake you are not able to change colors to anything you like. Instead semantic colors are used. The definition of what RGB-value is for example used by semantic color 'critical' is done in the portal (if your app runs in the portal) within the portal theme editor. You can define the colors and a lot of other css-values there.

I think there is no UI element at hand which would allow defining a background image. Stacking two elements on top of each other e.g. image and textview is not possible as well, so my first guess is that you won't be able to do such things...

The only hack that I see would be creating an external html page, for example as a BSP application, providing the image and the text. Then include this page within an IFrame in your WD ABAP View. Either get the text in the BSP app or pass it via url parameter. So that would be a workaround for including things that are not possible within WD ABAP.

Regards,

Alex

Former Member
0 Kudos

Hi Alex,

this is right the way I did it until now. But it doesn't really satisfies me.

For a customer without a portal I need a window header with his corporate identity.

Ok, I will stay at BSP's for that header area...

Bye

Uwe

Answers (1)

Answers (1)

Former Member
0 Kudos

The forground features semantic color (7 from memory) and Design which changes font features such as size, italics and sometime use a font background.

However the standard textview has no background concept.

That comes from the under lying container as it should.

However, christmas tree effects are still possible

Background can be controlled within the TABLE UI.

Each celleditor has a cell design option. This can be changed per column or even per cell

using cell variants.

16 different coloured backgrounds are possible.

So yes you can chnage the background colors. You just need to use a useful container

of sorts. Table being a good example.

How to test:

Build a simple view.

Add a context with a cardinaltiy 1:1 node.

define the following attributes:

VALUE type string

DESIGN type WDUI_TEXT_VIEW_DESIGN

CELL_DESIGN type WDUI_TABLE_CELL_DESIGN

Sematic_color type WDUI_TEXTVIEW_SEM_COL

Use table wizard to create a table.

Change the design, cell_design and semantic color fields to be dropdownbykey .

Add an empty action to each ddbyk or add a simple button to view.Empty code, just

get the roundtrip.

You can now play with flashing lights.

Cheers

Phil.

Former Member
0 Kudos

Hi Phil,

I'm sorry, but I don't really understand your excample.

I have assigned the new node with the 4 attributes to the table. After starting your excample I only have the empty table with the filter line and the 4 attributes as dropdown in it.

But how the attributes should manipulate the cell attributes ?

Something wrong or missing ?

Regards

Uwe

Former Member
0 Kudos

The idea was a simple node with automatic element due to cardinality 1:1.

A table with 4 fields is created point at this node.

the properties of the first field the actual value field point the other fields so when you change

the other 3 fields, the first field's appearance changes immediately.

Roundtrips need to be triggered by way of action. The action can be an empty method.

So.

TABLE=======================================

VALUE PROP1 PROP2 PROP3 all point back to node for their value.

VALUE also refers to PROP1 PROP2 and PROP3 for the visual effects.

Hope that makes it clearer.

Good luck with WDA.

Cheers

Phil.

Former Member
0 Kudos

Hi Phil,

it works now.

But I think, my needs can not be developed with the standard WDA.

Like I said above, I will stay at the BSPs for these requirements.

Anyway: thank you for your ideas...

Regards

Uwe