Database access tutorial doesn't add actionOutputs when action is added
I've installed weblogic portal 10.3
Potential issue:
The help shipped with 10.3 in the path %BEA_HOME%\tools\eclipse_pkgs\2.0\eclipse_3.3.2\eclipse\plugins is
org.eclipse.help.base_3.3.1.v20070813_33x.jar
not ...base_3.3.2.v...
In the workshop tutorial,
"Accessing a Database from a Beehive NetUI Web Application"
in step 2, "Add a Page Flow and a Control"
the effect of adding the action "getCustomers" is, according to the tutorial,
supposed to add the following annotation to the CustomerManagementController.java code:
@Jpf.Action(forwards = { @Jpf.Forward(name = "success", path = "",
actionOutputs = { @Jpf.ActionOutput(name = "getCustomersResult", type = model.Customer[].class) }) })
However, when I do this, the added code is missing the actionOutputs phrase.
Is this the only thing which is missing, or are there other missing pieces as well?
Edited by: user10508604 on Nov 24, 2008 1:24 PM
It appears the proper output annotation should be added as follows:
In the Page Flow Editor,
make sure the Action "getCustomers" centered.
There should be a blue arrow pointing to the right to "customers.jsp"
The arrow should have no small icons indicating parameters overlaid in front of it.
Right click on the blue arrow and select "Edit Action Outputs..." from the menu.
The "Edit Action Output Annotations" dialog should appear.
Click the "New" button with an arrow pointing to the left.
A new Action Output labelled "newActionOutput1{String} should appear under "Action Outputs:" on the left,
with its name and type under "Details" in the lower part of the dialog.
Change the name in the details to "getCustomersResult".
Change the type in the details to "model.Customer[]".
Hit the "Copy" button to make this action output also a page input for the "customers.jsp" page.
Hit "OK"
An icon indicating that parameters are being passed to the jsp page should appear
overlaid on top of the blue arrow.
Inspection of the "getCustomers" action definition annotation in CustomerManagementController.java will
show the action output definition for "getCustomersResult" is now present.
Examination of the code for "customers.jsp" will also show the following line declaring the page input:
<netui-data:declarePageInput name="getCustomersResult" type="model.Customer[]" required="true" />
Similar Messages
-
I receive "Database access denied" when trying to add component 4543BD
I receive "Database access denied" when trying to add component 4543BD to my schematic. This component was added from a previous version. I'm using Multisim version 12.0.0 Student edition.
Solved!
Go to Solution.Hi Diarra,
I checked my database and the 4543 is not in the Student Edition. If you opened a schematic that was created in a higher version such as the Educaiton Edition and copied the part to your database, when you place this part you will get the access denied message.
Attached is a schematic with the part, you can open it and build you circuit around it.
Tien P.
National Instruments
Attachments:
4543.ms12 62 KB -
How do I get all the music on my IMAC in one ITUNES folder? We have one IMAC, with 3 sign ons for me and my 2 teens. When you add a song under one of the sign ons it doesn't add it to all 3 libraries. Before I updated to LION, We had one main library with all the songs we bought, imported from cd's etc. Then any of the three of us could add it to our own IPOD instead of buying the song agin. It is one house, one IMAC. It was working fine under Leopard.
The sort fields should generally be empty unless you've putting in custom values to sort solo artists by their surnames. You can apply common changes to thousands of tracks at once, just don't apply the wrong change because there is no undo.
It is a good idea to backup before undertaking large scale changes. See this backup tip for a suggested approach.
tt2
Message was edited by: turingtest2 -
How do I delete and app from my phone but not from the computer? Is there a way to do this so it doesn't add it back in when it syncs?
In iTunes under the Apps tab for the iPhone device just uncheck any app you don't want synced to the phone. When you next sync the app will be removed from the phone but remain in the iTunes library.
-
Music loaded to my phone is lost. When I resync to I Tunes it doesn't add the lost music. My phone was updated to 6.1. Any suggestions on how to restore the music to the I Phone?
If the music is in iTunes you should be able to sync it back to your iPhone.
What settings do you have in the iTunes Music tab for your device?
Is Sync Music set?
Is Entire music library checked?
What happens when you sync?
If iTunes is confused and thinks the music actually is on your iPhone you could try unchecking Sync Music and then sync. Follow this by checking Sync Music and then sync again. -
I'm trying to organize my movies with folders. When I click "new folder", it either doesn't add any folder or adds a new folder as a "subfolder" of an existing folder. Help!
Thank you for the suggestion - I tried it but still didn't work. When I click "New Folder" it gives me the pop-up to name the new folder, but doesn't put a new folder anywhere in my Project Library.
-
when i add a new contact to my phone, their details are saved in my contact list, but the name doesn't show up when they ring or txt me, how can i change that?
First, try a system reset. It cures many ills and it's quick, easy and harmless...
Hold down the on/off switch and the Home button simultaneously until the screen blacks out or you see the Apple logo. Ignore the "Slide to power off" text if it appears. You will not lose any apps, data, music, movies, settings, etc.
If the Reset doesn't work, try a Restore. Note that it's nowhere near as quick as a Reset. Connect via cable to the computer that you use for sync. From iTunes, select the iPad/iPod and then select the Summary tab. Follow directions for Restore and be sure to say "yes" to the backup. You will be warned that all data (apps, music, movies, etc.) will be erased but, as the Restore finishes, you will be asked if you wish the contents of the backup to be copied to the iPad/iPod. Again, say "yes."
Finally, if the Restore doesn't work, let the battery drain completely. Then recharge for at least an hour and Restore again. -
My hotmail access disappeared from my iPad. When I go to settings and click 'mail, contacts, calendars' the page freezes. It doesn't allow me to the account setting. Anyone have suggestions?
Your Settings app is crashing. Sometimes, the only way to fix this is by restoring the iOS software but hopefully it will not come to that.
1. Quit the app completely and restart the iPad. Go to the home screen first by tapping the home button. Double tap the home button and the task bar will appear with all of your recent/open apps displayed at the bottom. Tap and hold down on any app icon until it begins to wiggle. Tap the minus sign in the upper left corner of the app that you want to close. Tap the home button or anywhere above the task bar. Restart the iPad.
Restart the iPad by holding down on the sleep button until the red slider appears and then slide to shut off. To power up hold the sleep button until the Apple logo appears and let go of the button.
2. Reset the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons.
3. You can try resetting all settings. Settings>General>Reset>Reset All Settings. You will have to enter all of your app preferences and device settings again. -
I am having trouble with the reminders app for iPad mini on iOS 7. When I. hit add list it doesn't add a list. I've tried everything. Thank you.
Device not recognized by iTune
http://support.apple.com/kb/TS1591 -
Keyboard doesn't show up when I want 2 add a new contacts name on my iPhone 4S
Keyboard doesn't show up when I want 2 add a new contacts name on my iPhone 4S
Basic troubleshooting from the User's Guide is reset, restart, restore (first from backup then as new). Try each of these in order until the issue is resolved.
-
When i plug my phone into my computer and open itunes, i cannot access my phone to add music. Any suggestions?
Hy there,
In order for you to solve this problem you have to follow these stept if your running windows:
1'st step is to go into the device manager
2 step is to go to portable devices (it is rught under network adapters)
3 step is to right clic apple iphone and click update drivers
4 step is to brows your drivers from C:\Program Files\Common Files\Apple\Mobile Device Support\Drivers
After that your itunes will pump up alown and youl see your iphone right there.
Good luck and sry for my bad righting.
Andrei -
My keyboard doesn't come up when I try to add a new contact on my 5c.
My keyboard doesn't come up when I hit the add sign on my contacts. I need this to add a new contact.
My keyboard doesn't come up when I hit the add sign on my contacts. I need this to add a new contact.
-
I am trying to access my calender in the app Planner Plus and I get the message. "This app does not have access to your calendars." You can enable access in Privacy Settings. But when I go to Privacy Settings, there are no apps listed under Calendar. Anyone?
Oh my gosh. This worked perfectly!!!
After allowing the changes, I just had to open the apps again (such as Instagram), then the pop-up asking to allow access to Photos appeared!
And I thought I was going to get rid of my iPhone 4 already because of the issue. -
Database access from session bean
Hello,
I have a stateless session bean which performs some complex
calculations, and also does some database access.
For the database access the bean class has a datasource as
follows:
public class TestBean implements SessionBean {
private DataSource ds_;
public void ejbCreate() {
getDataSources();
private void getDataSources() {
try {
Context ictx = new InitialContext();
ds_ = (DataSource)ictx.lookup("java:comp/env/jdbc/TestDB");
} catch (Exception e) {
e.printStackTrace();
throw new EJBException(e);
Now this class has a method (which is also in the remote interface)
calculateSomething(). This method constructs a number of other
objects that do the actual calculation, and one of these objects
does the actual database access. How would another object be able to
use the datasource that was constructed in the bean class?
I could pass the datasource reference to that object, but that would
break my encapsulation. This is because that object does not get
created directly by the bean object, but rather the way the objects
interact is something like A -> B -> C, where A is the TestBean, and
C is the object that does the DB access. If I passed the datasource,
I would need to make B aware of the datasource, which doesn't
seem good design, because B doesn't do any database access.
Alternatively I could do the lookup in class C, but that would
degrade the performance, as an object C gets created and destroyed
every time the calculateSomething() method is called.
A third option I have thought of, is to add a public method to the
bean that returns a connection. Whenever another object gets
created, a reference to the bean object will be passed along. Then,
if another object needs to do database access, it will call back
the bean to get a connection. This seems just as bad (if not worse)
than the first option.
Does anyone have an elegant solution for this situation? What is
the best practice of handling datasources when a bean class doesn't
do the database access itself? In all the examples I've seen so far,
all the functionality was in the session bean class, but again that
doesn't seem good OO design, and would result in a single huge class.
regards,
KostasThanks again to both for the replies. Here are my responses:
Yi Lin: Yes, I know that an entity bean would solve this problem, however it has been decided not to use entity beans so this is not my call (I think the reason entity beans are not allowed in this project is that they are considered risky: there are other applications that access the same database, so if the container caches entity bean data as you describe, then the users might get inconsistent results).
Gerard: Actually object B is the one that has the business logic and C is a peer object that only does database access and no calculaitons. For example B can be Customer, and C CustomerDB. This is why object B does not have any knowledge of datasources or connections. So my design does not appear to be that bad!
As far as the factory you propose is concerned, I cannot understand how this would solve my problem. In order to solve this situation the factory would need to be persistent, i.e. get created by the ejbCreate() method, and destroyed whenever the container decides to destroy the bean. There would be no point in object C creating the factory, as I would have the overhead of doing the JNDI lookup every time I create a C.
So the question remains the same: how would I pass a reference to the factory from A to C without making B aware of it? -
Hi All, I downloaded the dreamweaver 8.0 trial version. I was
trying to see how database access works. I followed several
tutorials on the adobe website, but I am not able to view any live
data. When I open any page with data access defined it doesnt do
anything, I just occasionally see a file download diagram and
nothing happens after that. I am not sure that with the trail
version you can actually have data access. Does anyone have any
suggestions??
KrupeshThanks Krupeshd:
That gives us something to work with.
Is your ASP.NET enabled to run on the local server? See:
http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/44f16c37-f727-4 244-9813-2289e13dadba.mspx?mfr=true
The fact that you say "I open any page with data access
defined it doesnt do anything, I just occasionally see a file
download
diagram" indicates that the file type that you are trying to
access is
not recognized, so you may not have the server enabled for
aspx files.
I'm sure that there are others here who can address that.
If you want to use an OLE DB Connection for your database
connection:
If you've got your MS SQL database set up using the
Enterprise Manager,
the next thing to do is to go into the ODBC Data Source
Administrator on
your system and add your datasource to the System Datasources
list in
the System DSN tab. I found a rather old tutorial at:
http://www.depts.ttu.edu/helpcentral/directions/ODBCSetup.php
but it should provide you with the information you need to
set up your
system DSN so you database will be properly exposed to
Dreamweaver.
Once you've done that, in Dreamweaver make sure your site is
properly
defined for your testing server in the Testing Server
category of the
Site Definition dialog. Also define the location of the
server as a
subdirectory of your C:\Inetpub\wwwroot\ directory.
If the Testing Server is properly setup, open an aspx page
and then
bring up the Databases panel. There click on the Add (+)
button and set
up a datbase connection. Choose OLE DB Connection and in the
dialog
that comes up, click on the Build... button (that's the
easiest way to
work with it). Select your machine name from the "Select or
enter a
server name" list/menu. In Enter information to log on to the
server,
enter your login for your SQL Server database User by
clicking Use a
specific user name and password radio button and entering
your SQL
Server user name and password. Select the database from the
next
list/menu and click Test Connection. If it works, click OK
the
Connection String should be populated with the proper
information in the
OLE DB Connection dialog. Click Test to see if your
connection is
still working, then click OK. You should now be able to add a
dataset
and then create a dynamic table to display the results of the
dataset.
For a discussion of common errors, see:
http://www.adobe.com/go/tn_16398
Note: There are many others in this forum who are much more
savvy than I
am with ASP.NET. they may tell you to NOT use OLEDB and just
to use the
SQL Server Connection. I'm fine with that. There's plenty of
room for
different ways to connect, as long as they all work! ;~}
enthusiastically,
mark haynes
webassist sales
Check out our Special Offers at:
http://www.webassist.com/professional/products/specials.asp
Krupeshd wrote:
> Hi Mark, I am using asp.net c#. Testing on a local PC.
Everything is running locally. I am accessing sql server
Maybe you are looking for
-
Unknown PC server "connected" to the network
I have a weird problem. I've got one iMac and one MB Pro connected to my wireless network. On the iMac I've just today started getting a PC server showing up under "shared" in the sidebar in Finder. When i try to connect, it says that the connection
-
Year-To-Date Sales by month calculation in cube
Hi everyone, I want to already calculate the 'YTD Sales'by month in my cube, so I increase performance when the user is running his report. YTDSALES = Actual Month Total Sales + Previous month YD Total Sales. Not sure how to implement it in the updat
-
Hi, I am using MYSQL server ver. 4.0 and J/Connector version 3.0.6 I have two columns of LONGTEXT type and i have to concatenate them and store it in a third column.I have thought of the following strategy: 1. Retrieve the columns as CLOB using getCl
-
EREC - How to disable user settings in external job board e recruitment
Hi All, Is there an option to disable the user settings for External Job Boards ? The user settings where candidate can save default keywork search etc (which unfortunately stays for other candidates unless the default value is discarded.) Thanks Sum
-
I have lost the AUDIO of my Encore project
This is a project that I finished few months ago. I went back in to burn another DVD and found that I can't hear anything. The Encore project opened up without any warnings such as assests missing or anything. But the audio is gone. Any ideas?