Ustore HTML Generic Dial & Call Back Function

1,168 views
Skip to first unread message

tiffany

unread,
Dec 10, 2010, 9:49:19 AM12/10/10
to XMPie Interest Group
We have a sale sheet for a customer that is a giant product list.
There is about 300 products and the customer wants the ability to go
through and turn each one off or on. While we were able to set this up
successfully using 300 ustore dials, the loading and processing time
for this particular product is extremely long and cumbersome for the
user. So we were thinking that we can use the HTML generic dial to set
this up much differently and reduce the processing time.

We have done something similar on a much smaller scale with another
product. The only problem we have not yet solved when using the HTML
Generic Dial is getting the page to remember the dial values if the
user goes to the final proof page and spots an error, then they hit
the back button and they would have to go through and change their
values back again instead of the page remembering the dial values.

We noticed that there is something called a Call Back Function with an
input box when choosing the HTML generic dial. Has anyone used this
call back function? Is there any documentation on how to use it? Do
you think we could used that to solve the above problem? We were
thinking we could possibly use cookies.

Thanks for your help in advance.

Bill

unread,
Dec 10, 2010, 3:02:04 PM12/10/10
to XMPie Interest Group
The CallBack function principle is summarized in the uStore
Administrator's Guide page 210.

In the "CallBack Function" field, just mention the name of a sort of
"virtual" function. I wrote "virtual", as the function's body does not
need to be coded. Just type your favorite function name, such as
"Fnc_MyFavFnc" (it MUST not be any JavaScript reserved keyword).

Now, in the "Markup" field, you will need to write an HTML piece of
code, which will implement your own User Control's object (a "select"
object, in your case?). When this object loses the focus, call your
"Fnc_MyFacFnc" function, providing the appropriate value as parameters
to the function, in order to return the value to uStore.

The object's value initialization can be made thanks to a HTML
"value=" (if appropriate to your object type) or to JavaScript, based
on the #DIAL_VALUE# tag (which uStore's ASP scripts will convert into
the Dial's initial value, when the page is built and loaded into your
browser).

I made a simple sample store, which implements 3 separate "textarea"
objects, with a extra countdown of remaining characters; see www.xmpie.fr/afpa.
I can provide the code by PM.

Igor Vorobeychik

unread,
Dec 10, 2010, 4:04:26 PM12/10/10
to XMPie Interest Group
There is a document that I wrote that describes how to use HTML
Generic control ,
I don't rememberif it is part of the uStore Guide , but you can
request it from support.
Now HTML generic is a very paowerfull toll , unfortunately it require
good knoweledge of JavaScript and HTML DOM.
You have to test it in different browsers ....
So if you have programming skills you can do a very nice things like
be able to show and hide different inut controls based on user
selection .
You can use it to collect multiple values using just one dial that is
link to Variable in the plan (I'd recommmend to check latest uPlan
User guide that explain how to build User View from XML, that's the
esiest way to pass maltiple values but will require to know how to
deal with XML in Javascript on the client side or in the uPlan) .
You can use this control to actually build your own without using .net
programming and follow uStore Plug-in SDK, brining data from your
database ,you can use PHP , Java , Coldfusion ...

You can use this control to embed some flash application ...

There are alos several problems with HTML generic control
1) it cannot be connected to DB like other controls, so you need to do
some AJAX ...
2) You only get samall set of parameters like dial value and dial
name , but you do not know user id , order id , order product
id .....Now if you are really creative you can pass some of thouse
values using master pages or custom headers ...., but I hope we'll
expand this control a bit in the future.

Igor.
> > Thanks for your help in advance.- Hide quoted text -
>
> - Show quoted text -

Bill

unread,
Dec 11, 2010, 4:07:53 PM12/11/10
to XMPie Interest Group
Thanks for the details Igor.
The sample store I mentioned earlier is available at http://www.xmpie.fr/afpa
(the link mentioned in my previous post fails).

tiffany

unread,
Dec 13, 2010, 2:26:25 PM12/13/10
to XMPie Interest Group
Hi Bill,

That is perfect. If you can send the code, that would be quite
helpful!

Thanks so much for your help!

Tiffany

tiffany

unread,
Dec 13, 2010, 2:36:39 PM12/13/10
to XMPie Interest Group
Hi Igor,

Yes we have had very good luck using the HTML generic dial for things
that required more customization than available with regular dials. It
has come in very handy on several occassions. Now we are just trying
to understand how the call back function can help us to reinsert the
user's inputs if they navigate from the page and then go back.

I did ask xmpie support for the document you described above but they
only were able to send me the ustore user guide but it does not give
any detail about the call back function input. They were unfamiliar
with any other documentation relating to this dial customization.

Thanks!
Tiffany
> > - Show quoted text -- Hide quoted text -

Igor Vorobeychik

unread,
Dec 13, 2010, 3:12:11 PM12/13/10
to XMPie Interest Group
no problem I'll send you this doc.
In general xmpie expect you to give name of the function that you
suppose to call as part of your update value script, and pass value to
uStore using this function.As bill stand there is no need to code it
jast call it.

What you alos need to understand that it is your responsibility to
pass to uStore value for the dial via this fucntion.
The way to pass it, is to write your own function that will be called
lets say on some event like on change .


Now value for you controls you are going to passs using "#DIAL_VALUE#"

So for example if you have an input box it can be :

<script type="text/javascript">
function getValAndPassVal()
{
var myval =document.getElementById("myTextBox").value; // this one
gets value
passValue(myval);
}
</script>
<input id="myTextBox" type="text" onchange="getValAndPassVal()"
value="#DIAL_VALUE#">

Now in this example your call back function is passValue . Than uStore
first will load this script it will pass default value whatever it
finds in the dial setup. Once user will change / input value to this
box onchange event will be fiered and my getValAndPassVal() will be
called .
As you can see I'm getting first new value than I'm calling passValue
to pass it to uStore. If user will move forward and than will go back
uStore will pass via #DIAL_VALUE# already new value.

Obviously if you have more controls and more complex values you'll
have to do it a bit different like :

<script type="text/javascript">
function getValAndPassVal()
{
var myval =document.getElementById("myTextBox").value; // this one
gets value
passValue(myval);
}
function setMyVal(param1)
{
// hide or do something
//set value of all controls
document.getElementById("myTextBox").value = param1;
.....
//
}
</script>
<input id="myTextBox" type="text" onchange="getValAndPassVal()"
value="#DIAL_VALUE#">

<script type="text/javascript">
setMyVal("#DIAL_VALUE#");
</script>


as you can see here I'm calling setMayVal and use uStore
"#DIAL_VALUE#" as a parameter , so my fucntion can alos do something
else , like setup other defaults ..

if you have drop down and than inputbox , but you care about inputbox
value but also need setub correctly dropdown that your value can be
or
"option1;sometext" while option1 can tell what option should be
selected and sometext is a text default for input box. Obviously if
your user will use ; as a text you may be in trouble so you can use
xml to pass multiple values .........
Igor.

T Gus

unread,
Dec 13, 2010, 5:22:40 PM12/13/10
to xmpie...@googlegroups.com
Thanks, Igor, for the detailed explanation that you gave in your email, could you please send me a copy of the documentation too! I am very interested in implementing HTML Generic Dial as well.

Best Regards,

TGus

--- On Mon, 12/13/10, Igor Vorobeychik <vori...@gmail.com> wrote:

> --
> You received this message because you are subscribed to the
> Google Groups "XMPie Interest Group" group.
> To post to this group, send email to xmpie...@googlegroups.com.
> To unsubscribe from this group, send email to
> xmpie-users...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/xmpie-users?hl=en.
>
>



Bill

unread,
Dec 14, 2010, 2:57:36 AM12/14/10
to XMPie Interest Group
Done.

007design

unread,
Jan 1, 2011, 4:44:47 PM1/1/11
to XMPie Interest Group
Could I also get a copy of the documentation, please? I'm having the
following problem:
Everything is working perfectly on the web interface as far as
populating the uStore dial via the callback function and populating
the custom control when the user navigates back to the step page.
However, in my plan ADOR I prepends some InDesign Tagged Text tags to
the value from the database but when the user generates a proof the
raw value is being used.

Example:
[Text ADOR]
Expression: "<INDD TAGS>" & |->rawText

Say, for example, I put "my text" into the control on the page. I
want the PDF proof to receive "<INDD TAGS>my text" but it appears to
be receiving "my text". Are the plan ADOR values not evaluated when
using HTML Generic controls? Do I need to prepend my InDesign tags
via Javascript in the Dial Markup before calling the callback
function?

Thanks,
007

007design

unread,
Jan 2, 2011, 10:47:05 AM1/2/11
to XMPie Interest Group
I think I figured it out. I have to define a dial variable in my plan
which gets the HTML Generic control and then use an ADOR that prepends
the tags in my InDesign document. The problem I'm running into now is
when I call the callback function if the user input has any newlines
it causes unterminated string constant errors.

Bill

unread,
Jan 4, 2011, 9:17:48 AM1/4/11
to xmpie...@googlegroups.com
Can you provide more information regarding your JavaScript code, which runs into an error while processing multiline text input, as well as the browser you use?
As you could read at the top of this thread, multiline input might require extra coding, as the "placeholder" used by uStore in the master HTML page uses a "simple" Text input (usually unable to store multiline input).

007design

unread,
Jan 4, 2011, 11:28:42 PM1/4/11
to XMPie Interest Group
my solution was to simply replace newlines with <br> tags before
calling the callback function. seems so obvious but i'd been working
on it for many hours so the simple things were slipping by me.

007design

unread,
Jan 11, 2011, 2:50:44 PM1/11/11
to XMPie Interest Group
If the user generates a proof then goes Back and changes some
information and then clicks Next and generates a new proof the
information is not updated unless one of the changes was on a non-
Generic field.
If I generate a proof, go Back and change the value in one of my HTML
Generic controls, then generate a new proof, it still has the same
information as the previous proof. However, if I then go Back again,
my Generic controls are being properly populated with my new, changed
value so I'm quite sure that the Callback Function is being called
properly.
If I go Back and change the value in one of my non-Generic fields AND
the value in one of my Generic fields, the new proof will be correct
and reflect both changes. It's like a new proof is not being
generated if the only change is to an HTML Generic field.
Might this be a bug? I'm using uStore version 3.1

Thanks,
007

Igor Vorobeychik

unread,
Jan 11, 2011, 3:01:56 PM1/11/11
to XMPie Interest Group
latest uStore is 4.1 and I belive 3.7.1 still supported , please an
upgrade and if you still have an issue open support case.

Bill

unread,
Jan 11, 2011, 3:42:49 PM1/11/11
to xmpie...@googlegroups.com
Mmmm... Strange: I have always been said by XMPie that "bugs" are simply impossible with uStore Generic HTML DUCs, as the JavaScript code is your own responsibility, and cannot be endorsed by XMPie. (*)

(*) Before being read, this 2nd level joke needs to be approved by the Group Administrator. Tim, please...

Your issue might be due to the fact that your input value(s) are not stored back into your HTML objects, when your user moves back into the workflow.
In your JS code, you should try to implement something like the following:

window.onload=function()
{
   document.getElementById("xxx").innerHTML = '#DIAL_VALUE#'
}

007design

unread,
Jan 12, 2011, 9:22:34 AM1/12/11
to XMPie Interest Group
when the user clicks Back, my custom controls are being populated
correctly via #DIAL_VALUE#. the problem i'm having is that if the
user then makes a change to one of these controls, clicks Next and
generates a new proof, the proof still has the OLD values. if they
click Back, make a change to one of the custom controls again AND
change a non-custom control then the new proof will generate with the
correct, updated values in both cases.
it's like changing a custom control doesn't indicate to uStore that it
should re-generate the proof and it is instead serving up the same,
old proof.

thanks,
007

007design

unread,
Jan 12, 2011, 10:11:13 AM1/12/11
to XMPie Interest Group
a cursory investigation of the source shows that the 'qs' query string
value passed to ProofResult.aspx does not change when i make a change
to a custom control but does in fact change when i make a change to a
standard control. this further leads me to believe that the system is
actually serving up the 'old' proof again rather than generating a new
one.
of course, i realize all this could be moot were i not using an old
version of the software but, of course, i'm not the one who does the
purchasing, i'm just the one who's asked to 'make it work'.

thanks,
007

Igor Vorobeychik

unread,
Jan 12, 2011, 10:39:00 AM1/12/11
to XMPie Interest Group
if your are under maintanace any upgrade is free of charge

Shalom Pennington

unread,
Feb 28, 2013, 5:17:03 PM2/28/13
to xmpie...@googlegroups.com
Hi Igor,
I know this is an old post, but hoping you could send the documentation on setting up and using HTML Generic input control for uStore.

Thanks,
- Shalom

Guillaume Besnier

unread,
Feb 28, 2013, 5:25:28 PM2/28/13
to xmpie...@googlegroups.com
HTML Generic are mainly detailed in page 85-86, 260-262 and 424 of the uStore 7.1 User Guide.
I also know a (quite old) XMPie Technote regarding HTML generic controls (see attached).

-------- Message original --------
Sujet: [xmpie-users] Re: Ustore HTML Generic Dial & Call Back Function
De : Shalom Pennington <shal...@gmail.com>
Pour : xmpie...@googlegroups.com
Date : 28/02/2013 23:17
--
You received this message because you are subscribed to the Google Groups "XMPie Interest Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xmpie-users...@googlegroups.com.

To post to this group, send email to xmpie...@googlegroups.com.
Technote - uStore HTML Generic Input Control.pdf
Reply all
Reply to author
Forward
0 new messages