How to constuct a table with each row having a button to select
Hi,
Imagine i have 5 orders and i want to select one order to view or update in other page.
How i construct a table with each row having a button to select it.
I'm having a hard time to do this. How i select a backingBean method in Javascript?.
Thanks
I'm trying to put a <h:commandButton> inside <h:dataTable> like this:
<h:dataTable id="books" value="#{BuscarLibros.booksSearched}" var="book">
<h:column>
<f:facet name="header">
<h:outputText value="#{messages.title}"/>
</f:facet>
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="#{messages.isbn}"/>
</f:facet>
<h:outputText value="#{book.isdn}"/>
</h:column>
<h:column>
<h:outputFormat value="#{book.fechaPublicacion}">
<f:convertDateTime pattern="ddd/MM/yyyy"/>
</h:outputFormat>
<h:commandButton action="#{BuscarLibros.prepareUpdateBook}" value="Hello WORLD"/>
</h:column>
</h:dataTable>but it does not call the method.
If it is outside it calls but inside not. Its strange because Duke's bookstore example from Sun Java EE is like that.
Any clues?
Similar Messages
-
How to insert a table with variable rows in smart form
Hi all,
How to insert a table with variable rows in smart form?
Any help would be appreciated.
Regards,
Mahesh.Hi,
Right click the mouse->create->table
If you want 5 columns, you need to declare 5 cells in one line type of the table
Click on Table -> Details, then do the following
Line Type 1 2 3 4 5
L1 2mm 3mm etc
Here specify the width of the columns as many as you want..
then in the header/main area of the table, click create Table Line, Rowtype is L1, automatically 5 cells will come,In each cell create a text element, display the variable to be printed there. -
How to join 2 tables with unequal rows without resulting in a cartesian join
Hello,
This is the first time I have ever posted in any forum so please tell me if I should be doing this better.
Basically I have 2 tables with an unequal number of rows. For demonstration purposes, assume these are my 2 tables:
Table 1:
BaseKey
Letters
A
A
A
B
A
C
B
A
B
B
Table 2:
BaseKey
Numbers
A
1
A
2
B
1
B
2
B
3
I need to join them so that the data would appear like this
BaseKey
Letters
Numbers
A
A
1
A
B
2
A
C
null
B
A
1
B
B
2
B
null
3
Does anyone have any ideas how to do this using T-SQL without creating a cartesian join of 12 rows?
Thanks.>> This is the first time I have ever posted in any forum so please tell me if I should be doing this better. <<
Please post DDL, so that people do not have to guess what the keys, constraints, Declarative Referential Integrity, data types, etc. in your schema are. Learn to follow ISO-11179 data element naming conventions and formatting rules. Temporal data should
use ISO-8601 formats. Code should be in Standard SQL as much as possible and not local dialect.
This is minimal polite behavior on SQL forums. What you did post is useless! Can you program from it? Neither can we. And we have to do all the extra typing for you.
CREATE TABLE Foo
(base_something CHAR(1) NOT NULL,
something_letter CHAR(1) NOT NULL,
PRIMARY KEY (base_something, something_letter));
INSERT INTO Foo
VALUES ('A', 'A'),
('A', 'B'),
('A', 'C'),
('B', 'A'),
('B', 'B');
CREATE TABLE Bar
(CHAR(1) NOT NULL,
something_digit CHAR(1) NOT NULL,
PRIMARY KEY (base_something, something_digit));
INSERT INTO Foo
VALUES ('A', '1'),
('A', '2'),
('B', '1'),
('B', '2'),
('B', '3');
>> I need to join them so that the data would appear like this
base_something Letters Numbers <<
This looks like you are taking two decks of punch cards and merging them together, without any logical rules, just physical position in their decks relative to the base_something groups.
WITH Foo_Deck
AS
(SELECT base_something, something_letter,
ROW_NUMBER()
OVER (PARTITION BY base_something
ORDER BY something_letter) AS card),
Bar_Deck
AS
(SELECT base_something, something_digit,
ROW_NUMBER()
OVER (PARTITION BY base_something
ORDER BY something_digit) AS card),
SELECT F.base_something, F.something_digit, B.something_letter
FROM Foo_Deck AS F
LEFT OUTER JOIN
Bar_Deck AS B
ON B.base_something = F.base_something
AND B.card = F.card;
--CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
in Sets / Trees and Hierarchies in SQL -
How to create a table with 5 rows ready for user entry
Hello All,
Can someone kindly advise on how can I achieve the above ? Everytime the table is created, the fields are not enabled for entry . I am trying to create a ytabel that consists of 8 columns. Of which 2 of them are date fields and another 2 of them are dropdown listboxes (by key).
Thank you very much.
from
Kwok WeiHi,
Conside you have Valuenode which is bound to table and valueattributtes bound to Tablecolumns.
Create a elements of the Nodetype.
Ex: IPrivate<<ViewName>>.INodeElement ele=wdContext.create<Node>Element();
ele.set<<Attrib1>>(Value1);
ele.set<<Attrib2>>(Value1);
ele.set<<Attrib3>>(Value1);
ele.set<<Attrib4>>(Value1);
ele.set<<Attrib5>>(Value1);
ele.set<<Attrib6>>(Value1);
ele.set<<Attrib7>>(Value1);
ele.set<<Attrib8>>(Value1);
wdContext.node<<NodeName>>.addElement(ele);
The above statements should be in a loop so that it will add 5 rows in Table. )
Regards, Anilkumar -
How to create a table with strings active by boolean button
Good morning.
I have a problem to create a table and did not find any topic in the forum who could help me solve this problem.
I need to create an alarm table.
That is, every time an alarm was activated (boolean button), the table will show the time,date and where that alarm occurred.
For example, when the garage alarm is activated, it will to table:
Date // Time // Garage // Presence ON
And so on, when the alarm is activated the room:
Date // Time // Room // Presence ON
If anyone can help, I'd appreciate it enough.
Thank you.
Solved!
Go to Solution.Giuliano06 wrote:
So I can show the alarm, but when the button is not selected, it is sending null value (blank string) for the table through the shift register.
Also, when I select for example the 2 bedroom, he is moved to another column in the table and not just below the last alarm obtained.
My VI is attached case someone might have an idea.
your constantly polling the value to your table, ofcoarse this vi is designed according to the mechanical action of the boolean switch...
Attachments:
Sensors table.vi 10 KB -
TO DRAW A TABLE WITH MULTIPLE ROWS AND MULTIPLE COLOUMNS IN FORM
Hi,
How to draw a table with multiple rows and columns seperated by lines in form printing?check this
http://sap-img.com/ts003.htm
Regards
Prabhu -
How to create table with resizable row ?
how to create table with resizable row ?
I'd suggest you start here:
http://java.sun.com/docs/books/tutorial/uiswing/components/table.html -
How to create editable table with one empty row ?
I'm looking for solution how to create editable table with one empty row using ADF BC. I have seen this solution in application that was created in JHeadstart and it's very well idea to use it insead of creation form.
hammm, i do it this:
drop the VO on the page, select Table->ADF Table....
so, drop the botton create, from de VO->operations->create (the firts), and right botton (mouse) Edit binding....
in Data collection select the VO, in Select an action select CreateInsert
luck -
How to know the the list of tables with no rows inside a schema?
with reference to
http://www.ss64.com/orad/USER_TABLES.html
How to know the the list of tables with no rows inside a schema?
I try this select table_name from user_tables where num_rows=0;
I can found one table that is empty.
So what's the query to return list of tables in a schema which has no rows?
thanksYou can do that only if your have collected the stats properly. Otherwise its going to show you wrong information.
Check this out...
SQL> drop table t
2 /
Table dropped.
SQL> create table t
2 as
3 select level no from dual connect by level <=100
4 /
Table created.
SQL> select table_name,num_rows from user_tables where table_name = 'T'
2 /
TABLE_NAME NUM_ROWS
T
SQL> begin
2 dbms_stats.gather_table_stats(user,'T');
3 end;
4 /
PL/SQL procedure successfully completed.
SQL> select table_name,num_rows from user_tables where table_name = 'T'
2 /
TABLE_NAME NUM_ROWS
T 100
SQL>Thanks,
Karthick. -
How to create table with 1 row 1MB in size?
Hello,
I am doing some R&D and want to create a Table with 1 row, which is 1 MB in size.
i.e. I want to create a row which is 1 MB in size.
I am using a 11g DB.
I do this in SQL*Plus:
(1.) CREATE TABLE onembrow (pk NUMBER PRIMARY KEY, onembcolumn CLOB);
(2.) Since 1MB is 1024*1024 bytes (i.e. 1048576 bytes) and since in English 1 letter = 1 byte, I do this
SQL> INSERT INTO onembrow VALUES (1, RPAD('A', 1048576, 'B'));
1 row created.
(3.) Now, after committing, I do an analyze table.
SQL> ANALYZE TABLE onembrow COMPUTE STATISTICS;
Table analyzed.
(4.) Now, I check the actual size of the table using this query.
select segment_name,segment_type,bytes/1024/1024 MB
from user_segments where segment_type='TABLE' and segment_name='ONEMBROW';
SEGMENT_NAME
SEGMENT_TYPE
MB
ONEMBROW
TABLE
.0625
Why is the size only .0625 MB, when it should be 1 MB?
Here is the DB Block related parameters:
SELECT * FROM v$parameter WHERE upper(name) LIKE '%BLOCK%';
NUM NAME TYPE VALUE
478 db_block_buffers 3 0
482 db_block_checksum 2 TYPICAL
484 db_block_size 3 8192
682 db_file_multiblock_read_count 3 128
942 db_block_checking 2 FALSE
What am I doing wrong here???When testing it is necessary to do something that is a reasonably realistic model of a problem you might anticipate appearing in a production system - a row of 1MB doesn't seem likely to be a useful source of information for "R&D on performance tuning"
What's wrong with creating millions of rows ?
Here's a cut and paste from a windows system running 11.2.0.3
SQL> set timing on
SQL>
SQL> drop table t1 purge;
Table dropped.
Elapsed: 00:00:00.04
SQL>
SQL> create table t1
2 nologging
3 as
4 with generator as (
5 select
6 rownum id
7 from dual
8 connect by
9 level <= 50
10 ),
11 ao as (
12 select
13 *
14 from
15 all_objects
16 where rownum <= 50000
17 )
18 select
19 rownum id,
20 ao.*
21 from
22 generator v1,
23 ao
24 ;
Table created.
Elapsed: 00:00:07.09
7 seconds to generate 2.5M rows doesn't seem like a problem. For a modelling example I have one script that generates 6.5M (carefully engineered) rows, with a couple of indexes and a foreign key or two, then collects stats (no histograms) in 3.5 minutes.
Regards
Jonathan Lewis
http://jonathanlewis.wordpress.com
Now on Twitter: @jloracle -
How to add a comment for each row on the output of a report?
I would like to add a comment (field) for each row on the output of report? This comment should to be saved as well. Is there a way i can do that?
Regards,
RamHi Dimitri,
through the instead of trigger functionality i am able to update the view. This is view is based on different views which should be linked to a table (as you suggested) in which comments can be stored. Hower this table is empty and how to link this table with the view now? I face the following challenge.
View consists the following columns, for example
select name, sex, age from test_view
name sex age
John M 20
Anton M 30
Willy M 40
shirley F 38
sharon F 37
The report has the following output, for example
name sex age
John M 20
Anton M 30
Willy M 40
Shirley F 38
Sharon F 37
Now i would like to add comment through a button.
The report layout looks like
name sex age
John M 20 <add comment button>
After submitting the <add comment button> you can enter text which deals with John
text='John doesnot like me'
Finally the report display the comment as well
name sex age
John M 20 'John doesnot like me' <update/delete comment button>
Anton M 30 <add comment button>
Willy M 40 <add comment button>
Shirley F 38 <add comment button>
Sharon F 37 <add comment button>
After submitting the <update/delete button> you can change or delete the entered text.
I hope this example clears things up.
Regards,
Ram -
How to update two tables with trigger
Hi:
how to update two tables with trigger ?
I have two tables :
(1)ASIA
MI number;
(2)ASIA_P
ID number;
When I insert a new value into the asia.MI ,I also can
insert the same value into the asia_p.id field.
I have write a trigger as follows but it does't work.
create or replace trigger MI_TRG
before insert on asia
for each row
declare
seq number;
begin
select MI_SEQ.Nextval into seq from dual;
:new.MI:=seq;
insert into ASIA_PRO(MI_ID)
values
(seq);
end MI_TRG;
How to realize it ?
thanks
zzmWhy do you say it does not work?
-
How to create a table with events in smartforms?
How to create a table with events view in smartforms?
It doesn't like general table with header, main area and footer.
for example:
in smartforms: LE_SHP_DELNOTE
table name is TABLEITEM(Delivery items table)Vel wrote:
I am creating XML file using DBMS_XMLGEN package. This XML file will contain data from two different database tables. So I am creating temporary table in the PL/SQL procedure to have the data from these different tables in a single temporary table.
Please find the below Dynamic SQL statements that i'm using for create the temp table and inserting the data into it.
Before insert the V_NAME filed, i will be appending a VARCHAR field to the original data.
EXECUTE IMMEDIATE 'CREATE TABLE TEMP_TABLE (UNIQUE_KEY NUMBER , FILE_NAME VARCHAR2(1000), LAST_DATE DATE)';
EXECUTE IMMEDIATE 'INSERT INTO TEMP_TABLE values (SEQUENCE.nextval,:1,:2)' USING V_NAME,vLastDate;What exactly i need is to eliminate the INSERT portion of it,Since i have to insert more 90,000 rows into it. Is there way to have the temp table created with data in it along with the sequence value as well.
I'm using Oracle 10.2.0.4 version.
Edited by: 903948 on Dec 22, 2011 10:58 PMWhat you need to do to eliminate the INSERT statement is to -- as already suggested by others - eliminate the temporary table. You don't need it. It is just necessary overhead. Please explain why you (apparently) believe that the suggestion of a view will not meet your requirements. -
How to create a table with varied number of columns?
I am trying to create a balance table. The colunms should include years between the start year and end year the user will input at run time. The rows will be the customers with outstanding balance in those years.
If the user input years 2000 and 2002, the table should have columns 2000, 2001, 2002. But if the user input 2000 and 2001, the table will only have columns 2000 and 2001.
Can I do it? How? Thanka a lot.Why did you create a new thread for this?
How to create a table with varied number of columns? -
How to create a table with these dimensions?
Still new to Indesign but I need to create a table like the one below.
Selecting the text tool, I created a text frame and then inserted a table. However, I am lost as to how to edit the top row to be the length of the bottom two columns.
I looked at the tables panel options but it only allows me to edit the number of rows and columns.
Any advice is appreciated. Thanks.You have to create a table with two rows and two columns.
Than select first row and clic "merge cells"
Maybe you are looking for
-
Hi, I am having the Adobe Acrobat Pro 9 and would like to upgrade to the version X. Anyone can advise if I can upgrade from Adobe Acrobat Pro 9 to Adobe Acrobat X Standard version? Thanks.
-
How to find the glyphs character using js in indesign cs2?
i want to find whether the glyphs character(registered trademark symbol)is applied with character style superscript or not, i cant able to fix the glyphs character in the find preference, how to do it? thanks subha
-
Freehand Glyphs not displaying in Indesign
Hi, I'm working on a document that has a lot of glyphs (its Quebec towns and citys) When i import my Freehand EPS into indesign all the glyphs turn into little black boxes. Can anyone tell me how to fix it so the characters display correctly? I rea
-
Renumber Items - Process Purchase Orders
When you are in the change mode for a Purchase order, I see Renumber items button next to the Add items button Does anybody know what is the functionality of this button 1) Does it renumber and sort the items in the descending order compared to the o
-
How to Crash iMovie HD 6 in a few easy steps.
HOW TO CRASH iMOVIE HD (6.0) {Make sure your mouse is set up for left/right button operation like on a PeeCee. It may not work otherwise}. 1. Record a short clip using the iSight camera. Record another. 2. <Left Click> on one of the clips. 3. Use <ri