How to keep a portlet's state across re-renders?

Scenario:
Portlet is held within a panelgrouplayout with rendered="{PortletBean.portletRendered}";  However, when portletRendered flag is flipped, the portlet immediately loses it's state and on next render, it's as if I'm accessing the portlet for the first time.  Below is a fast test case using Untitled1Backing for same effect.
Sample Consumer Page:
<af:form id="f1">
        <af:panelGroupLayout id="pgl2">
        <af:panelGroupLayout id="pgl1"
                              rendered="#{Untitled1Backing.portletRendered}">
        <adfp:portlet value="#{bindings.SandboxPortlets2untitled1jspx1_1}"
                      id="portlet1" title="Test1"/>
        </af:panelGroupLayout>
        <af:commandButton text="Unrender" id="cb1"
                          action="#{Untitled1Backing.unrender}"
                          />
        <af:commandButton text="Render" id="cb2"
                          action="#{Untitled1Backing.render}"
                          />
        </af:panelGroupLayout>
      </af:form>
Sample Producer Page:
<af:form id="f1">
<af:selectOneChoice label="Select a Value:"
id="soc1">
<af:selectItem label="1_value" value="1_value." id="si1"/>
<af:selectItem label="2_value." value="2_value." id="si2"/>
<af:selectItem label="3_value." value="3_value." id="si3"/>
<af:selectItem label="4_value." value="4_value." id="si6"/>
</af:selectOneChoice>
</af:form>

Looks like even inline style hidden doesn't work.  After setting the values and doing an unrender/render toggle, the portlet's drop downs are:
Stateless: null <--Want Value0
Page1_State: Value2
Multi-Page_State: Value4
Below are the code segments:
Consumer:
<af:panelGroupLayout id="pgl1">
<af:panelGroupLayout id="pgl2"
partialTriggers="cb1 cb2"
inlineStyle="#{Untitled1Backing.stringRender}">
<adfp:portlet value="#{bindings.SandboxPortlets2untitled1jspx2_1}"
id="portlet1"/>
</af:panelGroupLayout>
<af:commandButton text="Render" id="cb1"
action="#{Untitled1Backing.render}"
partialSubmit="true" partialTriggers="cb1 cb2"/>
<af:commandButton text="Unrender" id="cb2"
action="#{Untitled1Backing.unrender}"
rendered="#{Untitled1Backing.portletRendered}"
partialSubmit="true" partialTriggers="cb1 cb2"/>
</af:panelGroupLayout>
Backing:
public String getStringRender() {
if(portletRendered)
return null;
else
return "visibility:hidden;";
Producer:
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
          xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
  <af:panelGroupLayout id="pgl1" layout="vertical">
    <af:selectOneChoice label="Stateless" id="soc1">
      <af:selectItem label="Value0" value="Value0" id="si1"/>
      <af:selectItem label="Value1" value="Value1" id="si2"/>
    </af:selectOneChoice>
    <af:selectOneChoice label="Page1_State"
                        value="#{selectOne_StateKeeper.page1String}"
                        id="soc2" valuePassThru="true" autoSubmit="true">
      <af:selectItem label="Value2" value="Value2" id="si4"/>
      <af:selectItem label="Value3" value="Value3" id="si5"/>
    </af:selectOneChoice>
    <af:selectOneChoice label="Multi-page_State"
                        value="#{selectOne_StateKeeper.sharedString}"
                        id="soc3" valuePassThru="true" autoSubmit="true">
      <af:selectItem label="Value4" value="Value4" id="si3"/>
      <af:selectItem label="Value5" value="Value5" id="si6"/>
    </af:selectOneChoice>
    <af:commandButton text="Go to Page2" id="cb1" action="Page2"/>
  </af:panelGroupLayout>
</jsp:root>

Similar Messages

  • How to keep first form window state maximize when you called the second for

    HI,
    how to keep first form window state maximize when you called the second form ?
    Thanks

    Here is sample of doing this.
    Chris

  • How to keep a music file playing across slides in Keynote '09

    Hi all,
    I've made an opening slide which has a 4 minute long music piece as it's first build. Now, after the 4-5 photos that drift in over the music, I want to change the slide and bring in the next few slides at timed transitions but I want to keep the music playing continuously over these all and end the presentation with the final slide over the end of the music. How do I do this?
    Thanks.

    Instead of having the song on the slide and using a build in for it, make the song the soundtrack. To make the song the soundtrack, add it in the Inspector>Document>Audio section. Then you can time out all your transitions and builds. The song will not fade out at the end, but you can add it to Garage Band and shorten it and fade it out if needed.

  • How to keep up the session state values uncleared after page submit

    hi,
    i am using Application Express 4.0.2.00.07
    and 11g
    i have created a tabular form manually useing apex_items.
    select apex_item.checkbox(1,null) as "check",
           APEX_ITEM.DISPLAY_AND_SAVE(4,line_item_no) as "Line Item No",
           APEX_ITEM.DISPLAY_AND_SAVE(5,line_item) as "line item",
           APEX_ITEM.text(6,module) as "Modulle",
           rstag as "RS tag",
           *apex_item.text(2,null) as "FS Name"*,      --"fsname" and "fstag" are not columns of this table(pli)
           *apex_item.text(3,null) as "FS Tag"*
    from pli where pid = :P17_PID
    order by line_item_no deschere on submit, data gets inserted into the another table(fli),(whixh contains all these columns)
    after the page is submitted it returns to same page,
    i want the apex_items's text fields to retain the submitted values after returning to the same page
    can you tell me how to achieve this.
    thanks,
    Little Foot

    hi,
    can you help me to use this collections,
    i have created a collection processdeclare 
      la_cks wwv_flow_global.vc_arr2;
    begin
      htmldb_collection.create_or_truncate_collection('UPDATEE');
      htmldb_collection.create_or_truncate_collection('INSERTT');
      for i in 1..htmldb_application.g_f01.count
      loop
        if htmldb_application.g_f01(i) is not null then
          htmldb_collection.add_member(
              p_collection_name => 'UPDATEE',
              p_c001            => htmldb_application.g_f01(i),
              p_c002            => htmldb_application.g_f02(i),
              p_c003            => htmldb_application.g_f03(i),
              p_c004            => htmldb_application.g_f04(i),
              p_c005            => htmldb_application.g_f06(i),
              p_c006            => htmldb_application.g_f07(i),
              p_c007            => htmldb_application.g_f08(i),
              p_c008            => htmldb_application.g_f09(i));
        else
          htmldb_collection.add_member(
              p_collection_name => 'INSERTT',
              p_c001            => htmldb_application.g_f01(i),
              p_c002            => htmldb_application.g_f02(i),
              p_c003            => htmldb_application.g_f03(i),
              p_c004            => htmldb_application.g_f04(i),
              p_c005            => htmldb_application.g_f06(i),
              p_c006            => htmldb_application.g_f07(i),
              p_c007            => htmldb_application.g_f08(i),
              p_c008            => htmldb_application.g_f09(i));
        end if;
      end loop;
    end;            then when creating a report on collections i am unable to proceed,
    in sql report i used select apex_item.checkbox(1,null) as "check",
           APEX_ITEM.DISPLAY_AND_SAVE(4,line_item_no) as "Line Item No",
           APEX_ITEM.DISPLAY_AND_SAVE(5,line_item) as "line item",
           APEX_ITEM.text(6,module) as "Modulle",
           nvl(rstag,APEX_ITEM.text(7,null)) as "RS tag",
           apex_item.text(2,'klklk',null,null,' readonly="readonly" ') as "FS Name",
           apex_item.text(3,null) as "FS Tag"
          from htmldb_collections
    where collection_name = 'UPDATEE'says rstag invalid indentifier...,
    can you tell me how to use this collections to achieve my purpose.
    i tried http://www.oracle.com/technetwork/developer-tools/apex/tabular-form-090805.html
    so i need to use collections in this way only...!
    can i make collections to just collect values from two columns and then put those values to the respective rows in their columns...!!!
    guide me to achieve my requirement.
    Thanks,
    Little Foot
    Edited by: Little Foot on May 10, 2011 5:00 AM

  • How to keep the form's shape across screens and resolutions?

    Hi All,
    I know that this question is repeated but I didnt found any solutions.
    When I develope a form on a 17 inch monitor and run it from another screen with another dimentions (e.g 15") it looks different the same problem exist when the resolution changed.
    Is there any solution???

    You need to build your forms canvas based on the LOWEST screen resolution you expect the users to use. You especially need to account for users with poor eyesight, who will run with extra low resolutions.
    We code all of our forms to display within the 800 x 600 aspect ratio, because we have some users who need to use that value. Such forms only use a quarter of a full screen on my monitor, but I am not writing forms for only my use.

  • Portlet:namespace val changes on server restart. How to keep it constant?

    Hi -
    I want to generate WinRunner test script, and want to know the IDs of a couple of UI components on a JSF JSP.
    But JSF prefixes each component id with <portlet:namespace/> value. So, I tried to prefix the same value (got it using view source of the actual screen to test) to the components in my test script.
    This works just fine, the way I want it to, but until the server is not restarted.
    Once the server is restarted the value of the <portlet:namespace/> changes (for the same view in same jsp), thus my test script doesn't work.
    Is this expected behavior that for the same view in jsp, the value of <portlet:namespace/> changes after server restart?
    Is there a way to keep the value of <portlet:namespace/> constant for the same view even after server restart?
    Expecting prompt feedback and will highly appreciate it.
    Thanks
    Gagan

    The problem is still there if the jsp file is about inserting a new record
    into the database.
    If these parameters are gotten from the session, mutliple insertings will be
    attempted when the portlet is refresh.
    Maybe we can put some control flags in the session to judge the correct
    behavior, but the method results the session full of parameters(control
    flags).
    Or is there any better design?
    Alan.
    "travis wissink" <[email protected]> ¼¶¼g©ó¶l¥ó
    news:3cc71962$[email protected]..
    >
    Alan,
    You could use the session to put your parameters in instead of letting itride completely
    on the request object. Although, your question is more than just makingthe content
    reappear, it’s about holding state. The project that I am working on, theusers
    decided that they want the page portlets to go back to the "normal" state,not the
    "Maximized" view. So, I put a processor in between the internal.refreshwildcard
    and the Preprocessor input processor so that all the portlets would beseen in their
    "normal" state.
    Good Luck
    -Travis
    "Alan Liu" <[email protected]> wrote:
    Hi All,
    When I click page tabs in WLP, it will trigger a refresh event.
    The portlet has a webflow with a refresh event whose destination is
    lastContentUrl(referent-namespace is portal, cloned from portlet2.wf).
    The question is when the page changed, the jsp files which use
    request.getParameter() to get parameters will fail to fulfill what they
    need because the event provide none parameter.
    So that everytime page changed, these portlets will have quite strange
    contents.
    How to keep these content constant when page changed?
    Sincerely,
    Alan.

  • How to keep together Title + table's line across pages

    Hi all, I have a question.
    I'm trying to create a .rtf template where I have a table with 4 lines and a title <PROJ_NAME>
    I need to repeat this table (with all the necessary information - 4 lines) as many times as the projects' names are stored on the DB.
    For example: if the employee has 4 projects, on the report I will see 4 times these table and the relative project name as title.
    So, the repeating group mechanism works perfectly, but I am not able to control how the table's lines are splitted across pages....
    In other words if I have two pages in my .rtf template and I am at the end of the first page:
    1) I don't want to see the title on the bottom of the first page and the relative table above on the second page (title and table splitted on two differents pages)
    2) I don't want to see the title and a portion of the table on the bottom of the first page and the rest of the table (1,2 or 3 lines) above on the second page (table splitted on two differents pages)
    At the end I'd like to see always title and table together even if the page finishes. If the title + table exced the table's vertical border, it has not be splitted, but rewrite entirely (title + table) on the next page.
    The syntax is this:
    <?for-each-group:G_PROJ;./PROJ_NAME?><?PROJ_NAME?>
    TABLE WITH 4 LINES
    <?end for-each-group?>Page break
    I tried also, reading the forum, to use the paragraph properties (Keep lines together), but nothing.....
    Anyone can suggest me something ?
    Thanks in advance
    Alex

    After the for loop,
    take a table (suppose A) with one row and one column. In that table insert the Project name tag. Below that tag, insert an inner table(suppose B) in table A with 4 rows and columns you wish. Now select the outer table A(select the whole table), and in the table properties/Row , in the options , uncheck the 'Allow row to break across pages' property.
    end the for loop.

  • How to keep the waveform chart updated when changing states in state machine/

    Hello Everyone,
                           Can anyone please sugest me how to keep the waveform chart updated even if I am changing the states in a state machine??
    I am having analog inputs on the waveform chart...
    Thanks in advance...
    Now on LabVIEW 10.0 on Win7

    hello guys,
                    thanks a lot for the suggestions, here is the attached code... please follow the following steps to run it..
    ONce you hit play,press either Start Main/Cyl UP button on the front panel,
    once you start observing the waveforms, you can press the Cyl_Dwn button on the front panel... You can observe that the state changes to Start Counter state,
    and the waveform chart also stops updating... I would like both the waveform charts to conitnuously show the data even if the state is changed....
    Now on LabVIEW 10.0 on Win7
    Attachments:
    Soda Vending MAchine.vi ‏212 KB

  • How can I keep the browser window stretched across my two displays?

    I run am trying to run dual monitor setup and have the Firefox browser span the two monitors. Whenever a Firefox dialog opens, such as Preferences or Print, the window zooms to fit the one primary monitor. How can I keep the browser window stretched across my two displays?

    Thanks very much for your response to my question -very helpful.
    Do you have any recommendations for a good book on Edge Animate?
    Thanks,
    Shaun
    Date: Thu, 25 Oct 2012 17:10:43 -0600
    From: [email protected]
    To: [email protected]
    Subject: How can I change the browser window background color when playing an Edge animation?
        Re: How can I change the browser window background color when playing an Edge animation?
        created by heathrowe in Edge Animate - View the full discussion
    ADD this to compositionReady handler, change the hex color code to your desired color //Force body of webpage to a specific color$("body").css("background-color","#5d5e61"); Darrell
         Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/4801409#4801409
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/4801409#4801409
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/4801409#4801409. In the Actions box on the right, click the Stop Email Notifications link.
         Start a new discussion in Edge Animate by email or at Adobe Community
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • Keep prepared statement across commit

    Hello everyone!
    Is there any way the Oracle keeps prepared statements across commits (same connection, same process)?
    Thank you in advance
    Wolfgang

    Caching this occurs transparently, even across sessions. No need to do anything special...

  • How to keep applet's JFrame alive as browser's closed or, goes to other URL

    My applet has a JFrame that pops up when the applet is downloaded. Right now, if the browser goes to a different page or, if it is closed, the frame disappears.
    I would like to know how to keep the frame alive.
    Thanks.

    These comments applies to using the Applet PlugIn.
    One annoying thing about using the PlugIn is that every time you browse from your applet's page and return, it is destroyed and reinstantiated and then init'ed instead of just stop and start applied on the same applet object. One solution to maintaining state across multiple instances is to use static data. Here is an example that does this with a JFrame, since that is what the poster mentioned, although I usually just do this for the UI on the web page itself.
    This doesn't keep the frame visible when off the web page, but that seems to go against basic applet behavior.
    --Nax
    public class Applet1 extends JApplet
    {     private static JTextArea ui = new JTextArea();
         public void init()
         {     JFrame f = new JFrame("example");
              JScrollPane sp = new JScrollPane(ui);
              f.getContentPane().add(sp);
              f.setSize(200,200);
              f.setVisible(true);
    }

  • How to keep the JSP content constant when page refresh?

    Hi All,
    When I click page tabs in WLP, it will trigger a refresh event.
    The portlet has a webflow with a refresh event whose destination is
    lastContentUrl(referent-namespace is portal, cloned from portlet2.wf).
    The question is when the page changed, the jsp files which use
    request.getParameter() to get parameters will fail to fulfill what they
    need because the event provide none parameter.
    So that everytime page changed, these portlets will have quite strange
    contents.
    How to keep these content constant when page changed?
    Sincerely,
    Alan.

    The problem is still there if the jsp file is about inserting a new record
    into the database.
    If these parameters are gotten from the session, mutliple insertings will be
    attempted when the portlet is refresh.
    Maybe we can put some control flags in the session to judge the correct
    behavior, but the method results the session full of parameters(control
    flags).
    Or is there any better design?
    Alan.
    "travis wissink" <[email protected]> ¼¶¼g©ó¶l¥ó
    news:3cc71962$[email protected]..
    >
    Alan,
    You could use the session to put your parameters in instead of letting itride completely
    on the request object. Although, your question is more than just makingthe content
    reappear, it’s about holding state. The project that I am working on, theusers
    decided that they want the page portlets to go back to the "normal" state,not the
    "Maximized" view. So, I put a processor in between the internal.refreshwildcard
    and the Preprocessor input processor so that all the portlets would beseen in their
    "normal" state.
    Good Luck
    -Travis
    "Alan Liu" <[email protected]> wrote:
    Hi All,
    When I click page tabs in WLP, it will trigger a refresh event.
    The portlet has a webflow with a refresh event whose destination is
    lastContentUrl(referent-namespace is portal, cloned from portlet2.wf).
    The question is when the page changed, the jsp files which use
    request.getParameter() to get parameters will fail to fulfill what they
    need because the event provide none parameter.
    So that everytime page changed, these portlets will have quite strange
    contents.
    How to keep these content constant when page changed?
    Sincerely,
    Alan.

  • How to utilize index in selection statement

    hi
    how to utilize index in selection statement and how is it reduces performance whether another alternative is there to reduce performance .
    thanks

    Hi Suresh,
    For each SQL statement, the database optimizer determines the strategy for accessing data records. Access can be with database indexes (index access), or without database indexes (full table scan).The cost-based database optimizer determines the access strategy on the basis of:
    *Conditions in the WHERE clause of the SQL statement
    *Database indexes of the table(s) affected
    *Selectivity of the table fields contained in the database indexes
    *Size of the table(s) affected
    *The table and index statistics supply information about the selectivity of table fields, the selectivity of combinations of table fields, and table size.     Before a database access is performed, the database optimizer cannot calculate the exact cost of a database access. It uses the information described above to estimate the cost of the database access.The optimization calculation is the amount by which the data blocks to be read (logical read accesses) can be reduced. Data blocks show the level of detail in which data is written to the hard disk or read from the hard disk.
    <b>Inroduction to Database Indexes</b>
    When you create a database table in the ABAP Dictionary, you must specify the combination of fields that enable an entry within the table to be clearly identified. Position these fields at the top of the table field list, and define them as key fields.
    After activating the table, an index is created (for Oracle, Informix, DB2) that consists of all key fields. This index is called a primary index. The primary index is unique by definition. As well as the primary index, you can define one or more secondary indexes for a table in the ABAP Dictionary, and create them on the database. Secondary indexes can be unique or non-unique. Index records and table records are organized in data blocks.
    If you dispatch an SQL statement from an ABAP program to the database, the program searches for the data records requested either in the database table itself (full table scan) or by using an index (index unique scan or index range scan). If all fields requested are found in the index using an index scan, the table records do not need to be accessed.
    A data block shows the level of detail in which data is written to the hard disk or read from the hard disk. Data blocks may contain multiple data records, but a single data record may be spread across several data blocks.
    Data blocks can be index blocks or table blocks. The database organizes the index blocks in the form of a multi-level B* tree. There is a single index block at root level, which contains pointers to the index blocks at branch level. The branch blocks contain either some of the index fields and pointers to index blocks at leaf level, or all index fields and a pointer to the table records organized in table blocks. The index blocks at leaf level contain all index fields and pointers to the table records from the table blocks.
    The pointer that identifies one or more table records has a specific name. It is called, for example, ROWID for Oracle databases. The ROWID consists of the number of the database file, the number of the table block, and the row number within the table block.
    The index records are stored in the index tree and sorted according to index field. This enables accelerated access using the index. The table records in the table blocks are not sorted.
    An index should not consist of too many fields. Having a few very selective fields increases the chance of reusability, and reduces the chance of the database optimizer selecting an unsuitable access path.
    <b>Index Unique Scan</b>
    If, for all fields in a unique index (primary index or unique secondary index), WHERE conditions are specified with '=' in the WHERE clause, the database optimizer selects the access strategy index unique scan.
    For the index unique scan access strategy, the database usually needs to read a maximum of four data blocks (three index blocks and one table block) to access the table record.
    <b><i>select * from VVBAK here vbeln = '00123' ......end select.</i></b>
    In the SELECT statement shown above, the table VVBAK is accessed. The fields MANDT and VBELN form the primary key, and are specified with '=' in the WHERE clause. The database optimizer therefore selects the index unique scan access strategy, and only needs to read four data blocks to find the table record requested.
    <b>Index Range Scan</b>
    <b><i>select * from VVBAP here vbeln = '00123' ......end select.</i></b>
    In the example above, not all fields in the primary index of the table VVBAP (key fields MANDT, VBELN, POSNR) are specified with '=' in the WHERE clause. The database optimizer checks a range of index records and deduces the table records from these index records. This access strategy is called an index range scan.
    To execute the SQL statement, the DBMS first reads a root block (1) and a branch block (2). The branch block contains pointers to two leaf blocks (3 and 4). In order to find the index records that fulfill the criteria in the WHERE clause of the SQL statement, the DBMS searches through these leaf blocks sequentially. The index records found point to the table records within the table blocks (5 and 6).
    If index records from different index blocks point to the same table block, this table block must be read more than once. In the example above, an index record from index block 3 and an index record from index block 4 point to table records in table block 5. This table block must therefore be read twice. In total, seven data blocks (four index blocks and three table blocks) are read.
    The index search string is determined by the concatenation of the WHERE conditions for the fields contained in the index. To ensure that as few index blocks as possible are checked, the index search string should be specified starting from the left, without placeholders ('_' or %). Because the index is stored and sorted according to the index fields, a connected range of index records can be checked, and fewer index blocks need to be read.
    All index blocks and table blocks read during an index range scan are stored in the data buffer at the top of a LRU (least recently used) list. This can lead to many other data blocks being forced out of the data buffer. Consequently, more physical read accesses become necessary when other SQL statements are executed
    <b>DB Indexex :Concatenation</b>
         In the concatenation access strategy, one index is reused. Therefore, various index search strings also exist. An index unique scan or an index range scan can be performed for the various index search strings. Duplicate entries in the results set are filtered out when the search results are concatenated.
    <i><b>Select * from vvbap where vbeln in ('00123', '00133', '00134').
    endselect.</b></i>
    In the SQL statement above, a WHERE condition with an IN operation is specified over field VBELN. The fields MANDT and VBELN are shown on the left of the primary index. Various index search strings are created, and an index range scan is performed over the primary index for each index search string. Finally, the result is concatenated.
    <b>Full Table Scan</b>
    <b><i>select * from vvbap where matnr = '00015'.
    endselect</i></b>
    If the database optimizer selects the full table scan access strategy, the table is read sequentially. Index blocks do not need to be read.
    For a full table scan, the read table blocks are added to the end of an LRU list. Therefore, no data blocks are forced out of the data buffer. As a result, in order to process a full table scan, comparatively little memory space is required within the data buffer.
    The full table scan access strategy is very effective if a large part of a table (for example, 5% of all table records) needs to be read. In the example above, a full table scan is more efficient than access using the primary index.
    <i><b>In Brief</b></i>
    <i>Index unique scan:</i> The index selected is unique (primary index or unique secondary index) and fully specified. One or no table record is returned. This type of access is very effective, because a maximum of four data blocks needs to be read.
    <i>Index range scan:</i> The index selected is unique or non-unique. For a non-unique index, this means that not all index fields are specified in the WHERE clause. A range of the index is read and checked. An index range scan may not be as effective as a full table scan. The table records returned can range from none to all.
    <i>Full table scan:</i> The whole table is read sequentially. Each table block is read once. Since no index is used, no index blocks are read. The table records returned can range from none to all.
    <i>Concatenation:</i> An index is used more than once. Various areas of the index are read and checked. To ensure that the application receives each table record only once, the search results are concatenated to eliminate duplicate entries. The table records returned can range from none to all.
    Regards,
    Balaji Reddy G
    ***Rewards if answers are helpful

  • How to keep track of views of a particular mysql entry

    I have a dynamic website through php and mysql. How do I get my website to keep track of the amount of views each entry got (and for the amount of views to be recorded in my mysql table? Is there an easy way to do this with dreamweaver?

    i do have a column for views but i have do not know how the results would be inputed.
    how do i use that "update statement" you mentioned to input increment view amounts in my column?
    table_name has column for views.
    page is a column in table that is used to dynamically display content based on title in URL parameter ie
    website.com/?page=home
    website.com/?page=about_us
    etc.
    Use query to update views+1 where page = the URL parameter that is entered into address bar to display the dynamic page content.
    $page = "-1";
    if (isset($_GET['page'])) {
    $page = $_GET['page'];
    $query_hits = sprintf("UPDATE table_name
    SET views = views+1
    WHERE page = %s", GetSQLValueString($page, "text"));
    $hits = mysql_query($query_hits, $connection) or die(mysql_error());
    best,
    Shocker

  • How to keep two HD's in sync?

    How to keep two HD's in sync? They both contain my Sample Libraries, one is in my desktop the other in my laptop…essentially they contain the same items, but, the thing is: when I'm working on one I begin to delete, modify and add to the pool, and so the two become out of sync.
    It's hard to know what exactly I've changed where. (So, what I usually do is take out things that I edit and re-save them separately, just in case, but this creates vast quantities of unnecessary duplicates).
    So, what I'd like, would be if I could just keep both of the in sync somehow?
    Here's what I'm thinking:
    What if I was to use Carbon Copy Cloner, and just clone one onto the other, back and forth regularly? (Using incremental backup BTW) Would that be a good idea? I'd be worried that things might get corrupted by being overwritten/modified so regularly? Or would that be OK? I mean what if I had changed a small portion of a sample on one HD and then CCC'd onto the other, is it going to detect such a change? And will it always safely copy it across?
    Thank you so much for any help.

    emirium wrote:
    It's hard to know what exactly I've changed where.
    Here's what I'm thinking:
    What if I was to use Carbon Copy Cloner, and just clone one onto the other, back and forth regularly? (Using incremental backup BTW)
    If you are very strict about changing just one drive at a time, you can use CCC or ChronoSync and I think it will be fine.
    BUT...if you are talking about making changes to both drives and trying to reconcile them, then you need ChronoSync or something similar. Because they allow you to preview exactly which files will be changed, in which direction, before you commit. I use a different utility (FoldersSynchronizer) for this purpose; it looks like ChronoSync achieves this through their Analyze window. At time I have stopped potential unintentional data loss by always previewing the changes.

Maybe you are looking for