Java data send to flex issue
This is my data structure at back-end using java,
ArrayList
HashTable(keys, values);
HashTable(keys, values);
but the problem is when push the data to flex this data structure will be coverd to a instance of ArrayCollection and the HashTable covered to a Object.
HashTable is out-of-order so the order of my data in flex is different every time . I use the ArrayCollection bind to the DataList component directly, and I don't want to indicate the order of each columns of each DataList Component.How can I fix this ?
var dataSource:ArrayCollection = from Java back-end;
<mx:DataList dataProvider="{dataSource}" />
I don't want to indicate each columns like this, because I have a lot of different structure tables in SQL.
<mx:DataList dataProvider="{dataSource}" >
<mx:DataListColumns dataField="ID" />
<mx:DataListColumns dataField="Name" />
<mx:DataListColumns dataField="Age" />
<mx:DataListColumns dataField="Address" />
</mx:DataList>
Can you give more details about the way you talking about ?
I'm not familiar with Java.
Thanks very much.
Similar Messages
-
Issue with "firstRecord" Business Component method of JAVA Data bean API.
Hi,
Following is my use-case scenario:
I have to add or associate child MVG business component (CUT_Address)
with the parent business component (Account) using JAVA Data bean API.
My requirement is: first to check whether child business component(i.e. CUT_address) exists. If it exists then associate it with parent business component (Account)
otherwise create new CUT_address and associate it with account.
Code (using JAVA Data bean APIs) Goes as follows:
SiebelBusObject sBusObj = connBean.getBusObject("Account");
parentBusComp = sBusObj.getBusComp("Account");
SiebelBusComp parentBusComp;
SiebelBusComp childBusComp;
// retrieve required account.. Please assume Account1 exists
parentBusComp.activateField("Name");
parentBusComp.clearToQuery();
parentBusComp.setSearchSpec("Name", "Account1");
sBusComp.executeQuery2(true, true);
sBusComp.firstRecord();
Counter = 0;
while (counter < Number_Of_Child_Records_To_Insert)
childBusComp = parentBusComp.getMVGBusComp("City");
associatedChildBusComp = childBusComp.getAssocBusComp();
childBusComp.activateField("City");
childBusComp.clearToQuery();
childBusComp.setSearchSpec("City", Vector_of_city[counter]);
sBusComp.executeQuery2(true, true);
if( sBusComp.firstRecord() )
// Child already exist and do processing accordingly
else
// Child does not exist and do processing accordingly
childBusComp.release();
childBusComp = null;
associatedChildBusComp.release();
associatedChildBusComp=null;
Now the issue with this code is: For the first iteration, SbusComp.firstRecord returns 0 if records does not exist. However from the second iteration, SbusComp.firstRecord returns 1 even if there is no record matching the search specification.
Any input towards the issue is highly appreciable.
Thanks,
Rohit.Setting the view mode to "AllView" helped.
Thanks for the lead!
In the end, I also had to invoke the business component method SetAdminMode with "true" as the argument so that I could also modify the records from my script. -
External SOAP client Accessing Webservice using built in Java Data type
We have built a webservice and deployed it on WLS. We accessed this from a swing
client it works fine.The webservice methods uses non-built in JAVA data types
as parameters.These are Value Objects and the JAVA Serializer and Deserializer
classes are generated using Ant task itself.The client coding uses Value objects
given by the Client_jar (generated using <Clientgen> ant task) to pass to the
webservice. We dont want to go by this way.Is there anyway were in we can pass
parameters to the method which expects non-built in java datatypes?
Why i am asking this is, i want to know how an external client (.Net client )
will be able to exceute my webservice (i.e., passing the required Object which
the method is expecting)?Hi Anish,
Well first off, your web service doesn't send or receive "objects". It only sends
and recieves XML, which is in turn converted to/from Java objects at invocation
time. Second, a .NET (or Perl, or Python, or C++) client will be able to call
your web service, because the wsdl.exe tool (for .NET) will generate "programming
language specific" objects from the <types><schema> elements, in the WSDL of your
web service :-) The wsdl.exe tool will create C# objects from the WSDL, that will
convert XML to/from C# when your web service is called. That's the beauty of XML
schema - it's a "universal typing system", so it's not tied to a particular programming
language. The only issue is whether or not the web services platform vendor's
XML Schema/WSDL processor, can successfully process the WSDL. Some vendors have
more complete implementations of the WSDL and XML Schema specs than others, so
expect varying success here. The one in WLS 7.0 is pretty good, so you shouldn't
have too many problems consuming WSDL generated by .NET tools (or any other tool
for that matter).
Regards,
Mike Wooten
"Anish" <[email protected]> wrote:
>
We have built a webservice and deployed it on WLS. We accessed this from
a swing
client it works fine.The webservice methods uses non-built in JAVA data
types
as parameters.These are Value Objects and the JAVA Serializer and Deserializer
classes are generated using Ant task itself.The client coding uses Value
objects
given by the Client_jar (generated using <Clientgen> ant task) to pass
to the
webservice. We dont want to go by this way.Is there anyway were in we
can pass
parameters to the method which expects non-built in java datatypes?
Why i am asking this is, i want to know how an external client (.Net
client )
will be able to exceute my webservice (i.e., passing the required Object
which
the method is expecting)? -
Java.lang.NoClassDefFoundError: coldfusion/flex/CFEventGatewayAdapter
When I start EventGateway of DataServicesMessaging, I got an
exception like below.
How should I do for fixing this problem???
I installed ColdFusion 801 without LiveCycle Data Services.
I installed LiveCycle Data Services on same machine.
We can't do this?? We have to install LiveCycle Data Services
by CF installer???
500
ROOT CAUSE:
java.lang.NoClassDefFoundError:
coldfusion/flex/CFEventGatewayAdapter
at java.lang.Class.getDeclaredConstructors0(Native Method)
at
java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
at java.lang.Class.getConstructor0(Class.java:2699)
at java.lang.Class.getConstructor(Class.java:1657)
at
coldfusion.eventgateway.EventServiceImpl.allocateEventGateway(EventServiceImpl.java:1031)
at
coldfusion.eventgateway.EventServiceImpl.startEventGateway(EventServiceImpl.java:398)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at coldfusion.runtime.StructBean.invoke(StructBean.java:511)
at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2300)
at
cfgateways2ecfm251583696._factor5(E:\cf8_updates\cfusion\wwwroot\CFIDE\administrator\even tgateway\gateways.cfm:261)
at
cfgateways2ecfm251583696._factor20(E:\cf8_updates\cfusion\wwwroot\CFIDE\administrator\eve ntgateway\gateways.cfm:251)
at
cfgateways2ecfm251583696.runPage(E:\cf8_updates\cfusion\wwwroot\CFIDE\administrator\event gateway\gateways.cfm:1)
at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:196)
at
coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:370)
at
coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65)
at
coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:279)
at
coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48)
at
coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
at coldfusion.filter.PathFilter.invoke(PathFilter.java:86)
at
coldfusion.filter.LicenseFilter.invoke(LicenseFilter.java:27)
at
coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70)
at
coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:2 8)
at
coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
at
coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46)
at
coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
at
coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
at coldfusion.CfmServlet.service(CfmServlet.java:175)
at
coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
at jrun.servlet.FilterChain.doFilter(FilterChain.java:86)
at
coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42 )
at
coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)
at jrun.servlet.FilterChain.service(FilterChain.java:101)
at
jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
at
jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
at
jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286)
at
jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)
at
jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)
at
jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320)
at
jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
at
jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
Caused by: java.lang.ClassNotFoundException:
coldfusion.flex.CFEventGatewayAdapter
at
coldfusion.bootstrap.BootstrapClassLoader.loadClass(BootstrapClassLoader.java:235)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
... 45 more
javax.servlet.ServletException: ROOT CAUSE:
java.lang.NoClassDefFoundError:
coldfusion/flex/CFEventGatewayAdapter
at java.lang.Class.getDeclaredConstructors0(Native Method)
at
java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
at java.lang.Class.getConstructor0(Class.java:2699)
at java.lang.Class.getConstructor(Class.java:1657)
at
coldfusion.eventgateway.EventServiceImpl.allocateEventGateway(EventServiceImpl.java:1031)
at
coldfusion.eventgateway.EventServiceImpl.startEventGateway(EventServiceImpl.java:398)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at coldfusion.runtime.StructBean.invoke(StructBean.java:511)
at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2300)
at
cfgateways2ecfm251583696._factor5(E:\cf8_updates\cfusion\wwwroot\CFIDE\administrator\even tgateway\gateways.cfm:261)
at
cfgateways2ecfm251583696._factor20(E:\cf8_updates\cfusion\wwwroot\CFIDE\administrator\eve ntgateway\gateways.cfm:251)
at
cfgateways2ecfm251583696.runPage(E:\cf8_updates\cfusion\wwwroot\CFIDE\administrator\event gateway\gateways.cfm:1)
at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:196)
at
coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:370)
at
coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65)
at
coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:279)
at
coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48)
at
coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
at coldfusion.filter.PathFilter.invoke(PathFilter.java:86)
at
coldfusion.filter.LicenseFilter.invoke(LicenseFilter.java:27)
at
coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70)
at
coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:2 8)
at
coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
at
coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46)
at
coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
at
coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
at coldfusion.CfmServlet.service(CfmServlet.java:175)
at
coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
at jrun.servlet.FilterChain.doFilter(FilterChain.java:86)
at
coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42 )
at
coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)
at jrun.servlet.FilterChain.service(FilterChain.java:101)
at
jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
at
jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
at
jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286)
at
jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)
at
jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)
at
jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320)
at
jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
at
jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
Caused by: java.lang.ClassNotFoundException:
coldfusion.flex.CFEventGatewayAdapter
at
coldfusion.bootstrap.BootstrapClassLoader.loadClass(BootstrapClassLoader.java:235)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
... 45 more
at
coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:70 )
at
coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)
at jrun.servlet.FilterChain.service(FilterChain.java:101)
at
jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
at
jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
at
jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286)
at
jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)
at
jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)
at
jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320)
at
jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
at
jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)Someone suggested it could be a serialisation issue but I I'm not sure how to go about checking that.
Any suggestions ? -
Using Java to Send Message to BlazeDS
Hello all, maybe you can help me with my problem.
I've created a very simple java program that should have no problem sending a message to BlazeDS.
Java App Code
import flex.messaging.MessageBroker;
import flex.messaging.messages.AsyncMessage;
import flex.messaging.util.UUIDUtils;
public class BlazeDSTest
public static void main(String[] args)
MessageBroker msgBroker = MessageBroker.getMessageBroker(
null);
String clientID = UUIDUtils.createUUID();
AsyncMessage msg = new AsyncMessage();
msg.setDestination(
"chat");
msg.setClientId(clientID);
msg.setMessageId(UUIDUtils.createUUID());
msg.setTimestamp(System.currentTimeMillis());
msg.setBody(1);
msgBroker.routeMessageToService(msg,
null);
ok, pretty simple. Now i'm getting a null pointer exception error when i try to run the routeMessageToService function.
Either i don't have my config,services xml set right or what, i have no idea why it can't find the message channel "chat".
I know it's in there. I see it under the BlazeDS samples. Is there something i need to set to specifically target a certain "folder" in blaze ds?
I want this java program to just run on the server (that blazeDS is installed on), anywhere in the os.
So like this....
JavaApp Runs -> JavaApp gets message from outside source -> JavaApp sends messages to BlazeDS -> Clients subscribed to Blaze get message
Pretty easy...but i'm beating my head. Anyone please?
Thanks!
-kevinHi
With the new 4.6 version of Adobe Data Services, you can also create Java (desktop/Android) and JS/ObjectiveC applications that can communicate with a messaging destination.
http://help.adobe.com/en_US/dataservicesjee/4.6/Developing/WS4976f0ec3ef48246-681f784e12dc 3e803c6-8000.html
Regards,
Ashish Vashisht -
How to show double byte data in a Flex application
Hi
I am looking for a way to show UTF-8 formatted data in a Flex
application. I have a Java app in the backend that generates an xml
file. Some attributes in the file are encoded in UTF-8 (when data
is Japanese or Chinese...). My Flex app is showing box characters.
I have XSLT app that generates html based off this xml file. The
browser i showing the Japanese characters fine.
I am wondering what the trick is to get Flex app show this
data.
Thanks
VideoguyIt turned out to be my XP that didn't have the the right lang
sets installed. I have two PCs. On one everything showed up fine. I
was able to view arabic, chinese data from xml just fine. On the
other one, same swf didn't show them. There is MS knowledgebase
article on how to enable east asian languages etc. I didn't give it
a try. I am using other pc for my dev now. -
How to do sorting/filtering on custom java data source implementation
Hi,
I have an entity driven view object whose data should be retrieved and populated using custom java data source implementation. I've done the same as said in document. I understand that Query mode should be the default one (i.e. database tables) and createRowFromResultSet will be called as many times as it needs based on the no. of data retrieved from service, provided we should write the logic for hasNextForCollection(). Implementation sample code is given below.
protected void executeQueryForCollection(Object qc, Object[] params, int noUserParams) {
Iterator datumItr = retrieveDataFromService(qc, params);
setUserDataForCollection(qc, datumItr);
hasNextForCollection(qc);
super.executeQueryForCollection(qc, params, noUserParams);
protected boolean hasNextForCollection(Object qc) {
Iterator datumItr = (Iterator) getUserDataForCollection(qc);
if (datumItr != null && datumItr.hasNext()){
return true;
setCallService(false);
setFetchCompleteForCollection(qc, true);
return false;
protected ViewRowImpl createRowFromResultSet(Object qc, ResultSet resultSet) {
Iterator datumItr = (Iterator) getUserDataForCollection(qc);
Object datumObj = datumItr.next();
ViewRowImpl r = createNewRowForCollection(qc);
return r;
Everything is working fine include table sorting/filtering. Then i noticed that everytime when user perform sorting/filtering, executeQueryForCollection is called, which in turn calls my service. It is a performance issue. I want to avoid. So i did some modification in the implementation in such a way that, service call will happen only if the callService flag is set to true, followed by executeQuery(). Code is given below.
private boolean callService = false;
public void setCallService(boolean callService){
this.callService = callService;
public boolean isCallService(){
return callService;
protected void executeQueryForCollection(Object qc, Object[] params, int noUserParams){
if (callService)
Iterator datumItr = retrieveDataFromService(qc, params);
setUserDataForCollection(qc, datumItr);
hasNextForCollection(qc);
super.executeQueryForCollection(qc, params, noUserParams);
Issue i have:
When user attempts to use table sort/filter, since i skipped the service call and set null as userDataCollection, createRowFromResultSet is not called and data which i retrieved and populated to view object is totally got vanished!!. I've already retrived data and created row from result set. Why it should get vanished? Don't know why.
Tried solution:
I came to know that query mode should be set to Scan_Entity_Cache for filtering and Scan_View_Rows for sorting. I din't disturb the implementation (i.e. skipping service call) but overrided the executeQuery and did like the following code.
@Override
public void executeQuery(){
setQueryMode(callService ? ViewObject.QUERY_MODE_SCAN_DATABASE_TABLES : ViewObject.QUERY_MODE_SCAN_ENTITY_ROWS);
super.executeQuery();
By doing this, i could able to do table filtering but when i try to use table sorting or programmatic sorting, sorting is not at all applied.
I changed the code like beolw*
@Override
public void executeQuery(){
setQueryMode(callService ? ViewObject.QUERY_MODE_SCAN_DATABASE_TABLES : ViewObject.QUERY_MODE_SCAN_VIEW_ROWS);
super.executeQuery();
Now sorting is working fine but filtering is not working in an expected way because Scan_View_rows will do further filtering of view rows.
Question:
I don't know how to achieve both filtering and sorting as well as skipping of service call too.
Can anyone help on this?? Thanks in advance.
RaguramanHi,
I have an entity driven view object whose data should be retrieved and populated using custom java data source implementation. I've done the same as said in document. I understand that Query mode should be the default one (i.e. database tables) and createRowFromResultSet will be called as many times as it needs based on the no. of data retrieved from service, provided we should write the logic for hasNextForCollection(). Implementation sample code is given below.
protected void executeQueryForCollection(Object qc, Object[] params, int noUserParams) {
Iterator datumItr = retrieveDataFromService(qc, params);
setUserDataForCollection(qc, datumItr);
hasNextForCollection(qc);
super.executeQueryForCollection(qc, params, noUserParams);
protected boolean hasNextForCollection(Object qc) {
Iterator datumItr = (Iterator) getUserDataForCollection(qc);
if (datumItr != null && datumItr.hasNext()){
return true;
setFetchCompleteForCollection(qc, true);
return false;
protected ViewRowImpl createRowFromResultSet(Object qc, ResultSet resultSet) {
Iterator datumItr = (Iterator) getUserDataForCollection(qc);
Object datumObj = datumItr.next();
ViewRowImpl r = createNewRowForCollection(qc);
return r;
}Everything is working fine include table sorting/filtering. Then i noticed that everytime when user perform sorting/filtering, executeQueryForCollection is called, which in turn calls my service. It is a performance issue. I want to avoid. So i did some modification in the implementation in such a way that, service call will happen only if the callService flag is set to true, followed by executeQuery(). Code is given below.
private boolean callService = false;
public void setCallService(boolean callService){
this.callService = callService;
public boolean isCallService(){
return callService;
protected void executeQueryForCollection(Object qc, Object[] params, int noUserParams){
if (callService) {
Iterator datumItr = retrieveDataFromService(qc, params);
setUserDataForCollection(qc, datumItr);
hasNextForCollection(qc);
super.executeQueryForCollection(qc, params, noUserParams);
}Issue i have:
When user attempts to use table sort/filter, since i skipped the service call and storing of userDataCollection, createRowFromResultSet is not called and data which i retrieved and populated to view object is totally got vanished!!. I've already retrived data and created row from result set. Why it should get vanished? Don't know why.
Tried solution:
I came to know that query mode should be set to Scan_Entity_Cache for filtering and Scan_View_Rows for sorting. I din't disturb the implementation (i.e. skipping service call) but overrided the executeQuery and did like the following code.
@Override
public void executeQuery(){
setQueryMode(callService ? ViewObject.QUERY_MODE_SCAN_DATABASE_TABLES : ViewObject.QUERY_MODE_SCAN_ENTITY_ROWS);
super.executeQuery();
}By doing this, i could able to do table filtering but when i try to use table sorting or programmatic sorting, sorting is not at all getting applied.
I changed the code like below one (i.e. changed to ViewObject.QUERY_MODE_SCAN_VIEW_ROWS instead of ViewObject.QUERY_MODE_SCAN_ENTITY_ROWS)
@Override
public void executeQuery(){
setQueryMode(callService ? ViewObject.QUERY_MODE_SCAN_DATABASE_TABLES : ViewObject.QUERY_MODE_SCAN_VIEW_ROWS);
super.executeQuery();
}Now sorting is working fine but filtering is not working in an expected way because Scan_View_rows will do further filtering of view rows.
If i OR'ed the Query Mode as given below, i am getting duplicate rows. (vewObject.QUERY_MODE_SCAN_ENTITY_ROWS | ViewObject.QUERY_MODE_SCAN_VIEW_ROWS) Question:
I don't know how to achieve both filtering and sorting as well as skipping of service call too.
Can anyone help on this?? Thanks in advance.
Raguraman
Edited by: Raguraman on Apr 12, 2011 6:53 AM -
How can I create a schedule in Java for sending mail from SAP?
Hello;
I am coding a programme in Java which reads data from KM. I wish to schedule a job which sends mail to a list of persons selected from KM. I read the article by Prakash Singh and based my programme on his explanations.
/people/prakash.singh4/blog/2005/04/20/did-you-know-you-can-schedule-jobs-in-portal-using-kms-scheduler-task
My first problem is that I don't know how to send mail in SAP, and how to use Java to send this mail. My second problem is how to develop this "schedule job" function - is it enough to use Prakash Singh's method, or does it need to be changed?
Can anyone help me with these questions?
Thank you very much, R.E.Hi,
I dont know about the CATS system. But when ur user selects the varaint, he should remove his own id and execute the query. This should display all the variants existing for that program. Then he can select the required variant.
The user can also save this varaint under his own ID
Hope it helps.
Regards.
Jay Gandhi -
hi,
how to connect to java data/services ?
I had this error :
Invalid root. The WEB-INF/flex folder must contain either flex-config.xml or services-config.xml.
my project java is in : D:\SVN\VAZII\trunk\VaziiAdminService
my project flex tha must use the service is in : D:\SVN\ICOSNET_WALLET\trunk\ConfortPayAdmin
My server tomcat is in : C:\apache-tomcat-7.0.32
what i must write in this input dialog box ?
Root Folder, Root URl, and Context root
thanksis there someone that knows flash builder here ?
-
"advanced data grid" with flex builder 3.0
I'm getting watermark as "Flex Data Visualization
Trial" when tried to use advances data grid with flex builder 3.0. There are some links floating on the internet where it's suggested that the license key should be provided in the flex-config.xml to avoid this issue. I would like to know if this componenet is stable with flex builder 3.0 and is it ok to use this in production environment?Someone from Adobe might be able to answer more definitely
but it's probably just not considered compatible with a modified
Eclipse (at least, the installer). It may just be the installer
blowing up when it shouldn't. I think Adobe doesn't want to support
install configurations that they don't have setup and tested. I had
a similar issue once and solved it by doing the following... not
sure if it'll work, and it's more of a last resort:
Setup a regular eclipse install - install the plugin there.
Somehow, you'll have to keep track of all the files it adds, either
using timestamps or some compare software. It should be a bunch of
files and/or folders in the '/plugins' directory, and possibly a
few others in '/configuration', maybe '/features'. Take all the new
folders and any jar files etc, and drop them into the same folders
in your special Eclipse version. Hopefully when you start it up
you'll get the Flex functions...
Of course, you could end up hosing your entire "NWDS"
(whatever this is) install. So you probably want to test it out
first! -
Has anyone done any Flex Apps that work with the Automatic
Identification System (AIS) used in the maritime industry to track
ships?
I'm looking for data feeds, databases etc. either in the NMEA
format or ideally something like XML, I'm interested in both pay
and open sources.
Anyone here know of any available sources?
D.Thanks for the reply. Yes, I did compile all the Java and it
works OK with a simple Java program. It just will not work in a
Flex application.
The java classes are:
RRA:
package blah.myPackage;
import java.util.List;
import java.util.Collection;
import flex.data.DataSyncException;
import flex.data.assemblers.AbstractAssembler;
class RRA extends AbstractAssembler
public Collection fill( List fillParameters )
RRS service = new RRS();
return service.getSome();
RRS:
package blah.myPackage;
import java.util.ArrayList;
import java.util.List;
import java.sql.*;
import flex.EORS.*;
class RRS
public List getSome()
ArrayList list = new ArrayList();
String str = "bob";
RR rr = new RR(str);
list.add(rr);
return list;
RR:
package blah.myPackage;
class RR
private String name;
public RR() { }
public RR(String name)
this.name = name;
public String getName()
return this.name;
public void setName(String name)
this.name = name;
I started with something that retrieved data from a database
but watered it down just to try and get some kind of communication
between Flex and Java. -
Can any body send me some issues about mail sending .
can any body send me some issues about mail sending .
thanks alot !
mail to :<i><b>[email protected]</b></i>HI
GOOD
GO THROUGH THIS CODE
REPORT ZTSAPMAIL.
DATA: X_OBJECT_TYPE LIKE SOOD-OBJTP.
DATA: BEGIN OF X_OBJECT_HD_CHANGE.
INCLUDE STRUCTURE SOOD1.
DATA: END OF X_OBJECT_HD_CHANGE.
DATA: BEGIN OF X_OBJCONT OCCURS 10.
INCLUDE STRUCTURE SOLI.
DATA: END OF X_OBJCONT.
DATA: BEGIN OF X_OBJHEAD OCCURS 0.
INCLUDE STRUCTURE SOLI.
DATA: END OF X_OBJHEAD.
DATA: BEGIN OF RAW_HEAD.
INCLUDE STRUCTURE SORH.
DATA: END OF RAW_HEAD.
DATA: BEGIN OF X_RECEIVERS OCCURS 0.
INCLUDE STRUCTURE SOOS1.
DATA: END OF X_RECEIVERS.
PARAMETERS: RECEIVER LIKE X_RECEIVERS-RECNAM. " Name
*BUILD MESSAGE HEADER
MOVE 'Sort field goes here' TO X_OBJECT_HD_CHANGE-OBJSRT. " Sort field
MOVE 'Name of the object goes here' TO X_OBJECT_HD_CHANGE-OBJNAM. " Name
MOVE 'Document title goes here' TO X_OBJECT_HD_CHANGE-OBJDES. " Title
MOVE 'F' TO X_OBJECT_HD_CHANGE-OBJSNS. " Functional OBJECT
MOVE 'E' TO X_OBJECT_HD_CHANGE-OBJLA. " Language
Object type of the new document
MOVE 'RAW' TO X_OBJECT_TYPE.
CLEAR X_OBJCONT.
MOVE 'Contents of mail' TO X_OBJCONT-LINE.
APPEND X_OBJCONT.
CLEAR X_OBJCONT-LINE. APPEND X_OBJCONT.
MOVE 'More contents' TO X_OBJCONT-LINE.
APPEND X_OBJCONT.
MOVE 'Still more contents'
to x_objcont-line.
APPEND X_OBJCONT.
MOVE ' ' TO X_OBJCONT-LINE.
APPEND X_OBJCONT.
Specific header (Dependent on the object type, here RAW)
REFRESH X_OBJHEAD.
DESCRIBE TABLE X_OBJCONT LINES RAW_HEAD-RAWSIZ.
MOVE RAW_HEAD TO X_OBJHEAD.
APPEND X_OBJHEAD.
*RECEIVERS table
CLEAR X_RECEIVERS.
REFRESH X_RECEIVERS.
MOVE RECEIVER TO X_RECEIVERS-RECNAM. " Name
MOVE 'B' TO X_RECEIVERS-RECESC. " Receiver type
MOVE 'X' TO X_RECEIVERS-SNDCP. " Send as a copy
MOVE 'X' TO X_RECEIVERS-SNDEX. " EXPRESS DOCUMENT
APPEND X_RECEIVERS.
CALL FUNCTION 'SO_OBJECT_SEND'
EXPORTING
folder_id = 'OUTBOX'
forwarder = x_forwarder
object_fl_change = x_object_fl_change
OBJECT_HD_CHANGE = X_OBJECT_HD_CHANGE
object_id = x_object_id
OBJECT_TYPE = X_OBJECT_TYPE
OUTBOX_FLAG = 'X'
OWNER = SY-UNAME
store_flag = x_store_flag
importing
object_id_new = x_object_id_new
sent_to_all = x_sent_to_all "May need to use
TABLES
OBJCONT = X_OBJCONT
OBJHEAD = X_OBJHEAD
objpara = x_objpara
objparb = x_objparb
RECEIVERS = X_RECEIVERS.
Firstly SAP Mail
A SAP mail is a mail internal to the SAP system. It is a very good forum to exchange information with other users. Using a SAP mail in ABAP code facilitates exchange of automatic messages at various stages of the business process. It is easy to use and saves many hassles involved in using workflows for exchanging messages.
The ABAP code to send a sap mail is built around the FM SO_OBJECT_SEND which has the following pattern.
call function 'SO_OBJECT_SEND'
exporting
EXTERN_ADDRESS = ' '
FOLDER_ID = ' '
FORWARDER = ' '
OBJECT_FL_CHANGE = ' '
OBJECT_HD_CHANGE = ' '
OBJECT_ID = ' '
OBJECT_TYPE = ' '
OUTBOX_FLAG = ' '
OWNER = ' '
STORE_FLAG = ' '
DELETE_FLAG = ' '
SENDER = ' '
CHECK_ALREADY_SENT = ' '
importing
object_id_new =
sent_to_all =
tables
OBJCONT =
OBJHEAD =
OBJPARA =
OBJPARB =
receivers =
PACKING_LIST =
ATT_CONT =
ATT_HEAD =
NOTE_TEXT =
exceptions
active_user_not_exist = 1
communication_failure = 2
component_not_available = 3
folder_not_exist = 4
folder_no_authorization = 5
forwarder_not_exist = 6
note_not_exist = 7
object_not_exist = 8
object_not_sent = 9
object_no_authorization = 10
object_type_not_exist = 11
operation_no_authorization = 12
owner_not_exist = 13
parameter_error = 14
substitute_not_active = 15
substitute_not_defined = 16
system_failure = 17
too_much_receivers = 18
user_not_exist = 19
x_error = 20
others = 21.
THANKS
MRUTYUN -
Simple java date related question
Hi Friends,
I have written this custom date class that compares two dates. The user can enter any number of days,and it should calculate the next date,is that possible???
public class Date implements Comparable {
private int month, day, year;
public Date(int m, int d, int y) {
month = m;
day = d;
year = y;
public int compareTo(Object o) {
Date a = this;
Date b = (Date) o;
if (a.year < b.year) return -1;
if (a.year > b.year) return 1;
if (a.month < b.month) return -1;
if (a.month > b.month) return 1;
if (a.day < b.day) return -1;
if (a.day > b.day) return 1;
return 0;
public String toString() {
return month + "/" + day + "/" + year;
public static void main(String[] args) {
Date d1 = new Date(21, 03, 2007);
int days = Integer.parseInt(args[0]);
System.out.println("New date is:"); // Need to print new date
Expected output:
java Date 30
New date is: 04/20/2007If this is not possible with this class,how can we do this, any ideas.
Your help would be appreciated.
ThanksHi,
Try this code out:
import java.text.DateFormat;
import java.util.*;
import javax.swing.JOptionPane;
public class SimpleDate {
private int month, day, year;
public SimpleDate() {
Date date = new Date();
String myString = DateFormat.getDateInstance().format(date);
StringTokenizer tokens = new StringTokenizer(myString, "/");
day = Integer.parseInt(tokens.nextToken());
month = Integer.parseInt(tokens.nextToken());
year = Integer.parseInt(tokens.nextToken());
public SimpleDate(String stdate) {
try {
StringTokenizer tokens = new StringTokenizer(stdate, "/");
day = Integer.parseInt(tokens.nextToken());
month = Integer.parseInt(tokens.nextToken());
year = Integer.parseInt(tokens.nextToken());
catch(Exception e) {
Date date = new Date();
String myString = DateFormat.getDateInstance().format(date);
StringTokenizer tokens = new StringTokenizer(myString, "/");
day = Integer.parseInt(tokens.nextToken());
month = Integer.parseInt(tokens.nextToken());
year = Integer.parseInt(tokens.nextToken());
JOptionPane.showMessageDialog(null, "Invalid String,\nDate set to current", "Invalid String", JOptionPane.ERROR_MESSAGE);
public SimpleDate(int d, int m, int y) {
month = m;
day = d;
year = y;
public int compareTo(Object o) {
SimpleDate a = this;
SimpleDate b = (SimpleDate) o;
if (a.year < b.year) return -1;
if (a.year > b.year) return 1;
if (a.month < b.month) return -1;
if (a.month > b.month) return 1;
if (a.day < b.day) return -1;
if (a.day > b.day) return 1;
return 0;
private int getNumOfDaysInMonth() {
boolean leap = false;
int days = 30;
if (year % 4 == 0) leap = true;
if ((month == 1) | (month == 3) | (month == 5) | (month == 7) |
(month == 8) | (month == 10) | (month == 12)) {
days = 31;
if ((month == 4) | (month == 6) | (month == 9) | (month == 11)) {
days = 30;
if (month == 2) {
if (leap) {
days = 29;
else days = 28;
return days;
public void addDays(int nums) {
while (nums > getNumOfDaysInMonth()) {
nums = nums - getNumOfDaysInMonth();
addMonths(1);
day = day + nums;
while (day > getNumOfDaysInMonth()) {
day = day - getNumOfDaysInMonth();
addMonths(1);
public void addMonths(int nums) {
while (nums > 12) {
nums = nums - 12;
addYears(1);
month = month + nums;
while (month > 12) {
month = month - 12;
addYears(1);
public void addYears(int nums) {
year = year + 1;
public int getDay() {
return day;
public int getMonth() {
return month;
public int getYear() {
return year;
public String toString() {
return day + "/" + month + "/" + year;
}I have swapped the day and month around from mm/dd/yyyy to dd/mm/yyyy
but otherwise its still the same basic code -
What is the difference between delivery date and actual goods issue date?
Hi ,
Can you please tell me the difference between Delivery date and Actual goods issue date ?
Delivery data can be be greater than goods issue date?
Thanks,
AjayHi Ajay,
Delivery date means its the original date on which the delivery should be done.Actual goods Issue date is the date on which goods to be delivered according to the purchase order.There can be delay in the delivery so we maintain 2 objects.
Yes delivery date can be greater than Goods Issue date.
Hope this clears
Regards
Karthik -
From Time column in Excel to Java Date ?
Hi there!
After I have read range data from Excel to a Java Object[][]
array/table, one of my excel time columns becomes "floats"
numbers when I try to access them in Java, like this:
from 15:00:00 in Excel to 0.625 in my Java program
How can I avoid this OR transform/parse this 0.625 number
back again to time/Date 15:00:00 inside Java ? hmmm
Is there any setup of jCom that can controll this somehow ?
I have been able to transform:
from 11.15.01 in Excel, becomes "Thu Nov 15 00:00:00 CET 2001"
with the jCom bridge ...
When I have this "string" on this format, it's easy
to get a Java Date of this with SimpleDateFormat.
... but not with this time of mine :-)
Any clues where to look or a solution for this ?
-- Thank you !
-- ErlendExcel stores times as decimal fractions (representing portions of a day)
There is no Time data type in VB so is probably represented by a Single
object.
This object is then converting to a java.lang.float on the Java side.
0.625 can be parsed by multiplying by (24*60*60) to get the number
of seconds after midnight.
A list of supported COM data types and their java equivalents
can be found in chapter 7 of the jCOMReference pdf file.
damon
"Erlend Bjorge" <[email protected]> wrote in message
news:3be2983e$[email protected]..
>
Hi there!
After I have read range data from Excel to a Java Object[][]
array/table, one of my excel time columns becomes "floats"
numbers when I try to access them in Java, like this:
from 15:00:00 in Excel to 0.625 in my Java program
How can I avoid this OR transform/parse this 0.625 number
back again to time/Date 15:00:00 inside Java ? hmmm
Is there any setup of jCom that can controll this somehow ?
I have been able to transform:
from 11.15.01 in Excel, becomes "Thu Nov 15 00:00:00 CET 2001"
with the jCom bridge ...
When I have this "string" on this format, it's easy
to get a Java Date of this with SimpleDateFormat.
... but not with this time of mine :-)
Any clues where to look or a solution for this ?
-- Thank you !
-- Erlend
Maybe you are looking for
-
Not impressed at all with the Mac Pro
I spent years of frustration using a PC and hearing Mac users telling me how they never have issues with their computers. In January, I finally broke down and spent more than $4,000 on a Mac OS X, Version 10.5.2 with the following installed: Processo
-
SAP* and DDIC passwords for new clients in Sol Man 4.0
Hello all, I just recently finished a Solution Manager 4.0 on Windows 2003 server box. Then, I performed some of the post installation steps until I had to create a new client. So, I went to scc4 and created a new client. When trying to get access to
-
Order state being changed automaticaly don't know where
Hello people! After i finished my shopping process i set a state (ORDER_SUBMITTED) for the order, shortly after its state is updated to another automatically i don't know by which component. I have debugged all the components, processors, pipeline ch
-
Hi folks... Does anyone know if there is a way to project my laptop on Sony HD TV by sending the signal back through the Fios router to the set top box to the TV? I know I can plug the laptop directly to the tv, but it requires a cable running all t
-
Help to configure msoutlook separate inbox for each accounts in office 365 in mac
i have installed office 365 in mac pro book and configured 3 accounts. all the mails are downloading to same inbox. please let me the configuration to receive mail in separate inbox, sent, draft, etc.. for each accounts