SBM Javascript Library Guide

SBM Javascript Library Guide

SERENA® BUSINESS MANAGER SBM JavaScript Library Guide Serena Proprietary and Confidential Information Copyright © 2007–2013 Serena Software, Inc. All rights reserved. This document, as well as the software described in it, is furnished under license and may be used or copied only in accordance with the terms of such license. Except as permitted by such license, no part of this publication may be reproduced, photocopied, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, recording, or otherwise, without the prior written permission of Serena. Any reproduction of such software product user documentation, regardless of whether the documentation is reproduced in whole or in part, must be accompanied by this copyright statement in its entirety, without modification. This document contains proprietary and confidential information, and no reproduction or dissemination of any information contained herein is allowed without the express permission of Serena Software. The content of this document is furnished for informational use only, is subject to change without notice, and should not be construed as a commitment by Serena. Serena assumes no responsibility or liability for any errors or inaccuracies that may appear in this document. License and copyright information for 3rd party software included in this release can be found on the SBM product news page at http://support.serena.com/ProductNews/default.aspx and may also be found as part of the software download available at http://www.support.serena.com. Trademarks Serena, TeamTrack, StarTool, PVCS, Comparex, Dimensions, Prototype Composer, Mariner and ChangeMan are registered trademarks of Serena Software, Inc. The Serena logo, Version Manager and Mover are trademarks of Serena Software, Inc. All other products or company names are used for identification purposes only, and may be trademarks of their respective owners. U.S. Government Rights Any Software product acquired by Licensee under this Agreement for or on behalf of the U.S. Government, its agencies and instrumentalities is "commercial software" as defined by the FAR. Use, duplication, and disclosure by the U.S. Government is subject to the restrictions set forth in the license under which the Software was acquired. The manufacturer is Serena Software, Inc., 1850 Gateway Drive, 4th Floor, San Mateo, California 94404. Part number: Product version: 10.1.3 Publication date: 2013-12-03 2 Serena® Business Manager (SBM) Table of Contents Overview ............................................................................................................5 Reference............................................................................................................5 Event Methods ...................................................................................................6 AddLoadCallback .............................................................................................6 AddClickCallback .............................................................................................7 AddChangeCallback ..........................................................................................7 AddRadioCallback.............................................................................................9 AddSubmitCallback ....................................................................................... 10 AddFocusCallback.......................................................................................... 11 AddSectionCallback ....................................................................................... 12 AddTabCallback .......................................................................................... 13 GetFormActionsEventSource ........................................................................... 14 Field Methods ................................................................................................ 14 MakeFieldInvalid .......................................................................................... 15 MakeFieldValid ............................................................................................. 16 IsFieldEmpty ................................................................................................ 17 IsFieldChecked ............................................................................................. 17 GetFieldValue ............................................................................................. 18 SetFieldValue ............................................................................................. 19 GetFieldValues ............................................................................................. 20 SetFieldValues ............................................................................................. 21 GetMultiListValues ....................................................................................... 22 SetMultiListValues ....................................................................................... 23 MakeFieldRequired ....................................................................................... 24 MakeFieldOptional ....................................................................................... 25 DisableField ................................................................................................ 26 EnableField ................................................................................................ 27 HideField...................................................................................................... 27 SBM JavaScript Library Guide 3 ShowField ................................................................................................... 28 HideSection ................................................................................................ 29 ShowSection ................................................................................................ 29 IsSectionShown .......................................................................................... 30 ExpandSection ............................................................................................. 30 CollapseSection .......................................................................................... 31 IsSectionExpanded ....................................................................................... 32 ActivateTab ................................................................................................ 32 IsTabActivated ............................................................................................. 33 RefreshWidget ............................................................................................. 33 SetLabelText ................................................................................................ 34 GetLabelText ................................................................................................ 34 Advanced Functions .......................................................................................... 35 Querying REST Service Results ........................................................................ 35 Pre-Selecting Rows in a REST Grid Widget ......................................................... 39 GetWidget Method .......................................................................................... 40 ShowErrorDiv Method .................................................................................... 40 Internal Functions ............................................................................................. 41 GetFieldByName ............................................................................................. 41 GetLabelByName............................................................................................. 42 GetFieldWidgetByName .................................................................................... 43 JavaScript Examples .......................................................................................... 43 Setting Field Properties Based on Field Values ................................................... 44 Changing Field Properties Based on Date Change ................................................ 46 Changing Field Properties Based on Field Value Length ....................................... 47 Marking a Field as Optional or Required ............................................................ 47 4 Serena® Business Manager (SBM) Overview The SBM JavaScript library is automatically included with every custom form. You do not need to do anything to access this library. JavaScript can be added to a custom form in two ways: • Importing or editing a JavaScript file, adding it to the process app, and then adding it to a custom form. The advantage of using this method is that you can reuse the file in several forms. • Adding an HTML/JavaScript widget with the content of <script>[your content]</script> to a custom form. The advantage of using this method is that you can quickly edit and test the widget on a custom form, and later move its content to a JavaScript file to reuse on other custom forms. After you create a JavaScript file, you can import it by adding it to your custom form from the JavaScripts tab in the Property Editor for a form in SBM Composer. Tip: You can define form actions in SBM Composer in an intuitive, condition- driven interface that allows you to include dynamic behavior in custom forms without JavaScript programming. For more information,

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    48 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us