How to bind a database table to a JSF table ?
Hi
thank you for reading my post
I tried to use derby with Jdev 10gR3 , but it does not works with derby when i drag and drop the table into a jsf page
it shows a error message :
Entity creation failed for following database object
no primary key attribute and does not support ROWID.use Entity wizard to crete an entity.
now my question is :
1-what is that entity ? is that a EJB stuff ?
2-my table has a primary key of type , bigInt and it is Identity (auto increment)
3-how i can resolve this problem.
Thank you
Can you be a little bit more specific about how you created the access to the database?
You can't drag a table directly onto a JSF page you first need to create either a Toplink object, an EJB or an ADF Business Component.
If you are going to use Derby as your database you should probably use Toplink and not ADF Business Components, since ADF BC wasn't certified with Derby.
Similar Messages
-
How to bind the database?
How to bind the database and to place the data of a field in a EditBox and to modify the data of a table.
Hi,
Here got one example.
Private oUserDataSource As SAPbouiCOM.UserDataSource
oNewItem = oForm.Items.Add("ET_GUID", SAPbouiCOM.BoFormItemTypes.it_EXTEDIT)
oEditText = oNewItem.Specific
oUserDataSource = oForm.DataSources.UserDataSources.Add("U_GUID", SAPbouiCOM.BoDataType.dt_LONG_TEXT, 60)
oEditText.DataBind.SetBound(True, "TableName", "FieldName")
Hope this helps,
Bruce. -
How it use Filter Id and FilterPanelFocusid in JSF Table component
How it use FilterId and FilterPanelFocusid in JSF Table component
How it use FilterId and FilterPanelFocusid in JSF Table component
-
How to we retrieve database content to a cell table?
hi all, i am trying to let user to view the database data from Web dynpro through the use of table view in a web page. Was wondering where do i get start if i am using a MS SQL DB. Any beginner tutorial to guide me to that? thx~
Hi...
Open SQL for WD JAVA
http://help.sap.com/saphelp_nw04s/helpdata/en/97/68d64260752a78e10000000a155106/frameset.htm
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/101cbffa-0701-0010-239f-f338d9ab0c71 -->Software
How Can I Run A SQLJ Normal Project In SAP NWDS
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/2351eb90-0201-0010-d297-f4681c2afb6d
These links may help u..
Regards,
Arun.. -
How to bind the data from my data source table to my jsp action form
I am doing one small application in that i need to bind my data to the database table, that means if i enter any data in my action form fields then it should get appended at database. I have done the binding but it is not appending to the database table. May be i didnt bind the data properly, can anyone help me out in solving this problem. Its very urgent because i have to submit this application today itself. Please help me out from this problem. please tell me from the basics and give me some example.
Thanking you in advancehi,
try this:
http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/inserts_updates_deletes.html
http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/dataproviders.html
regards,
rpk -
How to bind data from odata to the ui5 table .
HI ,
Can anybody help to bind Odata service to the ui5 table in eclipse .
This is my code.Check this
http://baigsorcl.blogspot.com/2010/03/creating-master-detail-form-in-adf.html
http://baigsorcl.blogspot.com/2010/03/moving-to-jdeveloper11g-your-first-adf.html
@John now you won :D -
How to bind "Image Field" object on a database
Hi to all
I inserted into a dynamic PDF (Livecycle ES3 trial) an image field, but I don't understand how I can to bind a JPG into a database.
In (F5) preview... I'm able to open a image file on filesystem and visualize it on PDF form... but then? How to bind on database?
In my several tentatives I'm using a MS Access 2010 database table, where I defined a OLE object... but doesn't work.
Thank you at all.
visertHi,
I have not tried to do this, but this document provides some instructions.
http://partners.adobe.com/public/developer/en/livecycle/lc_designer_XML_schemas.pdfhttp://partners.adobe.com/public/developer/en/livecycle/lc_designer_XML_schemas.pdf
Hope it helps
Bruce -
Fixing the Table Header in the default JSF Table
I am using the default JSF Table in Sun JS Creator (Version JSC 2 EA 2) with a
Scroll Bar Option (instead of Pagination Control). However I have not
been able to fix the table header and scroll only the data rows in the
table.
I have tried to use CSS style for table header, but it has not worked
either. Where do I set the CSS style - in JSCreator JSF Datatable or
JSCreator Table component, neither seems to work for me?
Is there any other way to fix the table header default JSF Table in Sun
JS Creator?
Using the scroll bar is critical user requirement for me and fixing the
table header will ensure that I can use the default JSF Table in Sun JS
Creator, alternatively we will have to use some other JSF table e.g.
from myFaces or an HTML Table and lose on the productivity benefit of
JSCreator.Hi,
There please just replace the If with IIF mentioned in Visakh Post. There is spell mistake
It should be
=IIF(CountRows("Dataset") > 0, True,False)
Regards, PS -
How to bind JtextFields in Swing to Table fields in the database
Can some one give the code of how to bind JtextFields in Swing to Table fields in the database
Am really new to java programming and have interest in learningThe standard JDK doesn't do this for you. If you search on Google, you may find some 3rd party packages that will do this.
You need to create your own form add execute the appropriate SQL yourself. Read the tutorial on [url http://java.sun.com/docs/books/tutorial/]JDBC Database Access to get started. -
Binding a JSF table to a list of data that does not come from a database
Retrieving data from a database I can just use the jDev wizard to "Create EJB from table" and bind the EJB to a JSF table through a NamedQuery.
However, in this instance I am retrieving a list of data from an existing API or a WebService.
Does anyone have a good example of how best to do this?Hi There,
I have make change as you suggested in your post.
But I am getting error that "org.apache.jasper.el.JspPropertyNotFoundException - /presale.jspx(86,56) '#{saveData._nameList}' Property '_nameList' not found on type dbtransaction.SaveData"
Where list is nameList which simply fetch data from Database and send it to the table
Here is my jspx code.
<tr:table var="row" value="#{saveData._nameList}">
<tr:column>
<f:facet name="header">
<tr:outputText value="Name" />
</f:facet>
</tr:column>
</tr:table>
I have just create one ArrayList object in Backing bean i.e. nameList and put getter setter functions for it.
Please help me out for this issue.
Thank You,
Navnath -
How to synchronize between DHCP binding table and DHCP snooping table ?
I clear DHCP snooping table with command "clear ip dhcp snooping binding " , and PC can't communicate with other any more. So how to synchronize between DHCP binding table and DHCP snooping table ?
dhcp-test#sh ip dhcp bind
IP address Client-ID/ Lease expiration Type
Hardware address
99.1.65.32 0100.1125.353c.25 Mar 02 1993 01:05 AM Automatic
99.1.65.33 0100.1438.059f.85 Mar 02 1993 12:01 AM Automatic
dhcp-test#sh ip dhcp snooping binding
MacAddress IpAddress Lease(sec) Type VLAN Interface
Total number of bindings: 0
thanks!ip dhcp snooping binding mac-address vlan vlan-id ip-address interface interface-id expiry seconds
Add binding entries to the DHCP snooping binding database. The vlan-id range is from 1 to 4904. The seconds range is from 1 to 4294967295.
Enter the above command for each entry that you add
To delete the database agent or binding file, use the no ip dhcp snooping database interface configuration command. To reset the timeout or delay values, use the ip dhcp snooping database timeout seconds or the ip dhcp snooping database write-delay seconds global configuration command.To renew the database, use the renew ip dhcp snooping database privileged EXEC command. -
I am developing a desktop application in Wpf using MVVM and Entity Frameworks. I have the following tables:
1. Party (PartyId, Name)
2. Case (CaseId, CaseNo)
3. Petitioner (CaseId, PartyId) ............. Link Table
I am completely new to .Net and to begin with I download Microsoft's sample application and
following the pattern I have been successful in creating several tabs. The problem started only when I wanted to implement many-to-many relationship. The sample application has not covered the scenario where there can be a any-to-many relationship. However
with the help of MSDN forum I came to know about a link table and managed to solve entity framework issues pertaining to many-to-many relationship. Here is the screenshot of my application to show you what I have achieved so far.
And now the problem I want the forum to address is how to bind a combo box so that it retrieves Party.Name for the corresponding PartyId in the Link Table and also I want to populate it with Party.Name so that
users can choose one from the dropdown list to add or edit the petitioner.Hello Barry,
Thanks a lot for responding to my query. As I am completely new to .Net and following the pattern of Microsoft's Employee Tracker sample it seems difficult to clearly understand the concept and implement it in a scenario which is different than what is in
the sample available at the link you supplied.
To get the idea of the thing here is my code behind of a view vBoxPetitioner:
<UserControl x:Class="CCIS.View.Case.vBoxPetitioner"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:v="clr-namespace:CCIS.View.Case"
xmlns:vm="clr-namespace:CCIS.ViewModel.Case"
mc:Ignorable="d"
d:DesignWidth="300"
d:DesignHeight="200">
<UserControl.Resources>
<DataTemplate DataType="{x:Type vm:vmPetitioner}">
<v:vPetitioner Margin="0,2,0,0" />
</DataTemplate>
</UserControl.Resources>
<Grid>
<HeaderedContentControl>
<HeaderedContentControl.Header>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
<TextBlock Margin="2">
<Hyperlink Command="{Binding Path=AddPetitionerCommand}">Add Petitioner</Hyperlink>
| <Hyperlink Command="{Binding Path=DeletePetitionerCommand}">Delete</Hyperlink>
</TextBlock>
</StackPanel>
</HeaderedContentControl.Header>
<ListBox BorderThickness="0" SelectedItem="{Binding Path=CurrentPetitioner, Mode=TwoWay}" ItemsSource="{Binding Path=tblParties}" />
</HeaderedContentControl>
</Grid>
</UserControl>
This part is working fine as it loads another view that is vPetioner perfectly in the manner I want it to be.
Here is the code of vmPetitioner, a ViewModel:
Imports Microsoft.VisualBasic
Imports System.Collections.ObjectModel
Imports System
Imports CCIS.Model.Party
Namespace CCIS.ViewModel.Case
''' <summary>
''' ViewModel of an individual Email
''' </summary>
Public Class vmPetitioner
Inherits vmParty
''' <summary>
''' The Email object backing this ViewModel
''' </summary>
Private petitioner As tblParty
''' <summary>
''' Initializes a new instance of the EmailViewModel class.
''' </summary>
''' <param name="detail">The underlying Email this ViewModel is to be based on</param>
Public Sub New(ByVal detail As tblParty)
If detail Is Nothing Then
Throw New ArgumentNullException("detail")
End If
Me.petitioner = detail
End Sub
''' <summary>
''' Gets the underlying Email this ViewModel is based on
''' </summary>
Public Overrides ReadOnly Property Model() As tblParty
Get
Return Me.petitioner
End Get
End Property
''' <summary>
''' Gets or sets the actual email address
''' </summary>
Public Property fldPartyId() As String
Get
Return Me.petitioner.fldPartyId
End Get
Set(ByVal value As String)
Me.petitioner.fldPartyId = value
Me.OnPropertyChanged("fldPartyId")
End Set
End Property
End Class
End Namespace
And below is the ViewMode vmParty which vmPetitioner Inherits:
Imports Microsoft.VisualBasic
Imports System
Imports System.Collections.Generic
Imports CCIS.Model.Case
Imports CCIS.Model.Party
Imports CCIS.ViewModel.Helpers
Namespace CCIS.ViewModel.Case
''' <summary>
''' Common functionality for ViewModels of an individual ContactDetail
''' </summary>
Public MustInherit Class vmParty
Inherits ViewModelBase
''' <summary>
''' Gets the underlying ContactDetail this ViewModel is based on
''' </summary>
Public MustOverride ReadOnly Property Model() As tblParty
'''' <summary>
'''' Gets the underlying ContactDetail this ViewModel is based on
'''' </summary>
'Public MustOverride ReadOnly Property Model() As tblAdvocate
''' <summary>
''' Gets or sets the name of this department
''' </summary>
Public Property fldName() As String
Get
Return Me.Model.fldName
End Get
Set(ByVal value As String)
Me.Model.fldName = value
Me.OnPropertyChanged("fldName")
End Set
End Property
''' <summary>
''' Constructs a view model to represent the supplied ContactDetail
''' </summary>
''' <param name="detail">The detail to build a ViewModel for</param>
''' <returns>The constructed ViewModel, null if one can't be built</returns>
Public Shared Function BuildViewModel(ByVal detail As tblParty) As vmParty
If detail Is Nothing Then
Throw New ArgumentNullException("detail")
End If
Dim e As tblParty = TryCast(detail, tblParty)
If e IsNot Nothing Then
Return New vmPetitioner(e)
End If
Return Nothing
End Function
End Class
End Namespace
And final the code behind of the view vPetitioner:
<UserControl x:Class="CCIS.View.Case.vPetitioner"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:vm="clr-namespace:CCIS.ViewModel.Case"
mc:Ignorable="d"
Width="300">
<UserControl.Resources>
<ResourceDictionary Source=".\CompactFormStyles.xaml" />
</UserControl.Resources>
<Grid>
<Border Style="{StaticResource DetailBorder}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="Petitioner:" />
<ComboBox Grid.Column="1" Width="240" SelectedValuePath="." SelectedItem="{Binding Path=tblParty}" ItemsSource="{Binding Path=PetitionerLookup}" DisplayMemberPath="fldName" />
</Grid>
</Border>
</Grid>
</UserControl>
The problem, presumably, seems to be is that the binding path "PetitionerLookup" of the ItemSource of the Combo box in the view vPetitioner exists in a different ViewModel vmCase which serves as an ObservableCollection for MainViewModel. Therefore,
what I need to Know is how to route the binding path if it exists in a different ViewModel?
Sir, I look forward to your early reply bringing a workable solution to the problem I face.
Warm Regards,
Arun -
Hi all,
Long time ago, I manually created a Database (APGriMMRP) and 3 Tables (dbo.Table_1_XYcoordinates, dbo.Table_2_Soil, and dbo.Table_3_Water) in my SQL Server 2012 Management Studio (SSMS2012). The dbo.Table_1_XYcoordinates has the following columns: file_id,
Pt_ID, X, Y, Z, sample_id, Boring. The dbo.Table_2_Soil has the following columns: Boring, sample_date, sample_id, Unit, Arsenic, Chromium, Lead. The dbo.Table_3_Water has the following columns: Boring, sample_date, sample_id, Unit, Benzene, Ethylbenzene,
Pyrene. The dbo.Table_1_XYcoordinates is a Parent Table. The dbo.Table_2_Soil and the dbo.Table_3_Water are 2 Child Tables. The sample_id is key link for the relationship between the Parent Table and the Child Tables.
Problem #1) How can I print out or export these 3 dbo Tables?
Problem #2) If I right-click on the dbo Table, I see "Start PowerShell" and click on it. I get the following error messages: Warning: Failed to load the 'SQLAS' extension: An exception occurred in SMO while trying to manage a service.
--> Failed to retrieve data for this request. --> Invalid class. Warning: Could not obtain SQL Server Service information. An attemp to connect to WMI on 'NAB-WK-02657306' failed with the following error: An exception occurred in SMO while trying
to manage a service. --> Failed to retrieve data for this request. --> Invalid class. .... PS SQLSERVER:\SQL\NAB-WK-02657306\SQLEXPRESS\Databases\APGriMMRP\Table_1_XYcoordinates> What causes this set of error messages? How can
I get this problem fixed in my PC that is an end user of the Windows 7 LAN System? Note: I don't have the regular version of Microsoft Visual Studio 2012 in my PC. I just have the Microsoft 2012 Shell (Integrated) program in my PC.
Problem #3: I plan to create an XML Schema Collection in the "APGriMMRP" database for the Parent Table and the Child Tables. How can I handle the relationship between the Parent Table and the Child Table in the XML Schema Collection?
Problem #4: I plan to extract some results/data from the Parent Table and the Child Table by using XQuery. What kind of JOIN (Left or Right JOIN) should I use in the XQuerying?
Please kindly help, answer my questions, and advise me how to resolve these 4 problems.
Thanks in advance,
Scott ChangIn the future, I would recommend you to post your questions one by one, and to the appropriate forum. Of your questions it is really only #3 that fits into this forum. (And that is the one I will not answer, because I have worked very little with XSD.)
1) Not sure what you mean with "print" or "export", but when you right-click a database, you can select Tasks from the context menu and in this submenu you find "Export data".
2) I don't know why you get that error, but any particular reason you want to run PowerShell?
4) If you have tables, you query them with SQL, not XQuery. XQuery is when you query XML documents, but left and right joins are SQL things. There are no joins in XQuery.
As for left/right join, notice that these two are equivalent:
SELECT ...
FROM a LEFT JOIN b ON a.col = b.col
SELECT ...
FROM b RIGHT JOIN a ON a.col = b.col
But please never use RIGHT JOIN - it gives me a headache!
There is nothing that says that you should use any of the other. In fact, if you are returning rows from parent and child, I would expect an inner join, unless you want to cater for parents without children.
Here is an example where you can study the different join types and how they behave:
CREATE TABLE apple (a int NOT NULL PRIMARY KEY,
b varchar(23) NOT NULL)
INSERT apple(a, b)
VALUES(1, 'Granny Smith'),
(2, 'Gloster'),
(4, 'Ingrid-Marie'),
(5, 'Milenga')
CREATE TABLE orange(c int NOT NULL PRIMARY KEY,
d varchar(23) NOT NULL)
INSERT orange(c, d)
VALUES(1, 'Agent'),
(3, 'Netherlands'),
(4, 'Revolution')
SELECT a, b, c, d
FROM apple
CROSS JOIN orange
SELECT a, b, c, d
FROM apple
INNER JOIN orange ON apple.a = orange.c
SELECT a, b, c, d
FROM apple
LEFT OUTER JOIN orange ON apple.a = orange.c
SELECT a, b, c, d
FROM apple
RIGHT OUTER JOIN orange ON apple.a = orange.c
SELECT a, b, c, d
FROM apple
FULL OUTER JOIN orange ON apple.a = orange.c
go
DROP TABLE apple, orange
Erland Sommarskog, SQL Server MVP, [email protected] -
How to search this value in oracle database to find out the table
Hi expert,
I know there is a value in oracle database, please show me how to search this value in oracle database to find out the table holding this value.
Many Thanks,918440 wrote:
Hi friends,
this question is really practical, I already know there is value from application saved in database, I want to search the whole database to figure out which table the value is contained.write SQL that writes SQL to query every table.
Handle: 918440
Status Level: Newbie
Registered: Mar 2, 2012
Total Posts: 20
Total Questions: 10 (10 unresolved)
why do you waste time here when you NEVER get any answer to any question you post? -
How to write select query for all the user tables in database
Can any one tell me how to select the columns from all the user tables in a database
Here I had 3columns as input...
1.phone no
2.memberid
3.sub no.
I have to select call time,record,agn from all the tables in a database...all database tables have the same column names but some may have additional columns..
Eg: select call time, record,agn from ah_t_table where phone no= 6186759765,memberid=j34563298
Query has to execute not only for this table but for all user tables in the database..all tables will start with ah_t
I am trying for this query since 30days...
Help me please....any kind of help is appreciated.....Hi,
user13113704 wrote:
... i need to include the symbol (') for the numbers(values) to get selected..
eg: phone no= '6284056879'To include a single-quote in a string literal, use 2 or them in a row, as shown below.
Starting in Oracle 10, you can also use Q-notation:
http://download.oracle.com/docs/cd/E11882_01/server.112/e17118/sql_elements003.htm#i42617
...and also can you tell me how to execute the output of this script. What front end are you using? If it's SQL*Plus, then you can SPOOL the query to a file, and then execute that file, like this:
-- Suppress SQL*Plus features that interfere with raw output
SET FEEDBACK OFF
SET PAGESIZE 0
-- Run preliminary query to generate main query
SPOOL c:\my_sql_dir\all_ah_t.sql
SELECT 'select call time, record, agn from '
|| owner
|| '.'
|| table_name
|| ' where phone_no = ''6186759765'' and memberid = j34563298'
|| CASE
WHEN ROW_NUMBER () OVER ( ORDER BY owner DESC
, table_name DESC
) = 1
THEN ';'
ELSE ' UNION ALL'
END AS txt
FROM all_tables
WHERE SUBSTR (table_name, 1, 4) = 'AH_T'
ORDER BY owner
, table_name
SPOOL OFF
-- Restore SQL*Plus features that interfere with raw output (if desired)
SET FEEDBACK ON
SET PAGESIZE 50
-- Run main query:
@c:\my_sql_dir\all_ah_t.sql
so that i form a temporary view for this script as a table(or store the result in a temp table) and my problem will be solved..Sorry, I don't understand. What is a "temporary view"?
Maybe you are looking for
-
How to setup multiple DNS zones in a single domain
We have a small charter school running a Mac Open Directory network on a single subnet with a single registered FQDN for its internal domain. We are about to open a second school within a wing of the same building which will also be on a Mac Open Dir
-
When I plug in my iPad 2 to my laptop to sync, it says "the file iTunes library itl" cannot be read because it was created by a newer version of iTunes. Can someone please tell me what this means? How do I correct it? Thanks!
-
Some help required - creating an election simulator
Hey there, i've only been coding java for the past month or so, and I've been going fine apart from this program i'm attempting to code (badly, I admit); To sum it up: *The program asks the user how many people are in a country. *The program asks the
-
Oracle Audit Vault Server & Agent Installation Error.
Hi, I am new to Audit vault. When I install Audit Vault on Windows 2008 R2 it throws an error after installing 99%. Kindly help me to resolve. OS Version : Windows 2008 R2 Oracle Audit Vault Version: 10.2.3.2 Error: Audit Vault Server: INFO: Configur
-
Command 1 in Messages not bringing up Buddies Window
When I press Command 1 in Messages, it not bringing up Buddies Window. I can go to Window and select Buddies fine. Any ideas?