IC5Notice: We have upgraded developerWorks Community to the latest version of IBM Connections. For more information, read our upgrade FAQ.
Topic
  • 23 replies
  • Latest Post - ‏2014-06-06T05:43:20Z by SubasiniRath
Abhishek127
Abhishek127
6 Posts

Pinned topic Web Experience Factory

‏2013-09-16T08:59:40Z |

hi all,

i have to insert some information into sql database by using SQL call builder,how to do ,i don't know.

i had tried,but i faced some issue.how to use that bulider.please suggest me..

  • mburati
    mburati
    2553 Posts

    Re: Web Experience Factory

    ‏2013-09-16T13:30:12Z  

    A general Web Experience Factory best practice is to use the highest level builder available for the use case,  as doing so will automate more for you than using lower level builders and require less knowledge of how to hook the results of the lower level builders together.

    For DB/SQL, the SQL Data Services builder does multiple things for you, including building SQL statements (and setting up SQL Call for you) and creating Service Operations for Create (insert),  Read,  Update and Delete  against a database table.   Take a look at the SQL Data Services builder and see if that helps.

    If you're new to Web Experience Factory, I recommend going through the Tutorials, Videos, Samples and Learning Roadmap available at the Web Experience Factory Wiki (url below).

     

    I hope that info helps,
    ..Mike Burati 
    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.
  • Abhishek127
    Abhishek127
    6 Posts

    Re: Web Experience Factory

    ‏2013-09-17T09:23:03Z  
    • mburati
    • ‏2013-09-16T13:30:12Z

    A general Web Experience Factory best practice is to use the highest level builder available for the use case,  as doing so will automate more for you than using lower level builders and require less knowledge of how to hook the results of the lower level builders together.

    For DB/SQL, the SQL Data Services builder does multiple things for you, including building SQL statements (and setting up SQL Call for you) and creating Service Operations for Create (insert),  Read,  Update and Delete  against a database table.   Take a look at the SQL Data Services builder and see if that helps.

    If you're new to Web Experience Factory, I recommend going through the Tutorials, Videos, Samples and Learning Roadmap available at the Web Experience Factory Wiki (url below).

     

    I hope that info helps,
    ..Mike Burati 
    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.

    Thanks 4 reply.but i am beginr.Actually i have 2 use my  my own GUI  not inbuiltGUI.

    if u  use inbuilt GUI ,some light blue color is showing on form page.

    one form page like firstname and lastname and submit button,if i use SQL CreateTable builder,then  values are inserted in to database

     

    but if i use sql call  builder, it is not inserted in to database...

  • mburati
    mburati
    2553 Posts

    Re: Web Experience Factory

    ‏2013-09-17T11:56:01Z  

    Thanks 4 reply.but i am beginr.Actually i have 2 use my  my own GUI  not inbuiltGUI.

    if u  use inbuilt GUI ,some light blue color is showing on form page.

    one form page like firstname and lastname and submit button,if i use SQL CreateTable builder,then  values are inserted in to database

     

    but if i use sql call  builder, it is not inserted in to database...

    SQL Data Service builder builds the SQL Call and Service Operations for a service provider model, not the UI, so you should still be able to use it even if you want a customized UI.   Note, SQL Table Create is built on top of SQL Data Service  (does the SQL DS and allows you to create a table - used mostly for samples/demos) and SQL DataService is built on top of SQL Call (and Service Definition and Service Operation), but does a little more for you.

    You can customize the colors via CSS.   You can customize the HTML and the rest of the UI, even if generated with high levle UI builders, via multiple means, described in the Learning Roadmap and Wiki articles I suggested referring to above.

    If you can provide more details (eg, a simple sample model with no proprietary or confidential info) showing what you're trying to do and desribing more what it's doing and not doing, it may help someone spot what it's missing.

    I hope that info helps,
    ..Mike Burati 
    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.
  • Abhishek127
    Abhishek127
    6 Posts

    Re: Web Experience Factory

    ‏2013-09-18T12:32:11Z  
    • mburati
    • ‏2013-09-17T11:56:01Z

    SQL Data Service builder builds the SQL Call and Service Operations for a service provider model, not the UI, so you should still be able to use it even if you want a customized UI.   Note, SQL Table Create is built on top of SQL Data Service  (does the SQL DS and allows you to create a table - used mostly for samples/demos) and SQL DataService is built on top of SQL Call (and Service Definition and Service Operation), but does a little more for you.

    You can customize the colors via CSS.   You can customize the HTML and the rest of the UI, even if generated with high levle UI builders, via multiple means, described in the Learning Roadmap and Wiki articles I suggested referring to above.

    If you can provide more details (eg, a simple sample model with no proprietary or confidential info) showing what you're trying to do and desribing more what it's doing and not doing, it may help someone spot what it's missing.

    I hope that info helps,
    ..Mike Burati 
    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.

    i have a form page.when i click submit button,it will go to ActionList,then SQL Call and at last it will go to DB for storing information.

    but i am unable to read the actionlist mean (how to pass argument.).Actually what happen the values are stored in to db but it is not showing in DB.

    If u insert something 

      Firstname     Lastname

    1   -------            -----------

    2  ----------         ---------               like this......

    if u select Firstname from tablename where Lastname='XXXXX'

    it showing that..

      Firstname

    1 -----------

     

    i have uploaded my model.please check it..

     

     

    Attachments

  • mburati
    mburati
    2553 Posts

    Re: Web Experience Factory

    ‏2013-09-18T14:31:23Z  

    i have a form page.when i click submit button,it will go to ActionList,then SQL Call and at last it will go to DB for storing information.

    but i am unable to read the actionlist mean (how to pass argument.).Actually what happen the values are stored in to db but it is not showing in DB.

    If u insert something 

      Firstname     Lastname

    1   -------            -----------

    2  ----------         ---------               like this......

    if u select Firstname from tablename where Lastname='XXXXX'

    it showing that..

      Firstname

    1 -----------

     

    i have uploaded my model.please check it..

     

     

    It would be best if you could spend some time going through the Learning Roadmap on the WEF Wiki, to learn some of the best practices and how to leverage what WEF can automate for you, so you won't have to try to use so many low level builders like this and try to wire them together.

     - In general, it's best to use high level builders that automate multiple parts of the use case pattern, rather than lots of low level control builders (that the higher level builders would've automated for you) that you have to wire together.

     - This model uses a number of low level text and text input and control builders, where an Input Form builder would've done more of that for you (allowing you to then focus on customizing the UI with HTML template, HTML Data Layout and/or CSS changes).

     - It's best to use an SOA pattern and put Data Access builders (such as SQL Data Services or if you must,  SQL Call) in a provider model, expose that as a service provider, and then leverage that via service consumer model and builder, to separate the data layer from the UI layer (again, going through the learning roadmap and tutorials and wiki samples and videos can help with this)

     - Your control builder (Button) is set to "Link to Action", but you want it to submit the form with the new inputs, so it should be set to "Submit Form and Invoke Action".

     - Your control builder (Button) invokes the action list called "second"  but that immediately tries to invoke the data service without populating the variable associated with that data service.  If you used a service consumer/provider approach and Input Form or View and Form, then the higher level builder would not only put the labels and inputs on the page for you, along with a control button, but it would've (via WEF "Page Automation")  generated the code to take the form inputs, validate them and save them to the variable associated with the data service operation.   By using the lowest level builders,  you're avoiding that power and automation of WEF's higher level builders and missing out on pieces like this.   

    While I don't recommend doing this via low level builders (and data operations in a consumer UI model - (again, please use a high level builder that leverages page automation to do these sorts of things), explaining the missing parts can help you understand what the higher level builders are doing under the covers,  so in your "second" action list, try adding the following two assignments (I did this via the pickers in your action list) to assign from the page inputs (after changing your button to "Submit form and invoke action" from "Link to Action")  to assign the form inputs into your
    insert"  data service's input variable:

        Assignment!DataServices/insert/execute/Inputs/insertInputs/Parameter1Value=${Inputs/FirstName}

        Assignment!DataServices/insert/execute/Inputs/insertInputs/Parameter2Value=${Inputs/LastName}

    Note, you need to do that "before" you call DataServices/insert/execute  so the inputs from the form will be available to the inputs to the data service when it's invoked.

    I hope that info helps,
    ..Mike Burati 
    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.
  • mburati
    mburati
    2553 Posts

    Re: Web Experience Factory

    ‏2013-09-18T14:49:47Z  
    • mburati
    • ‏2013-09-18T14:31:23Z

    It would be best if you could spend some time going through the Learning Roadmap on the WEF Wiki, to learn some of the best practices and how to leverage what WEF can automate for you, so you won't have to try to use so many low level builders like this and try to wire them together.

     - In general, it's best to use high level builders that automate multiple parts of the use case pattern, rather than lots of low level control builders (that the higher level builders would've automated for you) that you have to wire together.

     - This model uses a number of low level text and text input and control builders, where an Input Form builder would've done more of that for you (allowing you to then focus on customizing the UI with HTML template, HTML Data Layout and/or CSS changes).

     - It's best to use an SOA pattern and put Data Access builders (such as SQL Data Services or if you must,  SQL Call) in a provider model, expose that as a service provider, and then leverage that via service consumer model and builder, to separate the data layer from the UI layer (again, going through the learning roadmap and tutorials and wiki samples and videos can help with this)

     - Your control builder (Button) is set to "Link to Action", but you want it to submit the form with the new inputs, so it should be set to "Submit Form and Invoke Action".

     - Your control builder (Button) invokes the action list called "second"  but that immediately tries to invoke the data service without populating the variable associated with that data service.  If you used a service consumer/provider approach and Input Form or View and Form, then the higher level builder would not only put the labels and inputs on the page for you, along with a control button, but it would've (via WEF "Page Automation")  generated the code to take the form inputs, validate them and save them to the variable associated with the data service operation.   By using the lowest level builders,  you're avoiding that power and automation of WEF's higher level builders and missing out on pieces like this.   

    While I don't recommend doing this via low level builders (and data operations in a consumer UI model - (again, please use a high level builder that leverages page automation to do these sorts of things), explaining the missing parts can help you understand what the higher level builders are doing under the covers,  so in your "second" action list, try adding the following two assignments (I did this via the pickers in your action list) to assign from the page inputs (after changing your button to "Submit form and invoke action" from "Link to Action")  to assign the form inputs into your
    insert"  data service's input variable:

        Assignment!DataServices/insert/execute/Inputs/insertInputs/Parameter1Value=${Inputs/FirstName}

        Assignment!DataServices/insert/execute/Inputs/insertInputs/Parameter2Value=${Inputs/LastName}

    Note, you need to do that "before" you call DataServices/insert/execute  so the inputs from the form will be available to the inputs to the data service when it's invoked.

    I hope that info helps,
    ..Mike Burati 
    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.

    Sorry, one more issue you'll likely need to fix before trying the above.

     - You were creating all the text labels and text input fields in the form with advanced page locations (rather than creating tags in the page with name attributes and then targetting those with the low level builders as one often does if they absolutely have to use custom html and low level builders).   BUT,  you were only giving new tag names to the "Text" (label) builders, not to the "Text Input" builders, where it needs names for the form inputs (in general HTML form inputs need names that you can then reference on the server, not a WEF specific requirement).

     - Try setting the "New tag name" to FirstName for your first name "Text Input" builder and your "New Tag name" to "LastName" for your last name "Text Input" builder before trying the above Assignment statements.

     

    I hope that info helps,
    ..Mike Burati 
    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.
  • Abhishek127
    Abhishek127
    6 Posts

    Re: Web Experience Factory

    ‏2013-09-19T13:49:54Z  
    • mburati
    • ‏2013-09-18T14:49:47Z

    Sorry, one more issue you'll likely need to fix before trying the above.

     - You were creating all the text labels and text input fields in the form with advanced page locations (rather than creating tags in the page with name attributes and then targetting those with the low level builders as one often does if they absolutely have to use custom html and low level builders).   BUT,  you were only giving new tag names to the "Text" (label) builders, not to the "Text Input" builders, where it needs names for the form inputs (in general HTML form inputs need names that you can then reference on the server, not a WEF specific requirement).

     - Try setting the "New tag name" to FirstName for your first name "Text Input" builder and your "New Tag name" to "LastName" for your last name "Text Input" builder before trying the above Assignment statements.

     

    I hope that info helps,
    ..Mike Burati 
    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.

    i didn't get anything .please can u create a sample application for CRUD oprartion on database.

    i will go through that one.please..

    my email id:abhishek.mahapatra127@gmail.com

  • mburati
    mburati
    2553 Posts

    Re: Web Experience Factory

    ‏2013-09-20T02:52:03Z  

    i didn't get anything .please can u create a sample application for CRUD oprartion on database.

    i will go through that one.please..

    my email id:abhishek.mahapatra127@gmail.com

    If you add the "Tutorials" feature set to your project and go through the documentation and models for the tutorials, one of the tutorials is a crud based provider and consumer against a database.

    Also, in the WEF wiki referenced above and below URL, are videos showing how to build the provider and consumer using WEF high level builders, for a DB crud app.

    I suggest going through those (along with the learning roadmap) to use the high level builders available to automate your use case and pattern.    In addition, if you follow the steps I decribed above to resolve the issues in your low level builder model, you may find that works (although not in a best practice way) against your database, for a simple insert, as it did for me (I had to change the datasource and table to point to an existing DB I had, in additoin to fixing the issues I mentioned in the bullets above).

    I hope that info helps,
    ..Mike Burati 
    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.

     

  • Abhishek127
    Abhishek127
    6 Posts

    Re: Web Experience Factory

    ‏2013-09-20T12:57:45Z  
    • mburati
    • ‏2013-09-20T02:52:03Z

    If you add the "Tutorials" feature set to your project and go through the documentation and models for the tutorials, one of the tutorials is a crud based provider and consumer against a database.

    Also, in the WEF wiki referenced above and below URL, are videos showing how to build the provider and consumer using WEF high level builders, for a DB crud app.

    I suggest going through those (along with the learning roadmap) to use the high level builders available to automate your use case and pattern.    In addition, if you follow the steps I decribed above to resolve the issues in your low level builder model, you may find that works (although not in a best practice way) against your database, for a simple insert, as it did for me (I had to change the datasource and table to point to an existing DB I had, in additoin to fixing the issues I mentioned in the bullets above).

    I hope that info helps,
    ..Mike Burati 
    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.

     

    when i click submit button it is showing 

    "The action _gen_call_main in model dbConsumer is not publicly accessible.".
     

    Attachments

  • mburati
    mburati
    2553 Posts

    Re: Web Experience Factory

    ‏2013-09-20T15:17:27Z  

    when i click submit button it is showing 

    "The action _gen_call_main in model dbConsumer is not publicly accessible.".
     

    When a request fails for unexplained reasons, the first things to look for are typically:

     - Any error in the portal's SystemOut or SystemErr logs

     - Any error in the deployed application's logs (for a WEF WAR this would be in WEB-INF/logs/event.log in the deployed WAR (not the project))

     - Any Javascript error in the browser console (eg, right-click inspect element on the button/link before clicking it in FF/Firebug or CHrome  or use IE's F12 dev tools).    If a WEF AJAX request for a partial page refresh returns an error OR a page other than what it's expecting to place in the partial refresh region, it assumes there may be an expired session or missing session on the server and it tries a full page browser refresh to get the server to give it a new session (and if in portal to send you back to the portal login page).

     

    WEF protects against a browser calling a method/action that it doesnt' believe had a control (eg, Link, Button, HTML Event Action) builder associated with it, so it's possible there was a generation error (which should show up in the logs) where part of the application didn't finish generating (eg, due to DB issue or similar).

     

    I hope that info helps,
    ..Mike Burati 
    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.
  • Abhishek127
    Abhishek127
    6 Posts

    Re: Web Experience Factory

    ‏2013-09-23T07:24:20Z  
    • mburati
    • ‏2013-09-20T15:17:27Z

    When a request fails for unexplained reasons, the first things to look for are typically:

     - Any error in the portal's SystemOut or SystemErr logs

     - Any error in the deployed application's logs (for a WEF WAR this would be in WEB-INF/logs/event.log in the deployed WAR (not the project))

     - Any Javascript error in the browser console (eg, right-click inspect element on the button/link before clicking it in FF/Firebug or CHrome  or use IE's F12 dev tools).    If a WEF AJAX request for a partial page refresh returns an error OR a page other than what it's expecting to place in the partial refresh region, it assumes there may be an expired session or missing session on the server and it tries a full page browser refresh to get the server to give it a new session (and if in portal to send you back to the portal login page).

     

    WEF protects against a browser calling a method/action that it doesnt' believe had a control (eg, Link, Button, HTML Event Action) builder associated with it, so it's possible there was a generation error (which should show up in the logs) where part of the application didn't finish generating (eg, due to DB issue or similar).

     

    I hope that info helps,
    ..Mike Burati 
    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.

    yeah i got it...Thanks..

    Actually i had taken 2 model .one is Privider MOdel another one is Consumer Model.In provide Model i had placed SQL Tabke Create Bulider.And in Consumer MOdel I had imported this Provider MOdel.Now CRUD operation is working Fine.

    But One thing  i have to Change that is customize the GUI Part..I WANT 2 CUSTOMIZE DATA_CONSUMER mODEL.

     

    HOW TO DO THAT ONE PLEASE SUGGEST ME..TELL ME STEP BY STEP..

    Attachments

    Updated on 2013-09-23T10:20:15Z at 2013-09-23T10:20:15Z by Abhishek127
  • mburati
    mburati
    2553 Posts

    Re: Web Experience Factory

    ‏2013-09-23T17:39:48Z  

    yeah i got it...Thanks..

    Actually i had taken 2 model .one is Privider MOdel another one is Consumer Model.In provide Model i had placed SQL Tabke Create Bulider.And in Consumer MOdel I had imported this Provider MOdel.Now CRUD operation is working Fine.

    But One thing  i have to Change that is customize the GUI Part..I WANT 2 CUSTOMIZE DATA_CONSUMER mODEL.

     

    HOW TO DO THAT ONE PLEASE SUGGEST ME..TELL ME STEP BY STEP..

    There are a number of ways that Web Experience Factory allows you to customize the generated user interface.   The learning roadmap on the WEF WIki at the following URL has a number of the recommended ways described in various levels of detail:

    http://www-10.lotus.com/ldd/pfwiki.nsf/dx/learning-websphere-portlet-factory#Enhancing+and+customizing+the+user+interface

    Without knowing what you're trying to customize and how, it's hard to recommend which of those would be best for your particular situation, so I suggest going through the wiki articles on UI customization first, trying that and then seeing what questions you still have.    It looks like you added a Data Field Settings (DFS) builder, which is a good start, for customizing labels, whether fields are hidden (or hidden only on initial list pages etc), setting lookup tables for select lists etc.   I don't particularly care for Display Manager myself, as there are other ways of getting more flexible customization (see the wiki articles) than the old Display Manager builder allows.

    As you'll see in the Wiki Learning Roadmap articles,  the high level builders (V&F, DSUI...) have base pages that they use to generaet the UI from, along with HTML Templates (page automation templates) for how it lays out the data in those base pages,  stylesheets etc.   To allow you to have a custom look/feel across your webapps/portlets,  those high level builders usually have "Use Theme" checked which hides the builder inputs for what to use for base pages and stylesheets and templates and isntead gets those values from a WEF UI "Theme" which specifies those in an XML file that can be used across your entire project or for certain models via Theme builder.    Try going through the learning roadmap UI articles with that in mind, and see how far you can get customizing the UI with that info and if you get stuck after that, a more detailed question here based on what you've tried and what you're trying to get it to look like, would help.

     

     

    I hope that info helps,
    ..Mike Burati 
    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.

     

  • Abhishek_Tec
    Abhishek_Tec
    12 Posts

    Re: Web Experience Factory

    ‏2013-09-25T06:59:17Z  
    • mburati
    • ‏2013-09-23T17:39:48Z

    There are a number of ways that Web Experience Factory allows you to customize the generated user interface.   The learning roadmap on the WEF WIki at the following URL has a number of the recommended ways described in various levels of detail:

    http://www-10.lotus.com/ldd/pfwiki.nsf/dx/learning-websphere-portlet-factory#Enhancing+and+customizing+the+user+interface

    Without knowing what you're trying to customize and how, it's hard to recommend which of those would be best for your particular situation, so I suggest going through the wiki articles on UI customization first, trying that and then seeing what questions you still have.    It looks like you added a Data Field Settings (DFS) builder, which is a good start, for customizing labels, whether fields are hidden (or hidden only on initial list pages etc), setting lookup tables for select lists etc.   I don't particularly care for Display Manager myself, as there are other ways of getting more flexible customization (see the wiki articles) than the old Display Manager builder allows.

    As you'll see in the Wiki Learning Roadmap articles,  the high level builders (V&F, DSUI...) have base pages that they use to generaet the UI from, along with HTML Templates (page automation templates) for how it lays out the data in those base pages,  stylesheets etc.   To allow you to have a custom look/feel across your webapps/portlets,  those high level builders usually have "Use Theme" checked which hides the builder inputs for what to use for base pages and stylesheets and templates and isntead gets those values from a WEF UI "Theme" which specifies those in an XML file that can be used across your entire project or for certain models via Theme builder.    Try going through the learning roadmap UI articles with that in mind, and see how far you can get customizing the UI with that info and if you get stuck after that, a more detailed question here based on what you've tried and what you're trying to get it to look like, would help.

     

     

    I hope that info helps,
    ..Mike Burati 
    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.

     

    Sir please go through this project.

    i have created 2 models.

    1..STUDENT_INFORMATION.model

    2..student.model

     

    In 1st Model i am trying to insert all this information into database.but unfortunatly,it shows second_page as i mention in this model.yes ofcourse in ActionList i placed execute Statement to call this sql Operation.only after clicking Submit button.So Finally not inserting into DB.i have gone though this link and also Some video tutorials

    Actually in video tutorials,they have taken 2 models.one is provider another one is consumer.in consumer they are importing provider model.yeah this is right.after that in  that model they are adding Service Consumer and DSUI.

    Then It is working means values are inserting into DB.

     

    Actually i do not want this type.only i hav sample page .no. of form fields are there.submit button is there.when i click button ,it will insert in to DB.in 1st model i placed service operation ,Service definition,SQLcall.BUt still it is not inserting in to DB.

     

    2>In 2nd Model if u click Insertdetails the form Page will come.in this model DB operation is working Fine.

     

    In 1st why it is not working.suggest me..... i am thinking some mistake in ActionList,when u click submit button.

    May be i do not know.so what to pass in ActionLIst for executing all this things.

     

     

    Attachments

    Updated on 2013-09-25T07:18:58Z at 2013-09-25T07:18:58Z by Abhishek_Tec
  • Abhishek_Tec
    Abhishek_Tec
    12 Posts

    Re: Web Experience Factory

    ‏2013-10-02T09:08:49Z  

    Sir please go through this project.

    i have created 2 models.

    1..STUDENT_INFORMATION.model

    2..student.model

     

    In 1st Model i am trying to insert all this information into database.but unfortunatly,it shows second_page as i mention in this model.yes ofcourse in ActionList i placed execute Statement to call this sql Operation.only after clicking Submit button.So Finally not inserting into DB.i have gone though this link and also Some video tutorials

    Actually in video tutorials,they have taken 2 models.one is provider another one is consumer.in consumer they are importing provider model.yeah this is right.after that in  that model they are adding Service Consumer and DSUI.

    Then It is working means values are inserting into DB.

     

    Actually i do not want this type.only i hav sample page .no. of form fields are there.submit button is there.when i click button ,it will insert in to DB.in 1st model i placed service operation ,Service definition,SQLcall.BUt still it is not inserting in to DB.

     

    2>In 2nd Model if u click Insertdetails the form Page will come.in this model DB operation is working Fine.

     

    In 1st why it is not working.suggest me..... i am thinking some mistake in ActionList,when u click submit button.

    May be i do not know.so what to pass in ActionLIst for executing all this things.

     

     

    when i applied  in  Mobile No  for Validation using Phone No in-built functionlity.

    it is not working for this particular field..suggest me..

     

    And another thing is that how to work with margin and padding for a particular field.

    i had applied but still it is not reflected to form page... howe it will work

    if u have any link for that please give that link..

    Updated on 2013-10-02T09:37:43Z at 2013-10-02T09:37:43Z by Abhishek_Tec
  • Abhishek_Tec
    Abhishek_Tec
    12 Posts

    Re: Web Experience Factory

    ‏2013-10-02T13:11:11Z  

    when i applied  in  Mobile No  for Validation using Phone No in-built functionlity.

    it is not working for this particular field..suggest me..

     

    And another thing is that how to work with margin and padding for a particular field.

    i had applied but still it is not reflected to form page... howe it will work

    if u have any link for that please give that link..

    And also I wrote a customformater class.i hav used 2 builders

    1.Linked java object

    2.Data field Modifier.but still it is not working for Mobile No validation.

  • mburati
    mburati
    2553 Posts

    Re: Web Experience Factory

    ‏2013-10-03T14:28:48Z  

    when i applied  in  Mobile No  for Validation using Phone No in-built functionlity.

    it is not working for this particular field..suggest me..

     

    And another thing is that how to work with margin and padding for a particular field.

    i had applied but still it is not reflected to form page... howe it will work

    if u have any link for that please give that link..

    Some WEF validation (in particular client side validation, as opposed to server side validation) is done via the validation support provided by Dojo input widgets.

    Since many mobile phones / networks are significantly slower than wired and wifi networks, the mobile theme by default tries to significantly reduce the size and amount of http requests required to render the application, and Dojo is large and often requires multiple requests, so it is not enabled by default in the Mobile theme.     Another reason the WEF Dojo RDD is not the default for the mobile theme is that it was found that the Dojo date picker was not working well on mobile devices.

    The "Theme" typically specifies which Rich Data Definition (RDD) file to use by default.   If you look in your Application Tree in the Designer for your generated webapp, you'll see that the theme likely specifies a base mobile rdd when you apply the smarphone or tablet profile.   If you switch it to default or browser applied profile, you'll likely see it use the dojo_base_rdd  which is the one that tells page automation to use Dojo widgets for input fields.    You can use an override in your Theme builder for mobile profile to tell it to use the dojo_base_rdd but be sure to test out the performance over mobile, and the behavior of all the input widgets to be sure that they work ok for the device types you need to support.

     

    I hope that info helps,
    ..Mike Burati 
    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.
  • mburati
    mburati
    2553 Posts

    Re: Web Experience Factory

    ‏2013-10-03T14:33:00Z  

    when i applied  in  Mobile No  for Validation using Phone No in-built functionlity.

    it is not working for this particular field..suggest me..

     

    And another thing is that how to work with margin and padding for a particular field.

    i had applied but still it is not reflected to form page... howe it will work

    if u have any link for that please give that link..

    The "Theme" specifies the default css file(s) to use for various high level builders.   You can see which theme you're using and what the theme settings are in the application tree view of your model/webapp in the designer.

    To see which styles are applying to various elements in a page (whether built with WEF or any other tool) try a browser debugger like Firebug, Chrome right-click-inspect element or IE F12 dev tools).    

    If you need to quickly override a style without needing to provide a custom theme/stylesheet,  CSS does allow for more specific selectors (eg, selectors that include multiple levels including parent/children in the DOM chain) to override other selectors (and as a last case resort, a !important suffix to try to force an override).   That's  not WEF specific so a web search of "CSS selectors"  can provide quite a number of articles on that topic (I don't have any particular one I'd recommend - try searching and see which tutorial/article(s) work best for you on that topic).

    I hope that info helps,
    ..Mike Burati 
    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.
  • mburati
    mburati
    2553 Posts

    Re: Web Experience Factory

    ‏2013-10-03T14:49:47Z  

    Sir please go through this project.

    i have created 2 models.

    1..STUDENT_INFORMATION.model

    2..student.model

     

    In 1st Model i am trying to insert all this information into database.but unfortunatly,it shows second_page as i mention in this model.yes ofcourse in ActionList i placed execute Statement to call this sql Operation.only after clicking Submit button.So Finally not inserting into DB.i have gone though this link and also Some video tutorials

    Actually in video tutorials,they have taken 2 models.one is provider another one is consumer.in consumer they are importing provider model.yeah this is right.after that in  that model they are adding Service Consumer and DSUI.

    Then It is working means values are inserting into DB.

     

    Actually i do not want this type.only i hav sample page .no. of form fields are there.submit button is there.when i click button ,it will insert in to DB.in 1st model i placed service operation ,Service definition,SQLcall.BUt still it is not inserting in to DB.

     

    2>In 2nd Model if u click Insertdetails the form Page will come.in this model DB operation is working Fine.

     

    In 1st why it is not working.suggest me..... i am thinking some mistake in ActionList,when u click submit button.

    May be i do not know.so what to pass in ActionLIst for executing all this things.

     

     

    I don't have your DB to run your models against, or time to completely debug them, but it looks like you may still be missing some info about how to best leverage WEF, which the tutorials and articles on the wiki can help.

     - Using separate consumer/provider models does not force you to get stuck with the UI that WEF generates for you, it's just a best practice to separate the UI from the data access, similar to how you don't put all your Java code in a single class.   A Service Definition builder and Service Operation builder are there for exposing your operations to consumer models, so having them in the same model as the UI builders doesn't really make sense.

     - Using WEF page automation is almost always better than using low level control builders for every field because it does so much more for you.   By using all those low level control builders you're going to have to understand a lot more of how WEF works up front than if you let it do more for you and then customize the UI.

     - You do not have to be stuck with the size/shape/color or highlighting of the generated UI (if that's what the issue was with the generated UI from View and Form or Input form) - those are just defaults.   They can be changed via THeme, or for a quick test, disable theme and specify alternate html and css directly in the buiilder (eg, in Input Form and/or View and Form).

     - You are trying to assign a toString of a Java class (RequestInputs) into an XML variable in that submitAction, which isn't going to do what you'd expect (you're likely getting the toString assigned to the top level element in the XML rather than the right form fields to the right XML child elements.   Again, this is something that WEF page automation should be doing for you, if you let it, via Input Form or View and Form builders.    While you could assign each form field to each level of the Variable XML, I do not personally recommend trying to do everything with these low level builders and non-page-automation like this - it will not result in a very efficient use of WEF. 

     - Try looking at the DB Tutorial and OrdersServiceConsumer sample that come with the product and samples on the Wiki and see if you can learn how to generate the UI you want starting with a working sample, which should help you get the UI you want in this use case.

     - Try changing Themes (eg, from the WEF8 theme to the ootb clean theme) to see how just changing a theme (which changes high level buidler base html pages and css files) can generate different UIs from the same high level builders.

     - You can also try creating a Service Consumer model for your working provider model, using Input Form or VIew and Form and then using the Theme and/or Theme overrides or Input Form builder inputs to have it use alternate CSS / html as a base, to generate the UI you're looking for.

     

     I hope that info helps,
    ..Mike Burati 
    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.

     

  • mburati
    mburati
    2553 Posts

    Re: Web Experience Factory

    ‏2013-10-03T15:15:55Z  
    • mburati
    • ‏2013-10-03T14:49:47Z

    I don't have your DB to run your models against, or time to completely debug them, but it looks like you may still be missing some info about how to best leverage WEF, which the tutorials and articles on the wiki can help.

     - Using separate consumer/provider models does not force you to get stuck with the UI that WEF generates for you, it's just a best practice to separate the UI from the data access, similar to how you don't put all your Java code in a single class.   A Service Definition builder and Service Operation builder are there for exposing your operations to consumer models, so having them in the same model as the UI builders doesn't really make sense.

     - Using WEF page automation is almost always better than using low level control builders for every field because it does so much more for you.   By using all those low level control builders you're going to have to understand a lot more of how WEF works up front than if you let it do more for you and then customize the UI.

     - You do not have to be stuck with the size/shape/color or highlighting of the generated UI (if that's what the issue was with the generated UI from View and Form or Input form) - those are just defaults.   They can be changed via THeme, or for a quick test, disable theme and specify alternate html and css directly in the buiilder (eg, in Input Form and/or View and Form).

     - You are trying to assign a toString of a Java class (RequestInputs) into an XML variable in that submitAction, which isn't going to do what you'd expect (you're likely getting the toString assigned to the top level element in the XML rather than the right form fields to the right XML child elements.   Again, this is something that WEF page automation should be doing for you, if you let it, via Input Form or View and Form builders.    While you could assign each form field to each level of the Variable XML, I do not personally recommend trying to do everything with these low level builders and non-page-automation like this - it will not result in a very efficient use of WEF. 

     - Try looking at the DB Tutorial and OrdersServiceConsumer sample that come with the product and samples on the Wiki and see if you can learn how to generate the UI you want starting with a working sample, which should help you get the UI you want in this use case.

     - Try changing Themes (eg, from the WEF8 theme to the ootb clean theme) to see how just changing a theme (which changes high level buidler base html pages and css files) can generate different UIs from the same high level builders.

     - You can also try creating a Service Consumer model for your working provider model, using Input Form or VIew and Form and then using the Theme and/or Theme overrides or Input Form builder inputs to have it use alternate CSS / html as a base, to generate the UI you're looking for.

     

     I hope that info helps,
    ..Mike Burati 
    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.

     

    I don't usually have time to create model for forum questions, but to try to help get you started so the samples/articles might help more I threw together a really quick sample of a consumer aganist your student provider model that generates a UI similar to what your Student Information model was trying to generate, with high level page automation builders.   See if starting with builders like those used in the attached sample helps.

     

     

     I hope that info helps,
    ..Mike Burati 
    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.

     

    Attachments

  • SubasiniRath
    SubasiniRath
    26 Posts

    Problem while calling Web Service in WEF

    ‏2014-06-03T12:34:07Z  
    • mburati
    • ‏2013-09-18T14:49:47Z

    Sorry, one more issue you'll likely need to fix before trying the above.

     - You were creating all the text labels and text input fields in the form with advanced page locations (rather than creating tags in the page with name attributes and then targetting those with the low level builders as one often does if they absolutely have to use custom html and low level builders).   BUT,  you were only giving new tag names to the "Text" (label) builders, not to the "Text Input" builders, where it needs names for the form inputs (in general HTML form inputs need names that you can then reference on the server, not a WEF specific requirement).

     - Try setting the "New tag name" to FirstName for your first name "Text Input" builder and your "New Tag name" to "LastName" for your last name "Text Input" builder before trying the above Assignment statements.

     

    I hope that info helps,
    ..Mike Burati 
    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.

    Hi

    I am calling a WSDL based web service in WEF. The WSDL has 84 input parameters but in my UI I have only 1 field. 
    How can I ignore the rest input parameters to call my web service. Any sample code is appreciative.

    â€

    The sample WSDL for retrive operation is -

    <xsd:element name="retrieve">
    - <xsd:complexType>
    - <xsd:sequence>
      <xsd:element maxOccurs="1" minOccurs="1" name="context" nillable="true" type="ns1:OperationContext" /> 
      <xsd:element maxOccurs="1" minOccurs="1" name="requestParameters" nillable="true" type="tns:EmpTrainCourseServiceRetrieveRequestDTO" /> 
      <xsd:element maxOccurs="1" minOccurs="1" name="requiredAttributes" nillable="true" type="tns:EmpTrainCourseServiceRetrieveRequiredAttributesDTO" /> 
      <xsd:element maxOccurs="1" minOccurs="1" name="restartInfo" nillable="true" type="xsd:string" /> 
      </xsd:sequence>
      </xsd:complexType>

      </xsd:element>

     

    where

    ​<xsd:complexType name="EmpTrainCourseServiceRetrieveRequestDTO">

    - <xsd:complexContent>
    - <xsd:extension base="ns2:AbstractDTO">
    - <xsd:sequence>
      <xsd:element minOccurs="0" name="attendanceStatus" type="tns:attendanceStatus" /> 
      <xsd:element minOccurs="0" name="employee" type="tns:employee" /> 
      <xsd:element minOccurs="0" name="nonEmployee" type="tns:nonEmployee" /> 
      <xsd:element minOccurs="0" name="trainingCourse" type="tns:trainingCourse" /> 
      <xsd:element minOccurs="0" name="trainingSession" type="tns:trainingSession" /> 
      </xsd:sequence>
      </xsd:extension>
      </xsd:complexContent>
      </xsd:complexType>

     

    Similarly others have their elements together make 84 elements to call retrieve.

  • Khabib
    Khabib
    91 Posts

    Re: Web Experience Factory

    ‏2014-06-04T09:10:21Z  

    Try to understand the samples Projects in which of SQL being used 

    here is link

    http://www-10.lotus.com/ldd/pfwiki.nsf/dx/Web_Expereince_Factory_Samples_Categorized#SQL

  • mburati
    mburati
    2553 Posts

    Re: Problem while calling Web Service in WEF

    ‏2014-06-05T14:26:56Z  

    Hi

    I am calling a WSDL based web service in WEF. The WSDL has 84 input parameters but in my UI I have only 1 field. 
    How can I ignore the rest input parameters to call my web service. Any sample code is appreciative.

    â€

    The sample WSDL for retrive operation is -

    <xsd:element name="retrieve">
    - <xsd:complexType>
    - <xsd:sequence>
      <xsd:element maxOccurs="1" minOccurs="1" name="context" nillable="true" type="ns1:OperationContext" /> 
      <xsd:element maxOccurs="1" minOccurs="1" name="requestParameters" nillable="true" type="tns:EmpTrainCourseServiceRetrieveRequestDTO" /> 
      <xsd:element maxOccurs="1" minOccurs="1" name="requiredAttributes" nillable="true" type="tns:EmpTrainCourseServiceRetrieveRequiredAttributesDTO" /> 
      <xsd:element maxOccurs="1" minOccurs="1" name="restartInfo" nillable="true" type="xsd:string" /> 
      </xsd:sequence>
      </xsd:complexType>

      </xsd:element>

     

    where

    ​<xsd:complexType name="EmpTrainCourseServiceRetrieveRequestDTO">

    - <xsd:complexContent>
    - <xsd:extension base="ns2:AbstractDTO">
    - <xsd:sequence>
      <xsd:element minOccurs="0" name="attendanceStatus" type="tns:attendanceStatus" /> 
      <xsd:element minOccurs="0" name="employee" type="tns:employee" /> 
      <xsd:element minOccurs="0" name="nonEmployee" type="tns:nonEmployee" /> 
      <xsd:element minOccurs="0" name="trainingCourse" type="tns:trainingCourse" /> 
      <xsd:element minOccurs="0" name="trainingSession" type="tns:trainingSession" /> 
      </xsd:sequence>
      </xsd:extension>
      </xsd:complexContent>
      </xsd:complexType>

     

    Similarly others have their elements together make 84 elements to call retrieve.

    Sorry for not noticing this one before now - this really should be a new separate thread, since it's a new question.

     

    If there were just a couple fields you wanted to hide in the UI, then the easiest way would be with Data Field Settings.

     

    Where there are a very large number of inputs and most of the inputs to the service are not required by the consumer, then it's best to not even expose them to the consumer to make it easier for the UI developer to develop the consumer model and to not waste as much space for unnecessary metadata describing and wrapping those unused inputs in the consumer.

     

    The easiest way to do this may be to not expose the WS operation itself via the service definition in the provider but rather to create an Action List there that calls the Web Service, with an argument to the Action List that is the single input you require to pass along.   Then in the action list do an assignment using the picker from the input argument into the right place in the web service operation's input structure, and then call the web service operation and return its response.   Then with Service Operation builder, expose your Action List as an operation to the consumer via the service definition.    Then when you build the consumer model you should have an operation with that single input rather than the detailed ws operation that described all 84 inputs.

     

    I hope that info helps,
    ..Mike Burati 
    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.

     

     

     

  • SubasiniRath
    SubasiniRath
    26 Posts

    Re: Problem while calling Web Service in WEF

    ‏2014-06-06T05:43:20Z  
    • mburati
    • ‏2014-06-05T14:26:56Z

    Sorry for not noticing this one before now - this really should be a new separate thread, since it's a new question.

     

    If there were just a couple fields you wanted to hide in the UI, then the easiest way would be with Data Field Settings.

     

    Where there are a very large number of inputs and most of the inputs to the service are not required by the consumer, then it's best to not even expose them to the consumer to make it easier for the UI developer to develop the consumer model and to not waste as much space for unnecessary metadata describing and wrapping those unused inputs in the consumer.

     

    The easiest way to do this may be to not expose the WS operation itself via the service definition in the provider but rather to create an Action List there that calls the Web Service, with an argument to the Action List that is the single input you require to pass along.   Then in the action list do an assignment using the picker from the input argument into the right place in the web service operation's input structure, and then call the web service operation and return its response.   Then with Service Operation builder, expose your Action List as an operation to the consumer via the service definition.    Then when you build the consumer model you should have an operation with that single input rather than the detailed ws operation that described all 84 inputs.

     

    I hope that info helps,
    ..Mike Burati 
    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.

     

     

     

    Thanks Mike. It resolved my issue. 

            Related to this question I have created another question in below URL. Please help if possible.

     

    https://www.ibm.com/developerworks/community/forums/html/topic?id=cf228c18-dee7-4666-a3e5-fbd59c04618b