You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Dave <ja...@yahoo.com> on 2006/11/08 23:37:50 UTC

modal dialog help

Hello,
   
  Could anyone help me get started with sandbox modal dialog?
   
  How to open a ModalDialog when clicking a button?
  How to get the value(entered in modal dialog) back to the parent 
window?
   
  Thanks!
  david

 
---------------------------------
Sponsored Link

Mortgage rates near historic lows: $150,000 loan as low as $579/mo. Intro-*Terms

Re: modal dialog help

Posted by Werner Punz <we...@gmx.at>.
Dave schrieb:
> Hi Gerald,
>  
> Thanks, I tried the link several times last week, but it did not work.
> It is working now.
> The demo did not get the values back to the master window. Is there a
> way to see its source code?
>  
Yes the demo is not fully implemented yet, in the main form some values
are not referenced yet over managed beans.
I havent had time to fix this yet, it was more important to fix the
dialog into a working condition.

I will fix it asap to have a better working demo
(asap means probably tomorrow evening)


Re: modal dialog help

Posted by Gerald Müllan <bi...@gmail.com>.
Hi,

yes the server was down for quite a time. Hm..the best way to have a
look at the source code is a fresh checkout of svn head. In the
sandbox module you can found everything you
are looking for. It`s not that difficult to have a look at the examples there.

regards,

Gerald

On 11/14/06, Dave <ja...@yahoo.com> wrote:
> Hi Gerald,
>
> Thanks, I tried the link several times last week, but it did not work. It is
> working now.
> The demo did not get the values back to the master window. Is there a way to
> see its source code?
>
> Thanks,
> Dave
>
> Gerald Müllan <bi...@gmail.com> wrote:
> Hi,
>
> have a look at a working example in action:
>
> http://example.irian.at/example-sandbox-20061113/dojo/dojoDialog.jsf
>
> cheers,
>
> Gerald
>
> On 11/13/06, Dave wrote:
> > Hi Werner,
> >
> > I could not find any dialog demo from sandbox and examples download. Where
> > are the demos?
> >
> > Thanks,
> > Dave
> >
> > Werner Punz wrote:
> > Hi dave the current dialog demo showcases the form and the javascript way.
> > the ppr way is not showcased.
> > If you prefer the javascript way, you can use the current dialog demo to
> > my knowledge as a blueprint!
> >
> >
> >
> > Dave schrieb:
> > > HI Werner,
> > >
> > > Thanks!
> > >
> > > When user clicks a button, a dialog popup for user to select a node from
> > > a tree2.
> > > After user clicks a node, the dialog closes and change the value(tree
> > > path) on the master window. (eg. root > node1 > node11 > node112)
> > >
> > > I prefer the Javascript way because of better user experience.
> > > If you demo all three ways, it would be great!.
> > >
> > > Dave
> > >
> > >
> > > */Werner Punz /* wrote:
> > >
> > > Dave schrieb:
> > > > Hello,
> > > >
> > > > Could anyone help me get started with sandbox modal dialog?
> > > >
> > > > How to open a ModalDialog when clicking a button?
> > > > How t o get the value(entered in modal dialog) back to the parent
> > > > window?
> > > >
> > > I think the best way to get you kickstarted on that one is to check out
> > > the latest trunk sandbox demo!
> > > To open it you simply have to set a small javascript on an onclick (the
> > > javascript var can be defined, otherwise it is automatically determined)
> > >
> > >
> > > Then you have three ways to get the values back:
> > >
> > > a) either use a form submit (from a form within the dialog)
> > > you can use partial page rendering to avoid page refreshes
> > >
> > > b) move the values from the dialog into the master view, the
> > > javascript way
> > >
> > > c) go the full refresh cycle, by simple using jsfs submit mechanisms
> > >
> > > either way, you have to be aware, that the dialog has to be defined
> > > outside of a form, this is a javascript limitation which is caused by a
> > > severe ie positioning bug (the ie expects floating elements at the end
> > > of the begin of a body otherwise the positioning fails under ce rtain
> > > conditions)
> > >
> > > so you have to embed the form element in the dialog if you want to
> > > use it.
> > >
> > > If you have multiple forms on the page, you might consider using the
> > > saveState component or the scope component to preserve the values
> > > outside of the forms affected by the refresh!
> > >
> > > Anyway, if you can wait for a few days I will do a crud example which
> > > utilizes all this (not the dialog but the floating frames which are very
> > > similar) to achieve a rich client behavior within a web ui.
> > > I already have reserved my weekend to do the demo.
> > >
> > >
> > >
> >
> ------------------------------------------------------------------------
> > > Access over 1 million songs - Yahoo! Music Unlimited.
> > >
> > >
> >
> >
> >
> >
> > ________________________________
> > Want to start your own business? Learn how on Yahoo! Small Business.
> >
> >
>
>
> --
> http://www.irian.at
>
> Your JSF powerhouse -
> JSF Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>
>
>  ________________________________
> Everyone is raving about the all-new Yahoo! Mail beta.
>
>


-- 
http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces

Re: modal dialog help

Posted by Dave <ja...@yahoo.com>.
Hi Gerald,
   
  Thanks, I tried the link several times last week, but it did not work. It is working now.
  The demo did not get the values back to the master window. Is there a way to see its source code?
   
  Thanks,
Dave

Gerald Müllan <bi...@gmail.com> wrote:
  Hi,

have a look at a working example in action:

http://example.irian.at/example-sandbox-20061113/dojo/dojoDialog.jsf

cheers,

Gerald

On 11/13/06, Dave wrote:
> Hi Werner,
>
> I could not find any dialog demo from sandbox and examples download. Where
> are the demos?
>
> Thanks,
> Dave
>
> Werner Punz wrote:
> Hi dave the current dialog demo showcases the form and the javascript way.
> the ppr way is not showcased.
> If you prefer the javascript way, you can use the current dialog demo to
> my knowledge as a blueprint!
>
>
>
> Dave schrieb:
> > HI Werner,
> >
> > Thanks!
> >
> > When user clicks a button, a dialog popup for user to select a node from
> > a tree2.
> > After user clicks a node, the dialog closes and change the value(tree
> > path) on the master window. (eg. root > node1 > node11 > node112)
> >
> > I prefer the Javascript way because of better user experience.
> > If you demo all three ways, it would be great!.
> >
> > Dave
> >
> >
> > */Werner Punz /* wrote:
> >
> > Dave schrieb:
> > > Hello,
> > >
> > > Could anyone help me get started with sandbox modal dialog?
> > >
> > > How to open a ModalDialog when clicking a button?
> > > How t o get the value(entered in modal dialog) back to the parent
> > > window?
> > >
> > I think the best way to get you kickstarted on that one is to check out
> > the latest trunk sandbox demo!
> > To open it you simply have to set a small javascript on an onclick (the
> > javascript var can be defined, otherwise it is automatically determined)
> >
> >
> > Then you have three ways to get the values back:
> >
> > a) either use a form submit (from a form within the dialog)
> > you can use partial page rendering to avoid page refreshes
> >
> > b) move the values from the dialog into the master view, the
> > javascript way
> >
> > c) go the full refresh cycle, by simple using jsfs submit mechanisms
> >
> > either way, you have to be aware, that the dialog has to be defined
> > outside of a form, this is a javascript limitation which is caused by a
> > severe ie positioning bug (the ie expects floating elements at the end
> > of the begin of a body otherwise the positioning fails under ce rtain
> > conditions)
> >
> > so you have to embed the form element in the dialog if you want to
> > use it.
> >
> > If you have multiple forms on the page, you might consider using the
> > saveState component or the scope component to preserve the values
> > outside of the forms affected by the refresh!
> >
> > Anyway, if you can wait for a few days I will do a crud example which
> > utilizes all this (not the dialog but the floating frames which are very
> > similar) to achieve a rich client behavior within a web ui.
> > I already have reserved my weekend to do the demo.
> >
> >
> >
> ------------------------------------------------------------------------
> > Access over 1 million songs - Yahoo! Music Unlimited.
> >
> >
>
>
>
>
> ________________________________
> Want to start your own business? Learn how on Yahoo! Small Business.
>
>


-- 
http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces


 	
---------------------------------
Everyone is raving about the all-new Yahoo! Mail beta.

Re: modal dialog help

Posted by Gerald Müllan <bi...@gmail.com>.
Hi,

have a look at a working example in action:

http://example.irian.at/example-sandbox-20061113/dojo/dojoDialog.jsf

cheers,

Gerald

On 11/13/06, Dave <ja...@yahoo.com> wrote:
> Hi Werner,
>
> I could not find any dialog demo from sandbox and examples download. Where
> are the demos?
>
> Thanks,
> Dave
>
> Werner Punz <we...@gmx.at> wrote:
> Hi dave the current dialog demo showcases the form and the javascript way.
> the ppr way is not showcased.
> If you prefer the javascript way, you can use the current dialog demo to
> my knowledge as a blueprint!
>
>
>
> Dave schrieb:
> > HI Werner,
> >
> > Thanks!
> >
> > When user clicks a button, a dialog popup for user to select a node from
> > a tree2.
> > After user clicks a node, the dialog closes and change the value(tree
> > path) on the master window. (eg. root > node1 > node11 > node112)
> >
> > I prefer the Javascript way because of better user experience.
> > If you demo all three ways, it would be great!.
> >
> > Dave
> >
> >
> > */Werner Punz /* wrote:
> >
> > Dave schrieb:
> > > Hello,
> > >
> > > Could anyone help me get started with sandbox modal dialog?
> > >
> > > How to open a ModalDialog when clicking a button?
> > > How t o get the value(entered in modal dialog) back to the parent
> > > window?
> > >
> > I think the best way to get you kickstarted on that one is to check out
> > the latest trunk sandbox demo!
> > To open it you simply have to set a small javascript on an onclick (the
> > javascript var can be defined, otherwise it is automatically determined)
> >
> >
> > Then you have three ways to get the values back:
> >
> > a) either use a form submit (from a form within the dialog)
> > you can use partial page rendering to avoid page refreshes
> >
> > b) move the values from the dialog into the master view, the
> > javascript way
> >
> > c) go the full refresh cycle, by simple using jsfs submit mechanisms
> >
> > either way, you have to be aware, that the dialog has to be defined
> > outside of a form, this is a javascript limitation which is caused by a
> > severe ie positioning bug (the ie expects floating elements at the end
> > of the begin of a body otherwise the positioning fails under ce rtain
> > conditions)
> >
> > so you have to embed the form element in the dialog if you want to
> > use it.
> >
> > If you have multiple forms on the page, you might consider using the
> > saveState component or the scope component to preserve the values
> > outside of the forms affected by the refresh!
> >
> > Anyway, if you can wait for a few days I will do a crud example which
> > utilizes all this (not the dialog but the floating frames which are very
> > similar) to achieve a rich client behavior within a web ui.
> > I already have reserved my weekend to do the demo.
> >
> >
> >
> ------------------------------------------------------------------------
> > Access over 1 million songs - Yahoo! Music Unlimited.
> >
> >
>
>
>
>
>  ________________________________
> Want to start your own business? Learn how on Yahoo! Small Business.
>
>


-- 
http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces

Re: modal dialog help

Posted by Dave <ja...@yahoo.com>.
Hi Werner,
   
  I could not find any dialog demo from sandbox and examples download. Where are the demos? 
   
  Thanks,
Dave

Werner Punz <we...@gmx.at> wrote:
  Hi dave the current dialog demo showcases the form and the javascript way.
the ppr way is not showcased.
If you prefer the javascript way, you can use the current dialog demo to
my knowledge as a blueprint!



Dave schrieb:
> HI Werner,
> 
> Thanks!
> 
> When user clicks a button, a dialog popup for user to select a node from
> a tree2.
> After user clicks a node, the dialog closes and change the value(tree
> path) on the master window. (eg. root > node1 > node11 > node112)
> 
> I prefer the Javascript way because of better user experience.
> If you demo all three ways, it would be great!.
> 
> Dave
> 
> 
> */Werner Punz /* wrote:
> 
> Dave schrieb:
> > Hello,
> >
> > Could anyone help me get started with sandbox modal dialog?
> >
> > How to open a ModalDialog when clicking a button?
> > How t o get the value(entered in modal dialog) back to the parent
> > window?
> >
> I think the best way to get you kickstarted on that one is to check out
> the latest trunk sandbox demo!
> To open it you simply have to set a small javascript on an onclick (the
> javascript var can be defined, otherwise it is automatically determined)
> 
> 
> Then you have three ways to get the values back:
> 
> a) either use a form submit (from a form within the dialog)
> you can use partial page rendering to avoid page refreshes
> 
> b) move the values from the dialog into the master view, the
> javascript way
> 
> c) go the full refresh cycle, by simple using jsfs submit mechanisms
> 
> either way, you have to be aware, that the dialog has to be defined
> outside of a form, this is a javascript limitation which is caused by a
> severe ie positioning bug (the ie expects floating elements at the end
> of the begin of a body otherwise the positioning fails under ce rtain
> conditions)
> 
> so you have to embed the form element in the dialog if you want to
> use it.
> 
> If you have multiple forms on the page, you might consider using the
> saveState component or the scope component to preserve the values
> outside of the forms affected by the refresh!
> 
> Anyway, if you can wait for a few days I will do a crud example which
> utilizes all this (not the dialog but the floating frames which are very
> similar) to achieve a rich client behavior within a web ui.
> I already have reserved my weekend to do the demo.
> 
> 
> ------------------------------------------------------------------------
> Access over 1 million songs - Yahoo! Music Unlimited.
> 
> 



 
---------------------------------
Want to start your own business? Learn how on Yahoo! Small Business.

Re: modal dialog help

Posted by Werner Punz <we...@gmx.at>.
Hi dave the current dialog demo showcases the form and the javascript way.
the ppr way is not showcased.
If you prefer the javascript way, you can use the current dialog demo to
my knowledge as a blueprint!



Dave schrieb:
> HI Werner,
>  
> Thanks!
>  
> When user clicks a button, a dialog popup for user to select a node from
> a tree2.
> After user clicks a node, the dialog closes and change the value(tree
> path) on the master window.  (eg.  root > node1 > node11 > node112)
>  
> I prefer the Javascript way because of better user experience.
> If you demo all three ways, it would be great!.
>  
> Dave
> 
> 
> */Werner Punz <we...@gmx.at>/* wrote:
> 
>     Dave schrieb:
>     > Hello,
>     >
>     > Could anyone help me get started with sandbox modal dialog?
>     >
>     > How to open a ModalDialog when clicking a button?
>     > How t o get the value(entered in modal dialog) back to the parent
>     > window?
>     >
>     I think the best way to get you kickstarted on that one is to check out
>     the latest trunk sandbox demo!
>     To open it you simply have to set a small javascript on an onclick (the
>     javascript var can be defined, otherwise it is automatically determined)
> 
> 
>     Then you have three ways to get the values back:
> 
>     a) either use a form submit (from a form within the dialog)
>     you can use partial page rendering to avoid page refreshes
> 
>     b) move the values from the dialog into the master view, the
>     javascript way
> 
>     c) go the full refresh cycle, by simple using jsfs submit mechanisms
> 
>     either way, you have to be aware, that the dialog has to be defined
>     outside of a form, this is a javascript limitation which is caused by a
>     severe ie positioning bug (the ie expects floating elements at the end
>     of the begin of a body otherwise the positioning fails under ce rtain
>     conditions)
> 
>     so you have to embed the form element in the dialog if you want to
>     use it.
> 
>     If you have multiple forms on the page, you might consider using the
>     saveState component or the scope component to preserve the values
>     outside of the forms affected by the refresh!
> 
>     Anyway, if you can wait for a few days I will do a crud example which
>     utilizes all this (not the dialog but the floating frames which are very
>     similar) to achieve a rich client behavior within a web ui.
>     I already have reserved my weekend to do the demo.
> 
> 
> ------------------------------------------------------------------------
> Access over 1 million songs - Yahoo! Music Unlimited.
> <http://pa.yahoo.com/*http://us.rd.yahoo.com/evt=36035/*http://music.yahoo.com/unlimited/>
> 


Re: modal dialog help

Posted by Dave <ja...@yahoo.com>.
HI Werner,
   
  Thanks!
   
  When user clicks a button, a dialog popup for user to select a node from a tree2.
  After user clicks a node, the dialog closes and change the value(tree path) on the master window.  (eg.  root > node1 > node11 > node112)
   
  I prefer the Javascript way because of better user experience.
  If you demo all three ways, it would be great!.
   
  Dave
  

Werner Punz <we...@gmx.at> wrote:
  Dave schrieb:
> Hello,
> 
> Could anyone help me get started with sandbox modal dialog?
> 
> How to open a ModalDialog when clicking a button?
> How to get the value(entered in modal dialog) back to the parent
> window?
> 
I think the best way to get you kickstarted on that one is to check out
the latest trunk sandbox demo!
To open it you simply have to set a small javascript on an onclick (the
javascript var can be defined, otherwise it is automatically determined)


Then you have three ways to get the values back:

a) either use a form submit (from a form within the dialog)
you can use partial page rendering to avoid page refreshes

b) move the values from the dialog into the master view, the javascript way

c) go the full refresh cycle, by simple using jsfs submit mechanisms

either way, you have to be aware, that the dialog has to be defined
outside of a form, this is a javascript limitation which is caused by a
severe ie positioning bug (the ie expects floating elements at the end
of the begin of a body otherwise the positioning fails under certain
conditions)

so you have to embed the form element in the dialog if you want to use it.

If you have multiple forms on the page, you might consider using the
saveState component or the scope component to preserve the values
outside of the forms affected by the refresh!

Anyway, if you can wait for a few days I will do a crud example which
utilizes all this (not the dialog but the floating frames which are very
similar) to achieve a rich client behavior within a web ui.
I already have reserved my weekend to do the demo.



 
---------------------------------
Access over 1 million songs - Yahoo! Music Unlimited.

Re: modal dialog help

Posted by Werner Punz <we...@gmx.at>.
Dave schrieb:
> Hello,
>   
>   Could anyone help me get started with sandbox modal dialog?
>   
>   How to open a ModalDialog when clicking a button?
>   How to get the value(entered in modal dialog) back to the parent
> window?
>   
I think the best way to get you kickstarted on that one is to check out
the latest trunk sandbox demo!
To open it you simply have to set a small javascript on an onclick (the
javascript var can be defined, otherwise it is automatically determined)


Then you have three ways to get the values back:

a) either use a form submit (from a form within the dialog)
you can use partial page rendering to avoid page refreshes

b) move the values from the dialog into the master view, the javascript way

c) go the full refresh cycle, by simple using jsfs submit mechanisms

either way, you have to be aware, that the dialog has to be defined
outside of a form, this is a javascript limitation which is caused by a
severe ie positioning bug (the ie expects floating elements at the end
of the begin of a body otherwise the positioning fails under certain
conditions)

so you have to embed the form element in the dialog if you want to use it.

If you have multiple forms on the page, you might consider using the
saveState component or the scope component to preserve the values
outside of the forms affected by the refresh!

Anyway, if you can wait for a few days I will do a crud example which
utilizes all this (not the dialog but the floating frames which are very
similar) to achieve a rich client behavior within a web ui.
I already have reserved my weekend to do the demo.