This question is definitely a basic question, however I have issues to resolve this myself and also I could not find any question on this.

I have a PL/SQL procedure in which I am assigning a CLOB to a label (display item). How do I assign the CLOB domain to the label so it can accept a clob value from the database?

api_component.setValue(in_paneldotcomponentname_tx => 'TS_INTRO_MPL.TS_MY_INTRO_DI', in_value_cl => l_clob);

Also, How do I make it dynamic width and height to the full area of the panel? (Auto)

<panel>
  <xyLayout>
    <cell x="5" y="5" height="100" width="200">
      <textLabel name="TS_MY_INTRO_DI"/>
    </cell>
  </xyLayout>
</panel>

asked 03 Apr '14, 08:53

viswapsp's gravatar image

viswapsp
36111
accept rate: 11%


Hi Viswa,

Unfortunately it's not possible to set a domain to the textLabel component. To set a CLOB value to a textLabel, you have to assign a dummy clob datatyped datasource column to this textLabel component and set its value through api_datasource.setColumnValue API.

To make the textLabel's height dynamic, you should use tableLayout instead of xyLayout and set "Dynamic" as row's heightPolicy attribute:

<row heightPolicy="Dynamic">
  <cell hAlign="Full" vAlign="Full">
    <textLabel text-align="Left" column="PROBLEM_DESCRIPTION" dataSource="serviceRequests1"/>
  </cell>
</row>

Hope this helps,
Ibrahim

link

answered 04 Apr '14, 07:29

Ibrahim%20Sandalli's gravatar image

Ibrahim Sand... ♦♦
1.5k5
accept rate: 25%

Ibrahim - Thank you. Though I understood what you have mentioned, I just want to make sure I tell you the problem clearly. I am thinking the following should be a possible thing without needing a "Data Source". Do you really think we have to use a Data Source here?

I broke the functionality into 3 layers. 
 1. DB_layer -> packages that directly deals with tables.
CREATE OR REPLACE PACKAGE ts_timesheet_pkg IS
   FUNCTION get_compny_dscrptn  RETURN CLOB;
   FUNCTION get_curr_business_dt  RETURN DATE;
END;
/

 2. UI packages-> packages that interact with DB Layer packages and the UI components.
CREATE OR REPLACE PACKAGE BODY ts_timesheet_ui_pkg IS
   PROCEDURE pop_compny_info IS
   BEGIN
      api_component.setvalue('TS_TMSHT_CENTER_1_MPL.TS_TMSHT_COMPANY_DCRPTN_DI'
                            ,ts_timesheet_pkg.get_compny_dscrptn);
   END;
END;
/

 3. Front end Application: Here I have the following 
a. Simple Panel: TS_TMSHT_CENTER_1_MPL
b. On this panel text area: <textArea name="TS_TMSHT_COMPANY_DCRPTN_DI"/>
c. An action: pop_compny_info with the body 
ts_timesheet_ui_pkg.pop_compny_info
d. Application level "post open" event in which I am calling the action "pop_compny_info".

Invalid data type, expected "VARCHAR2" got "CLOB.
I tried using textLabel as well, and the result did not change.
(04 Apr '14, 09:56) viswapsp

Hi Viswa,

The default domain of text components is varchar2 and this domain cannot be changed for the textLabel. However, if the textArea is suitable for you, it's possible to achieve your request without datasource, by setting "DefaultCLOB" as your textArea domain:

<textArea domain="DefaultCLOB" ../>

Regards,
Ibrahim

(04 Apr '14, 10:28) Ibrahim Sand... ♦♦
Ibrahim - It worked when I changed the textLabel to textArea with "domain" clause. You are awesome :)

<textArea name="TS_TMSHT_COMPANY_DCRPTN_DI" domain="DefaultCLOB" wordWrap="Y" editable="N" />

Thank you.
link

answered 04 Apr '14, 13:49

viswapsp's gravatar image

viswapsp
36111
accept rate: 11%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×2
×2

Asked: 03 Apr '14, 08:53

Seen: 977 times

Last updated: 04 Apr '14, 13:49


© Copyright Gerger 2017