Dunno how to write JSP for login in......
Can someone help mi on write JSP coding for login in page?i dun really know how how to write JSP coding. i m now doing a project on Private Driving instructor portal where people can register as trainee or instructor.now i want to write the JSP coding on the login page part.... when instuctor login it will go to a instructor's main page n if a trainee login it will go to a trainee's main page.Can someone help mi on this??? it's very urgent n important for mi.Please help mi.
The easiest method I have found is to use a database to store the users details along with a flag indicating whether they are a trainee or an instructor. Upon logging in, you can use a bean to connect to the database and retrieve these values, then it is a simple matter of a jsp:forward tag to re-direct to the applicable page for trainee or instructor ...
e.g.
<pre>
***JSP PAGE ***
<%@page language="java" buffer="32kb" import="jspclasses.customer.*" errorPage="./error.jsp"%>
<jsp:useBean id="userBean" class="jspclasses.userInfoBean" scope="session"/>
* Get user and pass from form variables. (if passed)*
String user = request.getParameter("username");
String pass = request.getParameter("password");
* Retrieve fullname from session object. (if exists)*
fullname = (String)session.getValue("fullname");
String fwdPage = (String)session.getValue("fwdPage");
if (fullname==null) {
try {
* If no session has been established then attempt to create one using *
* the values passed through via form. If no values have been passed *
* through then variables will equal null as opposed to empty strings. *
* If null is evident, catch with NullPointerException. *
if (user.equals("") || pass.equals("")) {
fullname = "Not";
} else {
* Send values to method which validates users *
userBean.setUserInfo(user,pass);
* If an error was encountered within userBean the error *
* instance variable will != null. *
if (userBean.error == "") {
fullname = userBean.getFullname();
} else {
* Error was encountered so we set fullname to "Not", if *
* user was entered we re-display value and we instantiate *
* error variable to error value of userBean. *
fullname = "Not";
if (user!=null) uservalue=user;
error = userBean.error;
//out.println("Error is not null:<br>"+error+"<br>");
if (fullname!="Not") {
session = request.getSession(true);
session.putValue("fullname",fullname);
session.putValue("email",user);
session.putValue("user_id",userBean.getUserId());
session.putValue("user_type",userBean.getUserType());
session.putValue("sessionid",session.getId());
session.setMaxInactiveInterval(12000);
***END JSP***
*** START BEAN ***
public void setUserInfo(String user, String pass) {
String stmtString = "";
ResultSet rs = null;
// Check to see if a valid connection is available
getConnection();
// If getConnection returns null then
// connection successfully established
if (error.equals("")) {
try {
// Create SQL string to be sent to database
stmtString = "select * from serv_user where email = '" + user + "' and password = '" + pass + "'";
// Execute SQL
rs = stmt.executeQuery(stmtString);
// Specify estimated rows to be returned
rs.setFetchSize(1);
// If a row is returned get first and last name
if (rs.next()) {
user_id = ((rs.getString("USER_ID")!=null)?rs.getString("USER_ID"):"");
("USER_TYPE_ID"):"");
first_name = ((rs.getString("FIRST_NAME")!=null)?rs.getString("FIRST_NAME"):"");
last_name = ((rs.getString("LAST_NAME")!=null)?rs.getString("LAST_NAME"):"");
business = ((rs.getString("BUSINESS_NAME")!=null)?rs.getString("BUSINESS_NAME"):"");
address = ((rs.getString("ADDRESS")!=null)?rs.getString("ADDRESS"):"");
suburb = ((rs.getString("SUBURB")!=null)?rs.getString("SUBURB"):"");
state = ((rs.getString("STATE")!=null)?rs.getString("STATE"):"");
postcode = ((rs.getString("POSTCODE")!=null)?rs.getString("POSTCODE"):"");
hom_phone = ((rs.getString("HOM_PHONE")!=null)?rs.getString("HOM_PHONE"):"");
bus_phone = ((rs.getString("BUS_PHONE")!=null)?rs.getString("BUS_PHONE"):"");
mob_phone = ((rs.getString("MOB_PHONE")!=null)?rs.getString("MOB_PHONE"):"");
fax = ((rs.getString("FAX")!=null)?rs.getString("FAX"):"");
email = ((rs.getString("EMAIL")!=null)?rs.getString("EMAIL"):"");
pass_hint = ((rs.getString("PASSWORD_HINT")!=null)?rs.getString("PASSWORD_HINT"):"");
else {
error = "User <b>"+user+"</b> does not exist with specified password.<br>Please try again.";
} // END : ResultSet = true
} // END : TRY
catch (SQLException sqle) {
error = "<b>Error accessing database:</b><br> "+sqle.toString()+" - ORA:"+sqle.getErrorCode();
catch (Exception e) {
error = "<b>Error occurred in method setUserInfo()</b><br> "+e.getMessage();
} // END : CATCH
finally{
closeConnection();
try{
rs.close();
}catch(SQLException sqle){
} // END : IF
} // END : METHOD
} // END : BEAN
***END BEAN***
Similar Messages
-
How to write jsp select record from Oracle divide per page , about 50 reco
Dear Expert,
How to write jsp select record from Oracle divide per page , about 50 record per page.
Thank you very much.I wish I could, but there is no single sign on module available for Fusion, also, so called Fusion is yet another Word With Big Letters, behind it there is yet another OC4J ( now Oracle switched to Weblogic though) container with bunsh of Oracle apps residing in it.
Generally speaking, neither Fusion nor Oracle Apps user database does not have any single authentication module available out of the box to integrate user database.
It's a long sad story running straight from Oracle Apps 11.0.5.
That's why I've created JAAS single sign on login module and used it ever since at OC4J 10.2 and onwards at OC4J 10.3
Back to the topic: to develop Apps and test them externally using the session bean I've isted above, one need to copy certain libraries from Oracle Apps server, then add them as libraries for JDeveloper project.
Here is the complete list:
oracle.apps.fnd.cache
oracle.apps.fnd.cache
oracle.apps.fnd.common
oracle.apps.fnd.functionSecurity
oracle.apps.fnd.metadata
oracle.apps.fnd.security
oracle.apps.fnd.util
oracle.apps.jtf.cache
oracle.apps.jtf.security
Edited by: Faceless on Nov 26, 2009 3:04 AM -
How to write query for this in TopLink ?
I am doing a simple search in jsp where the search will the based on the choices chosen by user.
I had given 3 check boxes for those choices.
The problem is, query will be based on the choice or choices chosed by the user.
How to write query for this in TopLink ?
Thanks in Advance..
JayaganeshTry below solution, it is NOT best solution but might work:
Declare @Questions TABLE (QuestionID INT, QuestionText Varchar(100))
INSERT INTO @Questions
VALUES (1, 'Comment'), (2, 'Score')
DECLARE @Answers TABLE (authkey INT, QuestionID INT, questiontext VARCHAR(100), answertext VARCHAR(100))
INSERT INTO @Answers
VALUES (101, 1, 'comment', 'hi!!'), (101, 2, 'score', '4'), (102, 1, 'comment', 'excellent'), (102, 2, 'score', '5'), (103, 2, 'score', '6'), (104, 2, 'score', '8')
SELECT
A.AuthKey
,Q.QuestionID
,Q.QuestionText
,A.AnswerText
FROM
@Questions Q
INNER JOIN @Answers A ON Q.QuestionID = A.QuestionID
UNION
SELECT
A.AuthKey
,Q.QuestionID
,Q.QuestionText
,Null
FROM
@Questions Q
CROSS JOIN @Answers A
WHERE
NOT EXISTS (SELECT 1 FROM @Answers SubQry WHERE SubQry.AuthKey = A.AuthKey AND SubQry.QuestionID = Q.QuestionID)
Output
AuthKey | QuestionID
| QuestionText
| AnswerText
101 | 1 | Comment | hi!!
101 | 2 | Score | 4
102 | 1 | Comment | excellent
102 | 2 | Score | 5
103 | 1 | Comment | NULL
103 | 2 | Score | 6
104 | 1 | Comment | NULL
104 | 2 | Score | 8
Best Wishes, Arbi; Please vote if you find this posting was helpful or Mark it as answered. -
HR ABAP How to Write BDC For Infotype 0586
Hi Experts
Can Any One tell me how to write BDC for Infotype 0586 and also 585.
If we enter into the maintaining Screen, the lines in the Screen will dynamically changing depending on the values.
When I am doing recording , If I press page down after entering values in top lines, the lines are changing and the records are not updating Correctly.
I need to write BDC to Create Change.
Can any one please help me in this regard?
Thanks in Advance.
Regards
Avinash.http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm
http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm
http://www.google.co.in/search?hl=en&q=SAPBDCtable+control&meta=
http://www.sap-basis-abap.com/abap/handling-table-control-in-bdc.htm
http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm
http://www.sap-img.com/abap/question-about-bdc-program.htm -
How to write comments for a class
hi
how to write comments for a classI'm reeling with incredulity, and as such am unable to do anything except just post some code
// this is a single line comment
/* this is a multiline comment.
it can be spread over as many lines as you
want */Or are you asking about how to decide what the content should be? -
Does anybody know how to write GUI for J2ME?
Does anybody know how to write GUI for J2ME?
Thanks!Hi..! I don't know exactly... it's a good question. I refered something. U visit below URL's.
http://www.java-pro.com/upload/free/features/javapro/2000/13iss00/rg0013/rg0013.asp
http://developer.java.sun.com/developer/technicalArticles/wireless/midpui/ -
How to write code for page up and page down buttons on alv screen?
Hi,
Page up and page down buttons are not working in general alv report. Thease buttons are in disable mode. But is stnd. transactions (tcode : fbl5n) these are enabled and working properly, but we can't debug this with /h
How to write code for page up and page down buttons on alv screen?Poonam,
On doing the screen debugging it took me over to Include LSTXWFCC ,kindly check the below code.
module cc_display.
fcode = sy-ucomm(4).
case sy-ucomm(4).
when 'P--'.
perform cc_firstpage.
when 'P-'.
perform cc_prevpage.
when 'P+'.
perform cc_nextpage.
when 'P++'.
perform cc_lastpage.
when 'EX--'.
perform cc_firstcopy.
when 'EX-'.
perform cc_prevcopy.
when 'EX+'.
perform cc_nextcopy.
when 'EX++'.
perform cc_lastcopy.
I guess it can give you some lead.
K.Kiran. -
How to write program for handling script ?
In script i have 2 pages.
In first page i have constant windows and variable windows.
In second page i have main window.
How to write program for this?Hi
You need to write a driver program. You need to use open form, then write_form to write data into various windows and then close_form to close.
As you don't want main window in the first page first try out just by having the window in the second page; i guess system will take care of it. As all other windows filled and if u start writing data in the main it'll go for next page.
If doesn't work have the window on the first page with the least hight and write a command
IF &SYST-PAGE& EQ 1
NEXT-PAGE.
ENDIF.
Then in the second page you can have the main window hight as per your requirement.
Here is an example
(1) Get customer data
TABLES: scustom, sbook, spfli.
DATA: bookings like sbook...
select * from...
(2) Open form
CALL FUNCTION 'OPEN_FORM'
EXPORTING
DEVICE = 'PRINTER'
FORM = 'S_EXAMPLE_1'
DIALOG = 'X'
EXCEPTIONS
others = 1
(3) Print table heading
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'HEADING'
TYPE = 'TOP'
WINDOW = 'MAIN'
FUNCTION = 'SET'
(4) Print customer bookings
LOOP AT bookings WHERE
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'BOOKING'
TYPE = 'BODY'
WINDOW = 'MAIN'
ENDLOOP
(5) Close form
CALL FUNCTION 'CLOSE_FORM'
Regards
Surya. -
How to write Validations for Sample Data??
Hi Frnds,
I want to know how to write validations for sample oracle data?? Can anyone explain anyone clearly??
Regards,
RajHi shushma,
Simply put a check that:
If(wdContext.current<YOUR_NODE>Element().get<YOUR_ATTRIBUTE_NAME> !=null){
else{
// Show the error messages
//Displaying the error message is very easy.
//You can report exception using the message manager API's. You will get this easily on SDN.
I hope this helps! if you need ay further help please let me know.
Thanks and Regards,
Pravesh -
How to write GUI for J2ME?
Does anybody know how to write GUI for J2ME?
is there any reference books, web sites, etc?
Thank you!Thank you!
i will take a look. -
How to write BDC for tcode F-32
Hi Experts,
How to write BDC for tcode F-32 .
is it possible i recorded in SHDB BUT IF I AM DOING IT'S COMING WRONG .
plz guide me sir.
regars,
Hari
Edited by: hari311 on Oct 27, 2009 9:22 AMThere might be that when u provide the data in the selction screen of F-32 and press process open items some custom program might be attached to it and gets executed...
chek it out..
if so..
pass the bdcdata of the second screen into a memory id
export t_bdcdata into v_memid.
in that custoom report jus import this..
then fill the t_bdcdata with the header information and call the transcation f-32..
Edited by: imran khan on Oct 27, 2009 9:35 AM -
How to write API for web cam?
who knows how to write API for web cam?
if you mean capture from the cam try JMF I've done it a million times
salut -
Hi,
How to write BDC, for Tcode KP06, How to handle the table control in that Tcode.
or any other way to upload data for this Tcode.
Regards
ManoharHi,
check the sample code for transaction ME51 and ME21.
PARAMETERS:
p_fname TYPE ibipparms-path.
*" Data declarations...................................................
Work variables *
DATA:
fs_bdc TYPE bdcdata,
fs_msg TYPE bdcmsgcoll.
Internal table to hold bdc data *
DATA:
t_bdc LIKE
STANDARD TABLE
OF fs_bdc.
Internal table to hold bdcmessage data *
DATA:
t_msg LIKE
STANDARD TABLE
OF fs_msg.
DATA:
w_string(50) TYPE c,
w_string1(19) TYPE c,
w_message(72) TYPE c,
w_num TYPE i VALUE 1,
w_num1 TYPE i.
*" Type declarations...................................................
Type declaration of the structure to hold header data *
DATA:
BEGIN OF t_header OCCURS 0,
ftype TYPE c,
doctype(10) TYPE c,
acctcat(4) TYPE c,
date(10) TYPE c,
plant(4) TYPE n,
text(10) TYPE c,
qty(5) TYPE n,
units(5) TYPE c,
pgrp(3) TYPE n,
mgrp(3) TYPE n,
price(2) TYPE n,
gacct(6) TYPE n,
cost(4) TYPE n,
END OF t_header.
START-OF-SELECTION EVENT *
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_fname.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
program_name = syst-cprog
DYNPRO_NUMBER = SYST-DYNNR
FIELD_NAME = ' '
IMPORTING
file_name = p_fname
START-OF-SELECTION.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = 'c:\temp\item2.txt'
FILETYPE = 'ASC'
has_field_separator = 'X'
TABLES
data_tab = t_header
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
OTHERS = 17
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF. " IF SY-SUBRC <> 0
LOOP AT t_header WHERE ftype = 'H'..
CLEAR fs_msg.
IF t_header-ftype = 'H'.
PERFORM bdc_program USING 'SAPMM06B' '0100'.
PERFORM bdc_field USING 'eban-BSART' t_header-doctype.
PERFORM bdc_field USING 'eban-KNTTP' t_header-acctcat.
PERFORM bdc_field USING 'RM06B-EEIND' t_header-date.
PERFORM bdc_field USING 'eban-WERKS' t_header-plant.
PERFORM bdc_field USING 'BDC_OKCODE' 'AB'.
ENDIF.
IF t_header-ftype = 'I'.
LOOP AT t_header WHERE ftype = 'I'.
PERFORM bdc_program USING 'SAPMM06B' '0106'.
w_string = 'EBAN-TXZ01(01)'.
w_string+12(1) = w_num.
PERFORM bdc_field USING w_string t_header-text.
w_string = 'EBAN-MENGE(01)'.
w_string+12(1) = w_num.
PERFORM bdc_field USING w_string t_header-qty.
w_string = 'EBAN-MEINS(01)'.
w_string+12(1) = w_num.
PERFORM bdc_field USING w_string t_header-units.
w_string = 'EBAN-EKGRP(01)'.
w_string+12(1) = w_num.
PERFORM bdc_field USING w_string t_header-pgrp.
w_string = 'EBAN-MATKL(01)'.
w_string+12(1) = w_num.
PERFORM bdc_field USING w_string t_header-mgrp.
PERFORM bdc_field USING 'BDC_OKCODE' '=KN'.
w_num = w_num + 1.
PERFORM bdc_program USING 'SAPMM06B' '0102'.
PERFORM bdc_field USING 'EBAN-preis' t_header-price.
PERFORM bdc_field USING 'BDC_OKCODE' '=KN'.
PERFORM bdc_program USING 'SAPMM06B' '0505'.
PERFORM bdc_field USING 'BDC_OKCODE' '=KWE'.
PERFORM bdc_program USING 'SAPlkacb' '0002'.
PERFORM bdc_field USING 'EBAN-sakto' t_header-gacct.
PERFORM bdc_field USING 'cobl-kostl' t_header-cost.
PERFORM bdc_field USING 'BDC_OKCODE' '=ENTE'.
PERFORM bdc_program USING 'SAPMM06B' '0102'.
PERFORM bdc_field USING 'BDC_OKCODE' '/00'.
ENDIF.
ENDLOOP.
ENDLOOP.
PERFORM bdc_program USING 'SAPMM06B' '0106'.
PERFORM bdc_field USING 'BDC_OKCODE' 'BU'.
PERFORM BDC_PROGRAM USING 'SAPMM06E' '100'.
*PERFORM BDC_FIELD USING 'BDC_OKCODE' 'BACK'.
CALL TRANSACTION 'ME51' USING t_bdc MODE 'N' MESSAGES INTO t_msg.
LOOP AT t_msg INTO fs_msg.
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
id = fs_msg-msgid
lang = sy-langu
no = fs_msg-msgnr
v1 = fs_msg-msgv1
v2 = fs_msg-msgv2
v3 = fs_msg-msgv3
v4 = fs_msg-msgv4
IMPORTING
msg = w_message
EXCEPTIONS
not_found = 1
OTHERS = 2.
WRITE:
/ w_message.
ENDLOOP.
CLEAR t_bdc[].
PERFORM bdc_program USING 'SAPMM06E' '0100'.
PERFORM bdc_field USING 'EKKO-LIFNR' '1000'.
PERFORM bdc_field USING 'EKKO-EKORG' '1000'.
PERFORM bdc_field USING 'EKKO-EKGRP' '100'.
PERFORM bdc_field USING 'BDC_OKCODE' 'BS'.
PERFORM bdc_program USING 'SAPMM06E' '0501'.
PERFORM bdc_field USING 'EKET-BANFN' fs_msg-msgv1.
PERFORM bdc_field USING 'BDC_OKCODE' '=KOPF'.
PERFORM bdc_program USING 'SAPMM06E' '0125'.
PERFORM bdc_field USING 'BDC_OKCODE' 'MALL'.
PERFORM bdc_program USING 'SAPMM06E' '0125'.
PERFORM bdc_field USING 'BDC_OKCODE' 'REFH'.
PERFORM bdc_program USING 'SAPMM06E' '0504'.
PERFORM bdc_field USING 'BDC_OKCODE' '=ENTE'.
PERFORM bdc_program USING 'SAPMM06E' '0111'.
PERFORM bdc_field USING 'BDC_OKCODE' '=NEXP'.
*perform bdc_program using 'SAPLSPO1' '0300'.
*PERFORM BDC_FIELD USING 'BDC_OKCODE' 'YES'.
PERFORM bdc_program USING 'SAPMM06E' '0504'.
PERFORM bdc_field USING 'BDC_OKCODE' '=ENTE'.
PERFORM bdc_program USING 'SAPMM06E' '0111'.
PERFORM bdc_field USING 'BDC_OKCODE' '=NEXP'.
*perform bdc_program using 'SAPMM06E' '0504'.
*PERFORM BDC_FIELD USING 'BDC_OKCODE' '=ENTE'.
*perform bdc_program using 'SAPMM06E' '0111'.
*PERFORM BDC_FIELD USING 'BDC_OKCODE' '=NEXP'.
perform bdc_program using 'SAPMM06E' '0504'.
*PERFORM BDC_FIELD USING 'BDC_OKCODE' '=ENTE'.
perform bdc_program using 'SAPMM06E' '0504'.
*PERFORM BDC_FIELD USING 'BDC_OKCODE' '=ENTE'.
*perform bdc_program using 'SAPMM06E' '0111'.
*PERFORM BDC_FIELD USING 'BDC_OKCODE' '=NEXP'.
PERFORM bdc_program USING 'SAPMM06E' '0120'.
PERFORM bdc_field USING 'BDC_OKCODE' 'BU'.
CALL TRANSACTION 'ME21' USING t_bdc MODE 'N' MESSAGES INTO t_msg
LOOP AT t_msg INTO fs_msg.
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
id = fs_msg-msgid
lang = sy-langu
no = fs_msg-msgnr
v1 = fs_msg-msgv1
v2 = fs_msg-msgv2
v3 = fs_msg-msgv3
v4 = fs_msg-msgv4
IMPORTING
msg = w_message
EXCEPTIONS
not_found = 1
OTHERS = 2.
WRITE:
/ W_message.
ENDLOOP. " LOOP T_MSG
CLEAR t_bdc[].
PERFORM bdc_program USING 'SAPMM06E' '0105'.
PERFORM bdc_field USING 'RM06E-BSTNR' fs_msg-msgv2.
PERFORM bdc_field USING 'BDC_OKCODE' 'AB'.
w_num1 = w_num - 1.
DO w_num1 TIMES.
w_string1 = 'RM06E-TCSELFLAG(00)'.
w_string1+17(1) = w_num1.
PERFORM bdc_program USING 'SAPMM06E' '0120'.
PERFORM bdc_field USING w_string1 'X'.
PERFORM bdc_field USING 'BDC_OKCODE' 'DL'.
w_num1 = w_num1 - 1.
ENDDO. " DO W_NUM1
PERFORM bdc_program USING 'SAPMM06E' '0120'.
PERFORM bdc_field USING 'BDC_OKCODE' 'BU'.
CALL TRANSACTION 'ME22' USING t_bdc MODE 'A' MESSAGES INTO t_msg.
LOOP AT t_msg INTO fs_msg.
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
id = fs_msg-msgid
lang = sy-langu
no = fs_msg-msgnr
v1 = fs_msg-msgv1
v2 = fs_msg-msgv2
v3 = fs_msg-msgv3
v4 = fs_msg-msgv4
IMPORTING
msg = w_message
EXCEPTIONS
not_found = 1
OTHERS = 2.
WRITE:
/ w_message.
ENDLOOP. " LOOP T_MSG
*& Form bdc_program
This subroutine gives screenname and screen number *
There are no interface parameters to be passed to this subroutine. *
FORM bdc_program USING value(p_screen)
value(p_num).
CLEAR fs_bdc.
fs_bdc-program = p_screen.
fs_bdc-dynpro = p_num.
fs_bdc-dynbegin = 'X'.
APPEND fs_bdc TO t_bdc.
ENDFORM. " FORM BDC_PROGRAM
*& Form BDC_FIELD
This subroutine gives the field name and field value *
There are no interface parameters to be passed to this subroutine. *
FORM bdc_field USING value(p_name)
value(p_value).
CLEAR fs_bdc.
fs_bdc-fnam = p_name.
fs_bdc-fval = p_value.
APPEND fs_bdc TO t_bdc.
ENDFORM. " FORM BDC_FIELD
Regards,
jaya -
How to write procedure for creating a row
Hi
How to write procedure for creating a new row in data table when button clicked.Hi
I am able to create a row.by writing a method in Application module class.
method for creating a row in fin_years view:
public void createRow() {
Row newRow = (Row)getFinYearsView1().createRow();
newRow.setNewRowState(Row.STATUS_INITIALIZED);
//get instance of the above created view object
ViewObjectImpl vo=getFinYearsView1();
// to insert row at the end of the table
vo.insertRowAtRangeIndex(vo.getRangeSize()-1, (Row)newRow);
System.out.println(getFinYearsView1().getCurrentRowIndex());
but it doest not create row at last in the data table.Instead it insert row in middle.. -
How to write Validations for RadioButton
Hi All,
in my Application , two RadioButtons and one submitbutton is there, in that
1. yes
2. no
both are radio buttons
when i click on submit button, without selecting any one of those radiobuttons ,
it shud display error message, this errormessage i have written in iwdmessage.
it shud show this error message, instead of displaying nullpointer exception.
how to write validation for this.
please help me.
regards
sushHi shushma,
Simply put a check that:
If(wdContext.current<YOUR_NODE>Element().get<YOUR_ATTRIBUTE_NAME> !=null){
else{
// Show the error messages
//Displaying the error message is very easy.
//You can report exception using the message manager API's. You will get this easily on SDN.
I hope this helps! if you need ay further help please let me know.
Thanks and Regards,
Pravesh
Maybe you are looking for
-
Mini-DVI- Svideo- HDTV problem
I have a mid-2007 iMac and I'm attempting to connect it to my 2005 model Panasonic plasma TV to mirror my desktop. I'm using a Dynex mini-DVI to s-video adapter and have have not yet been able to view my Mac desktop on my tv. I've tried various met
-
Hi For sales, I have to pay the amount to Broker/ Agent some amonut based on gross price. How to do. Ex: Base price - 1000 commision - 20 Discount - 15 frieght------ 30 net value-- 1015 The commision s
-
What is the best setting to import songs from a CD. Right now I'm using the Apple Lossless, but is there one that will take up less memory?
-
Why can i import a .mov to final cut?
I had HD video with the .mpg format so I converted to .mov and it's not importing it to final cut. Does anyone know what can I do in order to open it in fc?
-
hi, I am not able to update "My Number" under "Phone\Settings" am using iPhone 4 anybody know what shall I do?