Max number of char in textArea component
Hi gurus!
The thtmlb textArea component does not have the property maxlegth. How can I limit the maximum amount of caracters for this component?
Thanks!!!
check this blog.
/people/sap.user72/blog/2005/02/07/bsp-howto-show-a-progress-bar-for-limiting-text-input
Similar Messages
-
Max number of chars in process message MSEL?
Hi, what is the max number of characteristics can be used in process message category's MSEL table? Right now, I am using more than 99 characteristics and I get a short dump DYNPRO_FIELD_CONVERSION. Is it really limited to 99 characteristics and if it is true, is there an OSS note to change it to allow more than 99?
Thanks and points availablePlease make sure that you build a
multithreaded program first (check with ldd).
If anyone can tell me the maximum number of threads per process I would
really appreicate it.
Also the maximum number of open files per process. It depends on the architecture (x86/SPARC), OS version,
64 or 32-bit, /etc/system, shell limitations (/usr/bin/ulimit) ...
Search for "rlim_fd_max / rlim_fd_cur" on docs.sun.com too.
HTH,
-vladimir -
Alter table reaching the max number of char 4000, CLOB? NCLOB?
I have a column is a table defined as a VARCHAR2(4000)
I try to alter the table
alter table sybaapc
MODIFY SYBAAPC_EXTRACURRICULAR VARCHAR2(5000)but it give me this error
ORA-00910: specified length too long for its datatype
I want the users to be able to enter more information on that column.
It seems that 4000 is the max we are in Oracle 10g
can I changed to CLOB or nclob, we already have data in that table?
What are the implications of changing it to clob or nclob,Thats becuase the maximum character length for a table column is 4000.
Alternatively you can:
SQL> create table test_1 (col1 VARCHAR2(4000))
2 /
Table created.
SQL> insert into test_1 values(RPAD('*',4000,'*'));
1 row created.
SQL> commit;
Commit complete.
SQL> alter table test_1 modify (col1 clob);
alter table test_1 modify (col1 clob)
ERROR at line 1:
ORA-22858: invalid alteration of datatype
SQL> alter table test_1 add(col2 clob);
Table altered.
SQL> update test_1 set col2 = col1;
1 row updated.
SQL> commit;
Commit complete.
SQL> alter table test_1 drop column col1;
Table altered.
SQL> alter table test_1 rename column col2 to col1;
Table altered.
SQL> desc test_1
Name Null? Type
COL1 CLOB
SQL>
SQL> select * from test_1;
COL1
SQL> Edited by: AP on Aug 24, 2010 7:41 AM -
Restricting TEXTAREA component to lines.
Hi All,
I wanna restrict user entry to certain no of lines in my
textarea component. Ho can i do this? I havent seen any relevant
API's for this in the help. Should i do this totally programatic
way?? Can anyone give me a hint?...
I can restrict characters and the requirement spec needs to
restrict lines too, say 16 lines.
Regards
Roshanquote:
Originally posted by:
kglad
how many lines fit in your textarea? or, what's the maximum
number of lines of scrolling that you want to allow?
Hi Kglad,
I have to restrict my textArea component to 16 lines. Even if
a single char is represented per line, it sould take only 16 lines
whatsoever.
I have restricted the no of chars to 572, which was there in
the requirement. Now i'm left with this probs.
Hope I can get it done..
Reagards
Roshan Kolar -
Limit number of chars per line
Hi ,
how to limit the number of chars per Line in a textArea or RTFEditableText?
I have to do the following:
Allow 25 Chars for first line,
any other line should have max. 28 chars.
First line should have a bold font.
Not an easy thing..
I tried to use a textarea fpr input and put the text into a datagrid in the textarea.change() event.
This works, but I lose a lot of the standard features of the textarea (hyphenation etc.)
The idea is to use only the textarea or a RTFEditor for applying the rules mentioned above.
Thanks
thorstenextend PlainDocument class to restrict the number of characters per line.
Set this class as model to TextArea.
Below is a class which does this. May be its useful
import javax.swing.*;
import javax.swing.text.*;
import java.awt.*;
public class FixedNumericDocument extends PlainDocument {
private int maxLength = 9999;
private String max="";
public FixedNumericDocument(int maxLength) {
super();
this.maxLength = maxLength;
//this is where we'll control all input to our document.
//If the text that is being entered passes our criteria, then we'll just call
//super.insertString(...)
public void insertString(int offset, String str, AttributeSet attr)
throws BadLocationException {
if (getLength() + str.length() > maxLength) {
return;
else {
try {
//check if str is numeric only
int value = Integer.parseInt(str);
//if we get here then str contains only numbers
//chk if it is less than 65535 so that it can be inserted
super.insertString(offset, str, attr);
catch(NumberFormatException exp) {
return;
return; -
Max number of records in an internal table
Hi,
Can any one tell me what is the Max Number of records we can get into an internal table.
if you have any link of sap help on this please FWD.
thanks in Adv.
Regards,
Lakshmikanth.T.VHi lakshmikanth,
Internal Tables as Dynamic Data Objects
Internal tables are always completely specified regarding row type, key and access type. However, the number of lines is not fixed. Thus internal tables are dynamic data objects, since they can contain any number of lines of a particular type. The only restriction on the number of lines an internal table may contain are the limits of your system installation. The maximum memory that can be occupied by an internal table (including its internal administration) is 2 gigabytes. A more realistic figure is up to 500 megabytes. An additional restriction for hashed tables is that they may not contain more than 2 million entries. The line types of internal tables can be any ABAP data types - elementary, structured, or internal tables. The individual lines of an internal table are called table lines or table entries. Each component of a structured line is called a column in the internal table.
regards,
keerthi. -
Max number of items exceeded?
I am trying to develop a questionaire like application. Most of the logic is stored inside pl/sql functions (that is retrieving the previous or next question with possible answers and answer-types, like, eg. radiogroup, select-list, textarea, ...) while all of the questions and respective possible answers are kept inside a collection. In processing the answers after submit I store given answers inside the same collection, basically by nullifying all possibly previously given answers for the current question and then looping through eg, g_f01.count to refill. The entire application remains on the same page, showing eg., in one 'frame', one or two questions with say 7 checkboxes and two textareas.
Everything seems to work fine, I can go forward and backward and will find new questions or ones that already have been answerd, but!!...
after the 50st item (answer), that is after I reached the 50st radiogroup, checkbox or textarea, new checkboxes or radiogroups even though shown the resulting values will not be stored inside the collection anymore.
generating the page i use:
htp.prn(apex_item.radiogroup(p_idx => 1, p_value => c2.a_id, p_selected_value => c2.qa_id, p_attributes => 'id="P2_QUEST_' || i || '"'));
and in processing correspondingly ...
FOR i IN 1 .. apex_application.g_f01.COUNT
LOOP
FOR c2 IN
(SELECT seq_id,
c001 q_id,
c002 a_id,
c012 qa_id
FROM apex_collections
WHERE c001 = to_char(p_q_id)
AND collection_name = 'ANSWERS'
AND c002 = apex_application.g_f01(i))
LOOP
apex_collection.update_member_attribute(p_collection_name =>
'ANSWERS', p_seq => c2.seq_id, p_attr_number => '12',
p_attr_value => c2.a_id);
END LOOP;
END LOOP;
to me I only use f01 ... f04 say, ... Is it possible that I still hit the max of 50 page-items?
Regards
j.max number of items exceeded?
-
Bug? using MAX() function on char(1) column returns something larger
details:
-- we have a complex nested query, where we are essentially returning the max() value into a variable
-- the max() function is being used on a char(1) column
-- where MAX() is part of an inner select, we have started getting
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
errors.
SELECT MAX(X) INTO var FROM ... works in 9i and 10g
SELECT X INTO var FROM (SELECT MAX(X) X FROM ... worked in 9i, does not work in 10g!
-- We never had problems with the code until upgrading to 10g release 2.
-- the Solution is to cast the final value with TO_CHAR(). The cast MUST be done at the outer most point of the select:
SELECT TO_CHAR(X) INTO var FROM (SELECT MAX(X) X FROM ... works
SELECT X INTO var FROM (SELECT TO_CHAR(MAX(X)) X FROM ... causes an error!
The following script demonstrates the issue, and includes the solution:
* October 3, 2006
* Possible SQL bug introduced with Oracle 10G
* Natalie Gray DBA/Developer, Environment Canada
* Description:
* Have discovered a problem with using the MAX() function
* on columns of type char(1)
* only an issue when used in an inner select
* solution (see test 4)
CREATE TABLE SQL_BUG_TEST
X NUMBER,
Y NUMBER,
Z CHAR(1)
INSERT INTO SQL_BUG_TEST (X, Y, Z)
VALUES (1,1,'A');
INSERT INTO SQL_BUG_TEST (X, Y, Z)
VALUES (1,1,'B');
INSERT INTO SQL_BUG_TEST (X, Y, Z)
VALUES (1,2,'C');
INSERT INTO SQL_BUG_TEST (X, Y, Z)
VALUES (1,2,'D');
DECLARE
TYPE REC IS RECORD (
x SQL_BUG_TEST.X%TYPE,
y SQL_BUG_TEST.Y%TYPE,
z SQL_BUG_TEST.Z%TYPE
v_rec REC;
BEGIN
-- DISPLAY THE TABLE DATA
BEGIN
DBMS_OUTPUT.PUT_LINE('TABLE DATA:');
DBMS_OUTPUT.PUT_LINE('');
DBMS_OUTPUT.PUT_LINE('SELECT * FROM SQL_BUG_TEST ORDER BY X,Y,Z;');
FOR crs IN (SELECT *
FROM SQL_BUG_TEST
ORDER BY X,Y,Z) LOOP
DBMS_OUTPUT.PUT_LINE(':'||crs.X||':'||crs.Y||':'||crs.Z);
END LOOP;
EXCEPTION WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE(SQLERRM);
END;
-- TEST 1
-- returning result from MAX into a variable when the MAX is in the outer most select
-- does not cause an error
BEGIN
DBMS_OUTPUT.PUT_LINE('*****************************************************');
DBMS_OUTPUT.PUT_LINE('TEST 1');
DBMS_OUTPUT.PUT_LINE('');
DBMS_OUTPUT.PUT_LINE('SELECT X, Y, MAX(Z) Z');
DBMS_OUTPUT.PUT_LINE('FROM SQL_BUG_TEST');
DBMS_OUTPUT.PUT_LINE('GROUP BY X,Y');
FOR crs IN (SELECT X, Y, MAX(Z) Z
FROM SQL_BUG_TEST
GROUP BY X, Y
ORDER BY X,Y,Z) LOOP
DBMS_OUTPUT.PUT_LINE(':'||crs.X||':'||crs.Y||':'||crs.Z);
END LOOP;
EXCEPTION WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE(SQLERRM);
END;
-- TEST 2
-- returning MAX() from an inner select to an outer select and then into a variable
-- causes an error
BEGIN
DBMS_OUTPUT.PUT_LINE('*****************************************************');
DBMS_OUTPUT.PUT_LINE('TEST 2');
DBMS_OUTPUT.PUT_LINE('THIS DID NOT CAUSE AN ERROR WITH ORACLE 9i');
DBMS_OUTPUT.PUT_LINE('');
DBMS_OUTPUT.PUT_LINE('SELECT * INTO v_rec');
DBMS_OUTPUT.PUT_LINE('FROM');
DBMS_OUTPUT.PUT_LINE('(SELECT X, Y, MAX(Z) Z');
DBMS_OUTPUT.PUT_LINE('FROM SQL_BUG_TEST');
DBMS_OUTPUT.PUT_LINE('GROUP BY X,Y)');
DBMS_OUTPUT.PUT_LINE('WHERE Y = 1');
SELECT * INTO v_rec
FROM
(SELECT X, Y, MAX(Z) Z
FROM SQL_BUG_TEST
GROUP BY X, Y)
WHERE Y = 1;
DBMS_OUTPUT.PUT_LINE(':'||v_rec.X||':'||v_rec.Y||':'||v_rec.Z);
EXCEPTION WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE(SQLERRM);
END;
-- TEST 3
-- casting the result from MAX to char before returning to the outer select
-- still causes an error
BEGIN
DBMS_OUTPUT.PUT_LINE('*****************************************************');
DBMS_OUTPUT.PUT_LINE('TEST 3');
DBMS_OUTPUT.PUT_LINE('');
DBMS_OUTPUT.PUT_LINE('SELECT * INTO v_rec');
DBMS_OUTPUT.PUT_LINE('FROM');
DBMS_OUTPUT.PUT_LINE('(SELECT X, Y, to_char(MAX(Z)) Z');
DBMS_OUTPUT.PUT_LINE('FROM SQL_BUG_TEST');
DBMS_OUTPUT.PUT_LINE('GROUP BY X,Y)');
DBMS_OUTPUT.PUT_LINE('WHERE Y = 1');
SELECT * INTO v_rec
FROM
(SELECT X, Y, to_char(MAX(Z)) Z
FROM SQL_BUG_TEST
GROUP BY X, Y)
WHERE Y = 1;
DBMS_OUTPUT.PUT_LINE(':'||v_rec.X||':'||v_rec.Y||':'||v_rec.Z);
EXCEPTION WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE(SQLERRM);
END;
-- TEST 4 - SOLUTION
-- the return value of MAX must be cast with to_char at the point where it is assigned to
-- variable (outer most select)
BEGIN
DBMS_OUTPUT.PUT_LINE('*****************************************************');
DBMS_OUTPUT.PUT_LINE('TEST 4 SOLUTION');
DBMS_OUTPUT.PUT_LINE('');
DBMS_OUTPUT.PUT_LINE('SELECT X, Y, TO_CHAR(Z) Z INTO v_rec');
DBMS_OUTPUT.PUT_LINE('FROM');
DBMS_OUTPUT.PUT_LINE('(SELECT X, Y, MAX(Z) Z');
DBMS_OUTPUT.PUT_LINE('FROM SQL_BUG_TEST');
DBMS_OUTPUT.PUT_LINE('GROUP BY X,Y)');
DBMS_OUTPUT.PUT_LINE('WHERE Y = 1');
SELECT X, Y, TO_CHAR(Z) Z INTO v_rec
FROM
(SELECT X, Y, MAX(Z) Z
FROM SQL_BUG_TEST
GROUP BY X, Y)
WHERE Y = 1;
DBMS_OUTPUT.PUT_LINE(':'||v_rec.X||':'||v_rec.Y||':'||v_rec.Z);
EXCEPTION WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE(SQLERRM);
END;
END;I certainly looks like a bug, but you should raise an iTAR on Metalink since Oracle does not monitor this forum.
I was able to replicate your results on my 10.2.0.1 database.
There is an easier workaround than yours. Try
ALTER TABLE sql_bug_test MODIFY (z VARCHAR2(1));That seems to eliminate the problem on my instance.
John -
Inconsistent datatypes: expected NUMBER got CHAR error
Hi,
I have the following table
create GLOBAL TEMPORARY TABLE br_total_rtn_data_tmp
code varchar(50) NOT NULL,
name varchar(255),
cum_ytd_rtn_amt varchar(255),
cum_one_mon_rtn_amt varchar(255) ,
cum_thr_mon_rtn_amt varchar(255) ,
cum_six_mon_rtn_amt varchar(255),
cum_nine_mon_rtn_amt varchar(255),
cum_one_yr_rtn_amt varchar(255),
cum_thr_yr_rtn_amt varchar(255),
cum_five_yr_rtn_amt varchar(255),
cum_ten_yr_rtn_amt varchar(255),
cum_lof_rtn_amt varchar(255),
avg_anl_one_yr_rtn_amt varchar(255),
avg_anl_thr_yr_rtn_amt varchar(255),
avg_anl_five_yr_rtn_amt varchar(255),
avg_anl_ten_yr_rtn_amt varchar(255),
avg_anl_lof_rtn_amt varchar(255),
cum_prev_1m_month_end varchar(255),
cum_prev_2m_month_end varchar(255)
)ON COMMIT PRESERVE ROWS;
I have a case statement
CASE
WHEN code = 'MDN' THEN
max(case when p.m_date = v_prev2_yr_mon and p.period_type = '1M' then p.mdn /100 else null end)
WHEN code = 'QRT' THEN
max(case when p.m_date = v_prev2_yr_mon and p.period_type = '1M' then p.quartile else null end)
WHEN code = 'PCT' THEN
max(case when p.m_date = v_prev2_yr_mon and p.period_type = '1M' then p.pct_beaten / 100 else null end)
WHEN code = 'RNK' THEN
case when (p.m_date = v_prev2_yr_mon and p.period_type = '1M' and p.rank is null and p.cnt is null)
THEN
P.RANK
else
p.rank||'/'||p.cnt
end
ELSE NULL
END CASE The output for code = RNK should be somewhat like 3/5 which is rank/count
but i get the error "Inconsistent datatypes: expected NUMBER got CHAR error" when i put p.rank||'/'||p.cnt
How can that be solved.
ORacle version is 10g.Taken from the documentation of the CASE expression:
"For a simple CASE expression, the expr and all comparison_expr values must either have the same datatype (CHAR, VARCHAR2, NCHAR, or NVARCHAR2, NUMBER, BINARY_FLOAT, or BINARY_DOUBLE) or must all have a numeric datatype. If all expressions have a numeric datatype, then Oracle determines the argument with the highest numeric precedence, implicitly converts the remaining arguments to that datatype, and returns that datatype.
For both simple and searched CASE expressions, all of the return_exprs must either have the same datatype (CHAR, VARCHAR2, NCHAR, or NVARCHAR2, NUMBER, BINARY_FLOAT, or BINARY_DOUBLE) or must all have a numeric datatype. If all return expressions have a numeric datatype, then Oracle determines the argument with the highest numeric precedence, implicitly converts the remaining arguments to that datatype, and returns that datatype."
You need to use the same data type for all your expressions. If you want to return a string, then you need to convert the remaining numbers explicitly to strings. E.g. you could try something like this:
CASE
WHEN code = 'MDN' THEN
to_char(max(case when p.m_date = v_prev2_yr_mon and p.period_type = '1M' then p.mdn /100 else null end), 'TM')
WHEN code = 'QRT' THEN
to_char(max(case when p.m_date = v_prev2_yr_mon and p.period_type = '1M' then p.quartile else null end), 'TM')
WHEN code = 'PCT' THEN
to_char(max(case when p.m_date = v_prev2_yr_mon and p.period_type = '1M' then p.pct_beaten / 100 else null end), 'TM')
WHEN code = 'RNK' THEN
case when (p.m_date = v_prev2_yr_mon and p.period_type = '1M' and p.rank is null and p.cnt is null)
THEN
to_char(P.RANK, 'TM')
else
p.rank||'/'||p.cnt
end
ELSE NULL
END CASE I see another potential issue, you're mixing aggregate functions with non-aggregate expressions, this can only work if these non-aggregate expressions are part of the group by clause, but you haven't posted the complete statement so I can only guess.
Regards,
Randolf
Oracle related stuff blog:
http://oracle-randolf.blogspot.com/
SQLTools++ for Oracle:
http://www.sqltools-plusplus.org:7676/
http://sourceforge.net/projects/sqlt-pp/ -
Dynamic linking within TextArea component
how can i include an MC or button inline within the HTML text
of a TextArea component -- and also have that object link to an AS
function? i want to have icons within the text of my TextArea that
open pop-up windows within the Flash application (MC linkage).
is this possible?
is asfunction used? if so how?Well if you are still interested in using a text component
instead of a Button the way you would go about this is using
textWidth. Here's how I've done it before using a text / label
whatever you want that shows text.
// => Set our text we got from database
myText.text = "This is the text I got from the DB";
// => Validate it so that way we make sure we get right
numbers
myText.validateNow();
// => Find out how wide our text really is.
var textWidth:Number = myText.textWidth
// => Reset the width of our text component and add 20 for
a little buffer
myText.width = textWidth + 20;
Now my suggestion is if your going to be dynamically creating
these on the fly from a database call you throw it into a method /
class and have that do all the work for you so all you have to do
is pass the text to it and it resizes itself based on the example
above. -
How can i display image in mx:TextArea Component?
I found display img tag in htmlText of mx:TextArea component
is very difficult in Flex Air
I new a simple air project in flex builder, put the code
below in it, i put a glad.png file in the src folder, every thing
is OK, when i run it, image cannot be displayed. why this happend,
I search the google for the solution, it seems there is a bug in
air, and told me to use mx:HTML coponent, but that component still
can not display img tag.
could any one help me with this?
<mx:TextArea width="100%" height="100%">
<mx:htmlText>
<![CDATA[
<a href='
http://www.adobe.com'><img
src='glad.png'/></a>Click the image to go to the Adobe
home page.
]]>
</mx:htmlText>
</mx:TextArea>I ran into a similar problem and wasn't able to find a way to have regular Flex components (like Text and TextArea) display <img> tags in their htmlText. Everything works find in a web-based Flex application, but once the same code was used in AIR, the images just wouldn't display.
I changed my display to use the mx:HTML component and everything worked fine (I was using only external images). -
HT204053 Max number of devices on one iTunes account?
Max number of Devices on a single iTunes account
Devices or Computers? The former there is no limit. For the latter there is a limit of 5.
-
How can I convert a number to char in javascript
How can I convert a number i.e ascii number to char in javascript.
ex: 55 to AHow can I convert a number i.e ascii number to char in javascript.
Quite simple: By asking in a forum that deals with javascript and not with java.
Have no clue...
Maybe on http://www.irt.org -
How can I access the content of a textarea component?
I'm trying to use a javascript form editor in my jsf project.
The form editor writes to an html <textarea> component.
The jsp page looks like this:
<div style="height: 336px; left: 0px; top: 0px; position: absolute; width: 672px">
<script language="javascript" type="text/javascript">
tinyMCE.init({
mode : "textareas",
theme : "advanced",
</script>
<textarea cols="50" name="content" rows="15">This is some content that will be editable with TinyMCE.</textarea>
</div>
The content of the <textarea> component is changed with the editor.
What I need to do is capture that content after it has been edited.
How can I do that??
ThanksI have a similar problem. When I try to watch the rented movie a pop up says "Cannot Open: The content is not authorized" What exactly is the problem. I'm not in the US at the current moment. I'm in France. But that shouldn't be a problem right?
-
A few questions about using an XML file to add text into a TextArea component set as html
I'm using AS2 in Flash CS3.
I have a TextArea component in the stage that's loading its text from an XML and I've been able to use the ul and li tags to create lists. However, when I try to include a nested list it just inserts a line break between the nested list and the main list rather than indent it further. Is there a solution for this issue?
Failing that, how would I be able to add non-breaking spaces into the XML so they will render inside the TextArea component? I've tried and   without success. I scoured the net for some help with this and found some information about modifying the font embedding xml file with a new entry for the non-breaking space and that didn't work either, so that leaves me somewhat stumped.flash doesn't handle nested lists (as you now know). you can work-around that limitation using css and creating your own indent styles. css have a marginLeft property you can use.
Maybe you are looking for
-
HD package confusion - sports channels and Extreme HD
I'm a recent FIOS convert from Optimum. After about 10 days I can say I am very pleased for the most part with the new service. Picture quality is better and I like the guide and DVR features better than my Optimum STB. The one problem I have had sur
-
Hi Experts, I have create an APD with Query ( on a multiprovider ) as a datasource. This query is a complicated one with lots of preaggregations and stuff and it has to read through a bulk of data. When I run this query in RSRT I get the output i
-
Defragmentation on system level
Do as in the DB I have no defragmentation, So at the operating system will not have defragmentation?. Are the blocks in the extent always arranged in the same place the disk and in sequential order? Is when Oracle allocate new extents they always arr
-
i synced two ringtons to my phone that i downloed from an app, but now all of my music is no longer on my phone but it is in my itunes library but when i try to sink my music to my phone it dose not sync
-
Hi! Hope someone can help. I have two MVC controllers. One main- and one subcontroller. The subcontroller is not in the same bsp application as the main controller. At the moment i call the subcontroller from init method with obj_mate_navigation ?=