My mistake. You're saying that the dialog box doesn't show the values. I lost 
that key point in this long trail.

The root of the problem is that the dialog box is a mixin on the submit. Its 
message content is rendered by the page, at which time the fields used in the 
message are empty.

You need to either (a) listen to changes in the 2 fields and modify the message 
before submit is pressed; or (b) remove the mixin, allow an AJAX submit to take 
place, and return a zone with a dialog in it.

Off the top of my head, option (a) requires either:

- Write JavaScript. It might not work because the mixin probably (I don't know) 
reads the message at instantiation (which is too early) as opposed to reading 
it from the DOM when submit is clicked.

- Use the Observe mixin and return a Zone around the Submit. I've never 
returned a Zone around a Submit but I suspect it might mess up the Form's 
operation - you'd have to try it and see.

Option (b) is pretty easy. It's analogous to what's done here, except the page 
would use Submit instead of EventLink...

        
http://jumpstart.doublenegative.com.au/jumpstart7/examples/javascript/modal/1
        
http://jumpstart.doublenegative.com.au/jumpstart7/examples/javascript/reusablemodal/1

...and if you want to keep the "create" logic in the page, not the dialog, then 
on Confirm from the dialog the server-side should bubble up an event to the 
page and let the page do the create. 

BTW, when there is a business action to be done, there's ALWAYS an exception 
flow. What do you want to see if "create ticket" fails?

On 18 Oct 2014, at 1:21 pm, Name Surname <wintertime0...@outlook.com> wrote:

> Hi Geoff! :)
> 
>> Subject: Re: Calling property in t:message
>> From: geoff.callender.jumpst...@gmail.com
>> Date: Sat, 18 Oct 2014 13:09:09 +1100
>> To: users@tapestry.apache.org
>> 
>> You still have not described the flow (of interaction with the user), so 
>> please answer the following questions.
>> 
>> I'm guessing that after choosing Confirm (possibly a button labeled "OK"), 
>> you want to display the entry page again, with the entered values, overlayed 
>> by a alert that says the thing has been created. Is that right?
>> 
> 
> No. What I want is after I filled up a form and pressed jquery/confirm
> <t:submit class="form-control" t:isResizble="true"  t:message="Do you want to 
> create a ticket? ${broj} ${datum}" t:mixins="jquery/Confirm">
> 
> I get Dialog box with a message " Do you want to create a ticket? ${broj} 
> ${datum} " in that box where ${broj} and ${datum} will have it's values and 
> not 0 and null like it is now.( they aren't yet set in this stage )
> 
> 
>> If no, then please describe what you want instead.
>> If yes, would the entry page now be in "update" mode or still in "create" 
>> mode? Do you want the previously entered fields to be editable or disabled? 
>> This next question is less important but it might help: what is the "thing" 
>> that you're creating?
> 
> It's only a confirm button which calls dialog box in which values are 
> retrieved from a form. If it's yet unclear I can make a screenshots.
> 
>> What about the exception flow, eg. if the create fails, what should happen? 
>> For example, should an error be displayed in the dialog, or should the 
>> dialog disappear and the error be shown in the entry page? If it's the entry 
>> page, should it still be in "create" mode with the same fields editable?
> 
> There is no exception flow. Everything works just fine except showing proper 
> values for the fields datum and broj in Dialog box( is run only after I click 
> on  <t:submit class="form-control" t:isResizble="true"  t:message="Do you 
> want to create a ticket? ${broj} ${datum}" t:mixins="jquery/Confirm"> )
> 
> 
> 
>                                         


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to