Retrieve URL from database and navigate through command button
I am new to ADF and Jdeveloper. In our database we store the URLs to our help/FAQ webpage in a table. What I would like to do is retrieve this URL from the database and code a command button to navigate the user to this URL but I am not sure how to accomplish this and have not had any lucking searching for a solution. I have created a view object for the table that contains the URL. Many thanks in advance.
Hi,
Welcome to OTN.
You can create a view object based on the table (on which you have the URL stored).
Create a goButton (Instead of a command button) and bind the column (which stores the URL) to the destination property of the go button.
Something like
<af:goButton text="Help" id="gb1"
targetFrame="_blank" destination="#{bindings.URL.inputValue}"/>-Arun
Similar Messages
-
DO Web Service allow you to retrieve data from database and make it pluggab
Can Web Services allo you to retrieve data from the database and do they make the pluggable by allow you to plug them into any database.. how is that possible....
Going through the javaee tutorial is one sure way of accelerating your learning curve, as almost every basic you will need to get your job done is explaiined well in there. i have been using it to learn building enterprise application and is awesome good resource.
seriously consider downloading it
java.sun.com/javaee/5/docs/tutorial/doc/ -
Retriev values from database and display in a ComboBox
hi all,
i think the subject explains it all. how? currently iam using vectors which is giving me lots of problems and errors, whenever it adds to the combobox it adds the square braces as well example if the value in database is asrar then it will display [asrar], what is causing that? does anybody now any easier way??
asrarplease can someone help me
asrar -
WPF- How to save and retrieve details from database
I want to develop an desktop app to save and retrieve details from database, but am having a little hitch
am getting errors in my code, kindly advice below are the required code
xaml
<Grid>
<TextBox HorizontalAlignment="Left" Height="23" Margin="144,28,0,0" TextWrapping="Wrap" x:Name="TbxId" VerticalAlignment="Top" Width="193"/>
<TextBox HorizontalAlignment="Left" Height="23" Margin="144,134,0,0" TextWrapping="Wrap" x:Name="TbxFn" VerticalAlignment="Top" Width="193"/>
<TextBox HorizontalAlignment="Left" Height="23" Margin="144,77,0,0" TextWrapping="Wrap" x:Name="TbxLn" VerticalAlignment="Top" Width="193"/>
<Label Content="Student ID" HorizontalAlignment="Left" Margin="10,28,0,0" VerticalAlignment="Top" Width="101"/>
<Label Content="Last Name" HorizontalAlignment="Left" Margin="10,134,0,0" VerticalAlignment="Top" Width="101"/>
<Label Content="First Name" HorizontalAlignment="Left" Margin="10,77,0,0" VerticalAlignment="Top" Width="101"/>
<Button x:Name="BtnSave" Content="Save" HorizontalAlignment="Left" Margin="23,206,0,0" VerticalAlignment="Top" Width="75" />
<Button x:Name="BtnBrowse" Content="Browse" HorizontalAlignment="Left" Margin="149,206,0,0" VerticalAlignment="Top" Width="75" Click="Save"/>
<Button x:Name="BtnShow" Content="Show" HorizontalAlignment="Left" Margin="294,206,0,0" VerticalAlignment="Top" Width="75"/>
<WindowsFormsHost Grid.Column="0" Margin="448,28,75,243">
<wf:PictureBox x:Name="pictureBox1" Height="150" Width="150" SizeMode="StretchImage"/>
</WindowsFormsHost>
</Grid>
cs
private void Browse(object sender, RoutedEventArgs e)
SqlConnection cn = SqlConnection(global::DatabaseApp.Properties.Settings.Default.Database1ConnectionString);
try
OpenFileDialog dlg = new OpenFileDialog();
dlg.Filter = "JPG Files (*.jpg)|*.jpg|GIF Files (*.gif)|*.gif|All Files(*.*)|*.*";
dlg.Title = "Select Student Picture";
if (dlg.ShowDialog() == DialogResult.OK)
imgLoc = dlg.FileName.ToString();
picStu.ImageLocation = imgLoc;
catch(Exception ex)
System.Windows.MessageBox.Show(ex.Message);
Thank you
Jayjay johnHi Joakins,
I think Lloyd has a point here in that all I see there which is really database related is a connection string.
Maybe your question is more general though and you're just asking how to work with a database as a general principle.
Personally, I like entity framework and would recommend that.
You can read a shed load of stuff about it.
https://msdn.microsoft.com/en-gb/data/ef.aspx?f=255&MSPPError=-2147217396
With WPF almost every dev uses MVVM and I'm no exception.
You may find this interesting:
http://social.technet.microsoft.com/wiki/contents/articles/28209.wpf-entity-framework-mvvm-walk-through-1.aspx
The article for the second in the series is only partly written, but the sample is complete:
https://gallery.technet.microsoft.com/WPF-Entity-Framework-MVVM-78cdc204
Hope that helps.
Recent Technet articles: Property List Editing;
Dynamic XAML -
Error retrieving REN server URL from database
Getting the following error in MCFLOG1 and USQSRV1 log files. Checked all published REN solution guide, nothing really worked. REN server seems to be working though. Coming from loadbalancerURL.peoplesoft.com it pings and REN features work. Ren is set up using machine names though. If logging in directly to machinename.peoplesoft.com REN ping fails with Forbidden error, but that could be a caching issue. I am worried about the log files below and the app. server performance deterioration which may or may not be related.
We have machine1 with web/app (REN is configured there) and machine two with web/app on it. Also, there is an F5 load balancer in front of them. Any thoughts?
PSMCFLOG1.5324 (0) [07/09/12 00:18:16](1) (PSMCFLOG1): Error retrieving REN server URL from database
PSMCFLOG1.5324 (0) [07/09/12 00:19:16](1) (PSMCFLOG1): Error retrieving REN server URL from database
PSMCFLOG1.5324 (0) [07/09/12 00:20:16](1) (PSMCFLOG1): Error retrieving REN server URL from database
PSMCFLOG1.5324 (0) [07/09/12 00:21:16](1) (PSMCFLOG1): Error retrieving REN server URL from database
PSMCFLOG1.5324 (0) [07/09/12 00:22:16](1) (PSMCFLOG1): Error retrieving REN server URL from databaseI restarted the services and the error stopped.
Thanks
Ramya -
Get username from session and retrieve records from database wit tat userna
hello..
i got a ChangePassword.jsp which i retrieve the username from session using bean to display on e page..
<jsp:getProperty name="UsernamePassword" property = "username"/>
but in my servlet, i wan to retrieve records from database with tat username..
i tot of coding
String username = (String)request.getSession().getAttribute("UsernamePassword");
and then use tat username to retrieve records.. but is that e right way? The page did not display and i got a CastingException..
Please help.If you are using the session inside a jsp, you can say "session" without having to declare it.String usernamePassword = (String) session.getAttribute("usernamePassword");However, right after you get this value, check if it is null:
if(usernamePassword==null)
// do sth like forward to error page
else
// continue processing
If it is null, then you are probably not setting it right in the first place. Make sure that in your servlet A you create a session, and before you return or forward to a jsp, that you actually set this value in the session like saying
session.setAttribute("usernamePassword", usernamePassword);
and it is case sensitive for the key. -
View and Navigate through PDF´s on a DB2 SQL Query
Hello,
We need to create a windows forms application in .Net to view and navigate through pdf´s that are located on a DB2 Express SQL database using the Acrobat SDK or PDF Library.
The idea would be to query the SQL table and the result we should be able to view and navigate through by using the viewer procedures from the SDK without having to send the PDF files to a temporary folder on the hard drive.
So for example, if the query returned 20 pdf´s, we should be able to navigate and view these pdf´s on a windows form connecting directly to the query via streams or a data source.
We assume that what we need is some sort of procedure to connect the viewer to the query through a data source.
Please help us to research about this and determine if this is possible.
Thanks.Hello lrosenth and thanks for your reply.
Our goal is to develop a Windows Form in .Net where we could view the pdf without launching Acrobat.
I guess you mean that we should develop a plugin in C/C++ for Acrobat, but that is not what we intend.
Is there a way to develop a function in .Net that will allow a Windows Form to read a stream with a pdf using Adobe ´s SDK or PDF´s library?
If so, would you be so kind as to point us to some reading material?
Regards -
How to retrieve datas from database to dropdown list in jsp
hai.
please tell me how to retrieve a perticular field list from database to a drop down list using jsp. i am new to jsp. i am doing employee management system. in that i need to edit employee's details as like.
so that i want to display employee id's in a drop down list. i want to retrieve from database and display.
please help me in this .
advance thanks.Hello friendz,
If tht is the i wud suggest if guyz can go wid AJAX...
try to make use of xmlHttp Object and generate a new dependent drop down by using a property from a bean->servlet->VIEW(FORM)
else save the form state in a session and then refersh it. once all in again.
i had a similar problem which i solved in the following way
Hi friend,
I had a similar situation and i tried to solve it by using XmlHttpRequest Object(used in AJAX).
U can checkout the below example just for further reference delete
UserForm.jsp:
==========
<head>
<script>
var xmlHttp
function showState(str)
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
alert ("Browser does not support HTTP Request")
return
var url="getState.jsp"
url=url+"?count="+str
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=stateChange
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
function stateChange()
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){
document.getElementById("state").innerHTML=xmlHttp.responseText
</head>
<body>
<select name='country' onchange="showState(this.value)">
<option value='india>india</option>
</select>
<br>
<div id='state'>
<select name='state' >
<option value='-1'>pickone</option>
</select>
</div>
</body>
getState.jsp
============
<%@page language="java" import ="java.util.Hashtable" import ="java.util.Set" %>
<%
String country=request.getParameter("count");
response.setContentType("text/html");
response.setHeader("Cache-Control","no-cache");
try{
Hashtable ht = (Hashtable)session.getAttribute("<ATTRIBUTE_NAME>");
String buffer="<select name='state'><option value='-1'>Pick One</option>";
Set s=ht.keySet();
Object keys[]=s.toArray();
int size=keys.length;
for(int i=0; i < size;i++){
buffer=buffer+"<option value='"+ht.get(keys).toString()+"'>"+ht.get(keys).toString()+"</option>";
buffer=buffer+"</select>";
response.getWriter().println(buffer);
catch(Exception exp){
response.getWriter().println(exp);
%> -
Problem in retreiving from database and viewing it in browser--urgent
hai,
i have develped an application using swings where the mails received from client and reply posted will be pasted in JEditorPane. all the mails,query and reply will be stored in database.
then iam retrieving the mails from database and displaying it in browser using table data.(Just like forum). Iam using encodehtmltag function to omit the html tags that r present in the mail data.
when i display it in browser it extends a page horizontically. how to avoid this. how to word wrap. one of my friend asked me to set number of character to be displayed per line. i did that. but problem is i could see the word break . i have set 90 characters to be displayed per line. i dont want to break the word. for eg., if the end string of a line is regarding it is displayed like this---reg and then arding in next line. how to avoid this.
please help me iam breaking my head with this for past few days.If the field is a Date in your database, you can use the ResultSet.getDate() method, which will return a java.sql.Date (which extends java.util.Date).
You can then use SimpleDateFormat to format it the way you like.
See the API doc for more details. -
Code that handles a set of questions from database and place it on JSP
Hi,
How to write a code that handles a set of Quiz questions from database and place it on JSP page..
Thanks in advance
Haritha975033 wrote:
Hi,
I hav got the answer from you r previous link, but not completly. I need help regarding on how to do code that handles a set of questions from database and place it on JSP.
Any help is highly appreciated.Yes but what kind of help do you expect to get? What kind of help do you think is possible through something as cold and distant as a forum, where you clearly require personal guidance and tutoring?
If you are going to answer "example code", I should warn you that the answers are not going to be to your liking. -
How to retrieve data from database to the structure(complicated)
Hello everyone:
I want to retrieve data from database to the structure. but the structure defined like this below:
TOLERANZOB LIKE QAMV-TOLERANZOB
TOLERANZOB1 LIKE QAMV-TOLERANZOB
so how can I retrieve the data from the database ? make sure that the two fields contain data both.
Thanks in advance .
Regards
NickHi Nick,
To retreive data for TOLERANZOB from QAMV,
If you know the key fields then use
SELECT SINGLE TOLERANZOB FROM QAMV INTO TOLERANZOB WHERE keyfields.
else, you can use
SELECT TOLERANZOB FROM QAMV UPTO ONE ROWS INTO TOLERANZOB WHERE....
Once you retreive the data using the select query, you can check if it is initial and if not move the data from TOLERANZOB to TOLERANZOB1.
<b>Reward points for helpful answers.</b>
Best Regards,
Ram. -
Create folders and navigate through server folder structure in Linux
Hello,
I want to know if there are any examples on how to reate folders and navigate through server folder structure in Linux OS. I currently can navigate trough Windows, but need to be able to do it in Linux, by using a GUI for it.
Any suggestions? Thanks
LabVIEW Intermediate I level!Hi Bebeto,
Would you please clarify your question a bit for us? Are you trying to implement something like Windows Explorer in your application? Also, are you looking for a tree-like display structure, or list of folders that you can drill down into (i.e. double click to enter into that that folder). My understanding from your comments is that you have implemented something like this in Windows, but not Linux. It this correct? Also, are you looking for advice on the GUI creation side of things, or the programmatic access/creation of files and folders? The more you can clarify your question for us, the more the community will be able to provide feedback and suggestions to help you get on track qiuckly.
Have a great afternoon!
John M
National Instruments
Applications Engineer -
Retrieving Data from database to combobox
Hi
Can anyone help in retrieving data from database to combobox..
All the names of employees and their designations are stored in database.so i want retrieve them in other page.
both designation and names of employees are comboboxes.
after loading tha page i need to get all the designations which are stored in database in first combobox and when i select a particular designation i need get all tha names of employees of that designation in other combobox.this has to be done using jsp and ajax.
please can anyone give me the code for this using Ajax and Jsp.Hello Friend try this code
dbdata.jsp
<%@page language="java" import="java.sql.*"%>
<html>
<%
Class.forName("..........");
Connection n=DriverManager.getConnection ("....","...","...");
Statement st=con.createStatement();
ResultSet rs=st.executeQuery("select ename from emp");
%>
<body>
<form>
<select>
<%
while(rs.next())
%>
<option><%=rs.getString("ename")%></option>
<%
%>
</select>
</form>
</body>
</html> -
Error:Failed to retrieve data from database [Vendor Code:3001]
Hello FOlks am trying to run a crystal report but when i try to run it somehow returns this error i.e [Error:Failed to retrieve data from database [Vendor Code:3001], I have no clue wats happening with this.Can anybody please throw some light on this.Am providing the sql behind this report for reference.
SELECT "CLIENT"."CLIENT_NAME",
"RECOVERY"."AMOUNT",
"RECOVERY"."RECOVERY_TRANSACTION_INTERNAL",
"RECOVERY"."ALLOCATION_CHECK_AMOUNT",
"RECOVERY"."RECOVERY_DATE"
FROM "HRI1_OWNER"."CLIENT""CLIENT",
"HRI1_OWNER"."EVENT_CASE""EVENT_CASE",
"HRI1_OWNER"."SETTLEMENT""SETTLEMENT",
"HRI1_OWNER"."RECOVERY""RECOVERY"
WHERE "CLIENT"."CLIENT_ID" = "EVENT_CASE"."CLIENT_ID"
AND "EVENT_CASE"."EVENT_CASE_ID" = "SETTLEMENT"."EVENT_CASE_ID"
AND "SETTLEMENT"."SETTLEMENT_ID" = "RECOVERY"."SETTLEMENT_ID"
AND "CLIENT"."CLIENT_CODE" <> 'CLIENT 1'
AND "CLIENT"."MAJOR_CLIENT_ID" in
(Select major_client_id
from major_client
where major_client_code in ('LA', 'PFG'))
ORDER BY "CLIENT"."CLIENT_NAME"Edited by: user11961230 on Nov 12, 2009 6:57 AM@oradba:Hi Thanks for getting bak. Well i have ran the query using PL/SQL Developer tool and yes its mapping to ORA-03001:unimplemented feature. i dont know what the problem is.
@centinul: well i dont have any views in there.but still cudnt figure out why its throwing tht error
Thanks
Edited by: user11961230 on Nov 12, 2009 7:12 AM -
Try to retrieve data from database got error message
Try to retrieve data from database got error message *"java.lang.ArrayIndexOutOfBoundsException: 2*
* sun.jdbc.odbc.JdbcOdbcPreparedStatement.clearParameter(JdbcOdbcPreparedStatement.java:1023)*
* sun.jdbc.odbc.JdbcOdbcPreparedStatement.setDate(JdbcOdbcPreparedStatement.java:811)*
* guestbk.doGet(guestbk.java:32)*
* guestbk.doPost(guestbk.java:73)*
* javax.servlet.http.HttpServlet.service(HttpServlet.java:710)*
* javax.servlet.http.HttpServlet.service(HttpServlet.java:803)"*
I have used prepared statment
java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat("dd/MM/yy");
java.util.Date dt = sdf.parse(str3);
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc:odbc:gbook");
//Statement stmt=con.createStatement();
PreparedStatement ps = con.prepareStatement("SELECT * from gbook where emailid =? AND date =?");
ps.setString(1,str1);
ps.setString(2,str2);
ps.setDate(3,new java.sql.Date(dt.getTime()));
//ps.executeQuery();
//ResultSet rs=stmt.executeQuery("select * from gbook where emailid = str1");
ResultSet rs = ps.executeQuery();
out.println("<Html>");
out.println("<Head>");
out.println("<Title>GuestBook</Title>");
out.println("</Head>");
out.println("<Table border=1 align=center >");
out.println("<H4><B><center>Teacher's Lesson Plan</center></B></H4><BR>");
out.println("<TR><TD><b>Teacher Name</b></TD><TD><b>Class</b></TD></TR>");
while(rs.next())
ctr++;
String email=rs.getString("emailid");
String cmt=rs.getString("comment");
out.println("<TR><TD>"+email+"</TD><TD>"+cmt+"</TD></TR>");
}Please anybody help .PreparedStatement ps = con.prepareStatement("SELECT * from gbook where emailid =? AND date =?");
ps.setString(1,str1);
ps.setString(2,str2);
ps.setDate(3,new java.sql.Date(dt.getTime()));Your SQL query has 2 placeholders but you try to set 3 values.
And didn't you read the stack trace?
guestbk.doGet(guestbk.java:32)You could've tracked down line 32 and seen what was there at that line.
People on the forum help others voluntarily, it's not their job.
Help them help you.
Learn how to ask questions first: http://www.catb.org/~esr/faqs/smart-questions.html
----------------------------------------------------------------
Maybe you are looking for
-
is there a way i can submit my crash report here so someone could look at it and let me know what's causing the issue
-
Message on computer for eReader says "This computer is not authorized to preview this book" but it is authorized and I've bought the book. Am trying to access information that will tell me how to retrieve books that I've tried to delete from the rea
-
Playstation 2 on apple 21" Sony Trinitron CRT
I'm trying to find a VGA adapter or splitter that will send an AV signal to my old monitor - I've tried buying a Mayflash Multi VGA Box that says it can 'convert any AV or S-AV to play on any standard monitor' but it doesn't seem to work - does anyon
-
Is it possible to take a movie of a disk and onto itunes?
i wanna have some movie on my itouch but i dont wanna buy them again help Thanks in advance
-
Iphone 4S authentication error on Nike Matrix Treadmill
My gym just recently added new Matrix Nike + Treadmills. My iphone 4S will not work with it. According to the gym, I am the only one who is having this problem! It recognizes the phone, but then says there is an authentification error and will not wo