• SCWells72
  • NEWBIE
  • 25 Points
  • Member since 2011

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 4
    Replies

Is there a prescribed best practice to segmenting portions of your code artifacts into discrete class libraries?  For example, we have Apex utility classes, reusable custom VisualForce components (including their components, controller classes, etc.), and general-purpose business objects and their logic classes.  The applications themselves are built on top of those reusable layers.  The only support for packing/namespacing is through published managed packages (for example, I've installed apex-lang and can access those classes through the "al" namespace), so I was wondering if there's a set of prescribed best practices for this typical component-oriented organization of business logic artifacts.

 

I'd like to get my arms around this before our org really starts cranking so we're organizing well from the start.  Any pointers?

 

Thanks!

My VisualForce custom components are always surrounded by a SPAN tag like <span id="j_idXXX:...">..custom-component-output...</span>.  Is there any way to suppress that SPAN tag so that the output is exactly what my component creates and nothing more?

 

Thanks!

 

Hi, I'm relatively new to the Force.com platform but am finding it very interesting.  I'm in the process of exploring a reusable integration between jqGrid and VisualForce through custom components.  I have an early version working now but I have two issues that I'd like to resolve:

 

Nested custom components

 

I can't figure out how to have two VisualForce custom components have a nesting relationship, for example, like pageBlockTable and column where the  former sets up some outer context through its value and var attributes and the latter can refer to those, presumably through a shared controller?  I know that you can give a custom component an ID and then refer to that component by ID from other components, but that seems like a cumbersome way to couple reusable components.  What I'd like to have in the end is something like:

 

<c:jqGrid id="productsTable" sObjectTypeName="Product2" pageSize="10" pageSizes="10,25,50" height="250">

    <c:jqGridColumn name="Name" width="75"/>

    <c:jqGridColumn name="ProductCode" width="75"/>

    <c:jqGridColumn name="Family" width="150"/>

</c:jqGrid>

 

But I can't figure out how to give jqGridColumn the context established by jqGrid, both in terms of its attributes and the state of its controller.  Any hints on how to do this?  

 

Shared controllers

 

I'm using JSON to provide a data model for jqGrid.  To do so I have the following artifacts (and would add another custom component if I can get a solid answer for the question above):

 

 

  • jqGrid.component - A custom component that creates the JavaScript and HTML for the jqGrid based on its attributes.
  • jqGridPagingController.cls - A controller for the jqGrid component that's responsible for its state but not anything to do with retrieving or paging through data.
  • jqGridJSONPager.page - A custom page that receives the REST request from jqGrid and returns the correct JSON for the current page.
  • jqGridJSONController.cls - A controller for the page above that actually does the heavy lifting of translating the inputs into a StandardSetController, thumbing through the results, and returning model data fit for a JSON response.
Overall I'm pretty happy with this layout, but the two controllers are shared-nothing.  I'm able to create some connection by passing the required subset of the grid component's configuration as query parameters to the JSON pager, but each time I do so it seems to set up a brand new controller context and therefore a brand new StandardSetController.  This seems VERY inefficient.  Is there any way I can have these guys either ideally share a controller or minimally retain state in jsGridJSONController across invocations?
Thanks much for any tips!

 

Hi friends,

 

   Can u share u r knowledge with me,

 

Scenario:-

 

      I want to write generic trigger for all objects,i.e i need to pass object name to the trigger then trigger will fired on that object(while insserting records). How i can acieve this.

 

 

Thanx In advance

   ForceDev79

Hi, I'm relatively new to the Force.com platform but am finding it very interesting.  I'm in the process of exploring a reusable integration between jqGrid and VisualForce through custom components.  I have an early version working now but I have two issues that I'd like to resolve:

 

Nested custom components

 

I can't figure out how to have two VisualForce custom components have a nesting relationship, for example, like pageBlockTable and column where the  former sets up some outer context through its value and var attributes and the latter can refer to those, presumably through a shared controller?  I know that you can give a custom component an ID and then refer to that component by ID from other components, but that seems like a cumbersome way to couple reusable components.  What I'd like to have in the end is something like:

 

<c:jqGrid id="productsTable" sObjectTypeName="Product2" pageSize="10" pageSizes="10,25,50" height="250">

    <c:jqGridColumn name="Name" width="75"/>

    <c:jqGridColumn name="ProductCode" width="75"/>

    <c:jqGridColumn name="Family" width="150"/>

</c:jqGrid>

 

But I can't figure out how to give jqGridColumn the context established by jqGrid, both in terms of its attributes and the state of its controller.  Any hints on how to do this?  

 

Shared controllers

 

I'm using JSON to provide a data model for jqGrid.  To do so I have the following artifacts (and would add another custom component if I can get a solid answer for the question above):

 

 

  • jqGrid.component - A custom component that creates the JavaScript and HTML for the jqGrid based on its attributes.
  • jqGridPagingController.cls - A controller for the jqGrid component that's responsible for its state but not anything to do with retrieving or paging through data.
  • jqGridJSONPager.page - A custom page that receives the REST request from jqGrid and returns the correct JSON for the current page.
  • jqGridJSONController.cls - A controller for the page above that actually does the heavy lifting of translating the inputs into a StandardSetController, thumbing through the results, and returning model data fit for a JSON response.
Overall I'm pretty happy with this layout, but the two controllers are shared-nothing.  I'm able to create some connection by passing the required subset of the grid component's configuration as query parameters to the JSON pager, but each time I do so it seems to set up a brand new controller context and therefore a brand new StandardSetController.  This seems VERY inefficient.  Is there any way I can have these guys either ideally share a controller or minimally retain state in jsGridJSONController across invocations?
Thanks much for any tips!

 

Hi All!

I know Java and I know Apex But I really don't understand the way they work together!

I took a look in Cookbook ect. but I can't fint a step by step or just a good tutorial that explains

the steps to create:

1. Java code that will be called from Apex. (In my case it has to be apex trigger).

2. How to call Apex from Java code?

 

The questions are very general but I could really hep if I could find some tutorial that explains what and how to install in order to get this thing working.

 

Thank you!