Indexed Property Example Code
Is there an example out there for a Java Newby - I am trying to save data in an array - that is using the indexed property in a SessionBean.
I have then added the indexed property and bound the value to it:
* Indexed getter for property rule.
* @param index Index of the property.
* @return Value of the property at <CODE>index</CODE>.
public Long getRule(int index) {
return this.rule[index];
* Indexed setter for property rule.
* @param index Index of the property.
* @param rule New value of the property at <CODE>index</CODE>.
public void setRule(int index, Long rule) {
this.rule[index] = rule;
public String button1_action() {
setValue("#{AdminBean.rule[1]}", selector.getValue());
I am getting the followong error:
Exception Details: org.apache.jasper.JasperException
Error getting property 'rule' from bean of type magicwheel.AdminBean
Possible Source of Error:
Class Name: org.apache.jasper.servlet.JspServletWrapper
File Name: JspServletWrapper.java
Method Name: service
Line Number: 384
Source not available. Information regarding the location of the exception can be identified using the exception stack trace below.
Can anyone help, possibly with some example code?
Thanks,
Nils
public String button1_action() {
setValue("#{AdminBean.rule[1]}",
selector.getValue());
How about
getAdminBean().setRule(1, selector.getValue());Assuming that selector.getValue() returns a Long and that AdminBean is either an Application, Session, or Request Bean.
Best regards
Antonio.
Similar Messages
-
Acrobat 7.0 ActiveX Object example code in Lookout
Help folks!
I'm trying to set up the Adobe Acrobat 7.0 Browser Document ActiveX Object under Lookout 6.0 but it doesn't work. My goal is to display a pdf document by lookout.
What should I set by Property Browser...?
What should I set by Property Pages...?
What should I set by Value Property:?
What means the term "Property" in this kind of objects?
Is there an example code I can get?
Any suggestion will be appreciated.
Thanx.I don't know of a FREE ActiveX control for MS Word. However, if you have MS Word installed on the same computer, you can use MS Internet Explorer ActiveX Control to view Word documents.
But before we do that, we have to make sure that MS Word is set to open documents in the "same window." This basically opens a DOC file in Internet Explorer itself rather than launching a new MS Word window and then opening the DOC file in it. To set this (if it isn't already):
1. Launch Windows Explorer.
2. From the Tools menu, select "Folder Options"
3. Click the "File Types" tab.
4. From the listing of "Registered File Types," select "Microsoft Word Document," (you can get to it fast by typing "DOC"); click Advanced.
5. Click the "Browse in same window" check box -- this toggles whether a Word document is launched outside of Internet Explorer.
6. Click OK to close the dialog boxes.
NOTE: if the DOC still opens in a new MS Word window (and not IE), go back and toggle the check-box.
In Lookout, use the Lookout Webbrowser control (which is nothing but MS IE Control). Specify the file path to the DOC file as the URL. I am attaching a process file which does this using a TextEntry object.
Hope this helps.
-Khalid
PS: not sure when this changed but we can't directly attach .L4P files to a post.. what a pain! Please take a minute to add your weight to this request:
http://forums.ni.com/ni/board/message?board.id=130&message.id=2142
Message Edited by Khalid on 12-28-2005 02:55 PM
Attachments:
doc_process.zip 4 KB -
Indexed property - editor needed?
Folks,
I have a bean (MyBean) with a indexed property (array of class type ClassX). It has setter and getters (total of 4) according to Java Beans specification.
On Netbeans, the indexed property appears on Properties list. But, I can�t add itens to it, like it occurs when the property is not indexed or is a String indexed property. I think I should assign an 'editor' to it.
Does anybody knows how to do this?
The idea is: the ClassX is a JComponent and the Frame has some of them (10, for example). This indexed property from MyBean should allow users to add as many as they want, but limited to those already added to the Frame. They could add, for example, 4 of 10 to the array.
Thanks!Did you try selecting portal components like books, pages, portlets. I have seen this problem too. But it would go away when you restart workshop.
--SJ -
Any Example code site for MQ v6.0 Clustering
Hi All
Can any body please help me some sites, where I can get some example codes, for MQ Clustering in java....
Windows platform
MQ Webspere v6.0
thanks in advance
BalmikiI'm looking for exact property need to be set for SSL in Oracle MQ adapter.
It would be very helpful if Oracle have some standard docs. -
Help with array / indexed property
Hi,
I am trying to save the value of multiple dropdowns in the Session Bean. Therefore, I created an index property "rule" in the Bean.
Each time the page is loadad, a different dropdown appears depending on the previous choices. If the ok button is clicked, the action is performed to save the current dropdown value in the index property:
public String button1_action() {
int cnt = 1;
// if page was loaded before, replace count
if (getAdminBean().getCount() > 0) {
cnt = getAdminBean().getCount() +1;
} else {
// save current count in Session
getAdminBean().setCount(cnt);
setValue("#{AdminBean.rule[cnt-1]}", selectme.getValue());
This is the error message:
Exception Details: javax.faces.el.PropertyNotFoundException
Error setting property '-1' in bean of type null
Possible Source of Error:
Class Name: com.sun.faces.el.PropertyResolverImpl
File Name: PropertyResolverImpl.java
Method Name: setValue
Line Number: 153
I have played around and even the following code would not work to save a value at the first position of the index property:
setValue("#{AdminBean.rule[0]}", selectme.getValue());
Can anyone help?
Thanks,
NilsYou can not set the index as you use here i.e
#{AdminBean.rule[cnt-1]}
is not correct. Because in JSF the "[" is used for some other purpose.
I would suggest you to use another property called "index"
setValue("#{AdminBean.index", cnt-1);
setValue("#{AdminBean.rule", selectme.getValue());
Inside the session bean, in the method setRule get the index (already set) and place your value in the correct indexed array.
Same logic you can use to get the value too
setValue("#{AdminBean.index", cnt-1);
getValue("#{AdminBean.rule");
the method getRule() should get the value for the index and return it.
- WInston
http://blogs.sun.com/roller/page/winston?catname=Creator -
Validator isn't fired when using example code from chapter 40: Validating Data
When following example code, mentioned in the Flex Developer
Guide on page 1282 is copied into an mxml example application and I
run the application, validation is never fired.
When I have a look at other example code, which is using the
listener- and trigger-property on the validator everything works
fine.
Could you explain why the example code from the Dev-guide
doesn't work as mentioned in the guide?Nathalie,
I believe you need to specify the "trigger" and "listener"
properties as well. For more information, see the last example on
this page:
http://livedocs.adobe.com/flex/201/html/validators_093_04.html -
I have several forms each containing a unique product. Each product has 'other' items that can be associated with each product.
Rather than creating setter and getter methods for each 'other' item (too many to do), I thought I'd send the values of those 'other' items to an indexed property like String[] other. A user will be presented with a list of 10 or so 'other' items for each, and each 'other' item will have a checkbox. I'd like only the checked values to show up on another page.
Is an indexed property the way to go with this? Plus I could iterate through the 'other' list on the seperate page. Any examples anyone knows of I can look at for some help? Thanks!public String button1_action() {
setValue("#{AdminBean.rule[1]}",
selector.getValue());
How about
getAdminBean().setRule(1, selector.getValue());Assuming that selector.getValue() returns a Long and that AdminBean is either an Application, Session, or Request Bean.
Best regards
Antonio. -
Example code for Trigering a workflow using WAPI from JAVA based tool
Hi Experts,
I am the newest guy in SAP workFlow and BAPI world. I need to trigger a workflow defined in WebFlow engine from a Java client. I know i can use JCo and to use WAPI to get workflow information but i am not sure how it works. Can you give me some example code to trigger one workflow defined in WebFlow using WAPI? If there is any alternative i am interested to know that as well.
Thanks in advance.
Regards,
RiyadhUse Function Module SWE_EVENT_CReate top trigger event that is linked with a Workflow.
<b>Please reward points if useful</b>
INCLUDE <cntn01> .
DATA:i_emp_details TYPE STANDARD TABLE OF p0001, "Employee Details
wa_request TYPE p0001, "Workarea for Employee details
v_country_grp TYPE molga, "Country SubGrouping
v_object_key TYPE sweinstcou-objkey. "Key for the buisness object ZWOBUSTRIP
CONSTANTS: c_bo_trip TYPE swo_objtyp VALUE 'ZWOBUSTRIP',
c_event_trip TYPE swo_event VALUE 'TripCreate',
c_infy_type_1 TYPE infty VALUE '0001'.
Event Container declaration
swc_container i_event_cont.
swc_create_container i_event_cont.
Reading the INFO TYPE 0001 to obtain the
Employee details
CALL FUNCTION 'HR_READ_INFOTYPE'
EXPORTING
pernr = i_emp_number
infty = c_infy_type_1
begda = sy-datum
endda = sy-datum
TABLES
infty_tab = i_emp_details
EXCEPTIONS
infty_not_found = 1
OTHERS = 2.
SY-SUBRC check is not required as the error
handelling will be done by WorkFlow rule
resolution.
CLEAR wa_request.
READ TABLE i_emp_details INTO wa_request INDEX 1.
IF sy-subrc = 0.
Retrieving the Country SubGrouping for the employee
SELECT SINGLE molga
FROM t001p
INTO v_country_grp
WHERE werks = wa_request-werks
AND btrtl = wa_request-persk.
ENDIF.
Sending the relevant data to event container
swc_set_element i_event_cont 'EmpId' i_emp_number.
IF sy-subrc <> 0.
No Processing needed.
ENDIF.
swc_set_element i_event_cont 'PersonnelArea' wa_request-werks.
IF sy-subrc <> 0.
No Processing needed.
ENDIF.
swc_set_element i_event_cont 'CountryGrouping' v_country_grp.
IF sy-subrc <> 0.
No Processing needed.
ENDIF.
swc_set_element i_event_cont 'EmpSubGrp' wa_request-persk.
IF sy-subrc <> 0.
No Processing needed.
ENDIF.
swc_set_element i_event_cont 'EmpTripId' i_emp_trip.
IF sy-subrc <> 0.
No Processing needed.
ENDIF.
Raising the event to trigger the workflow
v_object_key = i_emp_number.
CALL FUNCTION 'SWE_EVENT_CREATE'
EXPORTING
objtype = c_bo_trip
objkey = v_object_key
event = c_event_trip
TABLES
event_container = i_event_cont
EXCEPTIONS
objtype_not_found = 1
OTHERS = 2.
IF sy-subrc <> 0.
No Processing needed.
ENDIF.
COMMIT WORK.
ENDFUNCTION.
Thanks
Arghadip -
API & Example Code License Question
Note: This is a repost from this thread on Forum Nokia. I was referred here by Ron Liechty, a Forum Nokia Online Community manager. Please keep that in mind to avoid circular bureaucracy. Thanks
tl;dr: I want to use Nokia PC Connectivity API 3.2 example code as base for an open source project.
I am considering to spend some time on implementing that long overdue sync solution between Nokia PC Suite and Mozilla Sunbird/Lightning (making this a Windows-only solution, but thats what i, and probably a few other people, need). My current plan would be to write a plugin for Sunbird, and a C++ glue code .dll that is [scriptable] via the Mozilla XPConnect interface and heavily based on the PIMNavigator example application packaged with the Nokia PC Connectivity API 3.2. Nokia has placed the following license on this piece of source code:
Copyright (c) 2007 Nokia Corporation.
This material, including but not limited to documentation and any related
computer programs, is protected by intellectual property rights of Nokia
Corporation and/or its licensors.
All rights are reserved. Reproducing, modifying, translating, or
distributing any or all of this material requires the prior written consent
of Nokia Corporation. Nokia Corporation retains the right to make changes
to this material at any time without notice. A copyright license is hereby
granted to download and print a copy of this material for personal use only.
No other license to any other intellectual property rights is granted.
Since this would require me to, err, print out all the code in that very handy Visual Studio project and start coding from scratch, I would like to request a writ of consent from Nokia to use the example code as base for my work.
If I go ahead with it, I will release my product as open source and free of charge (not forgoing a Paypal donate button, but still), so the license I'd like to request is to a private person and for developing a non-profit product. After looking around on Forum Nokia, I haven't been able to locate the right place to apply for this kind of license, thus I'm asking for pointers from the community here. Replies from Nokia officials are highly appreciated as well, of course
I had a brief chat with a german Nokia support callcenter agent, who was convinced that Forum Nokia would be the place to go to with questions of this type. If that is indeed the case, I would very much like to be directed to a specific person / email address, if possible.
Message Edited by krugar on 06-Aug-2009 02:22 PMHi,
have you tried to search in SDN for "mdm api example". I found this: <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/2d18d355-0601-0010-fdbb-d8b143420f49">Introduction to the SAP Master Data Management Java API - Presentation</a>.
Regards
Gregor -
Question on the example code 8253eventcount.c
Hi.
I saw the example code 8253eventcount.c before in the NI-DAQ6.9.x. That is very useful.But i still confuse that "Do i need to set up each clock pulse duration?". From the program, it seems that the counting process solely depends on the function NIDAQDelay(sec).....
By the way, if i am now using an old version of NI-DAQ6.8.5, How can i update some calculated voltages for each 1ms. Although i have read and followed the procedures in the user mannual of lab-pc+,but, i am still not sure how to program the counterA2 with appropriate update interval. Could anyone give me an example code? It seems that no examples are given in the version of NI-DAQ6.8.5.
I am now using lab-pc+ with Ni-daq6.8.5 by using c++ and win
dows95 as my working platform.Please help me in anyway! Thanks!
Attachments:
Lab_PC+_AO.cpp 2 KBThe NIDAQDelay() is only in there to control how often the program checks the current count on the counter. If it is set to 1 seconds, it will read the counter every one second and return how many counts have been read since the start. If you take that function out, the program will check the counter as fast as it can which will tie up your CPU.
As to your question about calculated voltages, can you be more specific as to what your application is and what you are trying to do, I'm a little confused.
Brian -
System generated index property not generated in database
Hi,
I created an offline table by copying it from an (first) online database to my project. The table contains a unique key constraint, which references a system generated index. Now I used this offline table to generate a table in another (second) online database. This all works well except, that the "System Generated" property of the index is "false" and not "true" as in the offline table (and the first online database). When I manually reconcile the same table to the second online database again, there is always a difference shown for this index property. When I try to continue the reconcile process to change this property I get an error message, that the index cannot be dropped because it is obviousely referenced by the unique constraint.
When I drop the constraint and try to generate the index only I get the following warning message:
Jan 11, 2012 2:08:59 PM oracle.javatools.db.property.AbstractPropertyManager processDiffs
WARNING: Unsupported property: systemGenerated
Is there a way to work around this annoying behavour? Is it possible to change this index property by an ALTER INDEX statement?
Im using JDeveloper 11.1.2.1.0 (Build JDEVADF_11.1.2.1.0_GENERIC_110907.2314.6081)
Thanks for help and hints
Thomas
Edited by: thmayr on 11.01.2012 05:08Hi,
it might be due to some BUG in RDBMS...
First Check the Secondary index in TEST system
Look at the Transport Number in DEV system, If this is having error, then it will show you the error details also,
If that not moved Properly then you need to create another request for the INDEX and move it again
See the threads with similar problem...
Warning: Index does not exist in database system MSSQL
Index does not exist in database system ORACLE??????
Re creation of database index
Hope it will solve your problem...
<b>Reward Points if useful</b>
Thanks & Regards
ilesh 24x7 -
Has anyone got the Comsoft Profinet example code working??
Hello!
I have a cRIO Profinet card and I'm attempting to get the example code working.
I have followed the instructions in GettingStarted_cRIO_PN_IO_Device.pdf
I have created an empty project with just the 9023 and 9113 present, and copied the 3 items from the example project cRIO PN IO-Device (LV 2012) as per the documentation.
When I try to compile I get the error shown attached. I cannot view the error as the VI is password protected.
In 5 years of working with cRIO using many different c-series modules from NI and 3rd parties I have never come across a password protected example Vi - this is very disappointing! I don't see how it will be possible to use the card without being able to access this VI, and clearly it is impossible to use it without this VI as they are unwilling to share its functionality.
Has anyone got this working on anything other than a 9104 (which the example uses?) Does anyone know the password? Is it possible to use the card without using this example code?
I will be communicating with a Siemens PLC (acquiring a load of U16s and logging on the cRIO at 20ms intervals).
Many thanks for any input, or any experiences of using this card.
Aaron
LabVIEW/RT/FPGA 2012
NI-RIO 12.0.1
cRIO 9023 controller and 9113 chassis with COMSOFT PN module in slot 1.
Attachments:
PN_error.png 44 KB
PN_error2.png 20 KBJust for the record, I am using the CRIO-PN with cRIO-9081 and cRIO-9068 integrated chassis successfully.
LabVIEW (RT/FPGA) 2013 SP1.
I didn't use the higher level ComSoft example code directly, as the VIs use so many control/indicators that the FPGA usage is sky high. I rewrote them to pass the I/O data via DMA FIFOs. -
Is there example code for using Ni488 and PCI-GPIB card in non controller mode?
Is there example code for using Ni488 and PCI-GPIB card in non controller mode?
cymrieg,
Your code looks good to me. What is the problem? What happens when it fails? What is the IBSTA value on the controller, and at what point in the code does it stop? What is the IBSTA value on the slave, and at what point does it stop?
One thing is that you might not want to call IBCLR() in a loop on the device. At the beginning of the program is fine...This will send a clear command to the device and will clear out any LACS and TACS bits that might be set. Also your IBDEV call shouldn't be in a loop.
Hope this helps, but let me know if you need more information.
Scott B.
GPIB Software
National Instruments -
Incoming payments - payment on account example code for 8.8
Hi
Would anyone have example code for SAP B1 8.8 of an incoming payment - payment on account example please
Thanks
Regards AndyHi Ed
Thanks
I actually had a problem with my own code but it turned out someone gave me the wrong gl code to use !
Thanks again
Regards Andy -
[svn] 4595: Fix for - Example code in ObjectProxy ASDoc page is incorrect
Revision: 4595
Author: [email protected]
Date: 2009-01-20 08:11:25 -0800 (Tue, 20 Jan 2009)
Log Message:
Fix for - Example code in ObjectProxy ASDoc page is incorrect
Also modify the build.xml for "ant asdoc"
QE Notes: None
Doc Notes: None
Bugs: SDK-18335
tests: checkintests
Ticket Links:
http://bugs.adobe.com/jira/browse/SDK-18335
Modified Paths:
flex/sdk/trunk/asdoc/build.xml
flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/ObjectProxy.as>
build url like this,
'<a href=f?p='||NV('APP_ID')||':45:'||V('APP_SESSION')||'::NO:RP,45,CIR:ub_branch,ub_supplier,ub_customer,ub_product,ub_aging,ub_destination:'||REPLACE(branch,' ','%20')||'%2C'||REPLACE(ub_supplier,' ','%20')||'%2C'||REPLACE(ub_customer,' ','%20')||'%2C'||REPLACE(ub_product,' ','%20')||'%2C'||REPLACE(ub_aging,' ','%20')||'%2C'||REPLACE(ub_destination,' ','%20') ||'>All</a>',All of this is handled by the apex_util.url_encode API function as described above.
However, as also mentioned above, the best approach is to only pass discrete key values in URLs.
Maybe you are looking for
-
Frozen ipod that is no longer recognized by computer
Help! My I-pod nano is frozen. It has been frozen before, so I did what Apple.com said to do. It is still frozen! So I decided to plug it in to the computer to charge .. and the I-pod is no longer recognized by my computer! I've tried a million times
-
Site-to-site VPN failover via 3G HWIC
Small problem. Branch utilizes a 2811 router connected via MPLS to core via serial interface. If serial ip sla reachability fails, fire up the cell interface, dial out and connect to the internet. Establish ipsec tunnel to a peer ASA and pass loca
-
I asked earlier. Purchased QT Pro. Every time I launch it I have to re enter the registration # which is a huge pain. Someone (Link) wanted me to open the terminal and run some diagnostic. There is NO Way i should have to go into my terminal and run
-
Is there a limit or maximum number of pages that can be in one document?
Is ther a maximum number of pages that can be created in one document?
-
How to activate ABAP Dynrpo in SE80
Hi Experts, I am using ECC 5.0, and I want to create a web dynpro using ABAP, but in SE80 transaction this option is deactivated, how to activate it ?