I realized I am not doing a good job at explaining what I am looking
for(partially cause I am new to all this).
I have treeModel that contains the whole tree and all information in an
application context. I have a treebean that usually just passes the ids
of the treenodes back in the tree.jsp so tree.jsp has no knowledge of
any folderBeans as that would be too much I think and unnecessary. When
the action is called for the treeBean, I want to populate the folderBean
that is going to be used by editFolder.jsp, but alas there is no
folderBean at this point. I need my treeBean action method to create
the folderBean such that when editFolder.jsp is used, it uses that newly
created bean. Is something like this possible? Is that bean need to be
session scoped or can I do request scope?
thanks,
dean
Dean Hiller wrote:
I am not sure I understand. In treeBean, how do I get a
folderBean(that will be created if it doesn't exist). I was looking at
FacestContext
ExternalContext
I could not find any methods that I can use to look up
"folderBean"(and create a FolderBean if one doesn't exist), but I
suppose I am just missing this. Could you point me to the method?
LASTLY, can this bean be request scoped in this case then? it sounds
like it to me, but I am a newb in this stuff.
thanks,
dean
Ricardo Tercero Lozano wrote:
In order to send information from one bean to another you can use the
variable resover or the value binding. When the action to navigate
from tree.jsp to editFolder.jsp, you can locate the folderBean (if it
doesn't exist it'll be created) and set the data you want to send.
On 3/30/06, *Dean Hiller* <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:
I am have this
treeBean -> tree.jsp
folderBean -> editFolder.jsp
When someone click on the tree.jsp, I need to fill in the folderBean
with the folderName, folderId, and folderDescription
properties. What
is the best design for this? I am quite the newb to all this. I am
thinking session state right now is easiest, and I retrieve the
folderBean in treeBean.editFolder() action method and fill it in, so
when editFolder.jsp renders, it renders with the correct data.
Please
suggest alternatives and what you think is the best.
Lastly, what about dealing with someone who opens up two
windows(which
would be in the same session). Couldn't he possibly step on himself
since I am storing this stuff in the session above?
thanks,
dean