Package org.pentaho.gwt.widgets.client.utils.string

Examples of org.pentaho.gwt.widgets.client.utils.string.StringTokenizer.countTokens()


      for ( int i = 0; i < jparams.length(); i++ ) {
        urlParams += i == 0 ? "?" : "&";
        if ( jparams.get( i ).getValue().startsWith( "[" ) && jparams.get( i ).getValue().indexOf( "," ) >= 0 ) {
          // it's an array!
          StringTokenizer st = new StringTokenizer( jparams.get( i ).getValue(), "[]," );
          int tokens = st.countTokens();
          int numParamsAdded = 0;
          for ( int j = 0; j < tokens; j++ ) {
            String token = st.tokenAt( j );
            if ( !StringUtils.isEmpty( token ) ) {
              if ( numParamsAdded > 0 ) {
View Full Code Here


          }
          for ( int i = 0; i < jsSettings.length(); i++ ) {
            String content = jsSettings.get( i ).getValue();
            StringTokenizer nameValuePairs = new StringTokenizer( content, ";" ); //$NON-NLS-1$
            String perspective = null, content_panel_id = null, content_url = null;
            for ( int j = 0; j < nameValuePairs.countTokens(); j++ ) {
              String currentToken = nameValuePairs.tokenAt( j ).trim();
              if ( currentToken.startsWith( "perspective=" ) ) { //$NON-NLS-1$
                perspective = currentToken.substring( "perspective=".length() ); //$NON-NLS-1$
              }
              if ( currentToken.startsWith( "content-panel-id=" ) ) { //$NON-NLS-1$
View Full Code Here

    if ( jsArrayString == null ) {
      return null;
    } else {
      int[] intArray = new int[jsArrayString.length()];
      StringTokenizer tokenizer = new StringTokenizer( jsArrayString.toString(), "," );
      for ( int i = 0; i < tokenizer.countTokens(); i++ ) {
        try {
          String value = tokenizer.tokenAt( i );
          intArray[i] = Integer.parseInt( value );
        } catch ( Throwable t ) {
          Window.alert( t.getMessage() );
View Full Code Here

    if ( path != null ) {
      if ( path.startsWith( "/" ) ) { //$NON-NLS-1$
        path = path.substring( 1 );
      }
      StringTokenizer st = new StringTokenizer( path, '/' );
      for ( int i = 0; i < st.countTokens(); i++ ) {
        String token = st.tokenAt( i );
        pathSegments.add( token );
      }
    }
    TreeItem item = getTreeItem( pathSegments );
View Full Code Here

    if ( path != null ) {
      if ( path.startsWith( "/" ) ) { //$NON-NLS-1$
        path = path.substring( 1 );
      }
      StringTokenizer st = new StringTokenizer( path, '/' );
      for ( int i = 0; i < st.countTokens(); i++ ) {
        pathSegments.add( st.tokenAt( i ) );
      }
    }
    return pathSegments;
  }
View Full Code Here

      // if the override is set, we MUST obey it above all else
      reallyShowNewWindowOption = "true".equals( showNewWindowOverride ); //$NON-NLS-1$
    } else if ( getReturnLocation() != null && !"".equals( getReturnLocation() ) ) { //$NON-NLS-1$
      StringTokenizer st = new StringTokenizer( getReturnLocation(), "?&" ); //$NON-NLS-1$
      // first token will be ignored, it is 'up to the ?'
      for ( int i = 1; i < st.countTokens(); i++ ) {
        StringTokenizer paramTokenizer = new StringTokenizer( st.tokenAt( i ), "=" ); //$NON-NLS-1$
        if ( paramTokenizer.countTokens() == 2 ) {
          // we've got a name=value token
          if ( paramTokenizer.tokenAt( 0 ).equalsIgnoreCase( "showNewWindowOption" ) ) { //$NON-NLS-1$
            reallyShowNewWindowOption = "true".equals( paramTokenizer.tokenAt( 1 ) ); //$NON-NLS-1$
View Full Code Here

    } else if ( getReturnLocation() != null && !"".equals( getReturnLocation() ) ) { //$NON-NLS-1$
      StringTokenizer st = new StringTokenizer( getReturnLocation(), "?&" ); //$NON-NLS-1$
      // first token will be ignored, it is 'up to the ?'
      for ( int i = 1; i < st.countTokens(); i++ ) {
        StringTokenizer paramTokenizer = new StringTokenizer( st.tokenAt( i ), "=" ); //$NON-NLS-1$
        if ( paramTokenizer.countTokens() == 2 ) {
          // we've got a name=value token
          if ( paramTokenizer.tokenAt( 0 ).equalsIgnoreCase( "showNewWindowOption" ) ) { //$NON-NLS-1$
            reallyShowNewWindowOption = "true".equals( paramTokenizer.tokenAt( 1 ) ); //$NON-NLS-1$
            break;
          }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.