This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Does Simple Parent Access Simple Child?  RSS feed

 
Bobby Sharma
Ranch Hand
Posts: 598
3
Google App Engine jQuery Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have two tags.

//Parent tag Rachel

//Child Tag Jackie


Result


Note:tld is fine

why I am getting null? please explain.

best regards,
omi
 
Gopikrishna Kunisetty
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sharma,

We don't have any means to access or refer directly the childtag from the parent tag. You have to provide some logic inside Parent tag and child tag which will enable you identify the child. Some thing like maintain a array list in the Parent and have a method in child which will add itself to that array list.
In the code, the child name is coming as null because you have not initialized or assigned any value to this variable.
 
Bobby Sharma
Ranch Hand
Posts: 598
3
Google App Engine jQuery Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here I modified my code.The result is same again



Jsp Code

[ August 18, 2008: Message edited by: omi sharma ]
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you really not indent any of your code?
 
Bobby Sharma
Ranch Hand
Posts: 598
3
Google App Engine jQuery Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I did indent my code.

Can you clarify my problem , please
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!