[flexcoders] EPUB reader in Flex

2010-04-15 Thread Zdenek Mikan
Is there any open-source project which implements EPUB reader in Flex?

Thanks for any info

Zdenek M



[flexcoders] URLMonitor timeout

2010-03-26 Thread Zdenek Mikan
I am trying to detect the online/offline status of my Air 1.5 
application using URLMonitor. Unfortunately when the status is offline, 
the first StatusEvent after monitor.start() comes after very long 
timeout (20s?). Is there any method how to make this timeout shorter?

Zdenek M



[flexcoders] LCDS, Hibernate and offline synchronisation in Air

2009-06-01 Thread Zdenek Mikan
I am trying to make the database application in Air, which should work 
also offline. But I have a problem with associations.

I have two databases: Partner and Contact. In Contact there is a 
ManyToOne association to Partner, based on the join table:

@ManyToOne(targetEntity=Partner.class, cascade={CascadeType.ALL})
@JoinTable(name=partner_contact,
joincolum...@joincolumn(name=fk_contact, 
referencedColumnName=contact_id),
inversejoincolum...@joincolumn(name=fk_partner, 
referencedColumnName=partner_id))
private Partner partner;

The problem is that when I create a new partner offline, then add a new 
contact referencing this new partner, everything is OK when I am 
offline, but after getting online and commiting offline changes, the new 
partner is created two times.

Does anybody know the fix for this?

Thanks in advance

Zdenek M





[flexcoders] BlazeDS and Remote Objects

2008-09-18 Thread Zdenek Mikan
I would like to be sure: Is it possible to have a SWF on one computer 
and call Remote Objects (POJO) on other computer?

Zdenek M



[flexcoders] LCDS 2.6 + Hibernate: problem deleting items

2008-08-18 Thread Zdenek Mikan
I have got big problems deleting items from my managed collections:

When I delete item through ds.deleteItem and then call the ds.commit, 
after return from the commit operation my item is back in the 
ArrayCollection. The second time this item is deleted properly.

When I delete item through ac.removeItemAt the item is again restored by 
commit, but this time it is impossible to delete this item by the second 
call.

When I delete item from the collection and add another item into the 
same collection, the commit fails and the server returns error The item 
was not in the cache...

Does anyone know how to fix these problems? My items have to be 
improperly cached somewhere...

TIA Zdenek



[flexcoders] LCDS: data management and limited access

2008-08-12 Thread Zdenek Mikan
I am trying to limit access to my flex application which works with LCDS 
2.6 data management endpoints configured to use only the rtmp channel. I 
would like to limit access to my application from just certain ip 
addresses - I want to list these ip addresses in whitelist property of 
my server, but with this setting I am still able to connect to my 
application from ip addresses which are not in this whitelist. Even if I 
put my ip address into blacklist in services-config.xml file, I am still 
able to connect and see the data from my endpoints. I am a little 
confused why this feature does not work?

Zdenek M




[flexcoders] LCDS: how to fetch the items from lazy collection

2008-08-08 Thread Zdenek Mikan
I have an ArrayCollection which is filled from the LCDS/Hibernate 
destination with lazy=true. For display it is OK, but for export I need 
to go through all items to send them to output. Is there any way how to 
force fetch all items from the server?

BTW the sample in LCDS ES 2.6 Developer Guide on page 242-243 is wrong - 
you will get the ipe exception on line with ipe.addResponder in catch 
clause.

Zdenek M



[flexcoders] LCDS data management - original data on the client

2008-07-22 Thread Zdenek Mikan
I am using LCDS data management with Hibernate assembler. My dataservice 
is configured with autoSyncEnabled set to false and in my Flex 
application it is possible to make various changes to data in 
ArrayCollection resulting from fill operation. Then before commiting the 
dataservice I would like to inspect these changes. Are the old values of 
data (which were originally read by fill operation) accessible anywhere 
on the client?

Zdenek M



[flexcoders] LCDS 2.6 - problem in samples

2008-07-18 Thread Zdenek Mikan
I have just downloaded LCDS 2.6, installed it on Tomcat 6.0.16 (not 
using the integrated Tomcat). Then I installed JOTM 2.0.10 into Tomcat 
and tried to run the CRM sample. Unfortunately when I added new item 
(company or employee), it crashed every time with strange java 
exception. After some digging on web I found that this is caused by 
conflicting library commons-logging.jar in lcds-samples/WEB-INF/lib 
folder - when I removed this jar file, the CRM sample started to work. I 
wonder if this problem is also in the integrated Tomcat.



[flexcoders] LCDS/Hibernate + Tomcat - socket write error

2008-07-17 Thread Zdenek Mikan
I have a problem with my webapp: after some time it returns the 
SocketException: socket write error, then the Tomcat has to be restarted 
to get it run again. I have found the blog about similar problem on 
JBoss 
(http://viconflex.blogspot.com/2006/11/how-to-keep-db-connections-alive-in.html).
 
Does anyone have a solution for this problem on Tomcat?
Thanks in advance



[flexcoders] HorizontaList - variable column width

2008-07-11 Thread Zdenek Mikan
Is it possible to have variable column width in HorizontaList (similar 
to variableRowHeight for List)?


Zdenek M



[flexcoders] LCDS and Hibernate - how to setup bidirectional relationship

2008-07-04 Thread Zdenek Mikan
I have got bi-directional association defined in LCDS and Hibernate - 
one Parent has ArrayCollection of many Child objects, in Child I have 
the pointer to its Parent. All works correctly, but when I try to delete 
one of the child objects (either by parent.childs.removeItemAt() or 
directly through dsChild.deleteItem()), my parent object just disappears 
- it is deleted as well. I can fix this by making the relationship 
one-directional (then it works), but I think there has to be some 
setting either in LCDS or in Hibernate to prevent this.

Thanks in advance for some advice

Zdenek M



[flexcoders] LCDS and Hibernate - how to write equals() and hash()

2008-07-02 Thread Zdenek Mikan
I have seen some discussions on the web about not using database 
generated id in equals() and hash() functions for data objects (in java 
DTO model) as it changes during save operation. But in the open source 
samples there are either these functions based on id

(http://weblogs.macromedia.com/pent/archives/2007/10/flex_and_hibern.html)

or these functions are omitted

(http://blogs.adobe.com/mtg/2006/08/my_first_hibernate_enabled_fle.html 
and http://fleksray.org/flex_datamanagement_service_hibernate_en.html).

IMHO these samples will not work correctly with more complex object 
trees. Can someone give me the advice how to deal with this issue: is it 
better to compute hash from all properties (columns) of object or is it 
better to add special uid column into tables (and save it inot 
database)? The object retrieved from LCDS into Flex has the uid property 
- is it possible to use this property in equals() and hash() functions 
(in Java)?

Thanks in advance for answers and opinions.

Zdenek M



[flexcoders] Flex Builder 3 plugin problems opening perspective

2008-06-23 Thread Zdenek Mikan
I had some problems with my installation of Flex Builder 3 plugin in 
Eclipse 3.3.2 in Windows Vista (design view stopped working) so I tried 
to reinstall Flex Builder. But after reinstallation I am not able to 
open the Flex Development Perspective - the alert says Problems opening 
perspective 
com.adobe.flexbuilder.editors.mxml.ui.perspectives.development. Does 
anybody know how to fix it?

Zdenek M



[flexcoders] Srollbar for list of images

2008-04-18 Thread Zdenek Mikan
I have got the simple HorizontalList with Image as an itemRenderer. When 
the dataProvider has more items than columnCount, the scrollbar is 
automatically added to the bottom of the list. But this scrollbar 
obscures part of each image. As I need to have my images vertically 
centered (they have got various aspect ratio), they are centered in the 
original vertical space, not in the space left after scrollbar is added 
(there is space between top of the list and the image, but the lower 
part of the image can be obscured by the scrollbar). Is there any simple 
solution how to add the scrollbar outside of the items?



[flexcoders] Platform independent paths in AIR

2008-04-12 Thread Zdenek Mikan
Is it possible to get platform independent path for file or folder in 
Adobe AIR?

If I want to use the same Air application on Mac and Win, how can I 
translate the file paths between platforms? (The native path on Win does 
not include the server name, only the mapping on letter.)



[flexcoders] LCDS one-to-many managed association

2008-04-02 Thread Zdenek Mikan
I am struggling with very simple sample of one to many managed 
association using mySQL database and custom Java assembler extended from 
AbstractAssembler. I have got two destinations, parent and child.  In 
parent destination there is an ArrayCollection property which is 
associated with child destination. I fill this ArrayCollection in my 
parent assembler. Everything is fine, the data are correctly transferred 
from the database to the client and when I add item into my child 
ArrayCollection, the function create in my child Assembler is called. 
But when I delete item from the child ArrayCollection, my child 
Assembler is not called, only the update function in parent assembler is 
called. Does anyone have a clue what should I do to fix this?

Best Regards
Zdenek M



[flexcoders] LCDS one-to-many managed associations

2008-03-26 Thread Zdenek Mikan

Hi,

I am trying to comprehend how to implement the one-to-many managed 
associations in LiveCycle Data Services. Unfortunately there is no 
complete sample available.


I have got the Company and Employee tables in database and there is an 
id_company foreign key in the Emploee records.
I naively expected, that when I set the one-to-many association (in 
destination Company) and make the fill operation on ArrayCollection of 
companies, the LCDS will automatically call the fill method for emploees 
property in each company. But obviously this is not the case - I will 
have to fill this child ArrayCollections (or at least the IDs for lazy 
associations) in my custom Java assembler for the parent (Company) 
destination (using SQL query to Emploee table). But I am not sure how to 
pass this child List from Java to ArrayCollection in AS. Can someone 
explain this to me?


And are there any other places in Company Java assembler where I have to 
work with Emploee table or is then the creating, updating, and deleting 
of employee accomplished by simply creating, updating, and deleting 
items in emploees ArrayCollection in AS?


Thanxs

Zdenek M