Bsp table with editable columns
Hi,
I want to create a table with some columns and include check box.
Is it possible?
I want to do this
Table :
Date Time Checkbox Checkbox
Also how can i make the columns editable ?
Thank you
hello,
The basic idea would be use ITERATOR class reference in your 'Tavleview' HTMLB element
Iterator class should user interface 'IF_HTMLB_TABLEVIEW_ITERATOR', here you can modify column properties (GET_COLUMN_DEFINITIONS method) and cell properties (RENDER_CELL_START)
For your need:
RENDER_CELL_START method, example coding would be:
CASE p_column_key.
WHEN 'Column name'.
p_replacement_bee = cl_htmlb_checkbox=>factory(
id = p_cell_id
_checked = p_cell_binding
disabled = 'X' ).
ENDCASE.
Thanks
Similar Messages
-
How to create a table with editable column values.
Hi everyone,
I think this is very simple but i'm not able to find how to do this. This is my requirement. I need to create a table with n columns and 1 row initially. user should be able to enter data into this table and click of a button should insert data into the data base table. Also there should be a button at the bottom of the table to add 1 row to the table.
I know how to do the insert to database, but can anyone please let me know how to create a table that allows user to enter data and how to create a add 1 row button?
Thanks in Advance!Raghu,
Go through the ToolBox tutorial Create Page & Advanced table section of OAF Guide.
Step 1 - You require to create EO & a VO based on this EO. This EO will be of DataBase table where you want to insert the data.
Step 2 - Create a Advanced table region. (Refer this Adavanced table section for more on this)
Step 3 - Attach this VO in the BC4J component of Adavanced Table region.
Regards,
Gyan -
Error inserting a row into a table with identity column using cfgrid on change
I got an error on trying to insert a row into a table with identity column using cfgrid on change see below
also i would like to use cfstoreproc instead of cfquery but which argument i need to pass and how to use it usually i use stored procedure
update table (xxx,xxx,xxx)
values (uu,uuu,uu)
My component
<!--- Edit a Media Type --->
<cffunction name="cfn_MediaType_Update" access="remote">
<cfargument name="gridaction" type="string" required="yes">
<cfargument name="gridrow" type="struct" required="yes">
<cfargument name="gridchanged" type="struct" required="yes">
<!--- Local variables --->
<cfset var colname="">
<cfset var value="">
<!--- Process gridaction --->
<cfswitch expression="#ARGUMENTS.gridaction#">
<!--- Process updates --->
<cfcase value="U">
<!--- Get column name and value --->
<cfset colname=StructKeyList(ARGUMENTS.gridchanged)>
<cfset value=ARGUMENTS.gridchanged[colname]>
<!--- Perform actual update --->
<cfquery datasource="#application.dsn#">
UPDATE SP.MediaType
SET #colname# = '#value#'
WHERE MediaTypeID = #ARGUMENTS.gridrow.MediaTypeID#
</cfquery>
</cfcase>
<!--- Process deletes --->
<cfcase value="D">
<!--- Perform actual delete --->
<cfquery datasource="#application.dsn#">
update SP.MediaType
set Deleted=1
WHERE MediaTypeID = #ARGUMENTS.gridrow.MediaTypeID#
</cfquery>
</cfcase>
<cfcase value="I">
<!--- Get column name and value --->
<cfset colname=StructKeyList(ARGUMENTS.gridchanged)>
<cfset value=ARGUMENTS.gridchanged[colname]>
<!--- Perform actual update --->
<cfquery datasource="#application.dsn#">
insert into SP.MediaType (#colname#)
Values ('#value#')
</cfquery>
</cfcase>
</cfswitch>
</cffunction>
my table
mediatype:
mediatypeid primary key,identity
mediatypename
my code is
<cfform method="post" name="GridExampleForm">
<cfgrid format="html" name="grid_Tables2" pagesize="3" selectmode="edit" width="800px"
delete="yes"
insert="yes"
bind="cfc:sp3.testing.MediaType.cfn_MediaType_All
({cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgridsortdirection})"
onchange="cfc:sp3.testing.MediaType.cfn_MediaType_Update({cfgridaction},
{cfgridrow},
{cfgridchanged})">
<cfgridcolumn name="MediaTypeID" header="ID" display="no"/>
<cfgridcolumn name="MediaTypeName" header="Media Type" />
</cfgrid>
</cfform>
on insert I get the following error message ajax logging error message
http: Error invoking xxxxxxx/MediaType.cfc : Element '' is undefined in a CFML structure referenced as part of an expression.
{"gridaction":"I","gridrow":{"MEDIATYPEID":"","MEDIATYPENAME":"uuuuuu","CFGRIDROWINDEX":4} ,"gridchanged":{}}
ThanksIs this with the Travel database or another database?
If it's another database then make sure your columns
allow nulls. To check this in the Server Navigator, expand
your DataSource down to the column.
Select the column and view the Is Nullable property
in the Property Sheet
If still no luck, check out a tutorial, like Performing Inserts, ...
http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/index.jsp
John -
ORA-00939 when creating XML table with Virtual Columns
Getting error on creating table with VIRTUAL COLUMNS:
Error at Command Line:4 Column:31
Error report:
SQL Error: ORA-00939: too many arguments for function
00939. 00000 - "too many arguments for function"
Without VIRTUAL COLUMNS works fine.
Where to start?
Is it possible to add Virtual Columns after a table is created?
CREATE TABLE TDS_XML OF XMLType
XMLSCHEMA "http://xmlns.abc.com/tds/TDSSchemaGen2.xsd"
ELEMENT "TDSTestData"
VIRTUAL COLUMNS
TESTID AS (
XMLCast(
XMLQuery('declare default element namespace "http://xmlns.abc.com/tds/TDSSchemaGen2.xsd"; /TDSTestData/TestID' PASSING OBJECT_VALUE RETURNING CONTENT) AS VARCHAR2(32)
)SQL*Plus: Release 11.2.0.2.0 Production on Mon Apr 30 20:17:29 2012
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select * from v$version;
BANNER
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
PL/SQL Release 11.2.0.2.0 - Production
CORE 11.2.0.2.0 Production
TNS for 64-bit Windows: Version 11.2.0.2.0 - Production
NLSRTL Version 11.2.0.2.0 - Production
SQL>victor_shostak wrote:
Figured, Virtual Columns work only for Binary XML.They are only supported, currently, for Binary XML. -
Dropping a column in composite xmltype table with virtual column
Hello,
i found some interesting behavior. I have a table with xmltype column and a virtual column. If i drop a column, which has an index smaller than the index for the xmltype column, than the virtual column reference for xmltype column is not changed.
select * from v$version;
drop table t_xml purge;
create table t_xml( c1 number,
c2 number,
cxml xmltype,
c3 number,
xmlflag number as (nvl2(cxml,1,0)));
select * from t_xml;
alter table t_xml drop column c2;
select * from t_xml; The 2nd select will result in error:
SQL> select * from v$version;
BANNER
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
PL/SQL Release 11.2.0.1.0 - Production
CORE 11.2.0.1.0 Production
TNS for IBM/AIX RISC System/6000: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
SQL> alter table t_xml drop column c2;
Tabelle wurde geändert.
SQL>
SQL> select * from t_xml;
select * from t_xml
FEHLER in Zeile 1:
ORA-00904: "SYS_NC00004$": ungültiger BezeichnerNow the virtual column xmlflag references still the old hidden column for cxml (SYS_NC00004$). It not references the new hidden column, which is now SYS_NC00003$.
I think, it is a bug! Can someone inform oracle? I have no access to metalink.Hi,
Please try this code:
loop at int_inv into wa_inv.
lv_count = lv_count + 1.
AT END OF posnr. <------- The field you want to sum..
gs_total-posnr = wa_inv-posnr.
gs_total-cov_total = lv_count.
APPEND gs_total TO gt_total.
CLEAR : gs_total,
lv_count,
wa_inv.
ENDAT.
ENDLOOP. -
Select count(x) on a table with many column numbers?
Hi all,
i have a table with physical data with 850 (!!) colums and
~1 Million rows.
The select count(cycle)from test_table Statement is very, very slow
WHY?
The select count(cycle)from test_table is very fast by e.g 10 Colums. WHY?
What has the number of columns, to do with the SELECT count(cyle).... statement?
create test_table(
cycle number primary key,
stamp date,
sensor 1 number,
sensor 2 number,
sensor_849 number,
sensor_850 number);
on W2K Oracle 9i Enterprise Edition Release 9.2.0.4.0 Production
Can anybody help me?
Many Thanks
Achimhi lennert, hi all,
many thanks for all the answers. I�m not an Oracle expert.
Sorry for my english.
Hi Lennert,
you are right, what must i do to use the index in the
query? Can you give me a pointer of direction, please?
Many greetings
Achim
select count(*) from w4t.v_tfmc_3_blocktime;
COUNT(*) ==> Table with 3 columns (very fast)
306057
Ausf�hrungsplan
0 SELECT STATEMENT Optimizer=CHOOSE
1 0 SORT (AGGREGATE)
2 1 TABLE ACCESS (FULL) OF 'V_TFMC_3 _BLOCKTIME'
Statistiken
0 recursive calls
0 db block gets
801 consistent gets
794 physical reads
0 redo size
388 bytes sent via SQL*Net to client
499 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
1 rows processed
select count(*) from w4t.v_tfmc_3_value;
COUNT(*)==> Table with 850 columns (very slow)
64000
Ausf�hrungsplan
0 SELECT STATEMENT Optimizer=CHOOSE
1 0 SORT (AGGREGATE)
2 1 TABLE ACCESS (FULL) OF 'V_TFMC_3 _VALUE'
Statistiken
1 recursive calls
1 db block gets
48410 consistent gets
38791 physical reads
13068 redo size
387 bytes sent via SQL*Net to client
499 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
1 rows processed -
Error while importing a table with BLOB column
Hi,
I am having a table with BLOB column. When I export such a table it gets exported correctly, but when I import the same in different schema having different tablespace it throws error
IMP-00017: following statement failed with ORACLE error 959:
"CREATE TABLE "CMM_PARTY_DOC" ("PDOC_DOC_ID" VARCHAR2(10), "PDOC_PTY_ID" VAR"
"CHAR2(10), "PDOC_DOCDTL_ID" VARCHAR2(10), "PDOC_DOC_DESC" VARCHAR2(100), "P"
"DOC_DOC_DTL_DESC" VARCHAR2(100), "PDOC_RCVD_YN" VARCHAR2(1), "PDOC_UPLOAD_D"
"ATA" BLOB, "PDOC_UPD_USER" VARCHAR2(10), "PDOC_UPD_DATE" DATE, "PDOC_CRE_US"
"ER" VARCHAR2(10) NOT NULL ENABLE, "PDOC_CRE_DATE" DATE NOT NULL ENABLE) PC"
"TFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 STORAGE(INITIAL 65536 FREELISTS"
" 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) TABLESPACE "TS_AGIMSAPPOLOLIVE030"
"4" LOGGING NOCOMPRESS LOB ("PDOC_UPLOAD_DATA") STORE AS (TABLESPACE "TS_AG"
"IMSAPPOLOLIVE0304" ENABLE STORAGE IN ROW CHUNK 8192 PCTVERSION 10 NOCACHE L"
"OGGING STORAGE(INITIAL 65536 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEF"
"AULT))"
IMP-00003: ORACLE error 959 encountered
ORA-00959: tablespace 'TS_AGIMSAPPOLOLIVE0304' does not exist
I used the import command as follows :
imp <user/pwd@conn> file=<dmpfile.dmp> fromuser=<fromuser> touser=<touser> log=<logfile.log>
What can I do so that this table gets imported correctly?
Also tell me "whether the BLOB is stored in different tablespace than the default tablespace of the user?"
Thanks in advance.Hello,
U can either
1) create a tablespace with the same name in destination where you are trying to import.
2) get the ddl of the table, modify the tablespace name to reflect the existing tablespace name in destination and run the ddl in the destination database, and run your import command with option ignore=y--> which will ignore all the create errors.
Regards,
Vinay -
HOW TO CREATE A TABLE WITH 800 COLUMNS?
I have to create a table with 800 columns.I know the create statement to create a table but it will take more time.
So tell me the other method.If you really think that you have to store 800 values for a given entity, it would be a wise idea if you store you information in columnar fashion. Make a main table and a attribute table, keep the primary identifier in the main table and store other attributes in the attribute table where you can keep the primary key of the first table as foreign key (not necessary) to maintain the relationship.
eg.
emp_id
emp_name
dob
city
state
country
pincode
1
Mr X
01/01/1990
ABC
ZXC
MMM
12345
Can be stored as
Main Table
emp_id
emp_name
1
Mr X
Attribute Table
attr_id
emp_id
attr_nam
attr_value
1
1
dob
01/01/1990
2
1
city
ABC
3
1
state
ZXC
4
1
country
MMM
5
1
pincode
12345
Creating table with large number of columns is bad design as suggested by other Gurus.
Thanks -
How to read/write a binary file from/to a table with BLOB column
I have create a table with a column of data type BLOB.
I can read/write an IMAGE file from/to the column of the table using:
READ_IMAGE_FILE
WRITE_IMAGE_FILE
How can I do the same for other binary files, e.g. aaaa.zip?There is a package procedure dbms_lob.readblobfromfile to read BLOB's from file.
http://download-east.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_lob.htm#sthref3583
To write a BLOB to file you can use a Java procedure (pre Oracle 9i R2) or utl_file.put_raw (there is no dbms_lob.writelobtofile).
http://asktom.oracle.com/pls/ask/f?p=4950:8:1559124855641433424::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:6379798216275 -
Convert a table with one column to panelList with outputText
Hi,
I have a table with one column, I would like to change it to use panelList to present it instead. What will be the syntax for panelList?
<af:table value="#{bindings.ItasUiRuleParamsVO2.collectionModel}"
var="row"
rows="#{bindings.ItasUiRuleParamsVO2.rangeSize}"
emptyText="#{bindings.ItasUiRuleParamsVO2.viewable ? 'No data to display.' : 'Access Denied.'}"
fetchSize="#{bindings.ItasUiRuleParamsVO2.rangeSize}"
rowBandingInterval="0"
selectedRowKeys="#{bindings.ItasUiRuleParamsVO2.collectionModel.selectedRow}"
selectionListener="#{bindings.ItasUiRuleParamsVO2.collectionModel.makeCurrent}"
rowSelection="single" id="t2"
partialTriggers="::t1">
<af:column sortProperty="RuleName" sortable="true"
headerText="#{bindings.ItasUiRuleParamsVO2.hints.RuleName.label}"
id="c11">
<af:outputText value="#{row.RuleName}"
id="ot11"/>
</af:column>
</af:table>
I tried this:
<af:panelList id="pl1">
<af:forEach items="#{bindings.ItasUiRuleParamsVO2.collectionModel}">
<af:outputText value="#{item.RuleName}" id="ot14"/>
</af:forEach>
</af:panelList>
but the error say:
javax.servlet.jsp.JspException: "items" must point to a List or array
at org.apache.myfaces.trinidadinternal.taglib.ForEachTag.doStartTag(ForEachTag.java:136)
Any ideas?
Thanks
-Mina<af:forEach items="#{bindings.ItasUiRuleParamsVO2.collectionModel}" var="row">
<af:outputText value="#{row.RuleName}" />
</af:forEach>
and make sure the table binding is still in place in your pagedef (or binding tab) -
Dynamic Table with two columns
Hi!
i have to create a Dynamic Table with two columns having 5-5 links each with some text...... three links r based on certain conditions....they r visible only if condition is true...
if the links r not visible in this case another links take it's place & fill the cell.
links/text is coming from database.
i am using Struts with JSP IDE netbeans
Please help me
BuntyIndiai wanna do something like this
<div class="box_d box_margin_right">
<ul class="anchor-bullet">
<c:forEach items="${data.faqList}" var="item" varStatus="status"
begin="0" end="${data.faqListSize/2-1}">
<li>${item}</li>
</c:forEach>
</ul>
</div>
<div class="box_d">
<ul class="anchor-bullet">
<c:forEach items="${data.faqList}" var="item" varStatus="status"
begin="${data.faqListSize/2}" end="${data.faqListSize}">
<li>${item}</li>
</c:forEach>
</ul>
</div>
wanna divide table in two columns....if one link got off due to condition other one take it's position...
I have created a textorderedlist
Bunty -
In a recent project I've had the need of a Java Swing table with frozen columns.
After a long research at the Swing forum at java.sun.org and google I found out that
1. Currently there is no proper Open Source solution
2. All the postings at sun are good concepts, but far away from solutions
3. The only (for me )acceptable commercial solution is the JCTable from Quest (formerly KGroup)
Since I want to have full control over the source code of the table, I decided to collect all the tips from this forums and write my own table.
Here is the my first result:
http://jroller.com/resources/kriede/CoolTable.java
The main idea is to have two tables, one for the locked columns (=fixed columns = frozen columns) and one for the scrollable columns. With all the tips from this forum it was more or less a puzzle to make it work pretty. The next task will be to provide a JTable-like interface, meaning to write delegate/adapter methods to the API of the two nested JTable instances.The FixedColumnExample from the link that you provided doesn't work with JDK 1.3 or higher.
Anyway, putting a seperate table for the fixed columns into the row header is the first step to solve the problem of fixed columns.
The next problem is to synchonize the scrolling behaviour of the two tables. The FixedColumnExample tries to do it by overwriting the valueChange method (maybe this was working with JDK 1.8), but with JDK 1.2 or higher it is recommended to use ChangeListeners. That's what I am doing, as also described here: http://www.chka.de/swing/components/JScrollPane-bugfix.html.
Another problem is navigation with the tab or arrow keys: The default actions for those events move the selection only within one JTable. It would be nicer, if e.g. the tab key moves the selection within one row across both, the fixed and the scrollable columns.
Those problems and some more are solved in the CoolTable sample:
http://jroller.com/resources/kriede/CoolTable.java
Please try it out and send comments. -
Sparse table with many columns
Hi,
I have a table that contains around 800 columns. The table is a sparse table such that many rows
contain up to 50 populated columns (The others contain NULL).
My questions are:
1. Table that contains many columns can cause a performance problem? Is there an alternative option to
hold table with many columns efficiently?
2. Does a row that contains NULL values consume storage space?
Thanks
dyahav[NULLs Indicate Absence of Value|http://download-west.oracle.com/docs/cd/B14117_01/server.101/b10743/schema.htm#sthref725]
A null is the absence of a value in a column of a row. Nulls indicate missing, unknown, or inapplicable data. A null should not be used to imply any other value, such as zero. A column allows nulls unless a NOT NULL or PRIMARY KEY integrity constraint has been defined for the column, in which case no row can be inserted without a value for that column.
Nulls are stored in the database if they fall between columns with data values. In these cases they require 1 byte to store the length of the column (zero).
Trailing nulls in a row require no storage because a new row header signals that the remaining columns in the previous row are null. For example, if the last three columns of a table are null, no information is stored for those columns. In tables with many columns, the columns more likely to contain nulls should be defined last to conserve disk space.
Most comparisons between nulls and other values are by definition neither true nor false, but unknown. To identify nulls in SQL, use the IS NULL predicate. Use the SQL function NVL to convert nulls to non-null values.
Nulls are not indexed, except when the cluster key column value is null or the index is a bitmap index.>
My guess for efficiently storing this information would be to take any columns that are almost always null and place them at the end of the table definition so they don't consume any space.
HTH! -
Replicate Table with spatial columns
I'd like to know how to
replicate (updatable snapshot) a table
with spatial columns.
when i try to create a master repobject
i've got ORA-23318 error.
What can i do?
nullHi Vincent,
Oracle does not support replication of object in 8.1.6 or 8.1.7. I believe replication support is expected for the version after.
Sorry,
Dan -
Exporting Table with CLOB Columns
Hello All,
I am trying to export table with clob columns with no luck. It errors saying EXP-00011TABLE do not exist.
I can query the table and the owner is same as what i am exporting it from.
Please let me know.An 8.0.6 client definitely changes things. Other posters have already posted links to information on what versions of exp and imp can be used to move data between versions.
I will just add that if you were using a client to do the export then if the client version is less than the target database version you can upgrade the client or better yet if possilbe use the target database export utility to perform the export.
I will not criticize the existance of an 8.0.6 system as we had a parent company dump a brand new 8.0.3 application on us less than two years ago. We have since been allowed to update the database and pro*c modules to 9.2.0.6.
If the target database is really 8.0.3 then I suggest you consider using dbms_metadata to generate the DDL, if needed, and SQLPlus to extact the data into delimited files that you can then reload via sqlldr. This would allow you to move the data with some potential adjustments for any 10g only features in the code.
HTH -- Mark D Powell --
Maybe you are looking for
-
Why can't I get any devices to show in the sidebar of a finder window?
Until recently I had devices (hard drives, DVD's, disk images, etc show up under devices in the sidebar of a finder window. Now none of these items show up. In Finder Preferences>Sidebar>Devices I nave all 4 checked (Bob's Mac Pro, Hard disks, Extern
-
What can be upgraded in Compaq nx9420?
I read the official manuals and searched here, got nowhere. I know you can upgrade the RAM to 4 GB but what else is upgradable in a Compaq nx9420? I'm willing to beef up just about everything: CPU, Motherboard, Vid Card. I read the motherboard has an
-
MB51 sales order no. not visible
Dear SAP GURU's There is a problem in MB51 where if the special stock indicator is 'E' (Orders in hand) then only the sales order is available else it is not available. why? please explain Regards
-
. What is a process code in ALE
. What is a process code in ALE could u plz explain clearly
-
Need Help!!! Can't Transfer My Music
Need Help Can't Transfer My Music... need help on how to transfer my ipod music to my new library. Becausi had a problem and a delete my computer account and open a new one. So i need help on how to transfer my ipot music to my new library...