Search Results

Search found 76 results on 4 pages for 'cristian boariu'.

Page 2/4 | < Previous Page | 1 2 3 4  | Next Page >

  • Unrecognized configuration section rewriter

    - by Cristian Boariu
    Hi guyrs, I'm trying to implement Approach 3 from this Url Rewriting article. I've added all the required configuration (in web.config for the UrlRewriter module) but when i try to add this in web.config: <rewriter> <rewrite url="~/products/(.+)" to="~/products.aspx?category=$1" /> </rewriter> </configuration> it gives me: Unrecognized configuration section rewriter... Please let me know me WHY it tells me that i put in the wrong place that rewriter xml node? Thanks...

    Read the article

  • itext - pdf to html

    - by Cristian Boariu
    Hi guys, I have spent about 20 hours of coding to produce invoices using iText in c#. Now, i want to use the same code to transform some of the tables to html. Do you know if i can do this? For instance i have this: PdfPTable table = new PdfPTable(3); table.DefaultCell.Border = 0; table.DefaultCell.Padding = 3; table.WidthPercentage = 100; int[] widths = { 100, 200, 100}; table.SetWidths(widths); List listOfCompanyData = (List)getCompanyData(); List listOfCumparatorDreaptaData = (List)getCumparatorDreaptaData(proformaInvoice.getCumparatorDreapta()); table.AddCell((Phrase)listOfCompanyData.Items[0]); table.AddCell(""); table.AddCell((Phrase)listOfCumparatorDreaptaData.Items[0]); and i want to transform this table into html... Is it possible?

    Read the article

  • replace characters which do not matches the ones in a regex

    - by Cristian Boariu
    Hi, I have this regex: private static final String SPACE_PATH_REGEX ="[a-z|A-Z|0-9|\\/|\\-|\\_|\\+]+"; I check if my string matches these regex and IF NOT, i want to replace all characters which are not here, with "_". I;ve tried like: private static final String SPACE_PATH_REGEX_EXCLUDE ="[~a-z|A-Z|0-9|\\/|\\-|\\_|\\+]+"; if (myCompanyName.matches(SPACE_PATH_REGEX)) { myNewCompanySpaceName = myCompanyName; } else{ myNewCompanySpaceName = myCompanyName.replaceAll(SPACE_PATH_REGEX_EXCLUDE, "_"); } but does not work..., so in the 2nd regex "~" seems to not omit the following chars. Any ideea?

    Read the article

  • replace characters which do not match with the ones in a regex

    - by Cristian Boariu
    Hi, I have this regex: private static final String SPACE_PATH_REGEX ="[a-z|A-Z|0-9|\\/|\\-|\\_|\\+]+"; I check if my string matches this regex and IF NOT, i want to replace all characters which are not here, with "_". I've tried like: private static final String SPACE_PATH_REGEX_EXCLUDE = "[~a-z|A-Z|0-9|\\/|\\-|\\_|\\+]+"; if (myCompanyName.matches(SPACE_PATH_REGEX)) { myNewCompanySpaceName = myCompanyName; } else{ myNewCompanySpaceName = myCompanyName.replaceAll( SPACE_PATH_REGEX_EXCLUDE, "_"); } but it does not work..., so in the 2nd regex "~" seems to not omit the following chars. Any idea?

    Read the article

  • unable to find a MessageBodyReader

    - by Cristian Boariu
    Hi guys, I have this interface: @Path("inbox") public interface InboxQueryResourceTest { @POST @Path("{membershipExternalId}/query") @Consumes(MediaType.APPLICATION_XML) @Produces("multipart/mixed") public MultipartOutput query(@PathParam("membershipExternalId") final String membershipExternalId, @QueryParam("page") @DefaultValue("0") final int page, @QueryParam("pageSize") @DefaultValue("10") final int pageSize, @QueryParam("sortProperty") final List<String> sortPropertyList, @QueryParam("sortReversed") final List<Boolean> sortReversed, @QueryParam("sortType") final List<String> sortTypeString, final InstanceQuery instanceQuery) throws IOException; } I have implemented the method to return a MultipartOutput. I am posting an xml query from Fiddler and i receive the result without any problem. BUT i have done an integration test for the same interface, i send the same objects and i put the response like: final MultipartOutput multiPartOutput = getClient().query(getUserRestAuth(), 0, 25, null, null, null, instanceQuery); But here, so from integration tests, i receive a strange error: Unable to find a MessageBodyReader of content-type multipart/mixed;boundary="74c5b6b4-e820-452d-abea-4c56ffb514bb" and type class org.jboss.resteasy.plugins.providers.multipart.MultipartOutput Anyone has any ideea why only in integration tests i receive this error? PS: Some of you will say that i do not send application/xml as ContentType but multipart, which of course is false because the objects are annotated with the required @XmlRootElement etc, otherways neither the POST from Fiddler would work.

    Read the article

  • rich suggestions - why input is null? (seam framework)

    - by Cristian Boariu
    Hi, I'm trying to build a rich suggestions and i do not understand WHY the input value is null... I mean, why inputText value is not taken when i enter something. The .xhtml code: <h:inputText value="#{suggestion.input}" id="text"> </h:inputText> <rich:suggestionbox id="suggestionBoxId" for="text" tokens=",[]" suggestionAction="#{suggestion.getSimilarSpacePaths()}" var="result" fetchValue="#{result.path}" first="0" minChars="2" nothingLabel="No similar space paths found" columnClasses="center" > <h:column> <h:outputText value="#{result.path}" style="font-style:italic"/> </h:column> </rich:suggestionbox> and action class: @Name("suggestion") @Scope(ScopeType.CONVERSATION) public class Suggestion { @In protected EntityManager entityManager; private String input; public String getInput() { return input; } public void setInput(final String input) { this.input = input; } public List<Space> getSimilarSpacePaths() { List<Space> suggestionsList = new ArrayList<Space>(); if (!StringUtils.isEmpty(input) && !input.equals("/")) { final Query query = entityManager.createNamedQuery("SpaceByPathLike"); query.setParameter("path", input + '%'); suggestionsList = (List<Space>) query.getResultList(); } return suggestionsList; } } So, input beeing null, suggestionList is always empty... Why input's value is not posted?

    Read the article

  • jQuery properties - problem

    - by Cristian Boariu
    Hi, I use this plugin: jQuery.i18n.properties I put this code: /* Do stuff when the DOM is ready */ jQuery(document).ready(loadMessage); /* * Add elements behaviours. */ function loadMessage() { jQuery("#customMessage").html("test"); jQuery.i18n.properties({ name:'up_mail_messages', path:'https://static.unifiedpost.com/apps/myup/customer/upmail/upmail_messages/', mode:'both', language:'en', callback: function() { var messageKey = 'up.mail.test'; //alert(eval(messageKey)); jQuery('#customMessage').html(jQuery.i18n.prop(messageKey)); } }); } I do not understand why, in the customeMessage div it prints out: [up.mail.test] instead of the value of it: up.mail.test=messages loaded from en Can anybody show me where i am wrong? I;ve spent about two hours on it without finding any clue... Many Thanks. Ps: here is the message file: https://static.unifiedpost.com/apps/myup/customer/upmail/upmail_messages/up_mail_messages_en.properties

    Read the article

  • nested repeaters - how to sort

    - by Cristian Boariu
    Hi guys, I have a table: Category with some sort of categories category1 category2 category3 I have another table Subcategory which has a fk to Category. So, each category1 can have subcategoryB, subcategoryA, subcategoryZ. Well... i've made two repeaters. The first one is binded to a linq data source which takes the categories from the parent table. The children repeater is binded to that foreign key like: DataSource='<%# Eval("Subcategories_1s") %' So the result is: category1 subcategoryB subcategoryA subcategoryZ category2 etc. Well, the strange question is: how can i order the subcategories alphabetically? If i'd have binded the children repeater to a linq it would be easy. But in this case...?

    Read the article

  • jaxb entity print out as xml

    - by Cristian Boariu
    Hi, I have a class, let's say User adnotated with @XmlRootElement, with some properties (name, surname etc). I use this class for REST operations, as application/xml. The client will POST User class so i want to keep the values in the log. Is there any method in jax-ws to prints out this object as xml? For instance: log.info("Customers sent a USER"+user.whichMethod()); Customer sent a User <user> <name>cristi</name> <surname>kevin</surname> </user> Thanks.

    Read the article

  • c# const in jQuery?

    - by Cristian Boariu
    Hi guys, I have this piece of code in javascript: var catId = $.getURLParam("category"); In my asp.net and c# code for "category" query string i use a public const: public const string CATEGORY = "category"; so if i want to change the query string parameter to be "categoryTest" i only change this const and all the code is updated. Now the question is: how can i do something similar for the javascript i have in the same application (so i want to use the same constant)? I mean i want something like this: var catId = $.getURLParam(CQueryStringParameters.CATEGORY); but because there are none asp.net tags, my const is not interpreted... Any workaround?

    Read the article

  • js works inside the page but not in code behind

    - by Cristian Boariu
    Hi guys, I have this function put in a MasterPage, which shows up an mp3 player: <script type="text/javascript"> $(document).ready(function() { var stageW = 500; var stageH = 216; var cacheBuster = Date.parse(new Date()); var flashvars = {}; var params = {}; params.bgcolor = '#F6F6F6'; params.allowfullscreen = 'true'; flashvars.stageW = stageW; flashvars.stageH = stageH; flashvars.pathToFiles = ''; flashvars.settingsPath = '../mp3player/mp3player_settings.xml'; flashvars.xmlPath = '<%# getRestXmlPlayerUrl() %>'; flashvars.keepSelected = 't'; flashvars.selectedWindow = '4'; flashvars.slideshow = 't'; flashvars.imageWidth = '130'; flashvars.imageHeight = '130'; swfobject.embedSWF('swf/preview.swf?t=' + cacheBuster, 'myContent', stageW, stageH, '9.0.124', 'swf/expressInstall.swf', flashvars, params); }); </script> All works great. But, because i have some ajax on the page with update panel, the flash in not rendered when ajax requests occurs so i need to register this function and i've tried something like this: protected void Page_PreRender(object sender, EventArgs e) { Type cstype = this.GetType(); String csnameForPlayer = "applyStyleToMp3Player"; if (!Page.ClientScript.IsClientScriptBlockRegistered(cstype, csnameForPlayer)) { StringBuilder cstextForPlayer = new StringBuilder(); cstextForPlayer.Append(" $(document).ready(function() { " + " var stageW = 500;" + " var stageH = 216;" + " var cacheBuster = Date.parse(new Date());" + " var flashvars = {};" + " var params = {};" + " params.bgcolor = '#F6F6F6';" + " params.allowfullscreen = 'true';" + " flashvars.stageW = stageW;" + " flashvars.stageH = stageH;" + " flashvars.pathToFiles = '';" + " flashvars.settingsPath = '../mp3player/mp3player_settings.xml';" + " flashvars.xmlPath = '<%# getRestXmlPlayerUrl() %>';" + " flashvars.keepSelected = 't';" + " flashvars.selectedWindow = '4';" + " flashvars.slideshow = 't';" + " flashvars.imageWidth = '130';" + " flashvars.imageHeight = '130';" + " swfobject.embedSWF('swf/preview.swf?t=' + cacheBuster, 'myContent', stageW, stageH, '9.0.124', 'swf/expressInstall.swf', flashvars, params);" + "}); "); ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), csnameForPlayer, cstextForPlayer.ToString(), true); } } Well, this does not work. The flash player does not appear any more, so, i assume that is something wrong in the cstextForPlayer. I've spent over one hour to figure it out but i've failed. Does anyone see the problem? Thanks in advance.

    Read the article

  • diff between two days, in hours

    - by Cristian Boariu
    Hi, I do not uderstand why the result of: (DateTime.Now.Subtract(user.created_time.Value.Date)).Hours is 23. where: DateTime.Now is:{3/30/2010 12:00:00 AM} and user.created_time.Value.Date is : {3/24/2010 12:00:00 AM} Does it make sense for anybody? ps: I want to select all users created in last 72 hours so i suppose that is the way i should do...

    Read the article

  • url rewriting - build paths

    - by Cristian Boariu
    Hi guys, I have started to work on a site without url rewriting. Now, the request is to use friendly urls so i started to use Intelligencia.UrlRewriter. Let's take an example: I have a method: public static string getCategoriesIndexLink(string category) { string baseUrl = getBaseUrl() + (String)HttpContext.GetGlobalResourceObject("Paths", "categorii.index"); return baseUrl.AddQueryParam(CQueryStringParameters.CATEGORY, category); } which build this kind of urls "~/Site/Categorii.aspx?category=$1" Now i've added the following rule in web.config: <rewrite url="~/Site/Categorii/(.+)" to="~/Site/Categorii.aspx?category=$1" /> The question is HOW i can make the above method to build that kind of nice url? So no longer return "~/Site/Categorii.aspx?category=m1" but "~/Site/Categorii/m1" without beeing needed to modify its structure? I mean, i have about 30 methods like the one from the above; it would be extremely helpfull if i can be guided to use a regex at the output of the methods iso modifying the url construction... Thanks in advance...

    Read the article

  • bind a two-dimensional array to a repeater - error

    - by Cristian Boariu
    Hi, I have this array: string[,] productData = new string[5,7]; I bind it to a repeater and a call a method like: <img src="<%# getPhoto1WithReplace(Container.ItemIndex) %>" which is defined like: public String getPhoto1WithReplace(Object itemIndex) { int intItemIndex = Int32.Parse(itemIndex.ToString()); if (productData[intItemIndex, 3] != null) return this.ResolveUrl(productData[intItemIndex, 3].ToString()); else return String.Empty; } I do not understand why it calls getPhoto1WithReplace with itemIndex as 5. My array has 5 indexes: 0,1,2,3,4, so HOW Container.ItemIndex can be 5...?

    Read the article

  • GridView - set selected index by searching through data keys

    - by Cristian Boariu
    Hi, I have a GridView which has DataKey[0] as productId. If i have for instance productId = 54, is there any way to search through all GridView item and set as selected the one who has DataKEy[0] = 54? In drop down list i have : ddlProducts.Items.FindByValue(lblProduct.Text.ToString())).Selected = true Is anything similar for GridView? Thanks in advance.

    Read the article

  • strange parsing Double behaviour...

    - by Cristian Boariu
    Hi, I have this line of code: return (this.pretWithoutDiscount / Double.Parse(UtilsStatic.getEuroValue())).ToString("N2") + "€"; In debug mode i've tested and the values are: UtilsStatic.getEuroValue() = "4.1878" this.pretWithoutDiscount = 111.0 Can anyone explaing WHY: Double.Parse(UtilsStatic.getEuroValue()) = 41878.0 when it should be 4.1878 ?? Thanks... PS: UtilsStatic.getEuroValue returns a string.

    Read the article

  • Pass parameters to a user control - asp.net

    - by Cristian Boariu
    Hi, I have this user control: <user:RatingStars runat="server" product="<%= getProductId() %>" category="<%= getCategoryId() %>"></user:RatingStars> You see that i fill the product and category by calling two methods: public string getProductId() { return productId.ToString(); } public string getCategoryId() { return categoryId.ToString(); } I do not understand why, in the user control, when i take the data received (product and category) it gives me "<%= getProductId() %" instead of giving the id received from that method... Any help would be kindly appreciated...

    Read the article

  • Why await is not taken in consideration after deploy?

    - by Cristian Boariu
    I have a method which does some sync calls to a specific REST api, something like: WSRequestHolder url = WS.url("rest_api_url"); Promise<WS.Response> promisePerPage = url.get(); promisePerPage.getWrappedPromise().await(3000, TimeUnit.MILLISECONDS); WS.Response responsePerPage = promisePerPage.get(); ProductsWrapper productsWrapper = new Gson().fromJson(responsePerPage.getBody(), ProductsWrapper.class); As you notice, I put 3 seconds between calls so each request can be parsed in time and inserted in DB. All works great locally but after I deploy to cloud, all goes continuously, without any more waiting (3 seconds) between requests... Do you know why?

    Read the article

  • page loads twice due to js code

    - by Cristian Boariu
    Hi, I have this div inside a repeater, where i set the class, onmouseover and onmouseout properties from code behind: <div id="Div1" runat="server" class="<%# getClassProduct(Container.ItemIndex) %>" onmouseover="<%# getClassProductOver(Container.ItemIndex) %>" onmouseout="<%# getClassProductOut(Container.ItemIndex) %>"> codebehind: public String getClassProduct(Object index) { int indexItem = Int32.Parse(index.ToString()); if (indexItem == 3) return "produs_box produs_box_wrap overitem lastbox"; else return "produs_box produs_box_wrap overitem"; } public String getClassProductOver(Object index) { int indexItem = Int32.Parse(index.ToString()); if (indexItem == 3) return "this.className='produs_box produs_box_wrap overitem_ lastbox'"; else return "this.className='produs_box produs_box_wrap overitem_'"; } public String getClassProductOut(Object index) { int indexItem = Int32.Parse(index.ToString()); if (indexItem == 3) return "this.className='produs_box produs_box_wrap overitem lastbox'"; else return "this.className='produs_box produs_box_wrap overitem'"; } Well, the problem is that, my Page_Load is fired twice, and there i have some code which i want to execute only ONCE: if (!Page.IsPostBack) { ..code to execute once } This code is fired initially, and after the page is rendered, it is called again, and executed again due to that js... Anyone can recommend a workaround? Thanks in advance.

    Read the article

  • jsf custom control strange behaviour

    - by Cristian Boariu
    hi, I have a jsf custom control which contains this: <rich:column> <c:if test="#{not empty columnTitle}"> <f:facet name="header"> <rich:spacer/> </f:facet> </c:if> <s:link view="#{view}" value="#{messages['edit']}" propagation="#{propagation}"> <f:param name="${paramName}" value="${paramValue}"/> </s:link> &#160; <h:commandLink action="#{entityHome.removeMethodName(entity)}" value="#{messages['remove']}"/> </rich:column> You see that command link action. I want it to call an action like this: action="#{documentHome.removeProperty(property)"} Well, in order to do this i call the control like: <up:columnDetails view="/admin/property.xhtml" columnTitle="yes" entity="#{property}" paramValue="#{property.propertyId}" propagation="nest" entityHome="documentHome" removeMethodName="removeProperty"/> So, i hardcode entityHome and removeMethodName. Well an error is firing. Caused by javax.servlet.ServletException with message: "#{entityHome.removeMethodName(entity)}: javax.el.MethodNotFoundException It seems that it cannot interpret "removeMethodName". If i print entityHome or removeMethodName it correctly shows the values i pass. But i think jsf has an error like not beeing able to "believe" that after an object.something, that something can be a parameter... Can anyone guide me...?

    Read the article

  • strange behaviour of static method

    - by Cristian Boariu
    Hi, I load a js variable like this: var message = '<%= CAnunturi.CPLATA_RAMBURS_INFO %>'; where the static string CPLATA_RAMBURS_INFO i put like: public static string CPLATA_RAMBURS_INFO = "test"; I use it very well in this method. <script type="text/javascript"> var categoryParam = '<%= CQueryStringParameters.CATEGORY %>'; var subcategoryParam = '<%= CQueryStringParameters.SUBCATEGORY1_ID %>'; var message = '<%= CAnunturi.CPLATA_RAMBURS_INFO %>'; function timedInfo(header) { $.jGrowl(message, { header: header }); }; </script> so the message appears. I do not undersand, why, iso of "test", if i take the value from a static method, ths use of message js var is no longer succesfull (the message no longer appears). public static string CPLATA_RAMBURS_INFO = getRambursInfo(); public static string getRambursInfo() { return System.IO.File.ReadAllText(PathsUtil.getRambursPlataFilePath()); } Any help would be highly appreciated....

    Read the article

  • Custom Response + HTTP status?

    - by Cristian Boariu
    Hi, I have a rest interface for my project. For one class i have a POST method where you can post an xml and i RETURN a custom response like: <userInvitation>Invalid email</userInvitation> if the email from the xml which was posted, was incorrect + other custom messages i have defined for different situations. For all of these the HTTP STATUS is automatically put on 200 (OK). Is there any way to change it? Ps: I know that i can throw a web application like : throw new WebApplicationException(Response.Status.BAD_REQUEST); but in this case my custom response is no more included. So i just want to return my custom error + 400 as http response. Thanks in advance.

    Read the article

  • Why my jquery function is not firing on Firefox

    - by Cristian Boariu
    I have some trouble with some jquery method (for some checkboxes I want them to fire on checked/unchecked so I can do something then). This method works perfectly on Chrome and IE but not on latest FF. jQuery(function () { jQuery(':checkbox').change(function () { var counter = jQuery('.count').text(); var thisCheck = jQuery(this); if (thisCheck.is(':checked')) { counter++; //apply green color to the selected row jQuery(this).closest('tr').addClass('checked'); } else { counter--; //remove green color to the selected row jQuery(this).closest('tr').removeClass('checked'); } jQuery('.count').html(counter); //enable export button when there are selected emails to be exported if (counter > 0) { jQuery(".exportButton").removeAttr("disabled", ""); } else { jQuery(".exportButton").attr("disabled", "disabled"); } }); }); Basically it's simply not firing...Even with Debug is not catching the first line (function declare nor other lines too). If I move this javascript(without function declare) inside jQuery(document).ready(function ($) { all works nice on Firefox too... Yes, I do use jQuery.noConflict(); before jQuery(document).ready(function ($) { Do you know why this happens?

    Read the article

  • MapPath strange error

    - by Cristian Boariu
    Hi, I have the following code: string path = "~/Others/Muzica/Demo/"+interpret+"_"+album+"/"; CMSUtils.CreateFolder(MapPath(path)); where CreateFolder method is like: public static void CreateFolder(string path) { if (!System.IO.Directory.Exists(path)) { System.IO.Directory.CreateDirectory(path); } } So i create that folder if it does not exists... All works great locally BUT i do not understand why, if i put it on the server it gives: Failed to map the path '/gramma_prod/Others/Muzica/Demo/Vitamina C_De n-ai fi fost Tu /'. at CMSUtils.CreateFolder(MapPath(path)); I have checked if: /gramma_prod/Others/Muzica/Demo/ exists on the server and of course it exists... Does anybody see the problem?

    Read the article

  • why click on the button is not working on IE?

    - by Cristian Boariu
    Hi guys, I'm just preparing the release of a library site builded in asp.net: http://213.133.103.5/gramma_prod/Site/Index.aspx All it's working great on FF and Chrome but on IE the asp button click event is not working. Please notice the most important buttons: "Adauga in cos" (Add to basket)... I'm just struggling to find out the problem... I've checked the forms to not have nested ones but they seems ok. Could you provide any other ideea? ps: I did not post any code because this problem occurs on all pages... Thanks in advance. Edit: Code for "Add to basket"(Adauga in cos) button from the index: <asp:ImageButton ID="imgBtnCosBooksFeatured" runat="server" OnCommand="addProductToBasket_Click" CommandName="Click" CommandArgument='<%# Eval("Carti_id").ToString()+","+Eval("Titlu").ToString()+","+Eval("Autor").ToString()%>' ImageUrl="../Site/images/featured-cos.jpg" ToolTip="Adauga in cos" /> works ok on ff and chrome. Fails on IE :(

    Read the article

< Previous Page | 1 2 3 4  | Next Page >