This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
i m using frames for my application..my problem is these.
using action forwards, but the url in the browser never changes. Everything works happily, so the only thing i want is for the browser to change and display the new URL (mainly for the refresh button).
Refresh repeats the last request.and does not refreshing current page. what shall i do please help me......
As I've mentione to you before, your name is not in compliance with our JavaRanch naming policy. Once again we must request that you change your display name in order to comply. Failure to do so may result in the closing of your account. Might I suggest "S. Anitha", or heavens forbid, your full first and last name? Thanks in advance. [ March 18, 2005: Message edited by: Jason Menard ]
Thats the way the frames behave because each frame will be a window and that url will get updated whenever u click a link ..but if u press refresh on the frame that works perfectly fine .thats the way frames are .adn if u want the url to come in main window then u need to refresh entire page which looses the advantage of frames ............
Yah as per marc i do agree that frames are not that advisabel but still there might be many scenarios where frames are useful and get some things done easily for u
Joined: Nov 09, 2000
Yep, that's just the way frames work. Let me add my vioce to the FRAMES ARE EVIL call though. The way frames are often used is to simply provide "global" content on the page. For example, it's not uncommon to see a menu in a frame that controls a content frame. The menu frame is generally the same for each frame of content. This made it so that the developer only had to maintain the applications menu in one place without having to modify every page of the app if the menu were to change.
The times they are a changing though. Today we can use applications such as DreamWeaver to build our web pages. In a tool such as DreamWeaver, you can store your repeatable elements (such as menus) as library items which DreamWeaver will include in each page and update as necessary. Applications such as DreamWeaver aside, we can do the same thing in JSP via includes. Even better than straight JSP includes, there are various libraries available for templating in Java Web apps. For example, Struts includes the Tiles templating library which allows us to do most anything that we might have done in frames in the past, particularly as it applies to repeatable elements.
Frames are pretty nasty for application designers to have to use since they make it hard to maintain appl;cation flow control. If you have the option, and since you are using Struts anyway, it might not be a bad idea to look at Tiles as an alternative.
Joined: Jan 18, 2005
Thanks for ur reply..
i m in situation of using frames..if i use include tags it will reloaded at each page. i want to keep my top frame constant. pls help me. is there any solution to clear the refresh problem...
Thanks in Advance.
Joined: Sep 21, 2003
see u cant change thr url of the main window with out refreshing the whole page .....ie if u use frames u cant acheive this .how can some one expect this if they are using frames as the behaviour of frames is like tht
if u want to have that u should not use frames rather use server side includes or tiles which is part of strust which will refresh the entire page on each click