Render text item with procedure call

I have made several custom item types with custom attributes, and I use a procedure calls to render them in my region.
For example, the pl/sql call from the item can look like: portal.write_text and I use p_id and p_text as attribute parameters.
When I render the Text attribute it shows with no new lines (no <p>) although it is written with it in the item wizard.
How can I render the text attribute exactly as it supposed to be? (with <p>'s)
/Malin

Even simpler:
procedure showTextItem (p_itemid IN INTEGER, p_siteid IN INTEGER, p_language IN VARCHAR2) is
   theText varchar2(32767);
   begin
      select i.text
         into theText
         from portal.wwsbr_all_items i
         where i.id = p_itemid
         and   i.caid = p_siteid
         and   i.is_current_version = 1
         and   i.active = 1
         and    (i.language = p_language
                    or ( exists -- a row for the item in the page group default language            
                          (select pg.id             
                           from  wwsbr_all_content_areas pg             
                           where pg.id = i.caid             
                           and   pg.default_language = i.language             
                         and not exists -- a row for the item in the current language            
                          (select i2.id             
                           from  wwsbr_all_items i2             
                           where i2.id = i.id             
                           and   i2.language = p_language
                           and   i2.is_current_version = 1
                           and   i2.active = 1             
      htp.p(theText);
   exception
      when others then htp.p(sqlerrm);
   end;Note the conditions on language, active status, and current version - you should include these conditions
whenever you query from wwsbr_all_items.
Please refer to the content repository view documentation in the PDK.
Regards,
Jerry
PortalPM

Similar Messages

  • Is it possible to intialize a text item with Global Variable

    Hi,
    I have forms10g, I want to initialize text item with current hour for this purpose I have defined one global variable and initialize text item(for hour) with this global variable.
    Defination of global variable
    :GLOBAL.my_var := TO_CHAR(sysdate,'hh24');
    Initial Value of form text item as
    :Global.my_var
    but when I run the form it raise error " ORA-01403 no data found " error
    I already check this global variable intialize properly with the current hour.
    Thanks and Regards.
    Khawar

    Hi Francois,
    Thanks for reply, but when I removed initial value property of text item from Global variable to other or Null form starts running, I have one Poplist and it populate with a procedure at form startup I remove it but no success.
    Thanks and regards.
    Khawar

  • The color of text item with multi-line in web

    I tried to change the background color of text item with multi-
    line, but it does not work when I run in the web, if some body
    knows that, please give a hint.
    Thanks
    Frank
    null

    I tried to change the background color of text item with multi-
    line, but it does not work when I run in the web, if some body
    knows that, please give a hint.
    Thanks
    Frank
    null

  • Which situation should we use the text item with the item category TATX

    Dear experts!
    Thank you for your attention!
    I am confused with text item (TATX).
    which situation should we use the text item with the item category TATX????
    Someone told me that the text item is dummy and should be used as a manual of certain standard item. But the manual may be a book or several papers and it also takes up some inventory not a dummy.
    So, could some body tell me what the text item (TATX) exact is and what function it has.
    Best regard!
    Tangdark

    Hi,
    you can use TATX if you like to enter a text and to print some information between the item lines.
    Regards
    William

  • Oracle 10g FRM-41051 on a non-database text item with a LOV

    Hi all,
    I'm struggling with a problem I'm convinced must have a really simple solution, but for the life of me I can't figure it out!
    I have a data block called query. It is a non-DB block with a number of items, with either LOVs or drop down lists. It is used to choose values, which are them programatically 'translated' into values in two other database data blocks (which are populated in the WHEN-BUTTON-PRESSED trigger of a button in the non-DB block).
    This is necessary as I have a slightly complex query which takes values from many different tables and displays bits of information from all the different tables.
    My problem is that, on my text item (which has a LOV attached to it with Automatic Display set to Yes); when I click on it, I expect the LOV to show and I am able to choose a value from it. Instead I get the error 'FRM-41051 You cannot create records here' and the LOV does not display.
    I don't understand this. Everything on the block is a non-DB item, including the block itself, and I don't want to 'create' any records, all I want to do is choose values into my text items which I can then use in a DB query (written in my trigger).
    What am I doing wrong?
    Abigail

    Probably this other item or block has got property insert allowed to FALSE.
    I have suggested you to use a push button in order to check that everything in the LOV is OK.
    Lov can also return value to item in another block; probably in your case there is something that fires the error.
    Normally when I develop my form I disable on-error and on-message trigger in order to follow every step at runtime...
    I'm happy that you have resolved your problem :D
    Fabrizio

  • Navigating to the text item with color

    hi all,
    i have 10 text_items in my form, i want that when i am in first text_item the color should change default to any color i want (take suppose yellow)
    then when i am going to second text_item then color should change to yellow like that it has to happen for all the text_items.
    how can i do this... where i should write the code and what code...
    please reply...

    Create one VISUAL ATTRIBUTE with background color = yellow and use the code as below on block level triggers.
    1. Create one trigger on block-level called PRE-TEXT-ITEM and use the code as below...
    SET_ITEM_PROPERTY(:SYSTEM.CURRENT_ITEM,VISUAL_ATTRIBUTE,'VISUAL_ATTRIBUTE_NAME');2. Create another trigger on block-level called POST-TEXT-ITEM and use the code as below...
    SET_ITEM_PROPERTY(:SYSTEM.CURRENT_ITEM,VISUAL_ATTRIBUTE,'DEFAULT');-Ammad

  • How to make one of the columns in my tabular an text item with popup lov

    Hello,
    I want to manually make one of the columns say for the deptno in my tabular form as on text item popup lov using apex_item package
    and whenever user clicks on the text item popup lov, it should open up an dept table report and from which he/she needs to select
    the deptno and this deptno should be returned into the text item popup lov column.
    like for example: say if i have an emp table tabular form with all the columns and deptno column as an popup lov and when user clicks on this column
    it should open up an new sql report(similar to popup lov window), the select statement for this would be
    select deptno,dname,loc from dept order by 1;
    And from this popup lov report whenever an user selects a particular deptno, the same deptno should be returned to my text item popup column in emp tabular form.
    something like this
    select
    "EMPNO",
    "EMPNO" EMPNO_DISPLAY,
    "ENAME",
    "JOB",
    "MGR",
    "HIREDATE",
    "SAL",
    "COMM",
    APEX_ITEM.TEXT(3,deptno,20,50,'readonly=true') || '<img height="16" align="middle" width="16" style="vertical-align: middle;" alt="Popup Lov" src="/i/lov_16x16.gif"/>' deptno
    from "#OWNER#"."EMP"
    like i made my column as an text item lov and now I want to write an onclick event for the text item lov so that an popup window is displayed which is a sql report of the table dept (select deptno,dname,loc from dept order by 1;) and in this report i want to make deptno as an link so that when ever an user clicks on it
    -- this value should be returned to my text item popup lov column deptno in the emp tabular form.
    can anyone help me out with this issue.
    thanks,

    Hi,
    Refer to the link for the detailed information on ALV Grid.
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a415907
    Hope it helps.
    Regards,
    Rajesh Kumar
    Edited by: Rajesh Kumar on May 25, 2009 9:13 AM

  • Concatenation text item with variable

    hi to all
    i try to concatenation a item in form with variable.
    i went in a loop to concatenation counter value with 40 text item.
    once text item have a unique name like these:
    text_item_1
    text_item_2
    text_item_3
    i need to concatenation loop counter value with text item name.
    like this*=>:bl.text_item || wdser*
    like this thing that step by step go on all item and insert any value on that.
    PLZ help me.
    Edited by: Eliea on May 25, 2009 4:22 AM

    create a button and write following code.
    while :system.last_record!='TRUE' loop
         :block.text:=:block.TEXT_NAME||variable;
         next_record;
    end loop;
    If :system.last_record='TRUE' then
         :block.text:=:block.TEXT_NAME||variable;
    end if;
    Please mark the answer if it is helpful/correct

  • Trying to create a text item with a scroll bar in Indesign 5.5

    Is there a simple way to create a scrollable text article in Indesign 5.5? It will later be exported to a SWF as a mini-flash web portfolio.
    I would appreciate any help.
    I'm new to Indesign.

    quote:
    Originally posted by:
    wildfire121
    Can someone please help. I am trying to create a text box
    with a working scroll bar that will scroll the text in the text
    box. Can someone please help me with this?
    Do you mean a text box people can type in (for a Web form
    entry) or one for displaying your content?
    If the first, then you use the textarea tag and scrollbars
    appear when the user types more lines that you specify. See the
    textarea
    description at W3Schools.
    If the second, then that's usually done in Flash, but can be
    done with CSS. See these two pages:
    Dynamic
    text with scrollbar (Flash)
    Textbox
    with scrollbar (CSS)

  • Text item with a blank space

    I am trying to save a blank space in a text item but everytime i do, the item is getting trimmed.
    if i put in " " then it trims to null.
    If i put in "P " then it rtrims to "P"
    What am i doing wrong?

    I dont think i have been clear on what we are trying to achieve. They will not always need a blank space but could need one if they choose to do so.
    The form concatenates a set of values. So we have a set of information that is exported by the form.
    i.e.
    ONE
    TWO
    THREE
    FOUR.
    on button press turns into ONETWOTHREEFOUR
    they then have a custom seperator text item to specify what seperator is used to seperate the values. So this is where i want the user to be able to specify anything they want, including a blank space or anything else they require like comma etc so if they entered ", "
    on button press turns into ONE, TWO, THREE, FOUR
    at present it trims it turning it into ONE,TWO,THREE,FOUR
    Hope this makes sense as to why i want the blank space.
    I can add it as a list item and concatenate it on save but this this is a little OTT for what is a simple task

  • Pre-populating many items with one call to the database

    Hi,
    I have a form, containing eight text items, that needs to provide a 'copy from latest record' function, so when the form is rendered in 'Create mode' the data from the latest record is copied to the form and can then be updated.
    I could use the 'Default Value' property of each item, but as I would be retrieving the same row for each item this doesn't seem very efficient.
    Can anyone recommend a better way of doing this?
    Thanks
    Andrew.

    Andrew,
    You could create a Process that runs On Load - Before Header that does a
    Select Into your items.
    e.g:
    Select Col1, Col2, Col3
       into  :P1_Field1, :P1_Field2, :P1_Field3
      from Your_Table
      Where (your conditions);Doug

  • Strange problem with procedure calling from Java!!!

    I am using Oracle 8.1.7 Database, Oracle 8i Application server and WInNT platform.
    I am facing a strange problem while inserting a String from Java to Oracle database through Procedure. When i am passing the String containing single quotes(e.g "test' and ' and ' end") and without including any escape charactes for the single quotes I am passing the String by the setString() method then the procedure is inserting the single quotes without any problem.
    Of course when I am independently executing the procedure thru backend and passing the same String containing single quotes then the error message comes as " quoted string not properly terminated" which is justified,
    I have even printed the String in a file through sql on the runtime of the procedure when it is called by Java and then also the String contatins single quotes that is passed through java without any escape characters. This means that procedure is inserting the String into the column without any hassles!!!!!
    Can anyone tell me what may be the reason for the peculiar behaviour of Database?
    Thanks

    Sri Ram wrote:
    No actually in the documentation of oracle database 10g plsql user guide, oracle explains the concept of declaring nested plsql subprograms he gave the example but in the main block he gave NULL, without calling any procedure.Can you provide a link to where in the Oracle documentation you saw this example?
    in order to know which procedure is getting first i added a dbms statement in both the functions and called the function from the main block.
    the original example was
    DECLARE
    PROCEDURE proc1(number1 NUMBER); -- forward declaration
    PROCEDURE proc2(number2 NUMBER) IS
    BEGIN
    proc1(number2); -- calls proc1
    END;
    PROCEDURE proc1(number1 NUMBER) IS
    BEGIN
    proc2 (number1); -- calls proc2
    END;
    BEGIN
    NULL;
    END;
    ---------------------------------------------------------------------------------------------------------The original example is equivalent to:
    BEGIN
       NULL;
    END;That is, the main block never calls anything. Either you are misinterpreting the Oracle documentation, or if the example came from a non-Oracle source as I suspect, the author of that example has a deeply flawed understanding of how programming works.
    John

  • Problem with comparing text item with hidden item

    Hi all,
    I have two items, one text field which has a user name and other item which is hidden which also has a username input from a file.
    I want to compare these two items.
    But when both items are text fileds am able to compare, but when one is made hidden unable to compare.
    Please help on this......
    thanks,
    Srini

    Hi Srini,
    As long as you understand that the user can change the value of ANY field, even it is hidden, then I would suggest something like:
    1 - Hide your existing Login button. On the button definition, in "Button Display Attributes" add the following into the Attributes setting:
    style="display:none"2 - In the Login region's Region Footer, create a new button:
    &lt;input type="button" class="t12Button" value="Login" onclick="javascript:checkNames();"&gt;(Note that I have used a class name of "t12Button" - change this to match your current theme)
    3 - Underneath that, add in your javascript:
    &lt;script type="text/javascript"&gt;
    function checkNames()
    if ($v('field1name') == $v('field2name'))
      doSubmit('loginbuttonname');
    &lt;/script&gt;Then, when the user clicks the new Login button, this triggers your javascript. This checks that the values for field1name and field2name match. If they do, if fires the normal submit for the page (the same as if you clicked the original Login button)
    Andy

  • How can Highlight a text item with Visual Attributes

    DEAR ALL,
    I have an emp_dept_date block and in that block there are item by the name of to_dates in tabular form there are many dates display when user double click on the current date or any date it show the data of that date in the next block. i want to create a (when button pressed) in my Control Block that when button press the current date color changed automatically so for that what should i wirte in when button pressed.
    Thanks for your cooperation
    Regards,
    Kamran J. Chaudhry

    the is for first item in a block
    Set_Item_Instance_Property('emp_dept_date.to_date', CURRENT_RECORD, VISUAL_ATTRIBUTE,'date');
    this is for second item in a block
    Set_Item_Instance_Property('emp_dept_date.DAILY_ID', CURRENT_RECORD, VISUAL_ATTRIBUTE,'date');
    (emp_dept_date) is block name
    (to_date & daily_id) is an item name
    date is an visual attribute name which we create our self to define a color we want to change for the items we want to.
    these both visual attributes will solve the when we click when button pressed in that change the color of the items in the block you want to change
    Message was edited by:
    Kamran J. Chaudhry

  • Help with Scrolling Text Item.

    Hi , need help with making a text item scrollable.
    i.e. A field is 30 characters and i can only display 10
    characters, now what I would like is a scroll bar under the text
    item.
    Is this possible. I am using Forms 5.
    Thanx for any help.
    Pankaj Patel.
    null

    Petr Valouch (guest) wrote:
    : Pankaj Patel (guest) wrote:
    : : Hi , need help with making a text item scrollable.
    : : i.e. A field is 30 characters and i can only display 10
    : : characters, now what I would like is a scroll bar under the
    : text
    : : item.
    : : Is this possible. I am using Forms 5.
    : : Thanx for any help.
    : : Pankaj Patel.
    : Hi
    : You need that scrollbar under the item? You can set length
    of
    : text item and its size independently, so you can have text
    item
    : char(30) with size of 10 characters.
    An alternative is to declare the item as a multi-line text item
    with wrap set on. This would give you a vertical scroll bar on
    the item.
    Another option is to programmaticaly pop up an Editor, each time
    focus is moved to the item, or to actually change the width of
    the item when focus moves to it (and shrink it back when focus
    moves away.
    Simon Hedges
    Gloucester
    UK
    null

Maybe you are looking for

  • Unable to load itunes store on iphone 4S after updating to ios 7

    After I updated my iphone 4S to ios 7, I am unable to load the itunes store on my phone.  It spins like it is loading and then stops, but the screen is blank.  Does anyone know what might cause this?

  • Cisco C5548 UP _ very urgent please

    Hi Guys, We have recently bought 2 x cisco Nexus C5548 UP switches. they are running firmware code : 5.2(1)N1(4) and I want to upgrade them to 5.2(1)N1(8). However, when I try to upload a the kickstart file and firmware to the switch  I get the the f

  • Problem with class font

    I have been execute a tool, but she didn�t work properly. The message erro is unknown option "-class"font "-dt-interface user-medium-r-normal-m*-*-*-*-*-*-*-*-*"

  • Please , open this file for me

    i have been trying to open this file , but vainly , please open it for me , or guide me to a way to do so ? https://drive.google.com/file/d/0By6htDkhXWBiaEllNi1HV21pNFk/view?usp=sharing thanks

  • How to know if a given internal order(AUFNR) budget is exceeded...

    Hello Experts, Are there any available FMs or BAPIs that checks if a given IO number's budget is already exceeded or not? Thank you guys and take care!