You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Luka Surija <lu...@iytim.hr> on 2007/08/24 12:53:46 UTC

[Trinidad] XMLMenuModel bug

If found pretty dummy bug in XMLMenuModel.

If I call an action method trough XMLMenuModel then the method is 
executed, but no navigation is executed.


WorkingTaskAdmin:

public String addNewWorkingTask(){
        sessionBean.addNewWorkingTask();
        return "service:workingTaskWizard"; -- invoking in 
tr:commandMenuItem  act as where "return null;"
    }

menu-model.xml:

<itemNode id="menu241" label="#{mnl.newWorkingTask}" 
action="#{WorkingTaskAdmin.addNewWorkingTask}" 
focusViewId="/service/workingTaskWizard.xhtml" />


but if i press this button then everything works as expected.
 <tr:commandButton text="#{msg.new_label}" 
action="#{WorkingTaskAdmin.addNewWorkingTask}" />


I'm using trinidad 1.0.3-core trunk.

Re: [Trinidad] XMLMenuModel bug

Posted by Adam Winer <aw...@gmail.com>.
Looking at it again, I've no idea how this could happen.
validatorArray should always be non-null.  I'll add some
defensive code, but I can't imagine why you're seeing
this.

-- Adam


On 8/24/07, Adam Winer <aw...@gmail.com> wrote:
> Looks like a generic (and very simple) issue with some of the
> client-side validation changes I've made.  I'll fix this.
>
> -- Adam
>
>
>
> On 8/24/07, Luka Surija <lu...@iytim.hr> wrote:
> > Actually nothing happens, I've found that Firebug is displaying this
> > error message:
> >
> > validatorArray has no properties:
> >
> > _multiValidate(form#j_id1 index.xhtml, "j_id5:0:j_id6", ["j_id28", 0,
> > undefined, 17 more...])Common1_0_3.js (line 5248)
> > _validateInline(form#j_id1 index.xhtml, "j_id5:0:j_id6", ["j_id28", 0,
> > undefined, 17 more...])Common1_0_3.js (line 4589)
> > _j_id1Validator(form#j_id1 index.xhtml, "j_id5:0:j_id6")index.xhtml
> > (line 245)
> > _validateForm(form#j_id1 index.xhtml, "j_id5:0:j_id6")Common1_0_3.js
> > (line 4508)
> > submitForm(form#j_id1 index.xhtml, 1, Object source=j_id5:0:j_id6,
> > undefined)Common1_0_3.js (line 4765)
> > onclick(click clientX=0, clientY=0)index.xhtml (line 1)
> > for(var j=0;j<validatorArray.length;j=j+1)
> >
> >
> >
> > Luka Surija wrote:
> > > If found pretty dummy bug in XMLMenuModel.
> > >
> > > If I call an action method trough XMLMenuModel then the method is
> > > executed, but no navigation is executed.
> > >
> > >
> > > WorkingTaskAdmin:
> > >
> > > public String addNewWorkingTask(){
> > >        sessionBean.addNewWorkingTask();
> > >        return "service:workingTaskWizard"; -- invoking in
> > > tr:commandMenuItem  act as where "return null;"
> > >    }
> > >
> > > menu-model.xml:
> > >
> > > <itemNode id="menu241" label="#{mnl.newWorkingTask}"
> > > action="#{WorkingTaskAdmin.addNewWorkingTask}"
> > > focusViewId="/service/workingTaskWizard.xhtml" />
> > >
> > >
> > > but if i press this button then everything works as expected.
> > > <tr:commandButton text="#{msg.new_label}"
> > > action="#{WorkingTaskAdmin.addNewWorkingTask}" />
> > >
> > >
> > > I'm using trinidad 1.0.3-core trunk.
> > >
> >
> >
>

Re: [Trinidad] XMLMenuModel bug

Posted by Adam Winer <aw...@gmail.com>.
Looks like a generic (and very simple) issue with some of the
client-side validation changes I've made.  I'll fix this.

-- Adam



On 8/24/07, Luka Surija <lu...@iytim.hr> wrote:
> Actually nothing happens, I've found that Firebug is displaying this
> error message:
>
> validatorArray has no properties:
>
> _multiValidate(form#j_id1 index.xhtml, "j_id5:0:j_id6", ["j_id28", 0,
> undefined, 17 more...])Common1_0_3.js (line 5248)
> _validateInline(form#j_id1 index.xhtml, "j_id5:0:j_id6", ["j_id28", 0,
> undefined, 17 more...])Common1_0_3.js (line 4589)
> _j_id1Validator(form#j_id1 index.xhtml, "j_id5:0:j_id6")index.xhtml
> (line 245)
> _validateForm(form#j_id1 index.xhtml, "j_id5:0:j_id6")Common1_0_3.js
> (line 4508)
> submitForm(form#j_id1 index.xhtml, 1, Object source=j_id5:0:j_id6,
> undefined)Common1_0_3.js (line 4765)
> onclick(click clientX=0, clientY=0)index.xhtml (line 1)
> for(var j=0;j<validatorArray.length;j=j+1)
>
>
>
> Luka Surija wrote:
> > If found pretty dummy bug in XMLMenuModel.
> >
> > If I call an action method trough XMLMenuModel then the method is
> > executed, but no navigation is executed.
> >
> >
> > WorkingTaskAdmin:
> >
> > public String addNewWorkingTask(){
> >        sessionBean.addNewWorkingTask();
> >        return "service:workingTaskWizard"; -- invoking in
> > tr:commandMenuItem  act as where "return null;"
> >    }
> >
> > menu-model.xml:
> >
> > <itemNode id="menu241" label="#{mnl.newWorkingTask}"
> > action="#{WorkingTaskAdmin.addNewWorkingTask}"
> > focusViewId="/service/workingTaskWizard.xhtml" />
> >
> >
> > but if i press this button then everything works as expected.
> > <tr:commandButton text="#{msg.new_label}"
> > action="#{WorkingTaskAdmin.addNewWorkingTask}" />
> >
> >
> > I'm using trinidad 1.0.3-core trunk.
> >
>
>

Re: [Trinidad] XMLMenuModel bug

Posted by Luka Surija <lu...@iytim.hr>.
Any idea?


Luka Surija wrote:
> Actually nothing happens, I've found that Firebug is displaying this 
> error message:
>
> validatorArray has no properties:
>
> _multiValidate(form#j_id1 index.xhtml, "j_id5:0:j_id6", ["j_id28", 0, 
> undefined, 17 more...])Common1_0_3.js (line 5248)
> _validateInline(form#j_id1 index.xhtml, "j_id5:0:j_id6", ["j_id28", 0, 
> undefined, 17 more...])Common1_0_3.js (line 4589)
> _j_id1Validator(form#j_id1 index.xhtml, "j_id5:0:j_id6")index.xhtml 
> (line 245)
> _validateForm(form#j_id1 index.xhtml, "j_id5:0:j_id6")Common1_0_3.js 
> (line 4508)
> submitForm(form#j_id1 index.xhtml, 1, Object source=j_id5:0:j_id6, 
> undefined)Common1_0_3.js (line 4765)
> onclick(click clientX=0, clientY=0)index.xhtml (line 1)
> for(var j=0;j<validatorArray.length;j=j+1)
>
>
>
> Luka Surija wrote:
>> If found pretty dummy bug in XMLMenuModel.
>>
>> If I call an action method trough XMLMenuModel then the method is 
>> executed, but no navigation is executed.
>>
>>
>> WorkingTaskAdmin:
>>
>> public String addNewWorkingTask(){
>>        sessionBean.addNewWorkingTask();
>>        return "service:workingTaskWizard"; -- invoking in 
>> tr:commandMenuItem  act as where "return null;"
>>    }
>>
>> menu-model.xml:
>>
>> <itemNode id="menu241" label="#{mnl.newWorkingTask}" 
>> action="#{WorkingTaskAdmin.addNewWorkingTask}" 
>> focusViewId="/service/workingTaskWizard.xhtml" />
>>
>>
>> but if i press this button then everything works as expected.
>> <tr:commandButton text="#{msg.new_label}" 
>> action="#{WorkingTaskAdmin.addNewWorkingTask}" />
>>
>>
>> I'm using trinidad 1.0.3-core trunk.
>>
>
>


Re: [Trinidad] XMLMenuModel bug

Posted by Luka Surija <lu...@iytim.hr>.
Actually nothing happens, I've found that Firebug is displaying this 
error message:

validatorArray has no properties:

_multiValidate(form#j_id1 index.xhtml, "j_id5:0:j_id6", ["j_id28", 0, 
undefined, 17 more...])Common1_0_3.js (line 5248)
_validateInline(form#j_id1 index.xhtml, "j_id5:0:j_id6", ["j_id28", 0, 
undefined, 17 more...])Common1_0_3.js (line 4589)
_j_id1Validator(form#j_id1 index.xhtml, "j_id5:0:j_id6")index.xhtml 
(line 245)
_validateForm(form#j_id1 index.xhtml, "j_id5:0:j_id6")Common1_0_3.js 
(line 4508)
submitForm(form#j_id1 index.xhtml, 1, Object source=j_id5:0:j_id6, 
undefined)Common1_0_3.js (line 4765)
onclick(click clientX=0, clientY=0)index.xhtml (line 1)
for(var j=0;j<validatorArray.length;j=j+1)



Luka Surija wrote:
> If found pretty dummy bug in XMLMenuModel.
>
> If I call an action method trough XMLMenuModel then the method is 
> executed, but no navigation is executed.
>
>
> WorkingTaskAdmin:
>
> public String addNewWorkingTask(){
>        sessionBean.addNewWorkingTask();
>        return "service:workingTaskWizard"; -- invoking in 
> tr:commandMenuItem  act as where "return null;"
>    }
>
> menu-model.xml:
>
> <itemNode id="menu241" label="#{mnl.newWorkingTask}" 
> action="#{WorkingTaskAdmin.addNewWorkingTask}" 
> focusViewId="/service/workingTaskWizard.xhtml" />
>
>
> but if i press this button then everything works as expected.
> <tr:commandButton text="#{msg.new_label}" 
> action="#{WorkingTaskAdmin.addNewWorkingTask}" />
>
>
> I'm using trinidad 1.0.3-core trunk.
>