How the cursor will come after the text ?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

How the cursor will come after the text ?

gopalbi
Friends please help me...

    I am using focus-field-name="productId" for productId text box. Then the cursor on the productId textbox shows from the beginning. But if i have some data in the textbox then i need cursor will come after the text.
Please help me how to resolve this problem.


Thanks in Advance


Thanks & Regards:
Gopal Bisht
Reply | Threaded
Open this post in threaded view
|

Re: How the cursor will come after the text ?

Scott Gray
Hi Gopal

All focus-field-name does is add a little javascript like this:
document.formname.fieldname.focus();

I gave it a go on my browser and it puts the cursor at the end,
perhaps its an issue with your browser?

Regards
Scott

2008/8/18 gopalbi <[hidden email]>:

>
> Friends please help me...
>
>    I am using focus-field-name="productId" for productId text box. Then the
> cursor on the productId textbox shows from the beginning. But if i have some
> data in the textbox then i need cursor will come after the text.
> Please help me how to resolve this problem.
>
>
> Thanks in Advance
>
>
> Thanks & Regards:
> Gopal Bisht
> --
> View this message in context: http://www.nabble.com/How-the-cursor-will-come-after-the-text---tp19028449p19028449.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>
>
Reply | Threaded
Open this post in threaded view
|

Re: How the cursor will come after the text ?

gopalbi
Hello Scott,
 
    I am doing this thing in the ProductForm.xml :
 <form name="abc" focus-field-name="productId" target="updateabc" title="" type="single" header-row-style="header-row" default-table-style="basic-table" >
             

                <field name="facilityId" title="Package ID"><text size="45" maxlength="60" /></field>
                <field name="productId" title="Products List" ><textarea size="60" maxlength="60" /></field> ---(Here i need focus)
       
                <field name="Button" title="Update"><submit button-type="button" /></field>
</form>

But if i am doing then show the cursor from the beginning. I need cursor start from the end of the text.

Thanks & Regards:
Gopal B
Scott Gray wrote
Hi Gopal

All focus-field-name does is add a little javascript like this:
document.formname.fieldname.focus();

I gave it a go on my browser and it puts the cursor at the end,
perhaps its an issue with your browser?

Regards
Scott

2008/8/18 gopalbi <gopal.bisht@hytechpro.com>:
>
> Friends please help me...
>
>    I am using focus-field-name="productId" for productId text box. Then the
> cursor on the productId textbox shows from the beginning. But if i have some
> data in the textbox then i need cursor will come after the text.
> Please help me how to resolve this problem.
>
>
> Thanks in Advance
>
>
> Thanks & Regards:
> Gopal Bisht
> --
> View this message in context: http://www.nabble.com/How-the-cursor-will-come-after-the-text---tp19028449p19028449.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>
>
Reply | Threaded
Open this post in threaded view
|

Re: How the cursor will come after the text ?

BJ Freeman
I have had this problem, but it was browser related.
I am not sure what caused it, but it has gone away.


gopalbi sent the following on 8/18/2008 3:49 AM:

> Hello Scott,
>  
>     I am doing this thing in the ProductForm.xml :
>  <form name="abc" focus-field-name="productId" target="updateabc" title=""
> type="single" header-row-style="header-row"
> default-table-style="basic-table" >
>              
>
> <field name="facilityId" title="Package ID"><text size="45" maxlength="60"
> /></field>
> <field name="productId" title="Products List" ><textarea size="60"
> maxlength="60" /></field> ---(Here i need focus)
>
> <field name="Button" title="Update"><submit button-type="button"
> /></field>
> </form>
>
> But if i am doing then show the cursor from the beginning. I need cursor
> start from the end of the text.
>
> Thanks & Regards:
> Gopal B
>
> Scott Gray wrote:
>> Hi Gopal
>>
>> All focus-field-name does is add a little javascript like this:
>> document.formname.fieldname.focus();
>>
>> I gave it a go on my browser and it puts the cursor at the end,
>> perhaps its an issue with your browser?
>>
>> Regards
>> Scott
>>
>> 2008/8/18 gopalbi <[hidden email]>:
>>> Friends please help me...
>>>
>>>    I am using focus-field-name="productId" for productId text box. Then
>>> the
>>> cursor on the productId textbox shows from the beginning. But if i have
>>> some
>>> data in the textbox then i need cursor will come after the text.
>>> Please help me how to resolve this problem.
>>>
>>>
>>> Thanks in Advance
>>>
>>>
>>> Thanks & Regards:
>>> Gopal Bisht
>>> --
>>> View this message in context:
>>> http://www.nabble.com/How-the-cursor-will-come-after-the-text---tp19028449p19028449.html
>>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>>>
>>>
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: How the cursor will come after the text ?

Scott Gray
In reply to this post by gopalbi
Sorry I don't know, it works fine for me...

Regards
Scott

2008/8/18 gopalbi <[hidden email]>:

>
> Hello Scott,
>
>    I am doing this thing in the ProductForm.xml :
>  <form name="abc" focus-field-name="productId" target="updateabc" title=""
> type="single" header-row-style="header-row"
> default-table-style="basic-table" >
>
>
>                <field name="facilityId" title="Package ID"><text size="45" maxlength="60"
> /></field>
>                <field name="productId" title="Products List" ><textarea size="60"
> maxlength="60" /></field> ---(Here i need focus)
>
>                <field name="Button" title="Update"><submit button-type="button"
> /></field>
> </form>
>
> But if i am doing then show the cursor from the beginning. I need cursor
> start from the end of the text.
>
> Thanks & Regards:
> Gopal B
>
> Scott Gray wrote:
>>
>> Hi Gopal
>>
>> All focus-field-name does is add a little javascript like this:
>> document.formname.fieldname.focus();
>>
>> I gave it a go on my browser and it puts the cursor at the end,
>> perhaps its an issue with your browser?
>>
>> Regards
>> Scott
>>
>> 2008/8/18 gopalbi <[hidden email]>:
>>>
>>> Friends please help me...
>>>
>>>    I am using focus-field-name="productId" for productId text box. Then
>>> the
>>> cursor on the productId textbox shows from the beginning. But if i have
>>> some
>>> data in the textbox then i need cursor will come after the text.
>>> Please help me how to resolve this problem.
>>>
>>>
>>> Thanks in Advance
>>>
>>>
>>> Thanks & Regards:
>>> Gopal Bisht
>>> --
>>> View this message in context:
>>> http://www.nabble.com/How-the-cursor-will-come-after-the-text---tp19028449p19028449.html
>>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/How-the-cursor-will-come-after-the-text---tp19028449p19029182.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>
>
Reply | Threaded
Open this post in threaded view
|

Re: How the cursor will come after the text ?

Scott Gray
In reply to this post by BJ Freeman
You need to update that file, I think the issue was fixed a few weeks ago

2008/8/18 gopalbi <[hidden email]>:

>
> Yes it is browser problem.At this time is working fine.
>
> I have one question
> When i go to Facility-->Facilities-->Inventoy Search option form. if i am
> putting productId like (WG-1111) then it show the exception like
> -------------------------------------****************------------------------
> :ERROR MESSAGE:
> org.ofbiz.widget.screen.ScreenRenderException: Error rendering screen
> [component://product/widget/facility/FacilityScreens.xml#ViewFacilityInventoryByProduct]:
> groovy.lang.MissingMethodException: No signature of method: static
> org.ofbiz.entity.condition.EntityCondition.makeCondition() is applicable for
> argument types: (java.lang.String, java.lang.Boolean,
> org.ofbiz.entity.condition.EntityOperator$8, java.lang.String,
> java.lang.Boolean) values: {"productId", true, LIKE, "WG-1111%", true} (No
> signature of method: static
> org.ofbiz.entity.condition.EntityCondition.makeCondition() is applicable for
> argument types: (java.lang.String, java.lang.Boolean,
> org.ofbiz.entity.condition.EntityOperator$8, java.lang.String,
> java.lang.Boolean) values: {"productId", true, LIKE, "WG-1111%", true})
>
> -------------------------------------*******************-------------------------------------
>
> I am sending you the groovy file which i am using. I am unable to find where
> is actual problem.But if i am trying with blank productId and then click to
> the Find button then it show the result.
>
>
>
>
> ---------------------------------------ViewFacilityInventoryByProduct.groovy-----------------
>
> import java.util.*
> import java.sql.Timestamp
> import org.ofbiz.base.util.*
> import org.ofbiz.entity.*
> import org.ofbiz.entity.condition.*
> import org.ofbiz.entity.transaction.*
> import org.ofbiz.entity.model.DynamicViewEntity
> import org.ofbiz.entity.model.ModelKeyMap
> import org.ofbiz.entity.util.EntityFindOptions
> import org.ofbiz.product.inventory.*
>
> action = request.getParameter("action");
>
> searchParameterString = "";
> searchParameterString = "action=Y&facilityId=" + facilityId;
>
> offsetQOH = -1;
> offsetATP = -1;
> hasOffsetQOH = false;
> hasOffsetATP = false;
>
> rows = [] as ArrayList;
>
> if (action) {
>    // ------------------------------
>    prodView = new DynamicViewEntity();
>    conditionMap = [facilityId : facilityId];
>
>    if (offsetQOHQty) {
>        try {
>            offsetQOH = Integer.parseInt(offsetQOHQty);
>            hasOffsetQOH = true;
>            searchParameterString = searchParameterString + "&offsetQOHQty="
> + offsetQOH;
>        } catch(NumberFormatException nfe) {
>        }
>    }
>    if (offsetATPQty) {
>        try {
>            offsetATP = Integer.parseInt(offsetATPQty);
>            hasOffsetATP = true;
>            searchParameterString = searchParameterString + "&offsetATPQty="
> + offsetATP;
>        } catch(NumberFormatException nfe) {
>        }
>    }
>
>    prodView.addMemberEntity("PRFA", "ProductFacility");
>    prodView.addAliasAll("PRFA", null);
>
>    prodView.addMemberEntity("PROD", "Product");
>    prodView.addViewLink("PROD", "PRFA", Boolean.FALSE,
> ModelKeyMap.makeKeyMapList("productId"));
>    prodView.addAlias("PROD", "internalName");
>    prodView.addAlias("PROD", "isVirtual");
>    prodView.addAlias("PROD", "salesDiscontinuationDate");
>    if (productTypeId) {
>        prodView.addAlias("PROD", "productTypeId");
>        conditionMap.productTypeId = productTypeId;
>        searchParameterString = searchParameterString + "&productTypeId=" +
> productTypeId;
>    }
>    if (searchInProductCategoryId) {
>        prodView.addMemberEntity("PRCA", "ProductCategoryMember");
>        prodView.addViewLink("PRFA", "PRCA", Boolean.FALSE,
> ModelKeyMap.makeKeyMapList("productId"));
>        prodView.addAlias("PRCA", "productCategoryId");
>        conditionMap.productCategoryId = searchInProductCategoryId;
>        searchParameterString = searchParameterString +
> "&searchInProductCategoryId=" + searchInProductCategoryId;
>    }
>
>    if (productSupplierId) {
>        prodView.addMemberEntity("SPPR", "SupplierProduct");
>        prodView.addViewLink("PRFA", "SPPR", Boolean.FALSE,
> ModelKeyMap.makeKeyMapList("productId"));
>        prodView.addAlias("SPPR", "partyId");
>        conditionMap.partyId = productSupplierId;
>        searchParameterString = searchParameterString +
> "&productSupplierId=" + productSupplierId;
>    }
>
>    // set distinct on so we only get one row per product
>    findOpts = new EntityFindOptions(true,
> EntityFindOptions.TYPE_SCROLL_INSENSITIVE,
> EntityFindOptions.CONCUR_READ_ONLY, true);
>    searchCondition = EntityCondition.makeCondition(conditionMap,
> EntityOperator.AND);
>    notVirtualCondition =
> EntityCondition.makeCondition(EntityCondition.makeCondition("isVirtual",
> EntityOperator.EQUALS, null),
>                                                         EntityOperator.OR,
>
> EntityCondition.makeCondition("isVirtual", EntityOperator.NOT_EQUAL, "Y"));
>
>    whereConditionsList = [searchCondition, notVirtualCondition];
>    // add the discontinuation date condition
>    if (productsSoldThruTimestamp) {
>        discontinuationDateCondition = EntityCondition.makeCondition(
>               [
>                EntityCondition.makeCondition("salesDiscontinuationDate",
> EntityOperator.EQUALS, null),
>                EntityCondition.makeCondition("salesDiscontinuationDate",
> EntityOperator.GREATER_THAN, productsSoldThruTimestamp)
>               ],
>               EntityOperator.OR);
>        whereConditionsList.add(discontinuationDateCondition);
>        searchParameterString = searchParameterString +
> "&productsSoldThruTimestamp=" + productsSoldThruTimestamp;
>    }
>
>    // add search on internal name
>    if (internalName) {
>
> whereConditionsList.add(EntityCondition.makeCondition("internalName", true,
> EntityOperator.LIKE, "%" + internalName + "%", true));
>        searchParameterString = searchParameterString + "&internalName=" +
> internalName;
>    }
>
>    // add search on productId
>    if (productId) {
>        whereConditionsList.add(EntityCondition.makeCondition("productId",
> true, EntityOperator.LIKE, productId + "%", true));
>        searchParameterString = searchParameterString + "&productId=" +
> productId;
>    }
>    whereCondition = EntityCondition.makeCondition(whereConditionsList,
> EntityOperator.AND);
>
>    beganTransaction = false;
>    List prods = null;
>    try {
>        beganTransaction = TransactionUtil.begin();
>        prodsEli = delegator.findListIteratorByCondition(prodView,
> whereCondition, null, null, ['productId'], findOpts);
>        prods = prodsEli.getCompleteList();
>        prodsEli.close();
>    } catch (GenericEntityException e) {
>        errMsg = "Failure in operation, rolling back transaction";
>        Debug.logError(e, errMsg, "ViewFacilityInventoryByProduct");
>        try {
>            // only rollback the transaction if we started one...
>            TransactionUtil.rollback(beganTransaction, errMsg, e);
>        } catch (GenericEntityException e2) {
>            Debug.logError(e2, "Could not rollback transaction: " +
> e2.toString(), "ViewFacilityInventoryByProduct");
>        }
>        // after rolling back, rethrow the exception
>        throw e;
>    } finally {
>        // only commit the transaction if we started one... this will throw
> an exception if it fails
>        TransactionUtil.commit(beganTransaction);
>    }
>
>    // If the user has specified a number of months over which to sum usage
> quantities, define the correct timestamp
>    Timestamp checkTime = null;
>    monthsInPastLimitStr = request.getParameter("monthsInPastLimit");
>    if (monthsInPastLimitStr) {
>        try {
>            monthsInPastLimit = Integer.parseInt(monthsInPastLimitStr);
>            cal = UtilDateTime.toCalendar(null);
>            cal.add(Calendar.MONTH, 0 - monthsInPastLimit);
>            checkTime = UtilDateTime.toTimestamp(cal.getTime());
>            searchParameterString += "&monthsInPastLimit=" +
> monthsInPastLimitStr;
>        } catch (Exception e) {
>            // Ignore
>        }
>    }
>
>    prods.each { oneProd ->
>        oneInventory = [:];
>        oneInventory.checkTime = checkTime;
>        oneInventory.facilityId = facilityId;
>        oneInventory.productId = oneProd.productId;
>        oneInventory.minimumStock = oneProd.minimumStock as String;
>        oneInventory.reorderQuantity = oneProd.reorderQuantity;
>        oneInventory.daysToShip = oneProd.daysToShip;
>        rows.add(oneInventory);
>    }
>
> }
> context.inventoryByProduct = rows;
> context.searchParameterString = searchParameterString;
>
> -----------------------------------------END--------------------------------------------
>
>
>
> BJ Freeman wrote:
>>
>> I have had this problem, but it was browser related.
>> I am not sure what caused it, but it has gone away.
>>
>>
>> gopalbi sent the following on 8/18/2008 3:49 AM:
>>> Hello Scott,
>>>
>>>     I am doing this thing in the ProductForm.xml :
>>>  <form name="abc" focus-field-name="productId" target="updateabc"
>>> title=""
>>> type="single" header-row-style="header-row"
>>> default-table-style="basic-table" >
>>>
>>>
>>>              <field name="facilityId" title="Package ID"><text size="45"
>>> maxlength="60"
>>> /></field>
>>>              <field name="productId" title="Products List" ><textarea size="60"
>>> maxlength="60" /></field> ---(Here i need focus)
>>>
>>>              <field name="Button" title="Update"><submit button-type="button"
>>> /></field>
>>> </form>
>>>
>>> But if i am doing then show the cursor from the beginning. I need cursor
>>> start from the end of the text.
>>>
>>> Thanks & Regards:
>>> Gopal B
>>>
>>> Scott Gray wrote:
>>>> Hi Gopal
>>>>
>>>> All focus-field-name does is add a little javascript like this:
>>>> document.formname.fieldname.focus();
>>>>
>>>> I gave it a go on my browser and it puts the cursor at the end,
>>>> perhaps its an issue with your browser?
>>>>
>>>> Regards
>>>> Scott
>>>>
>>>> 2008/8/18 gopalbi <[hidden email]>:
>>>>> Friends please help me...
>>>>>
>>>>>    I am using focus-field-name="productId" for productId text box. Then
>>>>> the
>>>>> cursor on the productId textbox shows from the beginning. But if i have
>>>>> some
>>>>> data in the textbox then i need cursor will come after the text.
>>>>> Please help me how to resolve this problem.
>>>>>
>>>>>
>>>>> Thanks in Advance
>>>>>
>>>>>
>>>>> Thanks & Regards:
>>>>> Gopal Bisht
>>>>> --
>>>>> View this message in context:
>>>>> http://www.nabble.com/How-the-cursor-will-come-after-the-text---tp19028449p19028449.html
>>>>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>>>>>
>>>>>
>>>>
>>>
>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/How-the-cursor-will-come-after-the-text---tp19028449p19029565.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>
>