Win a copy of Head First Android this week in the Android forum!

ali honarmand

Ranch Hand
+ Follow
since Oct 12, 2009
ali likes ...
Netbeans IDE Oracle Java
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
0
Total given
9
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by ali honarmand

Hi,
I want to know what is the use of binding attribute of the jsf component tags and it's difference
with using value attribute to access a backing bean property.

can anyone help?
9 years ago
JSF

Dura Hurtado wrote:Hi,

maybe this link could help you.

https://coderanch.com/t/540735/JSF/java/EL-not-evaluated



Thanks, It helped. but it was about JSP. I think the problem was with Glass Fish, after a restart we had the view.
10 years ago
JSF
Hi,
If you are familiar with Java a bit, you may start from "your first cup" by Oracle, and proceed to "Java EE 6 Tutorial" again by oracle.
10 years ago
JSF
Hi everyone,
I'm new to JSF. I'm using a backing bean to support my view page. It is the simple greeting sample used everywhere.
but when I use the beans' properties they are not reflected on the XHTML page. and just the EL expression itself is shown there.
I have used the name attribute of @ManagedBean to name the bean. and use this name on view.
It seems EL is not evaluated.
can anybody help?
10 years ago
JSF
Hi all,
I have got problems instantiating a bean. here is the stack trace:


and the Course class:


and here is the beans.xml


Thanks priorly,
10 years ago

Sumit Bisht wrote:" Could not instantiate bean class [org.hibernate.cfg.Configuration]"
I'd guess your classpath does not have jar files for hibernate.



Hi Sumit,
Thanks for your answer,
I'm not sure you are right. because I have added the cfg package to libraries beside my project.
It works well while I use hibernate alone or spring alone. forexample setter injection and/or constructor injection work well.
and I have also Implemented CRUD using hibernate and sure it works well.
But when it comes to integration the problem shows itself.
I'm still working on it.
thanks anyway
Hi All,

In my first program integrating Hibernate and Spring I have encountered the following exception:


I have put hibernate configuration in a bean tag in beans.xml as follows:



Here is the Course Entity:


And the code that uses it:


Thanks

ali honarmand wrote:

Jeanne Boyarsky wrote:Ali,
Are you sure dom4j is in your runtime classpath? Some tools make this a little tricky so sharing what tool you are using/why you think it is in the classpath would help figure out why it isn't.


thanks Jeanne,
It was the dom4j problem and some other configuration issues.

Now I have got a new problem with transaction.commit(). It throws an exception and quits. I should say that no update or delete commands work properly.
can you help me with this issue please? Here is the exception:


It happens for update while for insert no exception is thrown.
Code for insert:

code for update:



Wow, I did not begin() the transaction. thanks everyone.

Jeanne Boyarsky wrote:Ali,
Are you sure dom4j is in your runtime classpath? Some tools make this a little tricky so sharing what tool you are using/why you think it is in the classpath would help figure out why it isn't.


thanks Jeanne,
It was the dom4j problem and some other configuration issues.

Now I have got a new problem with transaction.commit(). It throws an exception and quits. I should say that no update or delete commands work properly.
can you help me with this issue please? Here is the exception:


It happens for update while for insert no exception is thrown.
Code for insert:

code for update:
Hi,

I'm a new hibernate user and I have got the following problem:

I have referenced the class:
  • org.hibernate.cfg.Configuration

  • and the whole bundle and use the class as follows:

    but face the following Exception:
    Initial SessionFactory creation failed.class java.lang.NoClassDefFoundError
    Exception in thread "main" java.lang.ExceptionInInitializerError
    at com.vaannila.util.HibernateUtil.<clinit>(HibernateUtil.java:19)
    at com.vaannila.course.Main.saveCourse(Main.java:35)
    at com.vaannila.course.Main.main(Main.java:25)
    Caused by: java.lang.NoClassDefFoundError: org/dom4j/DocumentException
    at com.vaannila.util.HibernateUtil.<clinit>(HibernateUtil.java:13)
    ... 2 more
    Although I have the class as a library in my project. please help.
    thanks

    Darryl Burke wrote:A JLabel (or indeed any Component) can respond to mouse events by adding a MouseListener (or as applicable, a MouseMotionListener). A GridLayout(3, 3) can take care of positioning andsizing of components.

    More here: Creating a GUI With Swing.



    thanks a lot. It solved the problem. I added the mouse listener to my JPanel class but as I click the underlying frame the event is again invoked.

    I have got a JPanelClickEventListener as follows:

    and I added an instance of the event Listener class to my JPanels as follows:

    I should mention that the preceding code resides in a class extending JFrame.
    10 years ago
    Hi everyone,
    I'm working on a Naughts & Cross like game and I have problems with its GUI. I'm not familiar with JFX which seems to make it a peace of cake so I have to handle it using simple Swing. The problem is that I need to add a square(3^2) number of cells to my game area which are clickable(listen to events) - buttons are not a good choice - and change the surface according to the user clicks.

    thanks
    10 years ago

    Rachel Swailes wrote:Hi there.

    OK, well, let's get you on your way. If you need help at any stage just ask. Sometimes I tend to get ahead of myself when explaining.

    Step 1: It's going to be way easier for the whole thing if you make your table extend a TableModel from now (if you haven't already). So if you need help with that just ask.

    Step 2: In the table model you need to enable the cells to be editable. In the TableModel class that you make, you need to add these methods


    Step 3: You will see in the second method that we fire a method called fireTableCellUpdated. So here we can catch what the use it changing. You need to add a TableModelListener to your table to catch this.

    mytable.getModel().addTableModelListener(yourClass);

    And in the class that you decide will implement the TableModelListener you need this


    So that's the first part of it. Give it a bash and let me know how you get on.

    Cheers,
    Rachel

    [ July 27, 2004: Message edited by: Rachel Swailes ]
    [ July 27, 2004: Message edited by: Rachel Swailes ]



    Hi Rachel,
    I did whatever you mentioned here, but no events is raised. I have got a separate class which implements "AbstractTableModel" and "tableChanged" resides there. I have added "TableModel" and "EventListener" to tableModel as follows:

    and My listener class is as follows:


    thanks for comments priorly,
    Ali
    10 years ago
    Hi everyone,
    I'm using JTabbedPane on a JFrame. I have got two JPanels added to the JTabbedPane as my tabs. on first tab I have got a list which includes data loaded from DB. the next tab contains "Insert" function, which takes a name and inserts it to the DB(where list reads its data from). the problem is that I can not handle events to control switching between tabs to update list to show the new item inserted. Now I need your help.

    thanks in prior,

    A. Honarmand

    P.S.
    I'm using JDeveloper
    10 years ago

    Martyn Clark wrote:sorry for the late reply ali but you should be able to find it here Start->Program Files-> Microsoft sql server 2005->Configuration Tools->sql server configuration manager. In configuration manager console, on the left hand panel, expand the sql server 2005 Network Configuration.
    Click on the Protocols for Named-Instance-Name. On the right hand panel we need to right click and go to properties on the TCP/IP. The click on the ipAddresses tab any you can set/change port numbers.

    Hope that helps.



    Thanks Martyn. For instance I have changed into MySql. It solved the problem. But I will use MSSQL in a short time.