Re: putting in a WOBorser more than one colum
Re: putting in a WOBorser more than one colum
- Subject: Re: putting in a WOBorser more than one colum
- From: Gustavo Pizano <email@hidden>
- Date: Fri, 4 Sep 2009 11:00:08 +0200
now I made the JS function that changes the background color of the TR, but now Im facing the case when the user wants multiple selections, which he will hold the cmd key, my JS basic knowlage indicates me that I must somehow capture the even in the function I created
Well as I see that its kinda no possible to work with the WOBrowser, I have decided to try to recreate such a behavior but with a table. So this is what I have:
<table>
<webobject name = "translationPerUser">
<tr onclick="rowSelected(this)" class = "tableRow">
<td><wo:str value = "$userTranslationItem.tran"></wo:str></td>
<td><wo:str value = "$userTranslationItem.toTranslationSet.base"></wo:str></td>
<td><wo:str value = "$userTranslationItem.toStatus.name"></wo:str></td>
</tr>
</webobject>
</table>
the WOD:
translationPerUser:WORepetition{
list = userTranslationsList;
item = userTranslationItem;
}
I found this doing a google search::
<script>
function ck(e) {
var ctrl = null;
if (window.event) ctrl = window.event.ctrlKey;
else if (e) ctrl=(e.metaKey || e.ctrlKey);
else if (e) ctrl=(Event.META_MASK || Event.CTRL_MASK)
if (ctrl) {
alert("metaKey is true! You are pressing the Command key.")
} else {
alert("metaKey is false or undefined.");
}
}
document.
window.
window.
if (document.layers || (document.getElementById && !document.all)) {
document.captureEvents(Event.KEYPRESS);
document.captureEvents(Event.MOUSEDOWN);
}
</script>
but didn't understand quite well what its being happening... anyway... now to the right point..
I must somhow save the actual selections and send the data to the server when the user clicks the submit buttom, but I dunno how to achieve that now that what Im gonna be saving will be from within a JS function.. becuase I have the table wrapped with a <wo:form> and the submit button has an action, then in the onSubmit binding of the form I call a JS function which will gather the array of selected rows and send the data using the submit(..)... but Im kinda lost ..
Any way somebody can give me a light where to look at.?
Thanks
Gustavo
On Thu, Sep 3, 2009 at 2:22 PM, Gustavo Pizano
<email@hidden> wrote:
Hello..
Im in a need of WOBrowser again because of the multiple selection facility. BUT it tights me to have only one column which display the displayString binding.
I need to have multiple selection, but also I need more than one columns, 4 in fact.
Is there a way to do such a thing?
I was thinking in having the WOBrowser tag with the list item and selection binding, but without the displayString and inside that component the <option> with the value to the item, but again I dunno if its acceptablet o put divs inside the <option> tag.
Any help please?
Thx
Gustavo
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden