Hi Priti,
I just got a chance to try this out and see the same results that you
describe.
However, I see the same results if I remove the if and keep the #{}
binding that you pointed out is causing the problem. There log messages
that indicate that the binding couldn't be resolved.
I believe what is happening is that it is attempting to store the
submitted value according to the ValueBinding, but it failing. This
causes the request to complete before the "invoke" phase (where the
commands are processed). This is done intentially by JSF so that the
page can be refreshed with an error message.
Try adding:
<sun:messageGroup />
Right under the <sun:form> tag... you'll see the error.
Ken
Priti Tiwary wrote:
> Hi Ken,
> I have been digging into the presence of if and hyperlink for quite some
> time.
> see one very simple example , if placed in admin-jsf/src/docroot/jbi/inc
> does not execute command if there is any processing in the true branch,
> but processes the command if there is no processing in true and false
> could have any/many..
>
>
> <sun:page>
> <sun:html>
> <sun:head id="head" />
> <sun:body>
> <sun:form id="form">
>
> <!if false>
> <sun:hidden id="abc"
> />
> </!if>
> <!if false>
> <sun:hidden id="efg"
> />
> </!if>
>
> <!if true>
> <sun:hidden id="ijk"
>
> *value="#{Proto.deploymentsTableData}"*/> // its presence causes no
> execution of command handler..
>
> </!if>
>
> <sun:hyperlink text="Go!" >
> <!command
> getUIComponent(clientId="form"
> component=>$attribute{comp})
> />
> </sun:hyperlink>
> </sun:form>
> </sun:body>
> </sun:html>
> </sun:page>
>
> priti
>
> Ken Paulsen wrote On 09/27/06 10:47 PM,:
>
>
>> Hi Priti,
>>
>> From your example, it looks like I misunderstood your voicemail. I
>> don't see you using an "if" *inside* a button/hyperlink. The way you
>> are using it looks valid, I will look into this more to see what's going on.
>>
>> Ken
>>
>> Priti Tiwary wrote:
>>
>>
>>
>>> Hi Ken,
>>> I wanted to execute a command handler when a hyperlink/button is clicked.
>>> I was not able to break in the command handlers
>>> starting from scratch to see what was causing the code not to reach there.
>>> i discovered the presence of if components prohibited that
>>> I am attaching a small example.
>>> If you put the attached example in the admin-jsf/src/docroot/jbi/inc
>>> dir, and go to list JBI Deployments node, after setting breakpoint at
>>> the getUIComponent handler, you will observe the following"
>>> 1)when the if statements are removed , the code breaks at getUIComponent
>>> 2)and If stmts are present, nothing happens..
>>>
>>> What is wrong which i need to correct for the handler to get executed
>>> even when the ifs are present in the page
>>> Priti
>>>
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>> $attribute{tableRowGroup}); />
>>>
>>>
>>>
>
>