Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

bean:write Vs html:text

 
madhav changala
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am facing strange problem with bean:write,

I have the requirement like below

User clicks one "search"button on parent.jsp one popup will come i.e child.jsp.

In parent.jsp i have 3 fields, those are name, age,division

here name is one textfield after name textfield "search"button willbe there.Remaining are bean:write's not html:text

when user click on search button child.jsp will open, user selects one row and click "ok" then child window closes and the corresponding values ..i.e name, age & division values have to sit in parent.jsp.

For me only name field is setting up, age & divison are not setting up.

If i replace the code with html:text values are setting.. but the client requirement is only bean :write not html:text,,

How i implemented the code sofar is ..i am getting the corresponding values what user selects in javascript and setting for the fields of parent window in javascript only. but for html:text the formbean setter methods are caling but not for bean:write..

Could you any one comeup with soultions

ThanksInAdvance
Madhav
 
Rauhl Roy
Ranch Hand
Posts: 401
Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i guess, using html:hidden along with bean:write properties will solve your problem

example
// for displaying to the user
<bean:write name="className" propery="formBeanProperty" />
// for setting the value in formBean
<html:hidden name="className" propery="formBeanProery" />
 
madhav changala
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Rahul,

ThanksFor your reply,It did n't work without refreshing the page,,

Is there anyway ,without refreshing the page we can call setter method with bean:writes

I did same as above example, It did n't call setter method of parent window property unless untill i explicitly call forms[0].submit in javascript, User doesn't want the load page again which will take time and have somany parameters.


Could anyone please come with solution

ThanksInAdvance
Madhav
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic