JayaSiji Gopal

Ranch Hand
+ Follow
since Sep 27, 2004
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 JayaSiji Gopal

I am not sure if the following is doable:

I have say a hashmap - key:"1" value: "one".

I want to convert this hashmap to a list - ["1":"one"]

Is this doable?
12 years ago
I have a query



I am trying to use Hibernate detached criteria and have the following code:



This generates the above query with count(*). What should i add to get the count(*) in the query?
I tried projectionsCriteria.setProjection(Projections.count("column1")); and
projectionsCriteria.setProjection(Projections.rowCount());

that does not work. Any ideas?
Here is the code that i get:


with currentSession(), you dont need to close it manually. All of that is automatically taken care for you.
I have a sql-query which returns a resultset ref as:



In the same hbm file, i have two definitions of Cat Bean.



With the above code, I get an error on startup. Is there a way that the resultset ref can point to the (2) bean instead of (1)?
Hi,

I am facing the following issue:

when i login to my application, i am setting the value of a cookie. Cookie name = TESTCOOKIE.
When i logout, say the click of a link, i am programmatically removing the cookie as follows:


If i dont close the browser window and tried to login again, i see the following:
  • TESTCOOKIE
  • TESTCOOKIE=5130015848645758769


  • The second value is the expected value. I understand that the first value is because of me deleting the cookie.
    I see this happening in IE6 only. Can anybody let me know, if i can remove the first TESTCOOKIE from the list.

    Because of two cookies with the same name, i am unable to login to the application again.
    yes precisely. this is not only to save lot of code change, but is also shared by another application.
    Paul,

    Thank you for the reply. Could you point me to some examples which would help me do this.
    Also, i dont want to add a tag.

    I want to add as text inside the body tag. It would be an awful amount of existing java code change if i add it as a tag. that is why.
    i tried searching for xslt add text...but didnt find any.
    I have an xml file as follows:



    I need to transform the text in body tag and append the pre tag...something like:



    I have tried something like this:


    This works fine. However, this is actually copying the xml structure first in memory and then recreating the entire xml.
    Is there a way in xslt i could navigate to the required node and append <pre> within the body tag. Essentially i am thinking if there is a clean way to do it.
    Ok..i do understand what you are saying...but if you remove the alias, how would i supply articleId & attachmentName as restrictions to the detached criteria.

    I tried :



    It still tries to look for articleId in articleAttachments, whereas it is actually present in ArticleAttachmentsId.
    The articleId is present in ArticleAttachmentsId bean, a composite key in article_attachments table.
    If I were to remove the alias, how would I let the bean know to look for articleId and attachment name in articleattachmentsid bean.

    The attachment itself , a byte[] is in articleattachments bean.

    I also tried this approach:



    Here again i get the same exception as above.
    I have the following scenario:

    Article table, which has all article related information.
    A article can have one or more attachments, stored in article_attachments table.
    Article_attachments has composite key for which we have articleAttachmentsId bean.

    Following is the mapping in hbm.xml file:



    articleattachments and articleattachmentsid bean are as follows:


    I know the articleId and attachmentname and would like to retrieve the ATTACHMENT from the table. I wrote the following code:


    I get the following exception:


    Dont understand y it is searching for articleId in articleAttachments table, when i have created an alias? also trying to see if there is a resolution to this problem.
    Please help. Any ideas.

    Thank you!
    Jayashree.
    I am trying to download a report in pdf format. I get the following error:


    any ideas?

    Thank you!
    Jayashree.
    14 years ago
    I have two scenarios:

    1- An orderEntry class, which is an event listener class. No constructor defined. Does not extend JPanel/JFrame. This class is defined as a bean and is initialized by spring application context.
    2- An AgentMonitorBrowser class, which extends JPanel. No constructor defined. Again, same as (1), it is defined as a bean and initialized by spring app context.

    Any ideas on how one could write UIspec4j unit test cases for the above cases. I have tried all searches on google and i only find myself in circles, with the same examples around.

    I also took a look at abbot and I face the same issue there again....

    Any ideas please?

    14 years ago
    I am on the lookout for a Swing GUI testing framework. I did try UISpec4j, however, i see that the major disadvantage is I could write unit tests only for classes, which extend a JFrame/JPanel.
    I was reading on JFCUnit, however, I am not sure if it is still supported.

    Any suggestions/ideas?

    I have some classes like these -



    I am interested in writing unit tests for these swing based java classes.

    14 years ago