ADF Faces: RicheTableau - how to create a richeTableau method of bean datacontrol object that returns a list of objects
Build JDEVADF_12.1.2.0.0_GENERIC_130608.2330.6668
I have a data bean control method that returns a list of SearchResultRow objects. Each SearchResultRow has a list of SearchResultColumn objects. SearchResultColumn is the attribute name, value, type of data.
The method returned data looks like:
SearchResultRow {col1, a1, string}, {col2, a2, date}, {col4, 13, number}, {col4, a4, string}
SearchResultRow {col1, b1, string}, {col2, b2, date}, {col4, 23, number}, {col4, b4, string}
SearchResultRow {col1, c1, string}, {col2, c2, date}, {col4, 33, number}, {col4, c4, string}
I try to display searchResult table depending on whether it
col1 col2 col3 col4
A1 a2 a4 13
B1 b2 b4 23
C1 c2 c4 33
I drag my return value of method to the jsf page to create a link to the tree.
< Tree IterBinding = "retrieveSearchResultsIterator" id = "SearchResultRow" >
< nodeDefinition DefName = 'model. SearchResultRow"name ="SearchResultRow0">
< AttrNames >
< item Value = "resultType" / >
< / AttrNames >
< accessors >
< item Value = "searchResultColumns" / >
< / accessors >
< / nodeDefinition >
< nodeDefinition DefName = 'model. ResultColumn"name ="SearchResultRow1">
< AttrNames >
< item Value = "name" / >
< item Value = 'length' / >
< item Value = "query" / >
< item Value = 'type' / >
< item Value = 'value' / >
< / AttrNames >
< / nodeDefinition >
< / tree >
On my jsf page, I added a table then reused the liaison of the tree.
< af:table value = "#{bindings." SearchResultRow.collectionModel width}"= '100% '.
var = "row" rowBandingInterval = "0" id = "t3" binding = "#{backingBeanScope.backing_Test4.t3}" partialTriggers ="": b1 ' columnStretching 'last' = > "
My thought is in backing bean, loop through the table variable "line" which is my SearchResultRow and then loop SearchResultColumns of the line to build the RichColumn and add it to the table.
My question is: is this feasible? How can I get hold of the var 'line' backing bean?
Any other suggestions how to proceed?
Thank you.
I thought about it the adf table creation dynamically.
This link is useful. ORACLE ADF (Application Development Framework): creating dynamic table
Tags: Java
Similar Questions
-
ADF Faces: RicheTableau - how to create a richeTableau object
Hello. How to create a richeTableau object to put in a JSF page? I need to make a method that gets a list of column names and a list of list of data. This code I wrote do not work. What was my mistake?
public RichTable getADFTable( List<String> lstCols, List< List<String> > lstLstData ){ RichColumn adfCol = null; List<RichColumn> lstRichCols = new ArrayList<RichColumn>(); int cont = 0; for( String col : lstCols ){ adfCol = new RichColumn(); adfCol.setDisplayIndex(cont++); adfCol.setHeaderText( col ); adfCol.setMinimumWidth( "60" ); lstRichCols.add( adfCol ); } int contCols = 0; RichOutputText text = null; RichTable AdfTab = new RichTable(); for( List<String> lstData : lstLstData){ for( String data : lstData ){ text = new RichOutputText(); text.setValue(data); lstRichCols.get( contCols ).getChildren().add( text ); contCols++; } contCols = 0; } AdfTab.setRows(this.lstEntit.size()); cont = 0; for( RichColumn col : lstRichCols ){ AdfTab.getChildren().add( col ); } return AdfTab; }
I was looking for an example and I found it but the errors of the Pentecost, finally I fixed it and it works.
Just generate the data of your Web services and 'put' in this structure.
The java file (bean)
package view; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.apache.myfaces.trinidad.model.CollectionModel; import org.apache.myfaces.trinidad.model.SortableModel; public class DynamicTable { private SortableModel model; private List
columnNames; public DynamicTable() { columnNames = new ArrayList (); columnNames.add("Col-1"); columnNames.add("Col-2"); generateColumnModel(); } public void generateColumnModel() { this.model = new SortableModel(createRows(columnNames)); } private List The file jspx (page)
-
How to create a generic method to programmatically access the DB sequence in oracle adf
Hello
I am trying to create a generic method to access a programmaticall DB Sequence in oracle adf. My version of JDeveloper is 11.1.2.4.
I created a method getSequenceNumber (String seq) and saved in my application module. Also added to the links of my page.
I followed the instructions below link for this.
ADF Code corner: Oracle OTN JDeveloper harvest xx / 2010
Note: The problem with this approach is that I have to create separate methods to access the different sequence numbers.
In my managed bean, I wrote the code below to get the method name.
OperationBinding getNextSequence = ADFUtils.findOperation ("getSequenceNumber");
How can I pass my sequence DB name to this method?
Thank you
Hello
getNextSequence.getParameterMap.put ("seq", "yuorseqname");
getNextSequence.execute ();
-
[Table ADF Faces component] How to save the current state?
Hello
the ADF faces table component is great!
You can drag-and - drop columns, sort columns...
Now, we have an obligation to save the State of the table for subsequent sessions.
The return of the user wants to get the same State as last time (order requirement or sort of column), even if he comes back a few days later.
Is this possible?
I discovered, that this information is stored in the session cookie. But this cookie is discarded in a few minutes...
Any tips?fschulze,
If you use 11 GR 1 material - you can read about MDS in chapters 33 and 34 of the Fusion for the ADF Developer's Guide - it does exactly what you ask... an update, don't know if it will save the sort order, but the documentation specifically mentions column reorganization as being recorded.
John
-
ADF faces: the challenge of creating custom components
Hi all
My name is Juan Manuel Tamayo, and I start a project in which we will use ADF 11 g as part of our development, unless we find significant reasons not to do so. I don't have much experience with JSF or ADF, so please accept my apology for any obvious question.
I would like to know your opinion about the declarative elements in ADF Faces. Are they easy to use? are they flexible enough to build all the components required for a large application? In case the declarative elements are not sufficient, what other options do I have for building new, complex visual components?
I sincerely appreciate your help.
Kind regards
Juan Manuel Tamayo
Published by: juanmtamayo on January 19, 2009 20:48Juan,
If the component can be built out of existing components, so if it's a component of composite, then declarative components is a good and reusable approach. If you can't find what you are looking for your next step would be the Internet to see if you find a component JSF 1.2 compatible UI that you need and that co-exists with the set of components in ADF Faces. In any last resort, you can always write your own custom JSF component.
Frank
-
How to create a generic method that calls the Web Service
Hi I have a question how to create the Web Service client. In design mode, I can't specify static URLs? WSDL and process.
I found the briliant method in library of apache cxf.
for example
DCF JaxWsDynamicClientFactory = JaxWsDynamicClientFactory.newInstance ();
Customer customer = dcf.createClient ("http://soabpm-vm:8001 / soa-infra/services/default/MailSender/mailsender_client_ep?") WSDL");
Object [] results;
try {}
Results = clientA.invoke (QName new ("http://xmlns.oracle.com/SynchDSBpel20/MailSender/MailSender", "process"), '@', 'body', 'subject');
} catch (Exception e) {}
In my case, I should create a method with params (URL? WSDL, URI, name of operation, param1, praram2, param3)
Y at - it something like CXF in the ADF library?If your question has been answered, can you please mark as answer?
THX
Antonis -
Create the view and by using the function that returns a type oracle
Following is possible?
A function returns an ORACLE object Type, and I want to use this feature, in my opinion, it is possible to access each field of the type once the function is executed and make a column in the view?
Now, I want to use the function according to me - if the underlying query of the view follows-create or replace TYPE SOME_INFO AS OBJECT ( CHARGE FLOAT, SOME_DATE DATE, SOME_VAL VARCHAR(50) ); CREATE OR REPLACE FUNCTION CALCULATE_INFO ( p_chargeId NUMBER) RETURN SOME_INFO AS v_some_info SOME_INFO := new SOME_INFO(0, null, null); BEGIN -- function body populates the v_some_info return v_some_info; END calculate_info;
How to recover someInfo.CHARGE, someInfo.some_date, someInfo.some_val? I can put them as columns in the view?select c.*, calculate_info(c.charge_id) as someInfo from some_charge;
If you use only functions that return a single value in a view?
Thank you
Mustapha
Published by: Tina Giri on April 16, 2009 05:47How to recover someInfo.CHARGE, someInfo.some_date, someInfo.some_val?
SQL> create or replace type some_info as object (charge float, some_date date, some_val varchar (50)); / Type created. SQL> create or replace function calculate_info (p_chargeid number) return some_info as v_some_info some_info := new some_info (0, null, null); begin -- function body populates the v_some_info return v_some_info; end calculate_info; / Function created. SQL> select your_view.someinfo.charge, your_view.someinfo.some_date, your_view.someinfo.some_val from (select c.*, calculate_info (c.empno) as someinfo from emp c) your_view where rownum <= 3 SOMEINFO.CHARGE SOMEINFO SOMEINFO.SOME_VAL --------------- -------- -------------------------------------------------- 0 0 0 3 rows selected.
-
JDeveloper 10.1.3 ADF Faces &; BC: how to refactor a data control?
Hi all
Don't know if anyone else has experienced this problem, but as our application is iteratively, we ran in the case of uses of "Dialogues LOV' being required for several modules of the application. According to my experience as a swing developer, we can easily refactor a class an arch 'common' package-specific module and reduce code redundency. However, due to the nature of JSF/ADF and the mashup of technoglogies, this isn't a process in a straight line forward multiple dependencies (pageDef, viewobject/am/faces-config xml files, etc...) Does anyone have any suggestions on how to better approach question?
Thank you
WesHi Wes,
I can say that things in r10.1.3.x of refactoring-based ADF BC is going to be a little painful.
[url http://technology.amis.nl/blog/2859/fear-for-renaming-refactoring-adf-bc-objects-in-jdeveloper-is-not-unfounded] This blog is particularly detailed.
Best,
John
-
ADF Faces 10g: how to clear a <; af:table >; component?
Hello
I use JDeveloper/ADF 10.1.3.
I have a page with 2 iterators on the same point of view (always in search mode), a search form and a table of results. As there are many rows in the view and I don't want to interrogate him without search criteria in order to avoid all the results, I put the refresh of the iterator property to ${adfFacesContext.postback == true}.
I did a search button linking the Execute action and a reset button, forcing the find action. Now, when I hit the reset button, I also want to reset the table (query results) empty. How to do this? I couldn't find any method to empty all lines in lavel, nor to the iterator, table or view.
Thanks in advance for your answers.Hello
I don't have a declarative solution for you, but a few possible solutions or ideas to do.
1 put a method in end of request module show the method to the client (data control). This method can either remove all the lines of the VO (call removeCurrentRowFromCollection() for each line currently in the t, but keep them in the DB).
2. you can try to use executeEmptyRowSet() (I'm not sure that it is available in 10.1.3).) and hope that it deletes all rows of the rowset (the method is not documented, so I'm olny guess its function).
3. run your search with parameters, you are sure that they will not return any result. This can be made from a bean to support.Timo
-
JDeveloper 10.1.3 ADF Faces &; BC: how to get the hostname of h
Hi all
How can I get the hostname of the server that your application is deployed via the request form?
I know that on a javax.servlet.ServletRequest class, the method is called getLocalName(). Is there a way to access this information in the am?
Thank you
WesWes,
Something like that?
try { InetAddress addr = InetAddress.getLocalHost(); // Get IP Address byte[] ipAddr = addr.getAddress(); // Get hostname String hostname = addr.getHostName(); } catch (UnknownHostException e) { }
John
-
Hello
I have a structured map < String, List < String > > plan in backing bean. I have a requirement to draw a table using this hash table which means map key as columns and its value is a list and it's the column values.
Thank you
Faizal
Check this Create ADF Table during execution
~ Abhijit
-
How to create a display of a .as file object?
Hello
I'm trying to figure out how to dynamically create instances on stage from a .as file. So far I've succumbed
I have the following code:
package {}
import flash.display. *;
SerializableAttribute public class GreetingApp extends Sprite {}
public void GreetingApp() {}path to ensure that the function to run
trace ("hello world");
Create a rectangle
var rect:Shape = new shape;
rect.graphics.lineStyle (1);
rect.graphics.beginFill(0x0000FF,1);
rect.graphics.drawRect (0,0,75,50);
Add assets to the display list
addChild (rect);
}
}
}Image 1 of my calendar, I have this:
var greet: GreetingApp = new GreetingApp;
I expect that when I run the present, I see a rectangle on the stage. However, the stage is empty. What I am doing wrong?
Try...
var greet: GreetingApp = new GreetingApp;
addChild (greet);In addition, you should make a practice to include the () when you create an instance of a class...
var rect:Shape = new Shape();
var greet: GreetingApp = new GreetingApp();
-
How to create the data control to a custom object of sale cloud using web service.
Hi all
I'm working on a requirement I need to display the common custom object data and their children object. After the display of the data user will be able to select multiple records by using the check box and then update the State to close.
So basically, I need to create a table in which the data will fill with the checkboxs and when the user clicks on the button update then I need to update a field in the parent object.
Any help would be appreciated.
Thank you
You must follow the steps below
1. right click on the template project, select the new option
2 Select the data control in the left hand side of the tab "All Technologies"
4 Select "control of data from the Web Service" in the right side panel
3. Enter the name of the data control (custom name)
4. provide your WSDL to the URL https://crm-domain.oracleoutsourcing.com/foundationCustExtn/CrmCommonReferenceService?wsdl
5. click Next, next if all methods to winow than wsdl, mix to the right and click Finish button
6 refresh "data control" in your right side panel to request
7 expand control of data and select only control data that you have already given
8. then you can see the methods that comes from your wsdl.
9. Select the method and expand it, you will get the return values
10. drag and drop the return as a table value, you will get the af:table on the page
11. don't want to operatet this table.
-
How to create several timestamps fileds in EDS data object?
Hi all
I am creating BAM BOF EDS data objects. I have provided information for the connections of the DB, during the recording of the data objects its not allowing the fields of timestamps.
is there a workaround solution and please let me know the possibilities.
Thank you.
SwamyHello
Here is the SNA for this oracle docs question.from
Note:Only the tables owned by the user are displayed when a data object is created on an EDS.
Creating a data object with multiple fields of time on an EDS stamp is not supported.
http://docs.Oracle.com/CD/E15586_01/integration.1111/e10224/bam_data_objects.htm#BABCEHBB
http://docs.Oracle.com/CD/E15586_01/integration.1111/e10224/bam_extl_data_sources.htm
Thank you
Siva -
How to create a PDF file of a Web site that requires a login to view the content?
Hello
I want to create a PDF from a thread on a forum. However, the forum requires a login to view the content of the thread. When I paste the URL in acrobat to create the PDF file, it creates a PDF of the login page (not wire). Is there a way to achieve this?
Thank you.
Go to the web page and use the file > Print > printer Adobe PDF?
Maybe you are looking for
-
22 Firefox does not install OK. FF screen comes up transparent. Win 7
Upgrading to FF 22. FF appears on the display as transparent. Can see the desktop through the screen of FF. No problem with 21 FF or any earlier version. Running the 64 bit version of Windows 7
-
Search bar and address bar change size according to the length of the URL. How to keep my search bar the same size?
-
Equium A200-1V0: Modem Bt work will travel 105 on it?
Hello I got the driver for the modem WXP CD but I haven t had drivers for Vista.I searched the web but can't find it. So if possible can someone find me the drivers for it or it is possible to install the driver for the modem on the vista Windows XP
-
Satellite A210 - 1AO PSAELE - black screen problem
Hello. I have a strange problem with LCD on my Satellite A210-1AO. Sometimes LCD does not work. The problem is only at startup, only not on closing LCD display or sleep mode. If I connect an external monitor - there is a picture, but with strange ran
-
Print - don't know to change the background or the volume
help I'm naïve on the computer issues and don't know to change the background or the volume could someone pls explain this to me? I would be eternally grateful posml6617 Moved from feedback Original title: impression of the printer