Skin two components differently, based on styleClass

Hi. I'm doing some skinning of my ADF 11g app, and I'm having some trouble using the ADF selectors to achieve exactly what I want. Applying style rules that affect all components of a given type is working brilliantly with the various ADF selectors, however I'm having trouble when I need to style one component in one way, and another component (of the same type) a different way.
Imagine I have two af:panelBox components. One I want skinned with red header (and rounded corners), the other I want skinned with green header (and rounded corners). If I apply styleClass values to the panelBox tags like MyGreenBox and MyRedBox, how do I then use these classes to achieve what I need?
I know I can attach a class to the panelBox selector like:
af|panelBox.MyRedBox
However for the corners I need to use a selector like:
af|panelBox::header-start
So naturally, I tried:
af|panelBox::header-start.MyRedBox
but this doesn't seem to work :(
As far as I can tell, the MyRedBox/MyGreenBox class that I set in the styleClass property only gets set (in the output html) on the very top-most div of the component. Knowing that, I'm not sure whether the styleClass value is really of use here at all. Should I be differentiating using the component Id?

Doh! Got it now:
af|panelBox.MyRedBox::header-start
Thanks Lucas Jellema:
[http://technology.amis.nl/blog/5722/using-adf-faces-11g-skinning-for-setting-the-styles-of-specific-component-instances-or-groups-of-instances]
:)

Similar Messages

  • How can I link data in two components in a BI Publisher report?

    Hi,
    If possible, I would like to make a BI Publisher (11g) report build as a pivot table next to an ordinary table, where data in each row in the two tables are linked to each other. E.g. if Customer A is shown in first row in the ordinary table, it should also be in the first row of the pivot table etc.
    Any filtering and sorting defined in the ordinary table to have effect in the pivot table.
    I would like to have a Top-10 filter on my data set, but that is not possible in a pivot table. That's why I somehow need to link the two components to each other.
    I have tried to do this by linking data sets in the Data Model, but that doesn't seem to work.
    Does anyone know if this is possible at all?
    Thanks,
    Henning

    Hi BIPuser,
    Thanks for a quick response.
    A useful link, but not really what I was looking for.
    I would like a pivot table to be related to whatever is shown in an ordinary data table. I have not been able to do that and maybe it isn't possible. In the link you sent me, you also see that any filtering made in the lower table doesn't affect the upper graphs (at the end of the video).
    Another way to solve my problem would be to replicate the filtering in the pivot table based on the filtering in the ordinary table. But for some reason Top/Bottom filtering is disabled in pivot tables. Do you is there is another way to use a top-10 filter in a pivot table?
    Thanks,
    Henning

  • Can Partial Trigger Work between Two Components Which Are in Two Pages?

    Scenario: Some output text components in page one while a SelectOneChoice and a InlineFrame are in page two. At first the resource attribute of inlineFrame was set to point to page one. When changing the value of SelectOneChoice, the values of those output text will be expected to change accordingly. I tried to make SelectOneChoice to be the trigger of those output text components, but found that SelectOneChoice can't be seen when attempt to edit the value of PartialTrigger attribute of those output text components. Then I tried to set the ID of SelectOneChoice as the value of the InlineFrame component, but failed getting the wanted result again.
    Problem: How to get a partial refreshing effect between two components that are in two different pages? Can partial trigger work in this scenario?
    Thanks for your interest!

    Hi,
    Sorry, you can't achieve that the way you're doing it. If you're using 11g, however, you could do that using regions.
    Regards,
    ~ Simon

  • Two components per cell on a web dynpro table

    Hi all,
    I've been working with SAP Netweaver JAVA Stack. Now i'm trying to display two components on a cell of a table, but i can't...
    I've been looking to CellVariants, but that only allows me to display another type of component (always one) on a certain condition.
    What i want is to display on the same cell a Textview and a InputLink for all the rows.
    I've tried to add a Panel to the TableCellEditor, hoping i can next add a textview and a inputlink to the panel, but that isn't allowed.
    How can i add the components at the same time on the same cell?
    Can anybody help me?

    Please don't give up, there's hope
    Context
    + Items (node, c=0:n, s=0:n)
      + CategoryData (node, c=0:1, s= 0:1, singleton=false)
         + categoryName (string)
      + ProjectData (node, c=0:1, s=0:1, singleton=false)
         + projectName (string)
      + StandByData (node, c=0:1, s=0:1, singleton=false)
         + standByName (string)
      + TaskData (node, c=0:1, s=0:1, singleton=false)
         + taskName (string)
      + Children (recursion -> Items)
      + childrenLoaded (boolean)
      + expanded (boolean)
      + isLeaf (boolean)
      + type(string)
    The type can have the values "ProjectCategory", "TaskCategory", "StandByCategory", "Project", "Task", "StandBy". This context structure gives you the tree hierarchy and for each type of node you can store different type-specific data. The "CategoryData" represents the data for the top level which shows the categories "Products", .... The meaning of the other subnodes should be clear.
    The UI element hierarchy looks like this:
    Table (dataSource = Items)
      + TreeByNestingTableColumn
        (childrenLoaded = Items/@childrenLoaded, expanded = Items/@expanded, isLeaf = Items/@isLeaf)
        + Caption (text = Items/CategoryData/@categoryName)
      + NameColumn (selectedCellVariant = Items/@type)
         + TextView (standard cell editor, not used)
      + ProjectNameEditor (CellVariant, variantKey = "Project")
         + TextView (text = Items/ProjectData/@projectName)
      + TaskNameEditor (CellVariant, variantKey = "Task")
         + InputField (value= Items/TaskData/@taskName)
      + StandByNameEditor (CellVariant, variantKey = "StandBy")
         + InputField (value= Items/StandByData/@standByName, readOnly=true)
    To be continued...

  • I have two iphones, different telcos, i am using the same apple id for both - how can i use the 10GB icloud free memory of my new iphone 5?

    I have two iphones, different telcos, i am using the same apple id for both - how can i use the 10GB icloud free memory of my new iphone 5?

    Thank you KiltedTim!
    YES, that is the free 5GB icloud memory for each apple ID. Can I not add the free 5Gb of my second Iphone to my original apple ID (5GB also) as I want to use one Apple ID name on both 2 Iphones? Is it necessary to have a different apple ID for the second Iphone to avail the free 5GB it carries with it?

  • How to use a context between two components at the runtime

    Hi Experts,
    My Web dynpro component is over the Generation limit (size of generated load is > 2 MB) so it always gets Warning when I active it. That why I have separated my application into two components and use the ViewContainerUIElement in order to show views of each other.
    In the application, I use also the TimeTrigger to refresh pages, all views have a TimeTrigger and the DELAY property of TimeTriggers is bounden into the same context attribute. I use a component to set up (change) the value of context attribute that is mapped with the Delay property. I want to change the Delay value on a component and other component will understand the changing.
    My problem is how I can use the same context attribute between components at the runtime?
    Let give me your advice on this.
    Many thanks,
    Ken

    Hi Ken,
    You can use [external context mapping|https://cw.sdn.sap.com/cw/docs/DOC-27901] to share data between two or more components using context.
    Thanks,
    Duy

  • Installed components different in SLD than JSPM.  Why?

    Solution Manager 40 installed ABAP+Java stacks, SLD configured and seems to work.  SMSY_SETUP can talk to SLD.
    When SLD collects component information from Java AS server, the list of components differs (a subset of) from the list JSPM provides. which in turn is not the complete list (misses items that have never got patched.  In SMSY I would like the list of java components to be complete and up-to-date (automatically). 
    For example I have installed IGS 700 pl 5, wily introscope environment manager (no patch level) and J2EE cre tools pl 9 (plus others of course  - this is just a sampling of one component from each category).
    In SLD I see just J2EE CORE TOOLS at pl 9.
    In JSPM I see J@EE CORE TOOLS pl 9 and IGS pl 5.
    In SMSY (after running SMSY_SETUP) I see just what is in SLD J2EE CORE TOOLS SP 9.  Any components in SMSY not in SLD get deleted after running SMSY_SETUP.  Is there any way to get SLD to maintain the complete list or revent SMSY_SETUP from deleting components?

    Ah haaaa... I found other posts with answers. You "sign out" of your iTunes account and that did it for me. Nobody seems to tell you how to do this, so here's how: Find "SIGN OUT" under the "Store" drop-down menu in iTunes and click on that. If you want to buy things later you'll have to sign in again (same menu) and the only hassle is having to re-enter all your payment information.

  • Reading a 2GB file and writing to two differnt files based on a delimiter

    Good Morning!
    I have to to read the content of 2 gb file(main.txt) and copy its content into two other files based on a delimiter.The delimiter is '/'. Initially i have to start writing the contents of main.txt to copy1.txt as soon as i encounter a delimiter i have to write the contents to copy2.txt again if i encounter next delimiter i have to write the contents copy1.txt and so on
    This is my piece of code but it takes 20-25 minutes.How can i optimise this operation.efficiency is my problem
    try{
         FileInputStream fis = new FileInputStream ("main.txt");
         FileOutputStream foscopy1 = new FileOutputStream ("copy1.txt") ;
         FileOutputStream foscopy2 = new FileOutputStream ("copy2.txt") ;
         int iFlag=1;
         int s;
         while((s=fis.read())!=-1)
              System.out.println(iFlag);
              if (s=='/')
                   iFlag=-iFlag ;
              else{
         if (iFlag==1)
                        foscopy1.write(s);
    else
    foscopy2.write(s);
    if u canprovide code that would do a lot of good

    Perhaps you could use a StreamTokenizer on top of a BufferedReader since you are using text files... The buffered reader will buffer your input so that it doesn't have to perform IO on every byte read. Subsequently the output may also be buffered to enhance performance...
    StreamTokenizer st = new StreamTokenizer(new BufferedReader(new FileReader("main.txt")));
    st.whitespaceChars('/', '/');
    BufferedWriter out = new BufferedWriter(new FileWriter("copy1.txt"));
    //same with copy 2
    while (st.nextToken() != st.TT_EOF) { // while not end
      String s = st.sval;
      // determiine copy to write to, then write.
    }

  • I have 160gb of music on my Classic, 6th Gen (I think) I've just bought it. Is it possible for it to play my songs in a random order, one or two from different albums?

    I have 160gb of music on my Classic, 6th Gen (I think) I've just bought it. Is it possible for it to play my songs in a random order, one or two from different albums?

    To add to what Stonerock has mentioned, you can either create Playlists in your iTunes Library, containing exactly what you want, and then Sync them to your iPod, or you can use the iPod Classic's On-The-Go feature.
    Reading between the lines, I'm going to assume for now that you want to be able to create your preferred listening list while "out and about" - so not near your iTunes library. (You have posted in iPod Classic, after all.) You can do this with the On-The-Go Playlist.
    Look in the Playlists menu on the iPod. It probably contains the Recently Added, Recently Played and other pre-made Playlists that you see in your iTunes Library. At the bottom of the Playlists list, is the On-The-Go showing 0 Songs. Scroll down to it and press the Select (centre) button. The screen will give you instruction on adding songs to the On-The-Go Playlist.
    Basically, if you press-and-hold the Select (centre) button, while highlighting a song, the song title will blink as it is added to the On-The-Go Playlist. Try it, then go back to Playlists/On-The-Go and notice that it will now say 1 Song. (Note, you cannot add a "now playing" song to the On-The-Go Playlist.) Repeat this for every song you want to have in the list. You can also look in the Albums menu, highlight the album title and press-and-hold that to add the complete album to your On-The-Go Playlists with one press. So if you add the two albums to your On-The-Go Playlist, you can then listen to just those two albums.
    To shuffle the songs, turn on Shuffle on your iPod. Either, go into Settings/Shuffle and press the Select button to toggle between Off/Songs/Albums, or on the Now Playing screen, press the Select button three times to reach the Shuffle option, where you use the scroll wheel to move between Off/Songs/Albums, press the Select button to activate it.
    Having added songs to the On-The-Go Playlist, go into it and notice the list of songs and options to Save Playlist (New Playlist 1) or Clear Playlist. If you use Sync to manage your iPod (and that really is the best way by the way), the next Sync will transfer any unsaved On-The-Go and any New Playlist Xs that you have, back to your iTunes Library. You can even remove any song from the current On-The-Go Playlist by highlighting it (in the On-The-Go, obviously) and press-and-holding the Select button.
    If you need assistance in creating a Playlist in your iTunes Library, please ask.

  • Two Dimension Hierarchys based on one Logical Table

    Is it possible to have two dimesion hierarchys based on one logical table? Suppose we have the following case:
    Accounts Table
    Code
    Name
    Category
    Subcategory
    Level 1
    Level 2
    Level 3
    I would like to have one dimension Total > Category >Subcategory > Code and one Total > Level 1 > Level 2 > Level 3 > Code, so I can drill down on both paths. Is this possible?
    Thanx

    Yes, the trick is to have the same key on the lowest level in your hierarchy.
    regards
    John
    http://obiee101.blogspot.com/

  • Two very different results using the same settings (H.264 / Quicktime Pro)

    I’m a bit confused, I have used Quicktime Pro (v7.1) to encode DV into H.264 for iPod and this particular video is 18 minutes long and came out looking very good with the following settings;
    VIDEO: H.264 at 200kbps, Baseline Profile, 25fps, Auto Key Frames, 320x240 or 640x480, Multipass Best quality encoding.
    AUDIO: AAC Audio at 96kbps, 24kHz sampling freq, Stereo.
    However here is the twist…
    When I use the same exact settings to encode just the 30 second opener (from the 18 minute video) the encoded opener looks bad and blocky!
    Why? Same settings would make you assume that you should get a same or similar result, or am I wrong?
    The reason I have tried encoding this 30 second opener is that I am trying to work out which settings work best on the iPod (another issue) and I don’t want to spend hours test encoding the full 18 minute video, as you know H.264 is SLOW to encode!
    So can anyone help in regard to two very different results using the same settings?
    Regards,
    J
    PC   Windows XP  

    Alvin,
    Is it a commercially-released or home-burned CD?
    If it's commercially-released, try "encouraging" the recalcitrant computer by using the iTunes Advanced menu > Get CD Track Names command when it shows Audio CD.
    If it's home-burned, you will find that only the computer that actually burned the disc will know what's on it. The information won't be transferred to another computer.
    Let us know which, if either, of these situations applies to you.

  • Commmunication Between two Components

    Hi ,
    I am developing a project of having two components in it.  I want to communicate each component with other one. Both components should be communicating with each other.
    I am able to communicate from Component one to Component two . But !  unable to do the same from Component Two to Component one.  It shows the following error.
    Component ComponentOne: Cycle in component usage definitions: ComponentTwo
    Regards,
    Jyothi.

    Hallo Jyothi,
    Parent2Child-component-communication: apply interface method invocation (parent component with component usage relation to child component invokes interface controller method of child component --> IExternal-API)
    Child2Parent-component-communication: apply interface eventing (child component exposes interface controller event, child component defines NO cyclic component usage dependency to parent component, parent component subscribes own event handler to event of child component's interface controller, child component fires interface controller event at runtime and can also pass object references as event parameters).
    For data transfer across component borders apply interface-context-mapping
    1) exernal context mapping: data context in parent component, child component externally maps its interface context to it.
    2) interface context mapping: data context in child component, parent component maps own context to interface context of used child component.
    Regards, Bertram

  • Two components do PublishedStaticFiles over the same file, who wins?

    Hi,
    I use UCM 11G PS4.
    Does anyone knows how PublishedStaticFiles is working, I know it publish
    resources into the weblayout/resources/wcm/custom.
    But does anyone knows what happens if two components try to publish same file?
    I will expect that Content Server to merge the 2 published files into one
    depending by loadOrder.
    Can anyone tell me what is the difference between PublishedStaticFiles and PublishedWeblayoutFiles?
    Regards,
    Cipi

    The PublishedStaticFiles and PublishedWeblayoutFiles tables are essentially the same thing, in that they both define where to publish in the Weblayout folder/directory. However, PublishedStaticFiles is used to publish static items like images, while PublishedWeblayoutFiles is generally used to publish dynamic items like layouts. When you're in the config manager, the "Publish static layout files" and "Publish dynamic layout files" publish those tables, respectively. A brief overview can be read on Kyle's post.
    As far as merging published files, no, that is not possible. The Content Server publishes all component files, but if any have the same file name, the component with the bigger (higher) loadOrder will "win" and its file will override the other.
    For instance, in the .hda file of the component you want to be loaded, you'll have:
    @ResultSet MergeRules
    4
    fromTable
    toTable
    column
    loadOrder
    SSOPublishedStaticFiles <-- your table that defines where in the weblayout directory you want to publish your files to
    PublishedStaticFiles
    null
    500 <--loadOrder (set the value to something big like 500)

  • Event Listening across two components?

    Let's say I have two components. One of them has a button.
    The other will post an Alert once it detects that the button has
    been pressed.
    How can the Alert component detect the button press of the
    other component? I figured an eventListener would been needed, but
    I am not sure how to write it.

    Something like that might work, but from a programming
    standpoint, your components should be designed in such a way that
    they know absolutely nothing about the outside world (parent or
    other components). For all it knows, it's the only component in
    existence. But, using events, he could send out a message (event),
    that if someone else (another component) happened to hear it, they
    could do something in response to it. Think of the movie "Contact"
    (if you've ever seen it).
    Anyway, your best bet is to make a custom event that is able
    to encapsulate an ArrayCollection. Then when the button is clicked,
    you wrap up the AC in the event and send it out. Your other
    component will be listening for events that are of that type (your
    custom event). Then he can unwrap the AC in it and use it. If you
    do not know how to create custom events and/or send data in events,
    look up a tutorial on it. It's not that difficult to implement if
    you can follow the concept I just talked about. However, I've also
    personally tried to make a custom event to pass an ArrayCollection,
    and for some reason it never worked (even though I followed some
    tutorials down to the letter).

  • How to put some space b/w two components in panelGrid

    Hi,
    Can any one tell me how to put some space between two components in a panelgrid.I am trying to put   between the components in panelGrid,but it is not allowing me.
    I tried by putting <div> tags also...I am getting space on the top of the panelGrid...
    please tell me.
    Thanks

    Apply CSS. Make use of the margin/padding properties.
    If you never heard of CSS, start here: http://www.google.com/search?q=css+tutorial
    It's one of the essential knowledges (near HTML/JS/DOM) for webdevelopment.

Maybe you are looking for