You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Zied Hamdi (JIRA)" <de...@myfaces.apache.org> on 2007/06/13 18:35:26 UTC
[jira] Created: (TOBAGO-424) possibility to have a onclick event on
a sheet column
possibility to have a onclick event on a sheet column
-----------------------------------------------------
Key: TOBAGO-424
URL: https://issues.apache.org/jira/browse/TOBAGO-424
Project: MyFaces Tobago
Issue Type: Improvement
Affects Versions: 1.0.10
Environment: not applicable: on checking the generated source I don't have the text onclick="alert('clicked');"
Reporter: Zied Hamdi
Priority: Blocker
I'm trying to react on user clicks in the sheet, I don't have any access to the javascript, maybe a shorcut solution could be to add an attribute 'onclick' to UIColumn.
If there's a way to react on row selection I'm sorry for the inconvenience, but seen that I refer to your demo (I'm new to Tobago) I don't really have another source of information. Thanks anyway.
This is the code that doesn't work : <tc:command > doesn't generate any code and doesn't throw any excpetion
<tc:sheet id="personData" value="#{personCtrl.current.beanList}"
var="currentPerson" state="#{personCtrl.sheetState}" showHeader="true"
columns="1*;4*;4*;3*;6*;18*" showPageRange="center" showRowRange="right">
<tc:column sortable="false">
<tc:command onclick="alert('clicked');">
<tc:image value="image/edit_icon.gif" border="0"
alt="#{i18n.element_select}" height="16" width="12" />
<f:param name="selectedRowIndex" value="#{rowIndex}" />
</tc:command>
</tc:column>
...
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (TOBAGO-424) possibility to have a onclick event
on a sheet column
Posted by "Zied Hamdi (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/TOBAGO-424?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12504615 ]
Zied Hamdi commented on TOBAGO-424:
-----------------------------------
I've found a "cross around" solution that still doesn't really match my needs:
<tc:column sortable="false">
<tc:button id="editButton" action="#{personCtrl.edit}" image="image/edit_icon.gif">
<tc:attribute name="rowIndex" value="#{rowIndexNotAvailable}"/>
</tc:button>
</tc:column>
The bad things are:
- The selection doesn't change when I click a button: I've tried to call onclick="Tobago.clearSelection();" but that removes any associated action intead of appending it to: onclick="Tobago.submitAction('page:personForm:table:personData:0:editButton', true);"
- I don't have access to the index used in the javascript call eg. personData:0:editButton, so I can't send my self an attribute with the row index (where the button was pressed)
> possibility to have a onclick event on a sheet column
> -----------------------------------------------------
>
> Key: TOBAGO-424
> URL: https://issues.apache.org/jira/browse/TOBAGO-424
> Project: MyFaces Tobago
> Issue Type: Improvement
> Affects Versions: 1.0.10
> Environment: not applicable: on checking the generated source I don't have the text onclick="alert('clicked');"
> Reporter: Zied Hamdi
> Priority: Blocker
>
> I'm trying to react on user clicks in the sheet, I don't have any access to the javascript, maybe a shorcut solution could be to add an attribute 'onclick' to UIColumn.
> If there's a way to react on row selection I'm sorry for the inconvenience, but seen that I refer to your demo (I'm new to Tobago) I don't really have another source of information. Thanks anyway.
> This is the code that doesn't work : <tc:command > doesn't generate any code and doesn't throw any excpetion
> <tc:sheet id="personData" value="#{personCtrl.current.beanList}"
> var="currentPerson" state="#{personCtrl.sheetState}" showHeader="true"
> columns="1*;4*;4*;3*;6*;18*" showPageRange="center" showRowRange="right">
> <tc:column sortable="false">
> <tc:command onclick="alert('clicked');">
> <tc:image value="image/edit_icon.gif" border="0"
> alt="#{i18n.element_select}" height="16" width="12" />
> <f:param name="selectedRowIndex" value="#{rowIndex}" />
> </tc:command>
> </tc:column>
> ...
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (TOBAGO-424) possibility to have a onclick event
on a sheet column
Posted by "Volker Weber (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/TOBAGO-424?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12504624 ]
Volker Weber commented on TOBAGO-424:
-------------------------------------
Why do you need the rowIndex?
you can get the rowindex and/or the currentObject in an additional actionListener
search the users mailinglist for "[Tobago] using value from tc:link on server"
If you are just interested in the current object than in the rowIndex
then you can better use a f:param tag in combination with a actionListener
PS: please ask such questions on the mailinglist first before creating a entry here.
Regards,
Volker
> possibility to have a onclick event on a sheet column
> -----------------------------------------------------
>
> Key: TOBAGO-424
> URL: https://issues.apache.org/jira/browse/TOBAGO-424
> Project: MyFaces Tobago
> Issue Type: Improvement
> Affects Versions: 1.0.10
> Environment: not applicable: on checking the generated source I don't have the text onclick="alert('clicked');"
> Reporter: Zied Hamdi
> Priority: Blocker
>
> I'm trying to react on user clicks in the sheet, I don't have any access to the javascript, maybe a shorcut solution could be to add an attribute 'onclick' to UIColumn.
> If there's a way to react on row selection I'm sorry for the inconvenience, but seen that I refer to your demo (I'm new to Tobago) I don't really have another source of information. Thanks anyway.
> This is the code that doesn't work : <tc:command > doesn't generate any code and doesn't throw any excpetion
> <tc:sheet id="personData" value="#{personCtrl.current.beanList}"
> var="currentPerson" state="#{personCtrl.sheetState}" showHeader="true"
> columns="1*;4*;4*;3*;6*;18*" showPageRange="center" showRowRange="right">
> <tc:column sortable="false">
> <tc:command onclick="alert('clicked');">
> <tc:image value="image/edit_icon.gif" border="0"
> alt="#{i18n.element_select}" height="16" width="12" />
> <f:param name="selectedRowIndex" value="#{rowIndex}" />
> </tc:command>
> </tc:column>
> ...
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (TOBAGO-424) possibility to have a onclick event
on a sheet column
Posted by "Helmut Swaczinna (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/TOBAGO-424?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12522120 ]
Helmut Swaczinna commented on TOBAGO-424:
-----------------------------------------
See Tobago-84
> possibility to have a onclick event on a sheet column
> -----------------------------------------------------
>
> Key: TOBAGO-424
> URL: https://issues.apache.org/jira/browse/TOBAGO-424
> Project: MyFaces Tobago
> Issue Type: Improvement
> Affects Versions: 1.0.10
> Environment: not applicable: on checking the generated source I don't have the text onclick="alert('clicked');"
> Reporter: Zied Hamdi
> Priority: Blocker
>
> I'm trying to react on user clicks in the sheet, I don't have any access to the javascript, maybe a shorcut solution could be to add an attribute 'onclick' to UIColumn.
> If there's a way to react on row selection I'm sorry for the inconvenience, but seen that I refer to your demo (I'm new to Tobago) I don't really have another source of information. Thanks anyway.
> This is the code that doesn't work : <tc:command > doesn't generate any code and doesn't throw any excpetion
> <tc:sheet id="personData" value="#{personCtrl.current.beanList}"
> var="currentPerson" state="#{personCtrl.sheetState}" showHeader="true"
> columns="1*;4*;4*;3*;6*;18*" showPageRange="center" showRowRange="right">
> <tc:column sortable="false">
> <tc:command onclick="alert('clicked');">
> <tc:image value="image/edit_icon.gif" border="0"
> alt="#{i18n.element_select}" height="16" width="12" />
> <f:param name="selectedRowIndex" value="#{rowIndex}" />
> </tc:command>
> </tc:column>
> ...
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (TOBAGO-424) possibility to have a onclick event
on a sheet column
Posted by "Zied Hamdi (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/TOBAGO-424?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12522134 ]
Zied Hamdi commented on TOBAGO-424:
-----------------------------------
Thanks Helmut,
That's really good news!!!
Regards,
Zied Hamdi
> possibility to have a onclick event on a sheet column
> -----------------------------------------------------
>
> Key: TOBAGO-424
> URL: https://issues.apache.org/jira/browse/TOBAGO-424
> Project: MyFaces Tobago
> Issue Type: Improvement
> Affects Versions: 1.0.10
> Environment: not applicable: on checking the generated source I don't have the text onclick="alert('clicked');"
> Reporter: Zied Hamdi
> Priority: Blocker
>
> I'm trying to react on user clicks in the sheet, I don't have any access to the javascript, maybe a shorcut solution could be to add an attribute 'onclick' to UIColumn.
> If there's a way to react on row selection I'm sorry for the inconvenience, but seen that I refer to your demo (I'm new to Tobago) I don't really have another source of information. Thanks anyway.
> This is the code that doesn't work : <tc:command > doesn't generate any code and doesn't throw any excpetion
> <tc:sheet id="personData" value="#{personCtrl.current.beanList}"
> var="currentPerson" state="#{personCtrl.sheetState}" showHeader="true"
> columns="1*;4*;4*;3*;6*;18*" showPageRange="center" showRowRange="right">
> <tc:column sortable="false">
> <tc:command onclick="alert('clicked');">
> <tc:image value="image/edit_icon.gif" border="0"
> alt="#{i18n.element_select}" height="16" width="12" />
> <f:param name="selectedRowIndex" value="#{rowIndex}" />
> </tc:command>
> </tc:column>
> ...
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (TOBAGO-424) possibility to have a onclick event
on a sheet column
Posted by "Udo Schnurpfeil (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/TOBAGO-424?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Udo Schnurpfeil resolved TOBAGO-424.
------------------------------------
Resolution: Invalid
You can use state
see in code: state="#{personCtrl.sheetState}"
of type SheetState to get the selected rows with getSelectedRows()
> possibility to have a onclick event on a sheet column
> -----------------------------------------------------
>
> Key: TOBAGO-424
> URL: https://issues.apache.org/jira/browse/TOBAGO-424
> Project: MyFaces Tobago
> Issue Type: Improvement
> Affects Versions: 1.0.10
> Environment: not applicable: on checking the generated source I don't have the text onclick="alert('clicked');"
> Reporter: Zied Hamdi
> Priority: Blocker
>
> I'm trying to react on user clicks in the sheet, I don't have any access to the javascript, maybe a shorcut solution could be to add an attribute 'onclick' to UIColumn.
> If there's a way to react on row selection I'm sorry for the inconvenience, but seen that I refer to your demo (I'm new to Tobago) I don't really have another source of information. Thanks anyway.
> This is the code that doesn't work : <tc:command > doesn't generate any code and doesn't throw any excpetion
> <tc:sheet id="personData" value="#{personCtrl.current.beanList}"
> var="currentPerson" state="#{personCtrl.sheetState}" showHeader="true"
> columns="1*;4*;4*;3*;6*;18*" showPageRange="center" showRowRange="right">
> <tc:column sortable="false">
> <tc:command onclick="alert('clicked');">
> <tc:image value="image/edit_icon.gif" border="0"
> alt="#{i18n.element_select}" height="16" width="12" />
> <f:param name="selectedRowIndex" value="#{rowIndex}" />
> </tc:command>
> </tc:column>
> ...
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.