Stupid ? re dialog data

2006-07-27 Thread Sean Comerford
I've had no problem setting up a dialog but I can't figure out how to use
the dialog scoped data. I need a simple example I guess...

So assuming the following dialog:


  

  
  


  
  


I want to have a text input with a value bound to #{dialog.data.name} in
step1.jsp so I can refer to it in step2.jsp

But if, in step1.jsp, I just try:


Re: Stupid ? re dialog data

2006-07-27 Thread David Geary

You have to set up the dialog data yourself. One way to do that is with an
action state as the starting state for a dialog; for example:

 
   
  
   

   
   
 
   
...
  


The Setup state is an action state, so it invokes
dialogLauncher.setupPaymentDialog(), which returns a string that Shale
immediately uses as an outcome.

Here's the method:

public class DialogLauncher extends AbstractFacesBean {
   public String setupPaymentDialog() {
  // Create billpay data
  billpayData = new BillpayData();

  // Set dialog data with the handy setValue method
  // from org.apache.shale.view.AbstractFacesBean
  setValue("#{dialog.data}", billpayData);

  // This outcome takes us to the payment dialog's
  // first view state
  return "success";
   }
}

In my views, I have fields wired to my dialog.data:




david

2006/7/27, Sean Comerford <[EMAIL PROTECTED]>:


I've had no problem setting up a dialog but I can't figure out how to use
the dialog scoped data. I need a simple example I guess...

So assuming the following dialog:


  

  
  


  
  


I want to have a text input with a value bound to #{dialog.data.name} in
step1.jsp so I can refer to it in step2.jsp

But if, in step1.jsp, I just try:


Re: Stupid ? re dialog data

2006-07-29 Thread Sean Schofield

Welcome back to Shale David!  :-)

Sean

On 7/27/06, David Geary <[EMAIL PROTECTED]> wrote:

You have to set up the dialog data yourself. One way to do that is with an
action state as the starting state for a dialog; for example:

  

   




  

...
   


The Setup state is an action state, so it invokes
dialogLauncher.setupPaymentDialog(), which returns a string that Shale
immediately uses as an outcome.

Here's the method:

public class DialogLauncher extends AbstractFacesBean {
public String setupPaymentDialog() {
   // Create billpay data
   billpayData = new BillpayData();

   // Set dialog data with the handy setValue method
   // from org.apache.shale.view.AbstractFacesBean
   setValue("#{dialog.data}", billpayData);

   // This outcome takes us to the payment dialog's
   // first view state
   return "success";
}
}

In my views, I have fields wired to my dialog.data:




david

2006/7/27, Sean Comerford <[EMAIL PROTECTED]>:
>
> I've had no problem setting up a dialog but I can't figure out how to use
> the dialog scoped data. I need a simple example I guess...
>
> So assuming the following dialog:
>
> 
>   
> 
>   
>   
> 
> 
>   
>   
> 
>
> I want to have a text input with a value bound to #{dialog.data.name} in
> step1.jsp so I can refer to it in step2.jsp
>
> But if, in step1.jsp, I just try:
>
>