Sahil Saxena

Greenhorn
+ Follow
since May 26, 2005
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 Sahil Saxena

Hi All,
I have written a confirmation page in Struts which contains 1 label field "Username" and 2 buttons "Yes" & "No" respectively.

In IE when user navigates to the confirmation page I set the focus to the "Yes" button using following javascript code:


The above code works in IE

In Mozilla I tried to set focus on the button using the following code:

The above code does not work.

My observations:

For Mozilla browser:If I add any text field in the above confirmation page and set focus to it then whenever the user press enter key the "Yes" button is clicked. The code is as follows:
Javascript code:


Struts code (Addition of extra text field)


Problem:
I am not able to set focus on "Yes" button using javascript for Mozilla browser.I want that whenever user navigates to confirmation page and press enter key then "Yes" button should be selected.

Note: There is only a label field on my confirmation page and no text field

I have posted this question in this forum because I am using javascript to set focus on the buttons

Complete Code:


Please help me. I am struggling from last 2 days.

Thanks and regards.
12 years ago
Hi All,
I have written a confirmation page in Struts which contains 1 label field "Username" and 2 buttons "Yes" & "No" respectively.

In IE when user navigates to the confirmation page I set the focus to the "Yes" button using following javascript code:



The above code works in IE

In Mozilla I tried to set focus on the button using the following code:

The above code does not work.

My observations:

For Mozilla browser:If I add any text field in the above confirmation page and set focus to it then whenever the user press enter key the "Yes" button is clicked. The code is as follows:
Javascript code:


Struts code (Addition of extra text field)

Problem:
I am not able to set focus on "Yes" button using javascript for Mozilla browser.I want that whenever user navigates to confirmation page and press enter key then "Yes" button should be selected.

Note: There is only a label field on my confirmation page and no text field

I have posted this question in this forum because I am using javascript to set focus on the buttons

Complete Code:


Please help me. I am struggling from last 2 days.

Thanks and regards.
[ April 18, 2008: Message edited by: Sahil Saxena ]
To [Bear Bibeault]


Typically, web apps with this kind of functionality have a status page that users can visit to view the status of background operations.



Query: Do we maintain the status of background operation in DB and
on status page we display the status by fetching it from DB???

To [Stan James]
Query
Can the functionality which you did in your application using applet can be done using struts web application? For e.g. there will be 2 frames on a single page. one frame will contain form and the other frame will contain the status of the back ground processing. The 2 nd frame may get refresh after particular time say 2 secs which will send query to the server for status of background processing and display it. Or is there any other way which you would like to suggest? I am not aware whether the frames solution will be feasible or not?

To [Valentin Crettaz]
Query
I was bit aware of COMET however dont know how to apply it to my web application scenario.
I will read the tutorial "http://martin.ankerl.com/2007/08/21/ajax-dojo-comet-tutorial/"; and see if I can get any hint from it .
If you have any suggestion, how to apply COMET to my web application pls let me know


Thanks to everyone
[ September 03, 2007: Message edited by: Sahil Saxena ]
Hi,

I have to create a application using struts whose job is to generate reports at the server side based on the user inputs.

However there is a requirement that whatever processing is done at the server side should be informed to the user in the browser at the same time.

For example: If server is generating 5 reports then user should be informed that:
- 1st report is being generated.
- 1st report completed
- 2nd report is being generated.
....
and after generating all the 5 reports, the response should be sent to the user.

Question:
- Is it possible to implement the above requirement using ajax?
- Has anyone implemented such kind of feature and if yes how?

Any help or suggestion are welcome

Thanks.
Hi,
I am also planning to go for IBM UML certification and also have the same question which indu pai asked above

Question:
"In your post you have mentioned that, the certification will be ended in Dec 31, 2006. Does this mean, IBM - 486 certification will be closed?
If yes, will it be replaced with a new exam?
Where do i get more information about it?"

Regards
Hi,
I have 2 databases db1 and db2 both installed on same postgres server.

How should i configure both of them in applicationContext.xml?

I am using hibernate and spring combination.

- db1 is already confiured in applicationContext as below

<bean id="dataSource"
class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
<property name="driverClassName">
<value>org.postgresql.Driver</value>
</property>

<property name="url">
<value>jdbc ostgresql://1.1.1.1:5432/db1</value>;
</property>

<property name="username">
<value>postgres</value>
</property>

<property name="password">
<value>postgres</value>
</property>
</bean>

Should i create one more datasource in applicationContext.xml???

Thanks
[ February 07, 2006: Message edited by: Sahil Saxena ]
Hi,

In my appplication I am using jsf/spring/hibernate but when i execute a query which fetch all the products i found out that the query is executed twice due to which an illegalstate exception is thrown,if the managed bean of JSF is in request scope.

If i change the scope to session it doesnt throw any exception but still the query is executed twice.

Does anyone know why this thing happens?

Thanks
14 years ago
JSF
Hi,

In my appplication I am using jsf/spring/hibernate but when i execute a query which fetch all the products i found put that the query is executed twice due to which i an illegalstate exception is thrown if the managed bean of JSF is in request scope.

If i change the scope to session it doesnt throw any exception but still the query is executed twice.

Does anyone know why this thing happens?

Thanks
Hi,
I have also the same problem.
Today only I tried using JSF/Sprng/Hibernate but when i use Dao isntance from the service implementation class i also get the Null Pointer Exception.
Below is the method from the LoginServiceImpl class:

private LoginDao loginDao;

public void setLoginDao(LoginDao loginDao)
{
this.loginDao = loginDao;
}

public User login(String username, String password) throws Exception
{
User user = null;
try
{
user = this.loginDao.getUser(username);
...................

The configuration made in the applicationContext.xml is as follows

<!-- Login DAO object: Hibernate implementation -->
<bean id="loginDao" class="com.model.dao.hibernateimpl.LoginDaoHibernateImpl">

<property name="hibernateTemplate"><ref bean="hibernateTemplate"/></property>

</bean>

<!-- User Service Defintion -->
<bean id="loginService" class="com.model.service.impl.LoginServiceImpl">
<property name="loginDao"><ref local="loginDao"/></property>
</bean>

I will be also grateful if anyone figure out where am going wrong.
[ February 02, 2006: Message edited by: Sahil Saxena ]
Hi,

If anyone please know the answer or any solution let me know

Thanks
14 years ago
Thanks Balaji for the reply.

I also think the same regarding the size of the file and nice to know about the streamlining.

Thanks
Hi,

I am aware of differences between DTD and XML Schema but recently
in my project the client made change request saying "Use XML Schema instead of DTD".

The reason behind change request is:
"The XML instance created using DTD is "double in size" compare to the XML instance created using XML Schema".

I would like to know is the above reason true or someone can explain the above reason using example.

Thanks.
Hi,

I want to add my swing custom components to the eclipse Palette using Visual
Editor, I was successful in running the example as mentioned in the article
"Extending The Visual Editor Tutorial:Enabling support for a custom widget"
but in that article they have shown how to add the custom SWT WIdget and I want to add Swing Widget.
Also I want to add my own custom layout manager.

I searched for Tutorials on the internet but didnt find anything useful.

I will be grateful if any one has a small plugin example which will help me to add the custom swing widget and custom layout manager using Visual editor to the eclipse palette.

Thanks
14 years ago
Hi,

It has to be asynchronous communication because the client will be also doing other things in the session.

No the client dont have any process which would be listening to the server request but I was thinking of using JMS at the client side as well as server side.

Do you think JMS will work in the above scenario?

Thanks
Thanks Tim and Varun,

Behind the inialization of the servlet my intention was that DatabaseHandler class instance should be created once only before it receives any client request and that databaseHandler class instance will be used by rest of the beans.

Well as I dont have much knowledge of Spring I would like to know only one thing, when will the managed bean will create the instance of the database handler class?
1) After the web container is started? or
2) After the web container receives the first request from the client?

I didnt looked forward to Spring because as already I am learnign JSF at this moment so didnt wanted to increase the learning curve for the Project,
but now i think its time to start readin Spring too


Thanks.
14 years ago
JSF