How to display ImageComponent from ImageCompon[ ][ ] Array into table
Hello,
Sorry for double posting. I had written a wrong Subject!!!
I do the same with strings and that works without problems.
The Code wich creates the table. All providers are correct and instanciatet.
private Table createTable() {
String monat = null;
//Create the Table Dynamically
Table table = new Table();
table.setId("table2");
switch(getSessionBean1().getSelectedMonth()){
case 1 :
monat = "Januar";
break;
case 2 :
monat = "Februar";
break;
case 3 :
monat = "M\344rz";
break;
case 4 :
monat = "April";
break;
case 5 :
monat = "Mai";
break;
case 6 :
monat = "Juni";
break;
case 7 :
monat = "Juli";
break;
case 8 :
monat = "August";
break;
case 9 :
monat = "September";
break;
case 10 :
monat = "Oktober";
break;
case 11 :
monat = "Novemer";
break;
case 12 :
monat = "Dezember";
break;
table.setTitle("Team Plan - " + monat + " " + getSessionBean1().getSelectedYear());
//table.setPaginateButton(true);
//table.setPaginationControls(true);
// Create the Table Row group dynamically
TableRowGroup rowGroup = new TableRowGroup();
rowGroup.setId("rowGroup1");
rowGroup.setSourceVar("currentRow");
if(getSessionBean1().getZaehler() == 28){
rowGroup.setValueBinding("sourceData", getApplication().createValueBinding("#{TableDisplay.tableItems28ListDataProvide r}"));
if(getSessionBean1().getZaehler() == 29){
rowGroup.setValueBinding("sourceData", getApplication().createValueBinding("#{TableDisplay.tableItems29ListDataProvide r}"));
if(getSessionBean1().getZaehler() == 30){
rowGroup.setValueBinding("sourceData", getApplication().createValueBinding("#{TableDisplay.tableItems30ListDataProvide r}"));
if(getSessionBean1().getZaehler() == 31){
rowGroup.setValueBinding("sourceData", getApplication().createValueBinding("#{TableDisplay.tableItems31ListDataProvide r}"));
rowGroup.setRows(getSessionBean1().getAnzahlUser());
// Add the table row group to the table as a child
table.getChildren().add(rowGroup);
Field f[] = null;
if(getSessionBean1().getZaehler() == 28) {
TableItems28 ti = (TableItems28)tableItems28ListDataProvider.getList().get(0);
f = ti.getClass().getDeclaredFields();
if(getSessionBean1().getZaehler() == 29) {
TableItems29 ti = (TableItems29)tableItems29ListDataProvider.getList().get(0);
f = ti.getClass().getDeclaredFields();
if(getSessionBean1().getZaehler() == 30) {
TableItems30 ti = (TableItems30)tableItems30ListDataProvider.getList().get(0);
f = ti.getClass().getDeclaredFields();
if(getSessionBean1().getZaehler() == 31) {
TableItems31 ti = (TableItems31)tableItems31ListDataProvider.getList().get(0);
f = ti.getClass().getDeclaredFields();
for( int i = 0; i < f.length; i++) {
TableColumn tableColumn1 = new TableColumn();
tableColumn1.setId( "tableColumn"+String.valueOf(i) );
if (i == 0){
tableColumn1.setHeaderText( "Mitarbeiter" );
} else {
tableColumn1.setHeaderText( " "+String.valueOf(i) + "." + getSessionBean1().getSelectedMonth() + "." );
// Add the first table Column to the table row group
rowGroup.getChildren().add(tableColumn1);
// If activ, the provider Provides an ImageObject.It don`t work. Problem
// with value binding ?????
ImageComponent image = new ImageComponent();
image.setValueBinding("imagecomponent", getApplication().createValueBinding("#{currentRow.value['"+f.getName()+"']}" ));
tableColumn1.getChildren().add(image);
//If activ, the provider provides a String Value. It works fine.
StaticText staticText1 = new StaticText();
staticText1.setValueBinding("text", getApplication().createValueBinding ("#{currentRow.value['"+f.getName()+"']}"));
// Add the static text to the table column1
tableColumn1.getChildren().add(staticText1);
return table;
I Would be happy, if anybody can help me.
Regards
Stefan
Duplicate of http://forum.sun.com/jive/thread.jspa?messageID=370186
- Winston
http://blogs.sun.com/winston
Similar Messages
-
How to display records from a query into non-database field
Hi
I a have a problem:
I have a query with many tables and 6 column(select a,b,c,d,e,f from x,y,z,t,s,g where conditions) and I use 3 parameters.
I create 3 parameters :datai,:dataf and :partener and a button with a trigger when button is pressed.
Then a create a manualy block with six field non-database a1,b1,c1,d1,e1,f1.
Now I want to display all the records from my query into a1,b1,c1,d1,e1,f1 where a1=a,b1=b,etc. and all the records (if I have 20 record, it will display 20 records in non-database field) when I press the button.
How I made:
I create a cursor with query then
begin open cursor
loop
fetch cursor into :a1,:b1,:c1,:d1,:e1,:f1;
end loop;
close cursor;
end;
It display one record in a1,b1,c1 only and it have to display 100 records and are date for all the fields.
Can somebody help me in this problem?
Thanks.
Edited by: 928437 on Oct 1, 2012 2:55 AMCreating a view, and querying that into a database block is an excellent solution.
To use the non-database block:
You're missing the all-important Next_Record; command.
<pre> Begin
Go_block('X'); -- block X is the non-database block
Clear_Block(No_Validate);
open cursor X1;
loop
If :System.Record_status != 'NEW' then
Next_Record;
End if;
fetch X1 into :a1,:b1,:c1,:d1,:e1,:f1;
Exit when X1%NOTFOUND;
end loop;
close X1;
end;</pre> -
How to load data from XML DOM into tables using Business Components
<p>
Hi,
</p>
<p>
I need to upload XML file (it's not a problem) an load data (DOM tree) from this file into relationan tables. This filelooks like this:
</p>
<p>
<font face="courier new,courier" size="2"><Departments>
<Department>
<DepartmentName>OPERATIONS</DepartmentName>
<Localization>BOSTON</Localization>
<Employees>
<Employee>
<LastName>TURNER</LastName>
<Job>SALESMAN</Job>
<Manager>7698</Manager>
<HireDate>1981-09-08</HireDate>
<Salary>1500</Salary>
<Commerce>0</Commerce>
</Employee>
</Employees>
</Department>
</Departments></font>
</p>
<p>
Is there any Business Components support to obtain this ? What about primary and foreign keys values (there is no in XML file). How to place this XML data in appropriate tables ?
</p>
<p>
Kuba
</p>Pl post details of exact OS and database versions, along with a sample of the XML file and description of the tables. What have you tried so far ?
http://docs.oracle.com/cd/E11882_01/server.112/e22490/ldr_control_file.htm#i1005614
HTH
Srini -
How to display data from a recordset based on data from another recordset
How to display data from a recordset based on data from
another recordset.
What I would like to do is as follows:
I have a fantasy hockey league website. For each team I have
a team page (clubhouse) which is generated using PHP/MySQL. The one
area I would like to clean up is the displaying of the divisional
standings on the right side. As of right now, I use a URL variable
(division = id2) to grab the needed data, which works ok. What I
want to do is clean up the url abit.
So far the url is
clubhouse.php?team=Wings&id=DET&id2=Pacific, in the end all
I want is clubhouse.php?team=Wings.
I have a separate table, that has the teams entire
information (full team name, short team, abbreviation, conference,
division, etc. so I was thinking if I could somehow do this:
Recordset Team Info is filtered using URL variable team
(short team). Based on what team equals, it would then insert this
variable into the Divisional Standings recordset.
So example: If I type in clubhouse.php?team=Wings, the Team
Info recordset would bring up the Pacific division. Then 'Pacific'
would be inserted into the Divisional Standings recordset to
display the Pacific Division Standings.
Basically I want this
SELECT *
FROM standings
WHERE division = <teaminfo.division>
ORDER BY pts DESC
Could someone help me, thank you.Assuming two tables- teamtable and standings:
teamtable - which has entire info about the team and has a
field called
"div" which has the division name say "pacific" and you want
to use this
name to get corresponding details from the other table.
standings - which has a field called "division" which you
want to use to
give the standings
SELECT * FROM standings AS st, teamtable AS t
WHERE st.division = t.div
ORDER BY pts DESC
Instead of * you could be specific on what fields you want to
select ..
something like
SELECT st.id AS id, st.position AS position, st.teamname AS
team
You cannot lose until you give up !!!
"Leburn98" <[email protected]> wrote in
message
news:[email protected]...
> How to display data from a recordset based on data from
another recordset.
>
> What I would like to do is as follows:
>
> I have a fantasy hockey league website. For each team I
have a team page
> (clubhouse) which is generated using PHP/MySQL. The one
area I would like
> to
> clean up is the displaying of the divisional standings
on the right side.
> As of
> right now, I use a URL variable (division = id2) to grab
the needed data,
> which
> works ok. What I want to do is clean up the url abit.
>
> So far the url is
clubhouse.php?team=Wings&id=DET&id2=Pacific, in the end
> all
> I want is clubhouse.php?team=Wings.
>
> I have a separate table, that has the teams entire
information (full team
> name, short team, abbreviation, conference, division,
etc. so I was
> thinking if
> I could somehow do this:
>
> Recordset Team Info is filtered using URL variable team
(short team).
> Based on
> what team equals, it would then insert this variable
into the Divisional
> Standings recordset.
>
> So example: If I type in clubhouse.php?team=Wings, the
Team Info recordset
> would bring up the Pacific division. Then 'Pacific'
would be inserted into
> the
> Divisional Standings recordset to display the Pacific
Division Standings.
>
> Basically I want this
>
> SELECT *
> FROM standings
> WHERE division = <teaminfo.division>
> ORDER BY pts DESC
>
> Could someone help me, thank you.
> -
How to display items from database using catagorylookupdroplet
Hi everyone,
i want to know how to display items from database using catagorylookup droplet. if anybody have any code snippet please share it.
Thanks in advance,<dsp:droplet name=".................../CategoryLookup">
<dsp:param name="id" param="itemId"/>
<dsp:oparam name="output">
<dsp:valueof param="element.displayName"/>
<%-- This is show the Child Category --%>
<dsp:droplet name="......................./ForEach">
<dsp:param name="array" param="element.childCategories"/>
<dsp:oparam name="outputStart">Child Categories</dsp:oparam>
<dsp:oparam name="output">
<dsp:a href="">//bydefault it will take its own file's name
<dsp:param name="itemId" param="element.repositoryId"/> <dsp:valueof param="element.displayName"/>
</dsp:a>
</dsp:oparam>
</dsp:droplet>
<%-- This is show the Child Product --%>
<dsp:droplet name=".............../ForEach">
<dsp:param name="array" param="element.childProducts"/>
<dsp:oparam name="outputStart">Child Products</dsp:oparam>
<dsp:oparam name="output">
<dsp:droplet name="................/ProductLookup">
<dsp:param name="id" param="itemId"/>
<dsp:param name="elementName" value="Prod"/>
<dsp:oparam name="output">
<dsp:getvalueof id="img102" param="Prod.smallImage.url" idtype="java.lang.String">
<dsp:img height="250" width="250" src="<%=img102%>"/>
</dsp:getvalueof>
</dsp:oparam>
</dsp:droplet>
<dsp:a href="productView.jsp">
<dsp:param name="itemId" param="element.repositoryId"/>
<dsp:valueof param="element.displayName"/>
</dsp:a>
Hope this helps.
-RMishra -
How to load the data from excel file into table in oracle using UTL_FI
How to load the data from excel file into table in oracle
and from table to excel file
using UTL_FILE package
Please give me some exampleThis is something i tried in oracle apex
http://avdeo.com/2008/05/21/uploading-excel-sheet-using-oracle-application-express-apex/
Regards,
CKLP -
How to extract data from info cube into an internal table using ABAP code
HI
Can Anyone plz suggest me
How to extract data from info cube into an internal table using ABAP code like BAPI's or function modules.
Thankx in advance
regds
AJAYHI Dinesh,
Thankq for ur reply
but i ahve already tried to use the function module.
When I try to Use the function module RSDRI_INFOPOV_READ
I get an information message "ERROR GENERATION TEST FRAME".
can U plz tell me what could be the problem
Bye
AJAY -
In Mail 7.3 on my Retina MacBook Pro on OS 10.9.4, how can I type from the keyboard into a mail message using the Apple Symbols font?
When I select the Apple Symbols font from the list accessed from under Format/"Show fonts"/collection-all fonts/Apple Symbol, and then continue typing, I get normal letters, if in a slightly different font.
How can I type using the Apple Symbol font? I want to use that font to include keyboard and cursor selections of actual screen symbols to help write easily understood explicit computer lesson emails to my 92 year-old mom from a few hundred miles away.
SteveIn Mail 7.3 on my Retina MacBook Pro on OS 10.9.4, how can I type from the keyboard into a mail message using the Apple Symbols font?
When I select the Apple Symbols font from the list accessed from under Format/"Show fonts"/collection-all fonts/Apple Symbol, and then continue typing, I get normal letters, if in a slightly different font.
How can I type using the Apple Symbol font? I want to use that font to include keyboard and cursor selections of actual screen symbols to help write easily understood explicit computer lesson emails to my 92 year-old mom from a few hundred miles away.
Steve -
HT4906 how to import photos from photo stream into an event?
How to import photos from photo stream into an event?
How to import photos from photo stream into an event?
In iPhoto 9.4.3 the following works:
If you have not auto imported the photos from the Photo Stream, as Larry suugests, select the photos that you want to import in the Photo Stream, and drag them to the "Events" view in the Source List. They will be imported as new events, auto split with respect to your preferences.
Regards
Léonie -
I'm wondering how to display "bullets" from the bottom to the top (last to first) in a slideshow. Can anyone help?
Select the set of bullets. Go to the "Build" panel of the Inspector. Choose "Build In". Choose your effect. Select "By Bullet Group" under delivery.
Be sure to experiment with the various options. -
How to Pull data from sap r/3 tables to oracle tables
how to fetch data from sap r/3 tables & data pulled to oracle table .
GIVE THE APPROPRITE ANSWER FOR THIS.
THANKS IN ADVANCE.
If it is useful for me , i am giving point.
regards ,
Navita
Edited by: NAVITA YADAV on Mar 7, 2008 2:07 PM
Edited by: NAVITA YADAV on Mar 7, 2008 2:08 PMYou need to perform some native SQL to fetch data. Before doing this connection must be exists b/w your R/3 and Oracle server.
Basis team will help you to have connection.
Check the connection name in the table DBCON.
Check the below code to handle native SQL.
SELECT SINGLE DBMS
FROM DBCON
INTO DBTYPE
WHERE CON_NAME = DBS.
IF DBTYPE = 'ORA'.
TRY.
EXEC SQL.
CONNECT TO :dbs
ENDEXEC.
ERROR Handling for Native SQL *************
IF SY-SUBRC <> 0.
MESSAGE `Docusphere connection failed.` TYPE 'I'.
EXIT.
ENDIF.
EXEC SQL PERFORMING loop_output.
OPEN C1 FOR
SELECT UK1, UK7, uk6, uk9, uk22, uk23, uk25 "field names of Oracle table
FROM IIS_DOCS_AP10D
WHERE ( UK2 = 'ZFIINVOICE' OR UK2 = 'ZFIPAYREQ' ) AND
UK19 = 'E' AND
UK20 IS NULL
ENDEXEC.
DO.
CLEAR W_OUTPUT.
EXEC SQL.
FETCH NEXT C1 into :wa1-arc_doc_id, :wa1-bukrs, :wa1-belnr, :wa1-gjahr, :wa1-wi_id, :wa1-ARCH_METHOD, :wa1-barcd.
ENDEXEC.
enddo.
Reward points if helpful................. -
How to insert the select query result into table?
How to insert the select query result into table?
SELECT top 20 creation_time
,last_execution_time
,total_physical_reads
,total_logical_reads
,total_logical_writes
, execution_count
, total_worker_time
, total_elapsed_time
, total_elapsed_time / execution_count avg_elapsed_time
,SUBSTRING(st.text, (qs.statement_start_offset/2) + 1,
((CASE statement_end_offset
WHEN -1 THEN DATALENGTH(st.text)
ELSE qs.statement_end_offset END
- qs.statement_start_offset)/2) + 1) AS statement_text
FROM sys.dm_exec_query_stats AS qs
CROSS APPLY sys.dm_exec_sql_text(qs.sql_handle) st
ORDER BY total_elapsed_time / execution_count DESC;
Thanks,
Tirumala1. SELECT INTO
Below method will create table when data is inserted from one table to another table. Its useful when you need exactly same datatype as source table.
Use AdventureWorks2008R2;
Go
---Insert data using SELECT INTO
SELECT AddressLine1, City
INTO BothellAddresses
FROM Person.Address
where City = 'Bothell';
GO
---VERIFY DATA
Select AddressLine1, City
FROM BothellAddresses
---DROP TABLE
DROP TABLE BothellAddresses
GO
2. INSERT INTO SELECT
Below method will need table to be created prior to inserting data. Its really useful when table is already created and you want insert data from
another table.
Use AdventureWorks2008R2;
Go
---Create Table
CREATE TABLE BothellAddresses (AddressLine1 NVARCHAR(60), City NVARCHAR(30))
---Insert into above table using SELECT
INSERT INTO BothellAddresses(AddressLine1, City)
SELECT AddressLine1, City
FROM Person.Address
where City = 'Bothell';
---VERIFY DATA
Select AddressLine1, City
FROM BothellAddresses
---DROP TABLE
DROP TABLE BothellAddresses
GO
Regards,
Vishal Patel
Blog: http://vspatel.co.uk
Site: http://lehrity.com -
JDBC-XI-FILE scenario. How to extract data from more than one table in JDBC
Hi,
I was asked a question like in JDBC-XI-FILE scenario........ How to extract data from more than one tables (i.e from JDBC system) ?? What is the logic to do the same ??
I am not sure whether this is a valid question..........but any help in this regards is highly appreciated.
Regards
KumarHI,
Yes it can be possible ,please see the following links
JDBC Receiver with Oracle Stored Procedures
configuring jdbc adapter with multiple tables
RFC -> XI -> JDBC Scenario Updating Multiple Tables
/people/alessandro.berta/blog/2005/10/04/save-time-with-generalized-jdbc-datatypes
JDBC Adapter multiple Selects
https://www.sdn.sap.com/irj/sdn/advancedsearch?query=jdbc%20with%20multiple%20tables&cat=sdn_all
Regards
Chilla.. -
How to Display IMAGE BLOB stored in a table in a html region APEX
Need to know how to display an image stored in a table in a HTML APEX Region.
PleaseHi
Please explain what you mean by it doesn't work?
Are there errors messages, at what point, how far did you get and exactly what did you do????
Please provide more information.
Thanks
Ben -
How to insert data from JTable to mysql Table....
hello everybody
i need help about how to insert data from JTable to mysql table... i know about how to create Table model...facing problem about how to insert data from JTable to mysql table....any helping link or code ... ill be thankfulll....for giving me solution...table1.getValueAt(table1.getSelectedRow(),0)you are getting the value of a selected row... or if you want you can just use a loop..
for(.....){
table1.getValueAt(x,y);
}I think you know INSERT STATEMENT.. here on it just string concat
sample e.g. (This not insert)
"delete from accrule " +
"where ruleid= " + tblRA.getValueAt(tblRA.getSelectedRow(),0)+
" and accountname='"+tblRA.getValueAt(tblRA.getSelectedRow(),1)+"'"
Maybe you are looking for
-
Formatting Substitution Variables in 6.2
I am formatting some columns in my grid, but the selection criteria for those columns is a substitution variable. Problem is - each day the value of the variable changes, and my formatting goes away (if you look at the rule under "Data Formatting", i
-
Picture enhancement for GeForce 7600 on Qosmio G30-188?
In the manual of my brandnew G30-188 there is on page 8-31 a picture with a menue called Toshiba picture enhancement for Geforce 7300. It is described that you can change the settings for the Video and TV-picture. But on my G30-188, which has the GeF
-
Data selection and report generation
Hi, I want to create a report with information about friends. I have a class like this: public class friend(){ Date born; Vector phones; String name; I have a collection of friends and I want generate a report with some of them. I want to select thos
-
JDK - Time configuration for France
Hi! I'm using GregorianCalendar class to get current date and time like above: GregorianCalendar today = new GregorianCalendar(); I'm located in Paris and the time I get is automatically converted to Greenwich Mean Time (so one hour less than the one
-
HT204350 Migration Assistant in Mavericks does not allow User account migration
Users accounts do not show up at all.