Miro Ricco

Ranch Hand
+ Follow
since Apr 16, 2002
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Miro Ricco

Hello

I have a datatable displaying the items which are added or removed in the background dynamically.

There is an action which can be started related to selected row. The action is started by the command button in a separate column and I have tried more ways to relate the action to the item ID by adding f:param or f:attribute into the command button component. I have also tried to set the value of command button to the ID and getting the value from inside the action listener's method.
All methods work in the case the data in the table is not modified in the background.
But if new data is inserted or removed from the table, clicking the command always starts the action for different row - the row which would be on the place of click if I refresh the table before the click.

This is strange and I can't find what I'm doing wrong and how to avoid it.

I use JSF RI + IceFaces 1.8.2 and the application is deployed on Tomcat 5.5 running Java 6.
The page with data table is refreshed automatically by AJAX on demand renderer. The on demand renderer is requested for re-render each time the data in the table is modified - but it is limited to send re-render request once per 10 seconds only.

Do you happen to recognize the pitfall i'm trapped in?

Kind regards
Miro
13 years ago
JSF
I fight the same problem with JAXWS 2.2, but without a success.
Can anybody help?

I have found some info here:
http://stackoverflow.com/questions/2210346/how-can-i-make-a-webmethod-parameter-required

But I still can't make it work.

As I understood it correctly I shall use following annotation, right?



But I get the compilation error:
The annotation @XmlElement is disallowed for this location

All I want is make the parameter 'name' of web service method getInfo required.
It's a weird production problem to rewrite the generated wsdl manually.
13 years ago

Originally posted by Ed Stevens:
Is it feasible?


I think yes. I would use the mentioned BouncyCastle library for encryption or you can develop your own :-) You have to deal with some other APIs as well (for sending the SMS).

Originally posted by Ed Stevens:
Secondly is knowledge of JME a must to build this software ,or is there an alternative using core java & swing..


Yes, if you want the app for most of mobile phones, you HAVE to use JME. The other alternative is to develop an application for Symbian phones only (no java).
15 years ago
Your book is mentioned here:

Originally posted by Jeanne Boyarsky:
This week, we're delighted to have Riyad Kalla helping to answer questions about the new software MyEclipse.

The promotion starts Tuesday, August 19th 2008 and will end on Friday, August 22nd 2008.

We'll be selecting four random posters in this forum to win a free copy provided by the publisher, MyEclipse.

Please see the Book Promotion page to ensure your best chances at winning!

Posts in this welcome thread are not eligible for the drawing.



I'm also interested in such a book. Do you have a link to its TOC, please ?
I see the Glass pane is a feature of a frame which could be used for this.
It works very well for mouse exit, but on the other side it has other problems.
I've modified the glass pane demo to propagate all the events to other components, but it has these problems:

1) When the glassPane is visible, there are no rollover effects on the buttons or checkboxes.
2) When the glassPane is visible, press down on a button, then drag the mouse away from the button, and release it. the button stays depressed.
16 years ago
Hi all

I would like to hide the JFrame automatically when the mouse exits its boundary.
I have registered mouse listener to JFrame, but mouseExited method is never called.
What is wrong?
I use Java 6.

It is working in empty frame or if there is only a panel.
But try to add JTabbedPane and it stops working.

My code:


From java.awt.event.MouseEvent javadoc:
An event which indicates that a mouse action occurred in a component. A mouse action is considered to occur in a particular component if and only if the mouse cursor is over the unobscured part of the component's bounds when the action happens. "Component bounds can be obscurred by the visible component's children or by a menu or by a top-level window."

Does it mean it is not possible to catch mouse exit of the frame?
Because it always contains some components...
16 years ago
Hi

I have two classes Person and Team bound in many-to-one relation via foreign key.
When I try to delete Person or a Team I get:

org.hibernate.HibernateException: Illegal attempt to associate a collection with two open sessions
at org.hibernate.collection.AbstractPersistentCollection.setCurrentSession(AbstractPersistentCollection.java:410)
at org.hibernate.event.def.OnUpdateVisitor.processCollection(OnUpdateVisitor.java:40)
at org.hibernate.event.def.AbstractVisitor.processValue(AbstractVisitor.java:101)
at org.hibernate.event.def.AbstractVisitor.processValue(AbstractVisitor.java:61)
at org.hibernate.event.def.AbstractVisitor.processEntityPropertyValues(AbstractVisitor.java:55)
at org.hibernate.event.def.AbstractVisitor.process(AbstractVisitor.java:123)
at org.hibernate.event.def.DefaultDeleteEventListener.onDelete(DefaultDeleteEventListener.java:72)
at org.hibernate.impl.SessionImpl.fireDelete(SessionImpl.java:761)
at org.hibernate.impl.SessionImpl.delete(SessionImpl.java:739)
at sk.dopris.dao.PersonDAO.delete(PersonDAO.java:65)
...

Do you happen to know what could be the problem?

Kind regards
Miro
Thanks for the response, i will try. Maybe i will wait for upcoming release of V6.

Anyway, last time I've used fresh installation of MyEclipse (5.0) with bundled JRE with 1GB of memory dedicated to Eclipse.

Miro
Hello Riyad,

I have tried to use Matisse and UML tools in MyEclipse 5.0 with Eclipse 3.2 (all in one bundle) but unfortunately i've found it not usable at all.

Matisse had many problems:
-could not save the form - sometimes it happened that after some time of work at the form, MyEclipse was not able to save it. No error message, just an exception in error log.
-Matisse has started with distorted view - I was able to recognize the borders of the components in the form, but the content of the components was empty, properties table was empty, and gui hierarchy tree was just an empty outline
-whole ME has frozen many times - most often when using rename variable in Matisse
-rename variable feature did not renamed all necessary occurrences - if I've successfully designed nice and complex form (after many eclipse restarts, backup restores and project re-imports) and i've coded some other actions, i realized i need to change the names of the components. I've changed many of them at once. Me the fool! Matisse did not renamed all the necessary occurrences in the code. What a mess! Does anybody happen to know if jLabelName is jLabel1 or jLabel2 or jLabel3,4,5,6,7 or 8 ?

I have tried UML in MyEclipse to draw the diagrams for my project. When the diagrams have been nearly finished, some strange error message appeared and my whole model was an empty file without any information in it. No backup. 3 days of work lost. Pity. My heart was sick long after :-(

For all that annoyances I'm still patient and waiting for some stable release. I would like to ask whether this has changed, or is it still so buggy ?

PS:Sorry for this negative response.
Java is #1 choice for me always when it's possible.

But you may be limited by hosting which does not support JSP or by your know-how.
Hi, I've solved it.

I have a bean which manages a dynamic list of "data models".
When the bean is requested to return the data for a table, it looks via FacesContext for the ID and by that ID it uses the particular data.

Try to understand my TableIdHolder in this thread:
https://coderanch.com/t/210865/JSF/java/creating-table-component-dynamically

Hope this helps.
17 years ago
JSF
Thank you for the answer.

How will I quickly get sorted elements from positions 5000-5100 from SortedMap or SortedSet ?
17 years ago
I need a hint how to design a data structure for a table of items with good performance.

The structure must fullfil folowing requirements:

1. table is sorted by specified item attribute and sort order, which may change, but not so often
2. get item by index (used in method for getting the N-th page of items) - very often
3. add new item - very often
4. remove item by ID - very often

Item has about 15 attributes, so the table will have 15 columns.
The attributes have different data type (long, int, string, timestamp, ...).
The table will hold about 1000-10000 items.

The data structure will be implemented in java. I need only theoretical design, not the implementation, but the implementation is appreciated.

Thanks !
17 years ago
Hi,

I need to provide autorefresh in the data table.

The problem is there is dynamically created list of tables which display a data related to an selected object. So i need to identify the tables. The identification is solved as I've described
here.

The page with the table is opened from JSP request as JSF response.
I have a META tag in the head of the page, as it can refresh.
When I open the page it refreshes well because it's still the same JSP request.
But when I do some action in the table (sorting, paging...) a refresh repeats the JSF request from last action. And here is the problem. After this type of refresh the value of table ID in hidden input is lost. The other part of problem is if the refresh will not repeat the action ?

Does somebody understand what i've messed up ?

Nevertheless, more and more i have a feeling the jsf is not suitable for complex solutions. I must believe the feeling is wrong, but that's discussion for another topic. I'm sorry... :-)
18 years ago
JSF
Now I have my example working, but I'm not sure if it is the way it should be solved.

I use managed bean to hold the table id:






The problem regarding the add method which was not called was caused by param.tableId in inputHidden tag. It caused to throw this exception and thus the add method was not called:

18 years ago
JSF