John Bartlett

Ranch Hand
+ Follow
since Jan 25, 2006
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by John Bartlett

Hi,

Im curious whether it is possible to use the projections of a subquery (DetachedCriteria) with the projection list of another criteria.

e.g.


I have been searching for a while and it seems to me you can only restrict based upon a subqueries results? Is this the case?

Thank you in advance,

John
Hi Ulf thank you for the reply however I dont seem to be getting the desired results.

This is the code I have for evaluating the script file:




However when i inspect the writer afterwards it is empty, while an output is still being shown in the console. Any ideas y that is?

[EDIT]

I have just found out that this works fine with the JRuby engine, but the problem explained above happens when I use the javascript engine. Any ideas why the JRuby one works with this writer but javascript one doesnt?

[/EDIT]

p.s ignore spelling mistakes in code just done to avoid problems adding to post due to filter
[ March 24, 2008: Message edited by: John Bartlett ]
17 years ago
Hi,

I am using jsr223 to compile scripts custom made in a swing application.

Everything is working fine however it would be nice to display the output of the scripts to the user, as currently the output is just being shown in the console.

e.g user creates very simple script in jruby

def fun
puts('hello')
end
hello

this will output hello, but the ran output goes directly to the console when I would like to output it via my swing application.

I have googled around and for some reason cannot find anything on this topic, is it possible to capture the output? or to tell it to output somewhere else?

Any help would be greatly appreciated.

Thank you,

John
17 years ago
Hi,

I have used selinum a bit but never found it that reliable due to having to remake tests whenever the UI changed, so I have been doing alot of testing using HtmlUnit recently.

There is also HttpUnit, this allows you to capture the browser behaviour. so this should aid you in finding out page redirects.

Hope these links help.

John
17 years ago
Hi,

If you want to print out the entries of -

int [][] twoDee ={{1,2,3},{3,4,5},{5,6,7}};

you would have to do this;



John
17 years ago
Hi,

if you take a look at @Override it states it has been available since J2SE 5.0 so you'll need the JDK5.0 or higher.

John
[ July 25, 2007: Message edited by: John Bartlett ]
17 years ago
Hi,

If you mean how do I use a List<Object[]> you just do this:



where objectArrays returns a List<Object[]>

John
[ July 25, 2007: Message edited by: John Bartlett ]
17 years ago
JSF
Ah kool, I personally have never used Struts i have more experience using JSF and shale for the front end. but here are a few things that mite be worth looking at the get up-to-speed before you starts.

Shale Home
Shale Wiki
Shale Wikipedia

When I was learning i quite liked the "In Action" range of books, so Struts in Action would probably be quite a good place to start.

Its also worth noting that books and tutorials can only really take you so far but there is no substiture for actual hands on experience and your employer will know this, so dont panic. In my own experience, when i started my job, i had no prior knowledge of web based java development....I had never even looked into Struts or JSF so I was probably in what sounds like the same sort of situation your in now. Just read as much information as you can so you understand the concepts, this will give you the perfect place to start when you begin coding, and then with time you will be a pro lol!

Hope something i said helps

John
[ July 13, 2007: Message edited by: John Bartlett ]
17 years ago
Hi,

Congratulation on the job.

Firstly what frameworks are you going to be using to build these web based applications?

JSF?
Shale?
Seam?
Struts?
Tapesrty?
Hibernate?
Spring?

Once you know what frameworks you are going to be using it will be easier to point you to the right tutorials / books etc.

John
[ July 13, 2007: Message edited by: John Bartlett ]
17 years ago
Hi,

Why dont you bind the button/link into the bean and then invoke the action method on the component?

e.g.



John
[ July 02, 2007: Message edited by: John Bartlett ]
17 years ago
JSF
Hi,

I have a query written in Criteria that is in desperate need of a "Case When" statement but I cannot seem to find this functionality. Am I missing something or does Criteria have another way of doing this statement?

My basic problem is that I am pulling back a list of entities and mapping the values needed onto a UI row class for viewing, but two of the attributes on the row class are only set when a specific value is set to an attribute in the entity being pulled back.

Any help would be greatly appreciated.

Thank you,

John
ah ok. have you tried <br /> and <p />?
[ June 08, 2007: Message edited by: John Bartlett ]
17 years ago
JSF
Got to ask why are you using html tags?

Why not instead of <a href="" /> use <h:commandLink />?

John
17 years ago
JSF
anita dhar have have a look at the access level 'Protected', this is commonly used in the abstract class model.
17 years ago