Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

dynamic inlinestyle background color

3174772Nov 29 2016 — edited Dec 1 2016

Hi experts,

I am using jdev 12.2.1. i am writing inline style and inside that i am hard coding the background color. i want it to come from Bean property. for that i created new bean and in that , a string variable i declared and assigned a color.. when i am using the variable, i am getting blank background. it was like :

inlineStyle="#{node.highlight=='YES'? 'width:40px;height:40px;background-color:#309fdb;border-radius:50%;padding:8px;' "

i wrote:

<af:image source="/oracle/apps/vof/common/images/serial_48_white.png"

                                                          shortDesc="#{bnd.SERIAL_NUMBER}"

                                                          inlineStyle="#{node.highlight=='YES'? 'width:40px;height:40px;#{ColorCache.green};border-radius:50%;padding:8px;' : 'width:40px;height:40px;#{ColorCache.green};border-radius:50%;padding:8px;'}"

                                                          id="i1"/>

ColorCache.java

--------

package oracle.apps.vof.trace.bean;

public class ColorCache {

  

    String green;

   

    public ColorCache() {

        super();

    }

}

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 29 2016
Added on Nov 29 2016
23 comments
451 views