@Reijn: I am still not that familiar with cocoon. I would be kind, if you
could post the sourcecode, of how to fetch the value.
Thanks a lot
regards,
Niclas
Jeroen Reijn wrote:
>
> Niclas,
>
> now I understood what went wrong before.
> Try fetching the value after putting the namespace in front the attribute:
>
> <fd:submit id="link-contributionDOT2">
> <fd:label>Datenbankkomprimierung</fd:label>
> <fd:attributes>
> <fd:attribute name="objectType" value="link-contribution" />
> <fd:attribute name="id" value="2" />
> </fd:attributes>
> </fd:submit>
>
> Does this help? I tried it with cocoon 2.1.10 and it seems to work.
>
> Kind regards,
>
> Reijn
>
>
> ZongoZongo wrote:
>> Yea, that sounds great. Sadly I get a null value forr the "var attribute"
>> :-(
>>
>> Thats one of my widgets:
>>
>> <fd:submit id="link-contributionDOT2">
>> <fd:label>Datenbankkomprimierung</fd:label>
>> <fd:attributes>
>> <attribute name="objectType" value="link-contribution" />
>> <attribute name="id" value="2" />
>> </fd:attributes>
>> </fd:submit>
>>
>> Why is this so difficult :-D
>>
>> Niclas
>>
>>
>>
>>
>> Simone Gianni-2 wrote:
>>> ZongoZongo wrote:
>>>> The Problem is, that the forms are generated dynamically. So i dont now
>>>> which
>>>> buttons eaven exists.
>>>>
>>> Hi Niclas,
>>> you can write the following :
>>>
>>> var buttonid = form.submitId;
>>> var widget = form.lookupWidget(buttonid);
>>> var attribute = widget.getAttribute("myattribute");
>>>
>>> More or less .. :) I don' t have the code by hand, but that's the idea.
>>>
>>> Simone
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>>> For additional commands, e-mail: users-help@cocoon.apache.org
>>>
>>>
>>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/which-submitbutton-was-pressed--tf2795896.html#a7832696
Sent from the Cocoon - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
|