Susanta Chatterjee

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

Recent posts by Susanta Chatterjee

Found an answer in StackOverflow. Click on the link above to see the answer.
12 years ago
I did not find any answer in this forum, so cross-posted in StackOverflow.

If I find any answer, I will post here. So, if you have any answer to this question, please, reply.
12 years ago
I did my due diligence by doing Google search but did not find any answer.

We have a REST service bases Web Application, for which backend is implemented using Groovy and Grails (1.3.7 with Groovy 1.7.x). I understand how Open Session In View works in general for Hibernate, and when configuring Hibernate with Spring, we could specify for which set of URLs, OSIV should work in the filter configuration.

The issue is I cannot find how to exclude a set of URLs from the scope of OSIV filter (like matching *.js, *.gif, etc). I found from the Hibernate log, that even for Javascript file request, Open Session In View kicks in and opens a session and closes it.

Thanks in advance.

- Susanta
12 years ago
Paul is right. We are using multiple databases (and multiple schema on same database) and for each database/schema, we have one SessionFactory. Works fine, a little complicated at times ( )
Try changing your save method to:
I am not an expert, I think it should look like following:
What about using XML External Entity references? I am not highly expert on this, found the information on the "Java Persistence with Hibernate" book, Chapter 3, Pg. 136-137.

Step 1: Define a globals.dtd file where you define external XML entities like the following:



Step 2: Include the global dtd file containing entities into you DOCTYPE definition in hibernate.cfg.xml file.



Step 3: In the hibernate.cfg.xml file refer those entities as replaceable parameters (hope following formats well!).




Step 3: Make sure the globals.dtd file is there on the classpath for the parser to find it out.

Step 4: We have an Ant build file to include the correct globals.dtd file for different environment and to build the corresponding JAR file at deployment time.

And good news is that it worked for us. Hope this helps.

- Susanta
[ November 05, 2007: Message edited by: Susanta Chatterjee ]
And additional to those steps, Mark already mentioned, make sure the database user id you are using has been granted privilege to use the sequence.
We used the following inline style to do the same thing.



That restricts the width for Select control to 130 pixels, does not depend on the Option string width. There was a problem with that. Users complained that they needed to see the full text of the selected option. So, we provided a popup to be displayed on mouse over on select.

- Susanta
Eric,
Thanks. That works.
We successfully did a presentation to users using this technique and the HTML Grid design is a hit. Only trivial problem I found is that, in textarea, if you press enter then a new line is created in textarea (instead of form getting submitted as in case of input type=text box), as user may type something in those HTML grid.

I am thinking to put a javascript to check onkeypress to filter out Enter key. Do you think that to be a good approach for UI design? Or do you suggest some other technique.

- Susanta
[ September 29, 2006: Message edited by: Susanta Chatterjee ]
Eric, Thanks for replying.

We tried your approach of splitting the data on newline separator and distributing in the cells below. But, to do this, we have to work with textarea (as you mentioned and input[type=text] cannot handle that).

But that poses additional problem for validation of data, as user now sees a different kind of control with scroll etc. Even though you can restrict the textarea by 1 row and specific size of column, there is an additional scrollbar on right and user can type beyond text area visible portiona and additional javascript validation for type of data etc., which does not fit users' bill.

- Susanta
We have this requirement. In the HTML form, there will be rows of lines. Each line contains multiple Input(type=text) boxes. Basically, HTML form will look like EXCEL Grid, where each column or row is a series of INPUT boxes.

Now, users will copy data from any EXCEL column and will paste that data into any input box. Then, our application should copy the data from first cell of the EXCEL to that input box, the data from second(copied) cell to the input box below the first and so on. In brief, they want to cut/copy and paste from EXCEL column to HTML column.

I tried many many ideas/tricks but did not find any useful one. Any help?

Regards to all,
- Susanta

P.S. - We are not allowed to have ActiveX controls. Any IE scripting including javascript without ActiveX is allowed.
[ September 28, 2006: Message edited by: Susanta Chatterjee ]
Hi David,
What about opening a new window first and using javascript in the new window to do a form submit to get the server side to stream your application data?

My 2 cents.

- Susanta
Hi,
I am absolutely surprized seeing my name in winners' list. Thank you all of you, specially to Nate Schutta and Ryan Asleson. This winning is an added bonus to me, as my original goal was to get a pragmatic solution towards a problem in my current project. And I got the solution and we are putting that solution in design right now. So, this thread has been really helpful to me. And now I am about to get this book as a prize.

= Susanta