on 07-20-2006 11:09 AM
Hi,
I have done the TabStrip example...
I have created
TabStrip > Tabs1 > Tabs1_Content > ViewElementUiContainer.
like this i have created another Tab...
while i am executing the application i am getting all fields in disble state.....
i have created tabs Edit and Display....
in Edit i have fileds like
Name
Country
Birthday...
and Save Button
in Display i have Fields like
Name
Country
Birthday
My requirement is once i click on the SAVE button in edit view the data will be displayed on Display Tab view....
So i need what code i have to written in SAVE button action method for displaying data on Display View...
please help me
Thanks & Regards
Ravi Shankar
Hi Ravi,
About the fields being in disable state:
Are they bound to context attributes that are part of a value node? if so try to set the cardinality property of the value node to 1..1
About the Save button:
you can create a value attribute of type String, lets call it "selectedTab"
and bind it to the property selectedTab of the TabStrip.
now - on the action bound to the save button in order to display the other tab write:
wdContext.currentContextElement().setSelectedTab("Display");
When Display is the name of the second tab.
Hope it answers your questions, Adi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ravi,
A value node is a collection of records.
The cardinality of the node stends for the number of records possible in the collection.
It can be either 0..1,0..n,1..1 or 1..n.
If for example we use the node to populate a table we would use cardinality 1..n or 0..n
If we use the node for displaying only one record (like your example) we can use 0..1 or 1..1
Regards, Adi.
Hi Ravi,
You must be having two tabs EDIT and DISPLAY in your tabstrip. Can you please note the ID for the same?
Lets say the ID's for EDIT is "Tabs0" and DISPLAY is "Tabs1".
CREATE AN ATTRIBUTE CALLED SELECTEDTAB IN UR COMPONENT CONTROLLER'S CONTEXT AND MAP IT TO YOUR VIEW CONTROLLER. BIND THE SELECTEDTAB CONTEXT ATTRIBUTE TO SELECTEDTAB PROPERTIES FOR YOUR TABSTRIP AND WRITE THE FOLLOWING CODE IN UR SUBMIT() METHOD:
if(wdContext.currentContextElement().getSelectedtab() == "Tabs0")
{
wdContext.currentContextElement().setSelectedtab("Tabs1");
}
else
{
wdContext.currentContextElement().setSelectedtab("Tabs0");
}
Hope this will solve you problem.
Regards,
Rekha Malavathu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ravi,
Please go through the following links. It contains some sample project and one PDF File.
Kind Regards,
S.Saravanan.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ravi,
To Pass data (Name, Country..) to another view, you have to use data passing mechanism . Either a Portal Eventing or Passing data from Controller Mechanism.
In Save button from Edit View, you have fire to Display View.
Ex - Portal Eventing.
WDPortalEventing.fire("nameSpace","event",dataObject);
// write whatever you want to pass to other view.
dataObject - Contains Name + delim + Country + delim + ...
In the Display (Subscribe View) will get that data, it will display in the respective fields.
WDPortalEventing.subscribe("nameSpace","event", wdThis.actionMethod);
In the Action Method you assign it to individual values, by splitting using delimiters.
Regards,
Sridhar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.