on 08-12-2005 1:01 PM
Hi,
Is there a possibility to read attributes from UI-Elements instead of using the static wDoModifyView - Method?
Are the views or view elements accessible by the IWDCustomEvent.class?
Thanks.
Cemal
You should use the wdDoModifyView() method exclusively to change the layout of a view, not to change UI element property values.
Use data binding to manipulate UI element property values from within controller methods and event handlers.
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bharathwaj,
in case of firing and handling an event the response time is very long.
I've a Tabstrip - UI-Element with two tabs. Tab1 holds a table which displays a media library. Tab2 is form based view of a table row.
1) In case of filtering on a column of a table I need the info which column is to be filtered.
2) In case of switching the table row selection I want to jump to Tab2 in order to show table row data by the form.
I usually can store the mentioned UI-Element in the context by conding in the wDoModifyView-Method. But I mean there must be possible that we are able to access to the View-Interfaces.
Kind regards.
Cemal
Concerning the tab selection:
There is an event TabStrip.onSelect with parameter "tab" that contains the ID of the new selected tab.
See Javadoc
To transfer the event parameter into an action handler parameter, use the so-called parameter mapping.
Search this forum for "parameter mapping", you will find many posts that explain this. Or read Chris Whealy's book.
For events without parameters, you can attach fixed value parameters.
Example: An input field has an onEnter event. If you "wire" different InputField.onEnter events with the same action, you can attach constant parameter values to identify the event source.
See:
IWDInputField.mappingOfOnAction().addParameter(name, value).
Alles klar?
Armin
Hi again,
the tip for parameter mapping was very helpful,
but it seems to be not enough to solve my problem.
Now the problem i currently have is that I don't have the info about the table column the user filter on it.
The class IWDTable has an event onFilter which has no parameters.
How can I get the info in the onFilter-Action method which column is to filter?
I tried the following in the wDoModifyView-Method:
final IWDTableColumn[] columns = table.getColumns();
for (int i = 0; i < columns.length; i++) {
IWDTableColumn tc = columns<i>;
// tc.mappingOfOnAction().addSourceMapping("column", tc.getId());
table.mappingOfOnFilter().addParameter("column", tc.getId() );
}
But in this case only the last column is mapped to the key "column". And I don't know yet which column it to filter.
Is it possible to get the id of the "selected" column, the column which is to filter?
Cemal
Hi,
Hint : We can use parameter mapping in actions for this.
@All : Please correct me if i am wrong.
Regards, Anilkumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
In that case it will be restricted to a particular type of UI element ...Isn't it ?
Say if there are 5 links we can get the link id to differentiate which one is clicked..
For different UI elements this wont work..
I think ...I understood anil s statement correctly !
(Oops ! a lot of post inbetween anils and mine ! )
Regards
Bharathwaj
Message was edited by: Bharathwaj R
Hi,
In this case you can go for Context Programming.
I mean you can bind the attributes of UIElements to contextattributes and you can access the values through context attribs.
Regards, Anilkumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.