:26 -0300, Javix <[hidden
> email]<http://user/SendEmail.jtp?type=node&node=5547946&i=0>>
> wrote:
>
> > I don't really know, the method signature was defined as void that's why
> > I'm asking. And as it is void, in java these methods can not
; On Thu, 08 Mar 2012 12:17:47 -0300, Javix <[hidden
> email]<http://user/SendEmail.jtp?type=node&node=5547914&i=0>>
> wrote:
>
> > Is it possible to redirect to another page from inside a void method
> > annotated as follows:
>
> Does it really need to
Is it possible to redirect to another page from inside a void method
annotated as follows:
@OnEvent(value = EventConstants.ACTIVATE)
public void initPage(Object[] parameters) {
if(something goes wrong) {
redirect to home page
}
}
Thank you
--
View this message
I can't figure out how to set (force) the default locale value. here is what
I added to my service module:
[code]
{
...
configuration.add(SymbolConstants.SUPPORTED_LOCALES, "en,de,fr");
...
public void
contributeComponentRequestHandler(OrderedConfiguration
configuration) {
configuration.add
Could you tell in which place exactly did you place the new prototype.js
file? Thanks
--
View this message in context:
http://tapestry.1045711.n5.nabble.com/Tapestry-5-with-Prototype-1-7-tp3288189p5469538.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
The link is broken :(((
https://github.com/hlship/tapx/blob/master/tapx-prototype/src/main/resources/com/howardlewisship/tapx/prototype/tapestry-js-fixes.js
--
View this message in context:
http://tapestry.1045711.n5.nabble.com/Re-Prototype-IE9-update-tp4331824p5469075.html
Sent from the Tapestr
I found why it didn't work. I just replaced:
Tapestry.Initializer.load = function loadPass(jsonObject){
}
with
Tapestry.Initializer.loadPass = function loadPass(jsonObject){
...
}
I believed that 'load' was a maethod to call on Tapestry.Initializer
object(unfortunately T API says
One more question:
How to trigger the exectution of js function. For exmaple, before the code
was like that directly n the tml page:
Some hard-coded
meessage
Finally I got it working by adding as you told:
Tapestry.Initializer.load = function load(jsonObject){
..
errorText.text(jsonObject.m1)
}
and ot in the very begining of the call:
jQuery(document).bind(Tapestry.ZONE_UPDATED_EVENT, function(e){
//load(m1,m2,m3,m4,m5,m6,m7,m8,m9,m10,m11,m
It didn't work:
Oups ... org.apache.tapestry5.runtime.ComponentEventException: A component
event handler method returned the value
MultiZoneUpdate[{page=org.apache.tapestry5.corelib.components.Zone@1799a64,
May it's because in the javascript file the call to the load fucntion is
made lie that:
I discovered that in the real application that was made in one only
language(the client' one), there is a URLRewriterRule with
SimpleRequestWrapper in use. So I have to change a little bit my question:
what is the best way to implement the possibility to swith between locales
in this case taking in
I have a strange behavior when usin the above methods to add javascript from
inside Java classes.
When I use the first one like this:
//java class
@Inject
private Messages messages;
@Environmental
private RenderSupport renderSupport;
@BeginRender
void addJsLibs() {
Strin
Could anybody explaine how to remove the generated by Tapestry locale prefix
in the url or just avoid id?
When switching the locale like this(took from the very known exmaple):
public class Layout {
@Inject
private PersistentLocale persistentLocale;
@Inject
private Locale currentLocal
Yes, I see. I'll try to replace the arguments I passed before to my JS
function by JSON object.
P.S. The difference is that in RoR you can embed Ruby code inside js files.
--
View this message in context:
http://tapestry.1045711.n5.nabble.com/inject-i18-text-in-javascript-variables-jQuery-tp50943
@Chris: thanks again and sorry for my tone of sharpness regarding the
community activity.
I watched JSON technics. As far as I got it, it is just a container to keep
your data, like a hash. So what is advantages to use it instead of
'renderSupport.addScript(js);' where I constructed the js function
Thanks again, after escaping single quote it worked for me.
As for JSON, I'l take a try and come back if I ever have some questions; For
the moment it is not so clear (really I never did it) how to get JSON values
in a JS function. One more question to google for.
--
View this message in context:
Thank you for the info. Two more questions:
1. In the page TML the call to the abov JS fucntion was done in on 'IF'
loadPath();
...
Can I add the same condition to the abov addJsLibs method:
@BeginRender
void addJsLibs() {
if (error) {
String js = String.format("loadPas
AH, OK, I see. Thank you for the attention.
As for JSON, I have no idea how to use it, especially when I'm on Tapestry
5.1.5 :(
--
View this message in context:
http://tapestry.1045711.n5.nabble.com/inject-i18-text-in-javascript-variables-jQuery-tp5094388p5097160.html
Sent from the Tapestry - Use
Could you indicate where exactly I have to escape single quotes, please,
here:
String js = String.format("loadPass('%s','%s','%s','%s','%s');", m1, m2, m3,
m4, m5);
Thks
--
View this message in context:
http://tapestry.1045711.n5.nabble.com/inject-i18-text-in-javascript-variables-jQuery-tp5094
Unfortunately no one gave a good solution how to achieve the same
functionality from Java code.
So, finally, there 2 solutions, both are working for me.
1. Declare the needed variables insode a tml page like that:
Like that we are passing the needed translations to the js function.
2. Copy-p
I think I know why it doesn't work properly.
1. I add a js function from inside the java class using
[code]
String m1 = messages.get("js_error_password_not_given");
String m2 = messages.get("js_error_no_confirmed_password");
String m3 = messages.get("js_error_password_not_matched");
21 matches
Mail list logo