UIX 2.1.20: Detecting current FACET in UIT / UIX

Hello,
I have a custom UIX control implemented as UIT. This control should change its appearance on the page depending on which facet is currently being used. My plan was to have 2 different controls in our UIT and conditionally switch them ON and OFF.
To implement this switching I need some way to access a "current facet" value from Rendering Context. There are multiple examples on how to get this info from Java, but I need to access it from UIT. Could you please let me know if this is possible and which notation should I use in our UIT?
Of course, I will be grateful for any alternative approaches that you may advise.
Thanks in advance,
Igor

unfortunately, I don't know of any declarative way to detect the facet name. You would have to write a DataObject that would take the rendering context and get the facet from that.
Alternatively, you can write an EL function to do the same.
let me know if you need help doing this.

Similar Messages

  • My fire fox download helper not detected current video on you tube. It's always shows only the first video which i was downloaded.pls help

    My fire fox download helper not detected current video on you tube. It's always shows only the first video which i was downloaded.pls help

    You need to refresh the page (F5) to update the items in the download menu. Apparently YouTube refreshes the page in such a way that the extension doesn't gets notified, so you need to refresh the page manually if you want to download a media file from this page.

  • How to detect Current Selection in a TextBox

    Hi All,
    I faced an issue regarding how to detect current selection in a Word Document TextBox. The Document looks like this,
    I tried to use Application_WindowSelectionChange(Word.Selection Sel)
    event to handle,
    private void Application_WindowSelectionChange(Word.Selection Sel)
    if (Sel.Range.ShapeRange.Count != 0)
    return;
    I found Sel.Range.ShapeRange.Count always 0. 
    To reproduce this issue, I upload the test document in OneDrive, you can download from
    here.
    How to solve this issue?
    Thanks a lot!
    The future belongs to those who believe in the beauty of their dreams.

    Hi friend,
    Just use Sel.ShapeRange.Count instead.
    On the other hand, to get selected text, we could use Sel.Text, to get whole selected
    TextBox’s text, we could use Sel.ShapeRange.TextFrame.TextRange.Text.
    Good job!
    Regards
    Starain
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to display the current time in a UIX page

    Hi All,
    another UIX question....
    A requirement of a customer is to display to current data and time in every page.
    It should be done in a <header>. So i'm writing a new (template based) renderer for that element. How can i display the current time and date on it?
    Thanks in advance for any help...
    Regards,
    Robert Willems

    Hi Robert -
    When you say you are writing a template-based Renderer, do you mean that you are creating a custom look and feel and replacing the header Renderer? If so, I'd recommend instead simply creating your own template (not template-based Renderer), and reference your template directly from your uiXML pages where you want to insert the timestamp.
    You'll probably want to write a method data provider which calls System.currentTime(), convert the result to a date, and then use Java's date formatting capabilities (see java.text.format.DateFormat) to produce a user presentable String that you can return from your data provider.
    For more info (and samples) on templates and data binding, see the "Templates and Data Binding" section of the "Includes and Templating in ADF UIX" help topic:
    http://tinyurl.com/5b7bf
    Andy

  • How much expensive is to always detect current phase

    Hi, as a matter of optimization, I often need from setters, event handlers, actions etc. to know which jsf phase we are in.
    A typical case occurs when - while restoring - I don't want to go to the business layer to reconstruct the component tree since it will change soon - while rendering - and there is nothing to report back from client (setters).
    I always wondered why current FacesContext does not report the phase.
    Anyway I can get it from a phase listener. Then I can store it either within a session-scoped bean or within current request.
    The question is: how much expensive is to always run through this detection sequence ? Which is faster - between those solutions - session bean or request
    storing ?

    video4success wrote:
    Windows 8 has presented no problems at all, Steve! I'm shooting 1920x1080p AVCHD with a Panasonic Lumix FZ200. I use Premiere Elements project preset 'AVCHD 1080p'. I render out (from Premiere Elements 11) using the 'Vimeo' template found under 'AVCHD'. I'm a happy guy!
    Amazing camera, including when it is used for video.  If you like birds and wildlife shooting get the Panasonic brand tele extender lens.
    In my experience, your work flow is both simple and reliable.  I've done it many times.  I too am happy!
    Bill

  • Detect Current IDENTITY_INSERT Settings?

    Is there any way to programmatically detect the current value(s) of the IDENTITY_INSERT property, specifically (a) whether it's ON or OFF, and/or (b) if it's ON which table it's on for?
    I have a table with an INSTEAD OF INSERT trigger which does a data check prior to insertion.  The table has existing data.  I'm trying to add the IDENTITY property to one of the columns in the PK so that going forward, the PK value is automatically generated on new rows.  Unfortunately, the INSERT in the trigger only works if IDENTITY_INSERT is off.  If IDENTITY_INSERT myTable is ON, the INSERT statement in the trigger fails because the identiy column is not coded in it.
    I tried putting the INSERT in a TRY...CATCH block, testing for error 545 in the CATCH and issuing a second INSERT with the PK column coded in it, but once you hit the CATCH block in a trigger SQL Server deems the entire transaction as "failed", and you can only roll it back (error 3930).
    CREATE TRIGGER myTable_tIiof
    ON myTable INSTEAD OF INSERT
    AS
    BEGIN
     SET NOCOUNT ON;
     IF (EXISTS (SELECT TOP 1 i1.col2 FROM inserted i1
      WHERE (EXISTS (SELECT TOP 1 r1.col1
        FROM myTable r1
        WHERE i1.col2= r1.col2
        AND UPPER(i1.col3) = UPPER(r1.col3)) ))) BEGIN
        PRINT 'INSERT failed - violation of duplicate col2 and col3 restriction';
     END ELSE
     BEGIN TRY
       INSERT INTO myTable (col2, col3, col4)
       SELECT i.col2, i.col3, i.col4 FROM inserted i
     END TRY
     BEGIN CATCH
       IF ERROR_NUMBER() = 545 BEGIN    -- IDENTITY_INSERT is on:
         BEGIN TRY
          INSERT INTO myTable (col1, col2, col3, col4)
          SELECT i.col1, i.col2, i.col3, i.col4 FROM inserted i
         END TRY
         BEGIN CATCH  -- Some other error occurred after second INSERT attempt:
          SELECT ERROR_NUMBER() AS ErrorNumber;
          IF @@TRANCOUNT > 0 ROLLBACK;
         END CATCH
       END ELSE BEGIN --
         SELECT ERROR_NUMBER() AS ErrorNumber;
         IF @@TRANCOUNT > 0 ROLLBACK;
       END
     END CATCH
    END
    IDEALLY, I want to do the following:
    CREATE TRIGGER myTable_tIiof
    ON myTable INSTEAD OF INSERT
    AS
    BEGIN
     SET NOCOUNT ON;
     IF (EXISTS (SELECT TOP 1 i1.col2 FROM inserted i1
      WHERE (EXISTS (SELECT TOP 1 r1.col1
        FROM myTable r1
        WHERE i1.col2= r1.col2
        AND UPPER(i1.col3) = UPPER(r1.col3)) ))) BEGIN
        PRINT 'INSERT failed - violation of duplicate col2 and col3 restriction';
     END ELSE BEGIN
       IF MissingFunction1(IsIdentityInsertOn) = true AND MissingFunction2(IdentityInsertObject) = 'myTable' BEGIN
          INSERT INTO myTable (col1, col2, col3, col4)
          SELECT i.col1, i.col2, i.col3, i.col4 FROM inserted i
       END ELSE BEGIN
         INSERT INTO myTable (col2, col3, col4)
         SELECT i.col2, i.col3, i.col4 FROM inserted i
       END
    END
    Do MissingFunction1 and/or MissingFunction2 exist?  If so, what are they called?
    (And if they don't exist, why don't they exist?)
    Thanks in advance... Bryan

    I figured out a solution to this problem in the case where you are trying to re-insert an old record into a table (insert an ID that is lower than would be inserted normally).  I put the following code around the part of the trigger that won't work
    with IDENTITY_INSERT set on (in my case a part of the trigger that inserts related records into the same table)
    if
    (select
    max(id)
    from
    MyTable) <
    (select
    max(id)
    from inserted)
    --Then you may be inserting a record normally
    BEGIN
        set @I
    = 1
    --SQL wants something to happen in the "IF" side of an IF/ELSE
    END
    ELSE --You definitely have IDENTITY_INSERT on.  Done as ELSE instead of the other way around so that if there is no inserted table, it will run anyway
    BEGIN
    .... Code that shouldn't run with IDENTITY_INSERT on
    END

  • Detect current cursor state

    Is there any way to detect which cursor is currently showing.
    Mouse.cursor returns "auto" indicating that it will change automatically depending on the context.
    I would like to make a waiting cursor that only replaces the pointer, I still want the Ibeam and hand icon to show when appropriate, but I want to indicate that the app is waiting for something when it would regularly show the pointer. This is the behavior of the cursor in a browser when a page is loading for example.

    i have the same problem too so if U recieve any reply please mail to me at [email protected]
    bye

  • Detecting validation errors in ADF UIX

    Dear sirs...
    how can i detect validation errors in an adf uix page using DataActionContext?
    thanks for any help

    dear sirs...
    i found how it works. it is simple, bust call this.hasErrors(ctx). this would return true if an error occurs, otherwise it returns false.
    best regards

  • How to detect Current OS of client's PC ???

    Hi,
    Can anyone help me out to detect OS of Client PC ??? I am developing JSF application. I want to know that if anyone opens my site then the OS of that perticular PC should be detected. Can anyone help me out to solve this ????
    Thanks in advance....
    JSFGEEKS

    That's indeed also a good option which I completely overlooked. Heck, I ever wrote a browser stats tool which makes use of it ;)
    Though keep in mind that the client side has full control over what it sends along the request headers. Your application shouldn't rely that much on it. At highest just use it for statistics or so.

  • UIX 2.20 iterator looses current row when filter is set using ViewCriteria

    Hi all,
    we use JDeveloper 10.1.2.1.0 (1913) with ADF UIX 2.20
    We have tables with search. For search we use ViewCriteria
    as a filter, data is shown in <table> element and it works fine
    But SOMETIMES when standart "sort goto" event is called for a table
    its content may become empty.
    Same problem occurs when user selects (standart "select" event of table) row and goes
    to edit- or delete-form, ${bindings.MyViewObjectIterator.currentRow} may return null.
    I should mention that this doesn't happen untill filter is set.
    Could anyone please explain why this happens and how to avoid this?
    Thanks in advance
    Renat

    do we have to use setWhereClause instead of ViewCriteria?

  • Detect current device channel from code behind

    From
    MSDN article about device channels:
    Also, device channels can set a JavaScript variable called effectiveDeviceChannel that contains the current channel alias. This variable can be used to show which channel is currently being used.
    Is there similar variable, that could be used in code behind (in C#), to determine which channel is currently used?

    You can use DeviceChannelPanel in your web part...
    For e.g. the following in a visual web part will render only to a channel that is targetted for tablets.
    <Publishing:DeviceChannelPanel runat="server" ID="pnlTab" IncludedChannels="Tab">
        You can see this tab devices.
    </Publishing:DeviceChannelPanel>
    From code behind, you can create a device channel panel dynamically and add contents to it.
    e.g.
                LiteralControl l = new LiteralControl();
                l.Text += "Sample content for tablets";
                DeviceChannelPanel dp = new DeviceChannelPanel();
                dp.Controls.Add(l);
                dp.IncludedChannels = "Tab";
                MyPanel.Controls.Add(dp);

  • Detect current page using JS

    Hi all, I would've figured this out myself, but I'm stumped
    on this.... why doesnt this work?
    <script type="text/javascript">
    document.write("<ul>");
    document.write(" <li><a href='index.html' " +
    if(window.location.href.match("index.html")) { document.write("
    class='x'"); } + ">link</a></li>");
    document.write(" <li><a
    href='links.htm'>link</a></li>");
    document.write(" <li><a
    href='contact.htm'>link</a></li>");
    document.write("</ul>");
    </script>

    Here's the code. For some reason, it doesn't even render
    anything on screen! I really hope there are a few javascript
    experts in the house.
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN" "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="
    http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1" />
    <title>Untitled Document</title>
    <style type="text/css">
    .x { font-weight:bold; }
    </style>
    </head>
    <body>
    <div id="leftnav">
    <script type="text/javascript">
    document.write("<ul>");
    document.write(" <li><a href='index.html' " +
    if(window.location.href.match("index.html")) { document.write("
    class='x'"); } + ">link</a></li>");
    document.write(" <li><a
    href='links.htm'>link</a></li>");
    document.write(" <li><a
    href='contact.htm'>link</a></li>");
    document.write("</ul>");
    </script>
    </div>
    </body>
    </html>

  • Uix frameset - how to get the current frame name?

    I have a frameset with 3 different frames in it. a top, center and bottom.
    There is a menu in the top frame that changes the contents of the center or bottom frame.
    How can I get the value of the frame name for the current frame into a bound value like a httpsession or page?
    for example if I change the center frame to "listadmin.uix" how can I load a bound value with the frames new source?
    Is there a way to pass javascript to a boundvalue? I could get the frames new properties from javascript

    In Jdev 9.0.3 you could do something like this:<frameBorderLayout>
    <start>
       <frame name="sideFrame">
        <boundAttribute name="source">
         <ctrl:pageURL name="sideFramePage">
          <ctrl:properties>
           <ctrl:property key="currentFrame"
                          value="sideFrame"/>
          </
         </
        </
       </
    </
    </then in startFramePage.uix you can access the current frame name by doing:<styledText data:text="currentFrame@ctrl:page"/>

  • UIX current path

    Hello,
    Does anybody know how to display the current path of the UIX page?
    I want to put this in a variable and send it to a dataAction so that after the execution in my dataAction has been done, I can fire back to the page I came from.
    I already tried ${pageContext.request.requestURI} only nothing comes out of this expression. Does anybody know the correct formulation of the binding to get the URI or path of the current UIX?
    Any help appreciated,
    Thanks,
    Gideon

    It works.. thanks.. only problem is that if I come from a DataPage, the URL/URI should end in a .do and not in a .uix
    With your example I only get .uix extensions.
    Is there a way to do this correctly.
    I have a datapage: workshops.do that forwards to an loginModule. One of the parameters of this loginModule is should be the correct URL. Because in this case I origin from a .do-page I also want this in the URL. Problem is that in the URL only .uix is displayed.
    Anybody know how to solve this?
    Thanks in advance,
    Gideon

  • Refer to 'parent' 'uix.current'?

    I'm using the 10g preview. I'm trying to do something like this:
    <contents childData="${ bean.thingsToChoose }" >
    <messageChoice prompt="${ uix.current.name }"
              name="${ uix.current.name }"
              >
        <contents childData="${ bean.childrenOf[ uix.current['.'] ] }" >
         <option text="${ uix.current.name }" >
         </option>
        </contents>
    </messageChoice>
    </contents>Let's say the bean has a method like 'selectedChildOf', so that in the option tag, I'd like to say something like:
    selected="${ uix.current['.'] eq bean.selectedChildOf[ uix.current['.'] }"Except the second occurrence of 'uix.current' there actually needs to refer to the current object in the outer loop, not the current object of the inner loop. (By the way, is that the correct comparison syntax - i.e. same as JSTL el?)
    I know that I could add a property to the children so that they could know whether they are selected, but I'd rather not do that just yet. If possible, could someone please point out both:
    1) How to refer to the outer loop's current object from inside the inner loop?
    2) How to set up a temporary variable or alias? This would be one way to make the reference - i.e. something like the following, only in UIX:
    <c:set var="outerCurrent" value="${ uix.current['.'] }" />Thanks!

    Thanks, Arjuna. Could you please confirm the following implementation? It appears to be working, but I want to be sure I haven't overlooked something that will get me into trouble down the line. Also, if this is a correct implementation, I thought it might be nice to have an example here that others could learn from or use.
    public class TempValueUIExtension implements UIExtension  {
         public static final String TEMP_VALUE_NAMESPACE = "http://tempvalue.avega.com";
         public TempValueUIExtension() {
         public void registerSelf(ParserManager parserManager) {
              XMLUtils.registerFunctions( parserManager, TEMP_VALUE_NAMESPACE, TempMap.class );
         public void registerSelf(LookAndFeel lookAndFeel) {
    public class TempMap {
         public static final String MAP_ATTRIBUTE = "tempMapAttribute";
         public static void put( UIImplicitObject uix, Object key, Object value ) {
              getTempMap( uix ).put( key, value );
         public static Object get( UIImplicitObject uix, Object key ) {
              return getTempMap( uix ).get( key );
         private static Map getTempMap( UIImplicitObject uix  ) {
              RenderingContext context = uix.getRenderingContext();
              BajaContext bajaContext = BajaRenderingContext.getBajaContext( context );
              HttpServletRequest request = bajaContext.getServletRequest();
              Map tempMap = (Map)request.getAttribute( MAP_ATTRIBUTE );
              if ( tempMap == null ) {
                   tempMap = new HashMap();
                   request.setAttribute( MAP_ATTRIBUTE, tempMap );     
              return tempMap;
    <?xml version="1.0" encoding="windows-1252"?>
    <page xmlns="http://xmlns.oracle.com/uix/controller"
          xmlns:temp="http://tempvalue.avega.com" expressionLanguage="el">
        <content>
            <dataScope xmlns="http://xmlns.oracle.com/uix/ui">
                <contents>
                    <document>
                        <contents>
                            <body>
                                <contents>
                                    <text text="${ temp:put( uix, 'tempKey', 'tempValue' ) }"/>
                                    <text text="${ temp:get( uix, 'tempKey' ) }"/>
                                </contents>
                            </body>
                        </contents>
                    </document>
                </contents>
            </dataScope>
        </content>
    </page>I've got the TempValueUIExtension registered in the uix-config.xml. The output of the above test page renders as just the string 'testValue', which is what I would expect. I wasn't sure where to include the el for setting the value, but since it is a null function, I figured it couldn't hurt to throw in a <text> tag that would probably just print nothing at all. Any better suggestions?
    Also, you say there will be a way to refer to outer loops in the next release of UIX (do you mean the 10g production release, or after that?) Will there also be a built-in mechanism for temporary variables?

Maybe you are looking for

  • Hi, how to develop application , matching of userid and password to backend

    hi masters ,               , user  have to give userid and password of back end sap system  to see particular report. i mean there is a first view ( this first view muust not be first screen of portal ) with userid and password fields . after gave hi

  • QT wont open .mov file

    Just as the title says... When I double click on the file, QT comes up with a message that says, "The file is not a movie file." File name: PICT0007.AVI

  • LMS 4.2 - Config collection issue

    After launching config collection job in LMS 4.2 I can't get job results and receive error message - Unable to get results of job execution for device... I've increased the job result wait time using option in Admin > Collection Settings ... , but no

  • GetURL question

    I am using two buttons with a getURL function. The actionscript is set to open the url in a new browser window, which works, however, when I have opened one of the URL's in a new browser window, the second one opens in that same window, instead of op

  • Change Images with Web Dynpro Theme Editor

    Hi, I am using the Web Dypnro Theme Editor for the Portal but I can not find where to change the branding image, the masthead image, the banner or things like that. Is there any way to change this things with the theme editor? Thanks Regards.