Post Element Text - Checkbox

Apex 4.0.2
Suppose I use the Post Element Text attribute of a page item to render a checkbox using <input type="checkbox" .... and a dynamic action to save its state to a database table. I am sure this will work fine but when the page loads how do I go about setting the value of all these checkboxes?
Any ideas? Thanks

Hello Vikas,
>> I am sure this will work fine but when the page loads how do I go about setting the value of all these checkboxes?
The trick is to use a checkbox that has the same ID and value. Remember that only checked checkboxes are submitted to the server. You can look at the following for a simple example:
http://htmldb.oracle.com/pls/otn/f?p=52616:30
Now for some code. I’m using the following as the post-element content for the first checkbox:
   <input type="checkbox" name="f50" id="CB1" value="CB1">Option 1<br />The HTML name will remain the same for all checkboxes; however, the ID and value should be different for each extra checkbox (e.g. CB2, CB3m etc.). In this example, the checked checkboxes will be populated, at submit time, into the G_F50 array. Of course, you can use any other available G_Fxx array.
I’m using the following table to save the checkboxes state:
CREATE TABLE  "CB_STATE"
   (     "PAGE" NUMBER(4,0) NOT NULL ENABLE,
     "VALUE" VARCHAR2(4) NOT NULL ENABLE
   ) ;For saving the checkboxes state, I’m using the following after submit PL/SQL process:
delete from cb_state
where page = :APP_PAGE_ID;
for i in 1..apex_application.g_f50.count loop
  insert into cb_state
  values(:APP_PAGE_ID, apex_application.g_f50(i));
end loop;For setting the checkboxes state, while rendering the page, I’m using the following Before Footer PL/SQL process:
htp.p('<script type="text/javascript">');
for x in (select * from cb_state
          where page = :APP_PAGE_ID) loop
  htp.p('$x('''||x.value||''').checked = true;');
end loop;
htp.p('</script>');I’m sure you can translate the last snippet of code to a Dynamic Action. If you do, please post it in here.
Regards,
Arie.
&diams; Please remember to mark appropriate posts as correct/helpful. For the long run, it will benefit us all.
&diams; Author of Oracle Application Express 3.2 – The Essentials and More

Similar Messages

  • Post Element Text

    Hi,
    I'd like to use JavaScript to add some post element text to some form items that is based on the content of the form item.
    I know that I could just add some extra items on my page and condition them but I'm keen to avoid this as I don't want to clutter the page with too many items. I'd rather just have post element text that I can condition in some way.
    Any ideas how I'd do this?
    Cheers
    Yog

    Hello,
    Just add something like this. To your post element attribute
    &lt;span id="after_#CURRENT_ITEM_NAME#">&lt;/span>
    and lets say your item name is
    HELLO
    you javascript should look like this
    $x('after_HELLO').innerHTML = 'After Hello';
    or
    html_GetElement('after_HELLO').innerHTML = 'After Hello';
    Carl
    Message was edited by:
    Carl Backstrom

  • Post-element text with computed value

    I have a page item (P10_X) with post-element text referencing a application level item using &G_ITEM. notation. G_ITEM is computed on the page and the computation needs to take into account the value of P10_X so the firing point is "after footer".
    This leads to a Catch-22 because the item and post-element text is rendered before the computation so the value of G_ITEM is not accurate.
    Any ideas? Thanks

    Not sure I understand. Suppose P10_X=10 when it is rendered. G_ITEM is computed as :P10_X (i.e. 10) + (select ...). The post-element text for P10_X refers to &G_ITEM. so it uses the "stale" value of G_ITEM; the latest value is not computed until after all regions are rendered.
    Edit: Turns out that P10_X obtains it value in an Before Header application process, not via its Source attribute. So I can put the computation for G_ITEM at the After Header point and so everything gets computed and rendered properly.
    Edited by: Vikas2 on Jul 14, 2009 4:05 PM

  • Post Element Text on report items

    I am trying to add an image after an item on a multi row report.
    Was wondering if there was anything similar to the Post Element Text attribute that is available for individual page items??
    I admit to being a little lazy in trying to create a custom popup lov (Displays description, returns key value) in a multi row report without using the htmldb_util.item function (as this would mean having to create my own optimistic locking and md5 computations).
    Was wondering if this was possible and if anyone had done this??

    Vikas,
    just trying to create a multi-row report which has several columns
    one of the columns is hidden and stores the id. One of the visible rows stores a description associated with the hidden id.
    I then want to display the list.gif icon after the description field so that it looks like a popup lov (i will code the popup up stuff seperately). In effect i wish to mimic the functionality provided by htmldb_item.popupkey_from_query without having to also code the optimistic locking you have to when using this in a query.
    what i am thinking is that if my reports select statement is a basic column selection and i can add a href image to the column as a post element text then this will give me the functionality i need with the optomistic locking provided out of the box?
    sorry the concept seems quite easy in my head but quite hard to explain ;-)

  • Conditional display of post element text.

    Hello,
    I wanted to know if it was possible to display the
    post element text for a text item conditionally.
    Thanks,
    shilpa.

    Hi Shilpa
    I am not aware of any functionality to conditionally display the post element text on its own. However there are 2 ways around this.
    1) If when entering the page you want to decide if you should display the text you could, after each item add a display only item and put a condition on that. Changing the display only items displayed properties to Begin On New Line = NO and Field = NO will give the impression of post element text
    2) If you want to conditionally display the text dependent on what the user has entered into the box you could use some javascript in the post element text field. e.g.
    &lt;span id="me"&gt;&lt;/span&gt;
    &lt;script language="javascript"&gt;
    function test1(){
    if (1 + 1 == 2){
    document.getElementById("me").innerHTML = "sometext";
    &lt;/script&gt;
    then in the html form element attributes field you can call this function like this:
    onblur="test1()"
    Hope that helps
    Adam

  • Image in a post element text : urgent

    hello.
    I am simulating a lov popup field (display description, return key..) because I am building the popup page manually...
    All works fine, I have a text field witch receive the key and display a description, I am concatening an image (in the post text element), when I click on this image My lov popup is openeing...
    My problem is : the image witch is right to the text field must be stuck to this text field ( I have a space between them),
    Any idea please ?

    lila,
    We can look at your application on htmldb.oracle.com where you reproduce this problem. Just post the app ID and we'll take a look.
    Scott

  • 3.12 post element text appearing on new line

    I have an icon and some javaScript behind it to clear the content of the item, which on moving to 3.12 is moved onto the next line:
    http://apex.oracle.com/pls/otn/f?p=41395:10
    Is there a simple way of avoiding this please so that it all appears on the same line (as in v2)?
    Phil

    Hi Phil,
    In your page's HTML Header setting, add in:
    &lt;style type="text/css"&gt;
    fieldset {display:inline}
    &lt;/style&gt;By default "fieldset" items are block elements so will always end with a new line - the above forces it to flow with the text
    Andy

  • 3.1 upgrade problem:  Post Element Text does not align properly - DUPLICATE

    Duplicated in error - problem with browser. Please remove this one.
    Thank you.
    Message was edited by:
    Thomas 8246

    Duplicated in error - problem with browser. Please remove this one.
    Thank you.
    Message was edited by:
    Thomas 8246

  • Button with pre element text is given a container div

    Hi!
    Just installed 4.2.2.00.09 and imported a workspace and an application. Worked fine.
    I noted a page display difference when compared to the exported application (4.1.0.00.32). I have (so far) found this:
    If I have a button with Pre Element Text set to <div class="dummy"> and Post Element Text set to </div>, Apex generates an extra div around it all.
    If my button was named P1_SUBMIT I end up with
    <div id="P1_SUBMIT_CONTAINER">
    <div class="dummy"> <input type="button" value="Search" id="P1_SUBMIT" /></div>
    </div>
    Is it possible for me to turn this extra div off?
    Kind regards
    Tomas

    Hi,
    Change the "Number of Columns" setting in the "List of Values" where you define the 1,2,3,4,5 to "5", and you'll be all set.
    --Jennifer                                                                                                                                                                                                                                                                                                   

  • How can I fix an error where Firefox temporarily opens a blank new window every time I try to post a text reply on any YouTube video?

    I'm not sure when it first started occurring, however, I recently noticed that ANY time I have tried lately to post a text reply to ANY video on YouTube, Firefox will open an "about:blank" screen for about 1-2 seconds, and close it. I will not get to make my reply and everything seemingly goes back to normal.
    If I open the same video URL in I.E. 11.0, I have no difficulty whatsoever posting text replies to ANY videos, so something is going on with Firefox.
    The thought had crossed my mind to uninstall/reinstall Firefox, and I know there's no harm in doing so, but I figured I'd come here first, in case someone who knows Firefox better than I, has an even simpler solution, or in case the uninstall/reinstall idea wouldn't have worked anyway. Please let me know what y'all think about this.

    Hello,
    Please try using our Reset feature.
    The Refresh feature (called "Reset" in older Firefox versions) can fix many issues by restoring Firefox to its factory default state while saving your bookmarks, history, passwords, cookies, and other essential information.
    '''''Note:''' When you use this feature, you will lose any extensions, toolbar customizations, and some preferences.'' See the [[Refresh Firefox - reset add-ons and settings]] article for more information.
    To Refresh Firefox:
    # Open the Troubleshooting Information page using one of these methods:
    #*Click the menu button [[Image:New Fx Menu]], click help [[Image:Help-29]] and select ''Troubleshooting Information''. A new tab containing your troubleshooting information should open.
    #*If you're unable to access the Help menu, type '''about:support''' in your address bar to bring up the Troubleshooting Information page.
    #At the top right corner of the page, you should see a button that says "Refresh Firefox" ("Reset Firefox" in older Firefox versions). Click on it.
    #Firefox will close. After the refresh process is completed, Firefox will show a window with the information that is imported.
    #Click Finish and Firefox will reopen.
    Did this fix the problem? Please report back to us!
    Thank you.

  • How to give error message for the screen element text field when wrong i/p

    How to give error message for the screen element text field when wrong i/p
    when wrong input given
    eg. 
    I have a text box with SBOOK-CARRID
    so when user give wrong entry in text box i.e LG
    then I should give some error stating that the the input is invalid or not available ,
    now it showing the error of standard messages,
    i want manual message to be displayed when error comes.
    Thank you,
    Regards,
    Jagrut Bharatkumar Shukla

    Hi all,
    Thank you for your valuable reply,
    but the thing is that its a screen field,
    i.e text box not a selection screen
    i created in screen layout
    with name sbook-carrid
    now i want to get error message display if wrong i/p is given
    thank you.
    Regards,
    Jagrut bharatkumar Shukla,

  • Post long text for document line item via FI-GL Inbound IDoc

    Hi guru,
    I am trying post extension ZFIDCP02 linked basic type FIDCCP02 and message type FIDCC2 IDoc in R/3 (4.6c) via IBM Websphere (Inbound IDoc),
    I am use inbound function module IDOC_INPUT_FIDCC2 and activate exit 008 (EXIT_SAPLF050_008) and exit 002 (EXIT_SAPLF050_002),
    In the extension ZFIDCP02 and under E1FISEG, I am add my segment  ZITEXT include field TDSPRAS, TDID, TDOBJECT, TDLINE.
    I am send  ZFIDCP02 IDoc via IBM Websphere no error  but all field TDSPRAS, TDID, TDOBJECT, TDLINE in my segment  ZITEXT not post in FI-GL.
    How can I  post long text for document line item (ZITEXT) in FI-GL ?.
    and I'm mean post ZITEXT to bank statement via IDOC.
    Please throw light on this  and  may be I  'm want solution or example ABAP code for exit 002 (EXIT_SAPLF050_002).
    Thanks in advance,
    Akkapong Pirachai
    CAT Telecom
    Edited by: Akkapong Pirachai on Aug 20, 2008 7:40 AM

    Close question because long time for answer.

  • Text checkbox obscuring view of text in PSE12

    With PSE12 how do I stop the green "tick" / red "reject" checkbox from obscuring my view of the text as I'm trying to type? The problem is that the checkbox retains the same number of pixels on my screen - no matter what amount of zoom is applied to the image I'm editing. This did not happen with my previous version (PSE7) - and it's annoying me so much that I would find it very difficult to recommend the program to anyone else. I expect that there is an easy solution - but I have done a lot of searching and I can't find it. The solution will be greatly appreciated.

    Thank you MichelBParis - I appreciate your suggestion and there's no doubt that it does work - but if Adobe's developers had done their job well, then all those steps would have been completely unnecessary. There is no good or useful reason for having the checkbox anchored close to the text box. With PSE7 the checkbox for the text was located on the right hand side of the task bar (which was above the edited image) - so it was impossible for the checkbox to get in the way of any part of the image. The designers of PSE12 should have applied a similar tactic by locating the text checkbox at the bottom, to the right of all the options for adjusting the text - OR they should make the existence of text checkbox optional. Thanks again for your help and advice.   

  • Extracting nested element text

    Hi everyone,
    I have a basic question which has been on my mind for a few days now. I'd be appreciative for any assistance or advice.
    I'm aiming to extract info using JDOM from all the children of 'Parent' (please see code below). Getting info/text from 'ChildOne' and 'ChildTwo' is easy, but I am having trouble extracting info out of the nested-element at 'ChildThree'.
    I'd be appreciative if anyone can shed light on how to solve such a question: how to not only extract info out of ChildOne, Two but also ChildThree, knowing that ChildThree is nested.
    I've playing around with instantiating an element which gets the children of 'ChildThree' and another which gets the elements of 'ChildThree/'FirstChild'... but I think there's an easier way than that!!
    I've attached a code-snippet which is resembles my XML file. I'd be very appreciative for any advice.
    Thanks,
    p
      <Root>
        <Parent>
          <ChildOne>First</ChildOne>
          <ChildTwo>Second</ChildTwo>
          <ChildThree>
            <InnerChild>
              <First>Text</First>
              <Second>Text</Second>
              <Third>Text</Third>
            </InnerChild>
          </ChildThree>
        </Parent>
      <Root>

    I reached a solution to my problem actually.
    In case other people have the same problem, this is what I did; source-attached.
    I made a behavior called 'displayElements' and it takes a parameter of type Element. I then made it so that for this specific element, I call the '.getChildren()' behavior such that a List is produced. This List was then saved as an Iterator and read-through iteratively.
    At the end, I re-called the 'displayElements' method and passed-in the same element because that element MIGHT have inner-elements.
    Anyways, enough talk. Here's my code incase other people have the same problem.
    public static void displayKids(Element current) {
              //Printing the current-element and the corresponding element-text
              System.out.println(current.getName() + "\t" + current.getTextTrim());
              //Print a row of stars; increases readability
              System.out.println("********************************");
              //For the specific element, we then call 'getters' which get the
              //children for that specific element and save as type 'List'
              List<Element> children = current.getChildren();
              Iterator iterator = children.iterator();
              while (iterator.hasNext()) {
                   Element child = (Element) iterator.next();
                   //Recursively calling the function
                   displayKids(child);
         }

  • MDIS ValueX XML Structure, element TEXT not found in xml schema

    When you extract ECC Contract through MECCM using port ERP Contract Data Transmission, if your mapping isn't correct 2 exception types are created: StructuralX or ValueX (and ImportX but I haven't seen this type of exception yet).
    Anyone noticed that the structure of the XML messages are actually different? The XSD for structuralX files are the same as the files placed in the "ready" folder, where as the XSD for the valueX files are DIFFERENT, and contain a tag called <TEXT>.
    This raises an issue when we're trying to handle exceptions in Import Manager using the type Port.  We get error "Logon Error: Source file does not conform to XML Schema. Element <TEXT> not found in xml schema".
    We can process exceptions in the structuralX folder, but not in the valuex folder because the xml file structure in the valuex folder is different.
    Just wondering if anyone else has had this issue or has resolved it.  We will open message with SAP.
    Thanks.

    Hello
    What is your MDM version ?
    this issue happened in old MDM 7.1 versions but was fixed in SP-2 unless you mapped Clone fields and in this case the fix is a bit later.
    In MDM 7.1 the latest builds of SP-2 and SP-3 should have the fix for all issues. But if you use MDM 5.5 then some issues regarding XSD conversion for exception where not addressed due to technical issues.
    The workaround for MDM 5.5 (If you use a late build of SP-6 Patch-4 or SP-6 Patch-5)  is to use the original file to fix the exception and not the file in the exception folder.
    Please notice that when you have Structural exception then all the Source XML file will go to the Exception folder.
    But in case of Value Exception - The source XML file will be dropped in the archive folder and another XML file containing VXR's (Virtual Extended Records) will be dropped in the exception folder, Therefore will have a different structure.
    Hope it helps.
    Thanks.
    Best Regards.
    Yaron.

Maybe you are looking for

  • Accounting Document not generate after Billing

    Dear All, Billing Documents are saved but after accounting document are not getting generated. we are getting the following error *Balancing field "Business Area" in line item 001 not filled* and billing doc are not releasing to accounting we have ch

  • HT203167 I have another email account that has a bunch of music on it.  However, I'm uncertain how to combine the two accounts? can anyone help?

    I had another account that years ago I downloaded a bunch of music.  I was wondering if there's any way I'm able to get the music from then into my library now.  I've spent the money, can I have the product please?  Can anyone help?  Thank you

  • Video in Mail

    Video clips used to be viewed in mail directly. Now I have to DL and drag to Quicktime. How do I fix that? And often If I click on the DL'd Video Icon I get a message saying Quicktime Player Must Be Installed to Run this Application. BUT when I Drag

  • ABAP logic for customer variables

    Dear Experts, I need a code for given screnario. There are 2 similar cubes under Multiprovider on which report is running.I am not supposed to restrict cube at query level in filters as both cubes are required.Here is an example. Examples: 1)      Th

  • Optimum Resolution & Size of Album Art

    I'm scanning in some of my album art for iTunes and have found that it looks fine in all cases except when displayed in Front Row while playing a track. Imported art does not have this problem. I've scanned in the images at 600 dpi and saved as a sta