Dheeman Basu

Greenhorn
+ Follow
since Mar 17, 2009
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 Dheeman Basu

How do I create IN Restriction using sub query?

Here are my tables
Table A ( primary_key_a, vala1, vala2, ....... )
Table B ( primary_key_b, foreign_key_a, valb1, valb2, ..........)

I want to select records from table B ( mapped in hibernate by BeanB) with certain foreign_key_a values ( say the ones with vala1 = 5, select primary_key_a where vala1 = 5)

My Hibernate code:
Session session = sessionFactory.openSession();
Criteria crit = session.createCriteria(BeanB.class);
crit.Restriction.in( "foreign_key_a" <some code> );

How do I fit in select primary_key_a where vala1 = 5 for <some code> ?
Ignore the double quote question. I created the problem. Thanks for solving the case once again.
12 years ago
JSP
It works! thanks for quick response.
Sorry for the dollar and S confusion. That is something my editor is doing.

But I have a small problem still. The value is showing up as "val2" instead of just val2. How do I get rid of the double quotes?
12 years ago
JSP
I have two beans in request context bean1 and bean2 (say).

One of the properties of bean1 is prop1 with value val1. Business logic ensures that bean2 is going to have a property named val1 with value val2.

Objective is to display the value val2 on the page.

Can someone help me with suitable jstl code?

<c:out value="S{bean1.prop1}" /> works, prints val1

<c:out value="S{bean2.val1}" /> works, prints val2

But I need something generic like <c:out value="S{bean2.${bean1.prop1} }" />
12 years ago
JSP
There seems to be some issue with the download links. I am getting "Bad Gateway" error. Is this a temporary problem and I should keep trying?

http://www.jboss.org/ejb3/docs/tutorial/1.0.7/ejb3-tutorials.zip

Thanks a lot for your quick response.

regards,

Dheeman
13 years ago
JBoss seem to provide a EJB3 tutorial.

http://docs.jboss.org/ejb3/docs/tutorial/1.0.7/html_single/index.html

But I could not find a link to the source code used in this tutorial. The tutoial does not provide any link. I could not find it in the free community edition that I downloaded. Is this tutorial not free actually?

I will appreciate if someone can provide me the link to download or the path in the community edition where I should look for the source code.

regards,


Dheeman
13 years ago
I want to show a hyperlinks in Richface datatable.
Say for simplicity all my links are: <a href="http://www.javaranch.com"> Click Here </a>

Now let's say table is defined like following:

<rich:dataTable
var="rec" value="#{beanList.records}"
rowClasses="jsf-table-odd, jsf-table-even">

<f:facet name="header">
<rich:columnGroup id="dataHeaderColGrp">
<rich:column> <h:outputText value="Links"/></rich:column>
</rich:columnGroup>
</f:facet>

<rich:column title="Links">
<h:outputText value="#{rec.text}" /></rich:column>
</rich:dataTable>


What should be the content of rec.text? In other words what must bean's getText() method return?
14 years ago
JSF
Thanks Tim. This is exactly my line of thought. I must use somehow <h:inputhidden?> tag. But I cannot figure the syntax.

Let's say the request scoped backing bean name is MyBean.
The property name is String formName
In view V1 I want formName to get set to "V1".
How do I write <h:inputhidden ................ /> block?
14 years ago
JSF
I want to share a request scoped JSF bean in more than one view with h:inputText X and Y that will bind with member variables mX and mY.
But on Submit the bean should be intelligently invoke different processes. Say I have two views V1 and V2. One solution would be to define two funtions in JSF bean submitV1() and submitV2() and bind them

<h:commandButton id="submit" action="submitV1"> </h:commandButton> in V1 and similar expression in V2

But that would mean for every new view I have to write a new submit function. Can I define something like hidden input text that will set a hidden member variable mV to "V1" or "V2" implicitly without knowlege of user? The JSF bean then can intelligently decide how to handle the Submit. Basically, I need the JSF backup bean to figure which View is calling it.
14 years ago
JSF
I have similar problem. I am working with chapter 2 example code of "EJB3 in Action".
I am using eclipse IDE 3.4 and JBoss 4.2.2 server.

I could successfully do the ANT build. But I have no clue how to run the clients. There are aparently two clients built chapter2-sfsb-client.jar and chapter2-slsb-client.jar. My questions are

1. How do I configure Eclipse run environment to run any of these two clients?
2. How do I run any of them from command line?
3. I tried to run them using appclient from Sun App Server 8.1 I . The appclient complains that there is no application-client.xml in client META-INF folders. This is true. I noticed that ant build script is attempting to copy application-client.xml from /etc folder to META-INF. But the file is missing in /etc folder. ( I downloaded JBOSS version of the examples.)

Please help.

Dheeman Basu
The sample code that comes with Debu Panda's book is written targeting JBoss 4.x releases. I need help to build with JBoss 5.0.0
The path elements in common.xml are
&amp;lt;pathelement location=&amp;quot;${JBOSS_HOME}/server/default/lib/jboss-ejb3x.jar&amp;quot; /&amp;gt;
&amp;lt;pathelement location=&amp;quot;${JBOSS_HOME}/server/default/lib/jboss-j2ee.jar&amp;quot; /&amp;gt;
&amp;lt;pathelement location=&amp;quot;${JBOSS_HOME}/server/default/lib/ejb3-persistence.jar&amp;quot; /&amp;gt;
&amp;lt;pathelement location=&amp;quot;${JBOSS_HOME}/server/default/lib/servlet-api.jar&amp;quot; /&amp;gt;
&amp;lt;pathelement location=&amp;quot;${JBOSS_HOME}/server/default/lib/jboss-jaxws.jar&amp;quot; /&amp;gt;

I replaced these lines (as JBoss 5.0.0 /server/default/lib is empty) with one line

&amp;lt;pathelement location=&amp;quot;${JBOSS_HOME}/common/lib/jboss-javee.jar&amp;quot; /&amp;gt;

That is not enough. The compilation is failing with errors like javax.ejb does not exist! What other jar files I must add to compile the
code?
15 years ago
The problem is with JBoss release 5.0.0 on wards

jboss-ejb3x.jar is missing. What is the alternative?
15 years ago