Determining page region through FacesContext

In 11g, what's the best way of determining which region (jsff) is currently being used ?
In 10g to provide conditional "Requery Condition" I used to use #{facesContext.viewRoot.viewId} on the group to check if the table or the form view was being used. This works fine for standalone pages but not for the new regions. How can I accomplish the same thing ?
The other place I need this functionality is for wizards where I am re-using a detail group between two different wizard pages (regions). On the entry page, the detail group is to be editable but on the summary page the group is to be read only. For this I could of course duplicate the detail group, make one editable and one read only and use different groups on the different pages still pointing to the same data collection. I would rather set the "Update Allowed" property such that I could use the same group in the two different regions.
Many thanks !
Cheers,
Brent

Brent,
You can use
#{controllerContext.currentViewPort.viewId}
this will return strings like "/EmployeesTaskFlow/EmployeesTable" for the table page, and "/EmployeesTaskFlow/Employees" for the form page.
Steven Davelaar,
JHeadstart Team.

Similar Messages

  • Very intermittent missing page regions / report rows / page item values

    My goals in making this posting are twofold:
    1. I'm looking to see if anyone else has experienced this type of issue before.
    2. I'm looking for ideas about what can be done to debug such an infrequent bug with serious implications.
    Synopsis
    I'm having a weird problem where very infrequently I will load a page and I'll notice that one or more page regions, report rows, or page item values are missing. If I reload the page the missing parts appear as they normally should.
    By "very infrequently" I would say it happens to me somewhere between 1 in 100 and 1 in 1000 page loads, of course at my last project demonstration in happened twice in 10 minutes to my demo participants. I've attempted to debug this, but most of the techniques I know of involve reloading the page or reposting the form data and (of course) everything looks fine then.
    Environment
    * This has happened on multiple different pages, under ApEx 3.1 (Linux) and 3.2 (Solaris).
    * I believe that so far I've only ever seen this under Firefox 3/3.5 under OSX, but since I do the vast majority of my development with this browser it's not reasonable to conclude that it only happens under Firefox.
    Logs
    * No application errors during this timeframe.
    * Nothing of significance in the database alerts log (just thread notes and log sequences).
    * Nothing of significance in the webserver log (just the usual mod_ossl connection errors).
    Thanks for your attention,
    Jason
    Edited by: Jason G on Jul 24, 2009 12:43 PM

    Well, thanks for reading the post anyway.
    While working through some debugging steps I realized that I was populating some of the regions as the page rendered using AJAX -- this would pause the page rendering until the AJAX request returned. I believe that a hanging AJAX call was the likely culprit of the very intermittent symptoms I was seeing.
    I moved the AJAX calls to the last region of the page and added a javascript function that "watches the page load" by checking for regions by ID and looking at javascript boolean flags to let me know when the page is fully rendered. If this process takes longer than 5 seconds it notifies the user that something happened and offers to reload the page for them in an effort to fix the issue.
    So far, so good -- but it will take a lot of testing to convince me that this case is solved. I hope my documenting this is helpful for others in similar situations.
    Good luck,
    Jason

  • Image from database won't display in page region

    I’m having difficulty getting an image stored in the database to display in an HTMLDB page region. I’ve consulted the tutorial in Sergio’s Blog and looked for relevant threads in this forum but am still having problems. Any insights into where I’m going wrong would be very helpful.
    I’m using HTML DB 1.5.1.00.12 and database 10.1.0.2.0 on an x86 machine running Win 2k SP4. My browser is IE6.
    First, here’s the procedure I wrote to display the picture. Although the variable names have been changed this is substantially the same as the procedure in the tutorial:
    CREATE OR REPLACE PROCEDURE download_pic(p_personid in number) as
    v_mimetype VARCHAR2(255);
    v_length NUMBER;
    v_filename VARCHAR2(255);
    v_picture BLOB;
    BEGIN
    SELECT mimetype, picture, SUBSTR(filename, INSTR(filename, '/') +1), dbms_lob.getlength(picture) INTO v_mimetype, v_picture, v_filename, v_length FROM TBLPICTURE WHERE personid = p_personid;
    owa_util.mime_header(v_mimetype, FALSE);
    htp.p('Content-length: ' || v_length);
    htp.p('Content-Disposition: filename="' || v_filename || '"');
    owa_util.http_header_close;
    wpg_docload.download_file(v_picture);
    end download_pic;
    Enterprise Manager tells me that the procedure is valid, and I made sure to grant execute to public.
    Here’s the source for my PL/SQL page region:
    DECLARE
    v_personid NUMBER;
    BEGIN
    SELECT PERSONID INTO v_personid FROM TBLPICTURE WHERE PERSONID = :P5_PERSONID;
    HTP.P('<IMG SRC=”#OWNER#.download_pic?p_personid=’ || v_personid || '”>’);
    EXCEPTION WHEN no_data_found THEN
    HTP.P('No picture in system');
    END;
    When I run the page my region displays properly but I get the red X where my picture should be. A review of the HTTP server’s error log tells me that the server thinks my procedure (HTMLDB.DOWNLOAD_PIC) doesn’t exist. If I create a second PL/SQL page region and set the region source to just the display_pic procedure by itself, using a static number as the p_personid parameter, the picture displays in my browser, but as the only object on the page. Typing the URL http://localhost:7777/pls/htmldb/htmldb.download_pic?p_personid=1 directly into my browser also gives me the “procedure doesn’t exist” error. So I believe my procedure works correctly but somehow my URL in the img tag is incorrect.
    Here’s my marvel.conf file just in case it helps solve the problem:
    Alias /i/ "D:\oracle\product\10.1.0\CompanionCD/marvel/images/"
    <Location /pls/htmldb>
    SetHandler pls_handler
    Order deny,allow
    Allow from all
    AllowOverride None
    PlsqlDatabaseUsername HTMLDB_PUBLIC_USER
    PlsqlDatabasePassword @BTV4hSLn+NKXXGs045hwqYeJ+u2gWjROPQ==
    PlsqlDatabaseConnectString BE4013882062404:1521:Robert ServiceNameFormat
    PlsqlDefaultPage htmldb
    PlsqlDocumentTablename wwv_flow_file_objects$
    PlsqlDocumentPath docs
    PlsqlDocumentProcedure wwv_flow_file_manager.process_download
    PlsqlAuthenticationMode Basic
    PlsqlNLSLanguage AMERICAN_AMERICA.WE8MSWIN1252
    Again, any assistance that anyone can provide would be very helpful. Thanks!

    Robert,
    please describe your task correctly:
    You want to create a link (in report) with download image capability, or you need to SHOW image in report? This is a bit difference tasks.
    I solved this tasks, you can do both capability in one report. It easy.
    1. wpg_docload procedure can be used only for download image/BLOB, not show it.
    2. For both download/show BLOB you need dual link with two different procedures. One with wpg_docload call for download, another for show with htp.prn (not htp.p!*) call for show. Then you can create call both procedures from your SQL repors select.
    3. Viola, all works perfectly.
    *Note: htp.p inserts newline after every block of BLOB, so JPEG with size> 32K will be incorrectly shown. htp.prn makes uninterrupted output without newline insert.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Pages cycles through documents and won't open any of them - what do I do?

    Pages cycles through documents and won't open any of them - what do I do?

    Thanks for replying -
    my operating system is OS X Lion 10.7.5
    Pages version 4.3
    What I mean by 'cycles through documents" is that when I attempt to either open a document or just open the application - it looks like the application begins to start - I see the first page of a bunch of documents very quickly going from left to right on my screen but then I see a bar in the middle of the screen (I'm not sure what its called but its the one that tells you to wait while the computer does something) - and then it just stays there, never opening the documents.
    My version of pages has always had the "cycling" effect at the beginning but it always ended quickly and I could begin working on my documents - now.... I can't begin working on anything and the only option I have is to force quit.
    Thanks for any advice you can give me!

  • Line Manager (A002) remains default approver in leave request, despite determining different agent through WF.

    Hello Experts
    I am facing a issue in Leave Request.
    I have requirement where for a leave, HR should be the approver not Manager.    
    I have determined the approver through Rule, and used a FM which modifies ACTOR_TAB internal table which is passed to the Task.
    When a request is raised, I can see only HR as an agent in workflow log. Thats correct.
    But If I go to Manager's inbox, request is sent to Manager as well for approval.
    He is not there in agent log.
    But then I checked the container element "Req". It shows Manager's userid as approver.
    I dont want Manager to receive any request by default. I can determine through WF.
    Can anyone help me remove Manager as Default approver.
    Thanks

    for your scenario check your configuration in Table V_PTARQ_TPROCESS as proposed above but in this case you need to use the BADI as above refer here http://wiki.scn.sap.com/wiki/display/ERPHCM/Leave+request+Configuration+steps http://scn.sap.com/thread/1349663

  • Creating Items in Personalize Page region (HTML Pages)

    Hi All,
    Has anyone ever ‘created an item’ in the Personalize page region in Oracle HTML pages (IE: iProcurement)...or more to the point; does anyone know how to?
    I have a DFF on requisition lines that I want to make context sensitive based on the supplier used in the requisition header, and ideally I would like to set it up within the Application.
    From what I have read on other forums and blogs this can be achieved by created a ‘Boolean item’ based on the supplier and then referencing this item in the ‘required’ properties of the attribute (using SPEL).
    Unfortunately I have fallen at the first hurdle as I am unsure how to create the Boolean Item (I have tried – but am unsure what to fill in on the form), can anyone give me any advise (hints, tips, step by step instructions etc) on how to create an item that returns True if the supplier ‘X’ is selected (otherwise return false)?
    Regards
    Carl

    you might have chosen an automatic sort in the region properties, for thoses where you cannot arrange items.

  • How to Create Page Regions of Equal Size

    Can someone please help on how I can Create the page regions with equal HEIGHT blocks organized along the x-axis_ - as in the apex IDE tool menu path (and many areas of apex IDE ): "*Administration -> Dashboard -> Users*" tab (apex 4.0 version)
    You'll notice that irrespective of the report data contained in each of the region blocks on that page, the height of all the regions are well organized along the horizontal x axis and with same heights (row 2 specifically) :).
    I'm having 3 regions on my page with Lists of links. But each region has different number of list-entries, thus my regions are not displaying the same height. I'm using Template 20 and region template as: "Borderless Region". Applying ReportRegiont template also doesn't help.
    To summarize, irrespective of the height of the list-entries shown in each of my 3 regions on the page - Display Point: Page Template Body (1) - columns 1,2&3 - ", the surrounding region x-y height should be same - potentially equal to the y-axis height of the region containing the maximum list entries.
    Thx in advance,
    SV

    Hello SV,
    you can fix the height of region by this way..
    Edit the region
    In Region Header section put
    <table width="100%" cellspacing="0" cellpadding="0" border="1" align="left">
    <tr height="350px" width="450px" align="left" valign="top"> //you can set height and width according to you
    <td>
    In Region Footer section put
    </td>
    </tr>
    </table>
    put the above code in all region of your page...this make your all region same height and width.
    Hope this will helps you.
    Thanks,
    jitu

  • Needed smartform to determine page format automatically.

    Hi
    I have a reqirement to print the smartform output in Letter format paper for one company code and it should print it in A4 size paper for rest of the company codes.
    I am using R/3 4.6c
    I tried with this code
    data: lx_sf_header(31) type c,
    field-symbols: <fs_header> type SSFFORMHD.
    if company_code = 'XXXX'.
    CONCATENATE '(' sy-repid ')%HEADER' into lx_sf_header.
    assign (lx_sf_header) to <fs_header>.
    <fs_header>-PAGEFORMAT = 'LETTER'.
    endif.
    but I am getting short dump & this logic is working fine in ECC.
    Please help me regarding this.......
    Thanks in advance
    Kiran.
    Edited by: kiran Pasala on Sep 30, 2008 4:44 PM

    Duplicate post.
    Needed smartform to determine page format automatically.

  • How to control width an height of a page region

    Hi all.
    How do i control width an height of a page region?. Say you have 4 regions on a page and want to tightly control these attributes, for example as a percentage of page dimension.
    Is that possible?, Also can it be manipulated dynamically?
    Best regards, Luis ....!

    Hi Luis,
    I don't know about dynamically but in the Region Attributes you can add 'style="width:100px" (or whatever value you want 10%, 25% etc.) to control the width
    and to control the height you need to add:
    <div style="overflow: auto; height: 450px;">(again or whatever size)
    to the region header and
    </div>to the region footer
    regards
    barney
    Edited by: barneyonfire on 27-Jan-2012 16:58
    sorry it didn't show the tags before...

  • Sharing pages docs through email ?

    When I choose "Share" the words "Send via email" are greyed out.  How can I send pages documents through email using this feature?

    The Share facility in Pages works just fine with normal OS X acceptible file names and content. As was previously mentioned, Apple has chosen to make the Pages Share menu categorical headings light grey. These headings, ”Send via Email,” and “Export,” are separators for the real items that immediately follow.
    I have a Pages document open in front of me. I want to send it as an e-mail attachment. I choose the Share menu, and decide that under ”Send Via Email,” that I want a PDF attachment. The only confirmation of success is that Apple Mail launches a composition window with the open Pages document attached as a PDF. If you are using a different Mail User Agent than Apple Mail, this behavior will not likely happen.
    In the Pages Help menu, there is a link to the Pages Users Guide. It is a useful read.

  • Page Region Height

    Is there a way to specify a height for a page region and/or portlet?

    Yeah,
    In the edit view of the page you'll see a pencil symbol on each region. Clicking on this allows you to edit a region's properties.
    Under the region properties you'll find both Region height and region width.
    The default for region height is unspecified.
    There isn't a way to specify the height of a portlet specifically. They just expand to fill the available space. The only way to do it would be to code your own.

  • XML page/region deployment without Jdeveloper

    Hi,
    As we know jdeveloper provides import.bat batch file to import the page region into MDS.
    The requirement is i wanted to give some of the cutom deployment to the production DBA and they do not have Jdeveloper installed in their workstation .
    Is there any way we can deploy the custom pages to MDS without have jdeveloper installation ?
    appriciate your feedback .

    DBAs may use XMLImporter class found on App Server.
    The command is under $JAVA_TOP/oracle/jrad/tools/xml/importer
    HTH
    ~Kesava

  • Conditional Layout (How I can determine page filling level? )

    The document consist with two parts:
    Part1: lines
    Part2: 1 line+signature+stamp = should be inseparably
    Situation1:
    When part1 have n lines which up to 80% page then document allocated on single page. No problem.
    Situation2.
    When part1 have n+k lines which filled page over 80% then part2 must be on next page.
    How I can determine end-of-page marker?
    or
    How I can determine page filling level ?

    Part2 should be allocated on single page with part1 ( if possible).

  • Old web page shows through to new web page when printing

    The page or window under the current page shows through when printed but not when viewing current page or window.

    Did you try Safe Mode?
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do NOT click the Reset button on the Safe Mode start window.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • ISupport Page Region Mapping table

    Hi,
    Can someone please point me to the iSupport Page Region Mapping database table?
    Finding information from front-end is a little bit of a task.
    Kind Regards.

    Hi,
    This EO query could be of help :
    Select PageRegionMappingEO.source_context_target_id, PageRegionMappingEO.source_context_type_id,
    PageRegionMappingEO.OBJECT_VERSION_NUMBER, PageRegionMappingEO.CONTEXT_VALUE1, PageRegionMappingEO.CONTEXT_VALUE2,
    PageRegionMappingEO.CONTEXT_VALUE3, PageRegionMappingEO.SEED_TARGET_VALUE1, PageRegionMappingEO.SEED_TARGET_VALUE2,
    PageRegionMappingEO.CUST_TARGET_VALUE1, PageRegionMappingEO.CUST_TARGET_VALUE2, PageRegionMappingEO.CREATED_BY,
    PageRegionMappingEO.CREATION_DATE, PageRegionMappingEO.LAST_UPDATED_BY, PageRegionMappingEO.LAST_UPDATE_DATE,
    PageRegionMappingEO.LAST_UPDATE_LOGIN , CSCT.Source_Code, PageContent.Meaning pageName, CSCT.Context_Type,
    contextContent.meaning contextMeaning, '' SR_Type_ID, '' respon_id, '' appl_id, '' SR_Type_Meaning, '' respon_meaning,
    '' appl_meaning
    from apps.CS_CF_SOURCE_CXT_TARGETS PageRegionMappingEO, apps.CS_CF_SOURCE_CXT_TYPES CSCT, apps.FND_LOOKUP_VALUES_VL pageContent,
    apps.FND_LOOKUP_VALUES_VL contextContent
    where PageRegionMappingEO.source_context_type_id = CSCT.source_context_type_id and PageContent.lookup_code = CSCT.Source_Code and PageContent.lookup_type = 'IBU_CF_PAGE' and contextContent.lookup_code = CSCT.Context_Type
    and contextContent.lookup_type = 'IBU_CF_CONTEXT_TYPE'
    --and PageRegionMappingEO.source_context_target_id = :1
    --and PageRegionMappingEO.last_update_date like '12-JAN-10'
    ORDER BY LAST_UPDATE_DATE DESC;
    Regards,
    Mohammed

Maybe you are looking for