on 08-06-2008 10:50 AM
hello Friends,
I have a following senario, I have two views, like in first view I have a table, there is a button, and when user clicks this button a new window ( my 2nd view is pop up )...
on this 2nd view there are some input fields where user can enter the values and press submit button
onActoinSubmit I take the values, and do processing and close the window
now the issue is, there are some fieds on 2nd view as mandantory fields, so I need to check, if user enters the values and if not on 2nd view I need to mark the inputfield and shows the msg that this input field should be filled or so
how I can do validation for particular input fileds on 2nd view ( i.e. popup )
I tried something like this: that on my onActionSubmit ( the action called when user press the button "submit" on popup window ( 2nd view )...I call the method for validation ....
public boolean validateInput( )
{
//@@begin validateInput()
IWDMessageManager mm = wdComponentAPI.getMessageManager();
String name1 = null;
name1 = wdContext.currentAddressElement().getName1();
IWDAttributeInfo attributeInfo = wdContext.currentAddressElement().node().getNodeInfo().getAttribute("name1");
if ( name1 == null ) {
mm.reportContextAttributeMessage(wdContext.currentAddressElement(), attributeInfo, IMessagePOEntryComp.MISSING_INPUT, new Object[] { "name1" }, true);
return false;
//validated = false;
}
return false;
but nothing happend on the screen, secondly what I also realize that, I can show anymessage on my 2nd view.... e.g when I try to do something
mm.reportsuc...(some msg ), nothing prints...out...
any idea, how I can display msgs on my 2nd view ( on first view msgs are displaying normally ) ...
With this code I am opening the 2nd view:
IWDWindowInfo addressWindowInfo = (IWDWindowInfo)wdComponentAPI.getComponentInfo().findInWindows("AddressWindow");
IWDWindow window = wdComponentAPI.getWindowManager().createWindow( addressWindowInfo, false);
IWDWindow window1 = wdComponentAPI.getWindowManager().createModalWindow( addressWindowInfo);
//createExternalWindow
window.setWindowPosition(300, 80);
window.show();
Regards,
are you sure that method validateInput() is being called on onActionSubmit() event?
see that action is binded to UI element
-
-
for external window:
IWDWindowInfo addressWindowInfo = (IWDWindowInfo)wdComponentAPI.getComponentInfo().findInWindows("AddressWindow");
IWDWindow window = wdComponentAPI.getWindowManager().createWindow( addressWindowInfo, false);
IWDWindow window1 = wdComponentAPI.getWindowManager().createModalWindow( addressWindowInfo);
//createExternalWindow
window.setWindowPosition(300, 80);
window.show();
I am not sure about what this code!!
if you want to display external modal window, you can use following code. It is similar to your code
IWDWindowInfo addressWindowInfo = (IWDWindowInfo)wdComponentAPI.getComponentInfo().findInWindows("AddressWindow");
IWDWindow window = (IWDWindow)wdComponentAPI.getWindowManager().createModalWindow( addressWindowInfo);
//createExternalWindow
window.setWindowPosition(300, 80);
window.show();
nikhil
Edited by: Nikhil ßos on Aug 6, 2008 5:53 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am just woundring why not a simple msgs like this in my modifyview () method cant be shown ??
for test purpose, I placed this the first line in my modifyview method....
IWDMessageManager mm = wdThis.wdGetAPI().getComponent().getMessageManager();
mm.reportSuccess("test");
I have define the UL element message area as well ??? but in my 2nd view I cant display any msgs ???
can anyone has any idea , what I am doing wrong ???
( I mean instead on my 2nd view, the msgs are shown on 1st view ) , can i do something to display the msgs on 2nd view ?
Regards,
Edited by: Shah H on Aug 6, 2008 1:50 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
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.